Place the following lines into the
<head> section of your page:
wtrmanualselects the element for running WTraffic inside it. The element have the style
position: relative(given in wtr.css), so another
positionstyle is not possible. If the user intends to use some of the keyboard commands, then it's the user's responsibility to assure, that the element is focusable adding the HTML attribute
The two possible class name differ in the way, how the presentation starts.
wtrautostarts immediately, when the page loaded
wtrmanualplaces buttons into the element to start, stop and pause the presentation.
rootattribute gives a section name in the standard timetable. The named section - and all sections below it - will run in this WTraffic instance.
ttattribute gives a short timetable for WTraffic. At this moment this immediate timetable can contain only movements; no section commands ($SECTION, $GROUP, $SCENE) are allowed. It is intended to allow section commands in the future in the immediate timetable.
Additionally parameters for starting section command - or for the
implicit root section command in case of the immediate timetable lines - can be added,
A few examples:
<div id='tr1' class='wtrmanual' style='width:100%;height:100px;' tabindex='0' data-tt=' C=DB_4_221; C=DB_4_221S1OB;D=X; '> </div>
<div id='tr2' class='wtrauto' style='width:100%;height:200px;' tabindex='0' data-root='MM_GHIST' data-ab='5' data-bl='10' data-st='0.8' > </div>
If you intend to run WTraffic on the whole page, there is a ready page, which can be controlled by the
query part of the URL. It is the
If you do not specify the root section name, temporarily the section name
WTR is used - it marks
a subset of the standard timetable, which already runs in WTraffic since spring 2021.
It was for your convenience: not to start accidentally parts not functioning yet.
If you want to start the whole standard timetable, please specify
You can select every section in the timetable as the root section -
listed on the Sections page - the whole Traffic standard timetable is available there.
As now the whole Traffic standard timetable is running in WTraffic, there is not need for special caution.
Nevertheless, if you want to be on the safe side, the
WTraffic Demo chapter in the table of content
lists pages, which are functioning (it is possible, that there are a few smaller problems - for example,
a large bus runs without a street line). Check back in 1-2 month intervals, and you will find a growing
set of functioning WTraffic scenes.
This way - invoking WTraffic on a full page, not creating an own HTML page with the containing <div> elements - does not provide the possibility to use a short, own timetable.