1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN" "https://www.web3d.org/specifications/x3d-3.0.dtd">
|
3 | <X3D profile='Immersive' version='3.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.0.xsd'> |
4 | <head> |
5 | <meta name='title' content=' DvdControllerPrototype.x3d '/> |
6 | <meta name='description' content='Digital Virtual Display (DVD) Controller Prototype definition to control animation timing. Heads-up display keeps DVD Controller on screen.'/> |
7 | <meta name='creator' content='Jane Wu, Don Brutzman, Jonathan Roberts'/> |
8 | <meta name='created' content='19 July 2001'/> |
9 | <meta name='modified' content='5 March 2024'/> |
10 | <meta name='subject' content='DvdController animation control'/> |
11 | <meta name=' TODO ' content=' check handling of beginning/end buttos '/> |
12 | <meta name=' TODO ' content=' X3D-Edit ExternProtoDeclare panel autocheck missed notifying that some fields are not in original ProtoDeclare '/> |
13 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerPrototype.x3d '/> |
14 | <meta name='generator' content='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
15 | <meta name='license' content='../../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <WorldInfo title='DvdControllerPrototype.x3d'/> |
19 | <ExternProtoDeclare name='SliderFloat' appinfo='Slider user-interface widget that produces floating-point output values' url=' "../../../Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.x3d#SliderFloat" "../../../Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat" "https://www.web3d.org/x3d/content/examples/Savage/Tools/Animation/SliderFloatPrototype.wrl#SliderFloat" '> |
20 | <!-- TODO autocheck missed that these are not in original ProtoDeclare... do these go into DvdController interface? <field accessType='outputOnly' name='isDragged' type='SFBool'/> <field accessType='initializeOnly' appinfo='default value true' name='dragEnabled' type='SFBool'/> <field accessType='inputOnly' name='setDragEnabled' type='SFBool'/> <field accessType='outputOnly' name='dragEnabledChanged' type='SFBool'/> <field accessType='initializeOnly' appinfo='default value true' name='clickEnabled' type='SFBool'/> <field accessType='inputOnly' name='setClickEnabled' type='SFBool'/> <field accessType='outputOnly' name='clickEnabledChanged' type='SFBool'/> --> |
21 |
<field name='layoutDirection' type='SFString' accessType='initializeOnly'
appinfo='Allowed values: vertical, horizontal'/> |
22 |
<field name='height' type='SFFloat' accessType='initializeOnly'
appinfo='default value 1.0'/> |
23 |
<field name='radius' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.1'/> |
24 |
<field name='barRadius' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.02'/> |
25 |
<field name='sliderBarColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .8 .4 .8'/> |
26 |
<field name='sliderBallColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .3 .4 .8'/> |
27 |
<field name='sliderEndColor' type='SFColor' accessType='initializeOnly'
appinfo='default value .2 .3 .9'/> |
28 |
<field name='min' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.0'/> |
29 |
<field name='max' type='SFFloat' accessType='initializeOnly'
appinfo='default value 10.0'/> |
30 |
<field name='value' type='SFFloat' accessType='initializeOnly'
appinfo='default value 0.0'/> |
31 | <field name='setMin' type='SFFloat' accessType='inputOnly'/> |
32 | <field name='setMax' type='SFFloat' accessType='inputOnly'/> |
33 | <field name='setValue' type='SFFloat' accessType='inputOnly'/> |
34 | <field name='valueChanged' type='SFFloat' accessType='outputOnly'/> |
35 |
<field name='traceEnabled' type='SFBool' accessType='initializeOnly'
appinfo='Enable/disable console output for troubleshooting'/> |
36 | </ExternProtoDeclare> |
37 | <ProtoDeclare name='DvdController' appinfo='Digital Virtual Display (DVD) Controller Prototype is a heads-up display (HUD) to control animation timing'> |
38 | <ProtoInterface> |
39 |
<field name='testTimeVal' type='SFTime' value='-2' accessType='initializeOnly'
appinfo='default value -2'/> |
40 |
<field name='description' type='SFString' accessType='initializeOnly'
appinfo='Short description of what is animated by this DvdController.'/> |
41 |
<field name='playEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='Whether or not play mode is enabled including during startup.'/> |
42 |
<field name='displayMode' type='SFString' value='PLAYBACK_SLIDER' accessType='initializeOnly'
appinfo='Initializes how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE.'/> |
43 |
<field name='setDisplayMode' type='SFString' accessType='inputOnly'
appinfo='Sets how control buttons and slider are displayed. The control buttons include DIS control (i.e. Master Ghost Local) and Playback control (i.e. Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset to End). Possible values are (case sensitive): ALL DIS_ONLY PLAYBACK_ONLY SLIDER_ONLY DIS_PLAYBACK DIS_SLIDER PLAYBACK_SLIDER and NONE.'/> |
44 |
<field name='buttonColor' type='SFColor' value='0.55 0.55 0.55' accessType='initializeOnly'
appinfo='Default button color.'/> |
45 |
<field name='selectedButtonColor' type='SFColor' value='0.75 0.75 0.75' accessType='initializeOnly'
appinfo='Button color when selected by user.'/> |
46 |
<field name='labelColor' type='SFColor' value='0 0 0' accessType='initializeOnly'
appinfo='Default label color.'/> |
47 |
<field name='selectedLabelColor' type='SFColor' value='0.1 0.65 0.2' accessType='initializeOnly'
appinfo='Label color when selected by user.'/> |
48 |
<field name='locationOffset' type='SFVec3f' value='-2 -2 0' accessType='initializeOnly'
appinfo='Modified screen location and distance (for size).'/> |
49 |
<field name='clockEnabled' type='SFBool' value='true' accessType='initializeOnly'
appinfo='default value true'/> |
50 |
<field name='cycleInterval' type='SFTime' value='1.0' accessType='initializeOnly'
appinfo='Time for complete loop cycle in seconds.'/> |
51 | <field name='set_cycleInterval' type='SFTime' accessType='inputOnly'/> |
52 | <field name='cycleInterval_changed' type='SFTime' accessType='outputOnly'/> |
53 |
<field name='speedFactor' type='SFFloat' value='10' accessType='initializeOnly'
appinfo='Factor used to determine the speed increase/decrease for Fast Rewind and Fast Forward action.'/> |
54 | <field name='isActive' type='SFBool' accessType='outputOnly'/> |
55 | <field name='startTime_changed' type='SFTime' accessType='outputOnly'/> |
56 | <field name='stopTime_changed' type='SFTime' accessType='outputOnly'/> |
57 | <field name='time_changed' type='SFTime' accessType='outputOnly'/> |
58 | <field name='fraction_changed' type='SFFloat' accessType='outputOnly'/> |
59 | <field name='secondsElapsed' type='SFTime' accessType='outputOnly'/> |
60 |
<field name='isMaster' type='SFBool' accessType='outputOnly'
appinfo='isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.'/> |
61 |
<field name='isRemote' type='SFBool' accessType='outputOnly'
appinfo='isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.'/> |
62 |
<field name='isLocal' type='SFBool' accessType='outputOnly'
appinfo='isMaster isRemote and isLocal are booleans represent a 3-way toggle. Only one of them can have a true value at any time.'/> |
63 |
<field name='isPaused' type='SFBool' accessType='outputOnly'
appinfo='isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa.'/> |
64 |
<field name='isRunning' type='SFBool' accessType='outputOnly'
appinfo='isPaused and isRunning always have opposite values. When isPaused is true isRunning will be false and vice versa.'/> |
65 |
<field name='traceEnabled' type='SFBool' value='false' accessType='initializeOnly'
appinfo='Enable/disable console output for troubleshooting'/> |
66 | </ProtoInterface> |
67 | <ProtoBody> |
68 | <Transform DEF='LocationOffset'> |
69 | <IS> |
70 | <connect nodeField='translation' protoField='locationOffset'/> |
71 | </IS> |
72 |
<!-- ROUTE information for WhereSensor node:
[from position_changed to FixedLocation.set_translation
]
[from orientation_changed to FixedLocation.set_rotation
]
-->
<ProximitySensor DEF='WhereSensor' size='1000000000 1000000000 1000000000'/> |
73 |
<!-- ROUTE information for FixedLocation node:
[from WhereSensor.position_changed to set_translation
]
[from WhereSensor.orientation_changed to set_rotation
]
-->
<Transform DEF='FixedLocation'> |
74 |
<!-- ROUTE information for MovableLocation node:
[from PlaneMovementSensor.translation_changed to set_translation
]
[from VisibilityControlScript.translationChanged to set_translation
]
-->
<Transform DEF='MovableLocation'> |
75 | <Transform translation='0 0 -10'> |
76 | <Group DEF='PlaneMovementSensorGroup'> |
77 |
<!-- ROUTE information for PlaneMovementSensor node:
[from VisibilityControlScript.translationOffsetChanged to set_offset
]
[from isActive to VisibilityControlScript.setPlaneSensorIsActive
]
[from translation_changed to VisibilityControlScript.setPlaneSensorTranslation
]
[from translation_changed to MovableLocation.set_translation
]
-->
<PlaneSensor DEF='PlaneMovementSensor' description='select and drag to move interface'/> |
78 |
<!-- ROUTE information for MovementVisibilitySensor node:
[from isActive to VisibilityControlScript.setIsVisible
]
-->
<VisibilitySensor DEF='MovementVisibilitySensor'/> |
79 |
<!-- ROUTE information for VisibilityControlScript node:
[from PlaneMovementSensor.isActive to setPlaneSensorIsActive
]
[from PlaneMovementSensor.translation_changed to setPlaneSensorTranslation
]
[from MovementVisibilitySensor.isActive to setIsVisible
]
[from translationChanged to MovableLocation.set_translation
]
[from translationOffsetChanged to PlaneMovementSensor.set_offset
]
-->
<Script DEF='VisibilityControlScript'> |
80 | <field name='description' type='SFString' accessType='initializeOnly'/> |
81 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
82 | <field name='isVisible' type='SFBool' value='true' accessType='initializeOnly'/> |
83 | <field name='locationOffset' type='SFVec3f' accessType='initializeOnly'/> |
84 | <field name='planeSensorTranslation' type='SFVec3f' value='0 0 0' accessType='initializeOnly'/> |
85 | <field name='setIsVisible' type='SFBool' accessType='inputOnly'/> |
86 | <field name='setPlaneSensorIsActive' type='SFBool' accessType='inputOnly'/> |
87 | <field name='setPlaneSensorTranslation' type='SFVec3f' accessType='inputOnly'/> |
88 | <field name='translationChanged' type='SFVec3f' accessType='outputOnly'/> |
89 | <field name='translationOffsetChanged' type='SFVec3f' accessType='outputOnly'/> |
90 | <IS> |
91 | <connect nodeField='description' protoField='description'/> |
92 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
93 | <connect nodeField='locationOffset' protoField='locationOffset'/> |
94 | </IS> |
<![CDATA[
ecmascript: function tracePrint (text) { if (traceEnabled) Browser.println ('[DvdController ' + description + ' VisibilityControlScript] ' + text); } function initialize () { translationOffsetChanged = locationOffset; planeSensorTranslation = locationOffset; setPlaneSensorIsActive (false, -1); // dummy timeStamp } function setIsVisible (value, timeStamp) { isVisible = value; tracePrint('isVisible=' + value); } function setPlaneSensorIsActive (value, timeStamp) { tracePrint('PlaneSensor isActive=' + value + ', translationOffsetChanged=' + translationOffsetChanged.toString()); if (value == false) { tracePrint('planeSensorTranslation=' + planeSensorTranslation.toString()); if (isVisible) { translationChanged = planeSensorTranslation; } else { translationChanged = new SFVec3f(0, 0, 0); translationOffsetChanged = new SFVec3f(0, 0, 0); } } } function setPlaneSensorTranslation (value, timeStamp) { planeSensorTranslation = value; tracePrint('planeSensorTranslation=' + value.toString()); }
]]>
|
|
96 | </Script> |
97 | < ROUTE fromNode='PlaneMovementSensor' fromField='isActive' toNode='VisibilityControlScript' toField='setPlaneSensorIsActive'/> |
98 | < ROUTE fromNode='PlaneMovementSensor' fromField='translation_changed' toNode='VisibilityControlScript' toField='setPlaneSensorTranslation'/> |
99 | < ROUTE fromNode='MovementVisibilitySensor' fromField='isActive' toNode='VisibilityControlScript' toField='setIsVisible'/> |
100 |
<!-- ROUTE information for MovementControlSwitch node:
[from DisplayLayerScript.movementControlSwitchSelection to whichChoice
]
-->
<Switch DEF='MovementControlSwitch' whichChoice='0'> |
101 | <Transform DEF='AllLayer' translation='-0.25 0 0'> |
102 | <Shape> |
103 |
<!-- Appearance
MovementControlAppearance is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Appearance DEF='MovementControlAppearance'> |
104 | <Material diffuseColor='0.65 0.65 0.65'/> |
105 | </Appearance> |
106 | <Box size='0.25 1.75 0.05'/> |
107 | </Shape> |
108 | </Transform> |
109 | <Transform DEF='TwoLayer' translation='-0.25 -0.285 0'> |
110 | <Shape> |
111 | <Appearance USE='MovementControlAppearance'/> |
112 | <Box size='0.25 1.175 0.05'/> |
113 | </Shape> |
114 | </Transform> |
115 | <Transform DEF='OneLayer' translation='-0.25 -0.575 0'> |
116 | <Shape> |
117 | <Appearance USE='MovementControlAppearance'/> |
118 | <Box size='0.25 0.6 0.05'/> |
119 | </Shape> |
120 | </Transform> |
121 | </Switch> |
122 | </Group> |
123 |
<!-- ROUTE information for DisplayControlSwitch node:
[from DisplayLayerScript.displayControlSwitchSelection to whichChoice
]
-->
<Switch DEF='DisplayControlSwitch' whichChoice='0'> |
124 | <Transform DEF='DisplayAllLayer'> |
125 | <Transform DEF='DisplayAllToggle'> |
126 | <Shape> |
127 | |
128 | <Material diffuseColor='0.65 0.65 0.65'/> |
129 | </Appearance> |
130 | <Box size='0.25 1.75 0.05'/> |
131 | </Shape> |
132 |
<!-- TouchSensor
DisplayAllSensor is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3
<!-- ROUTE information for DisplayAllSensor node: [from isActive to DisplayLayerScript.displayAllToggleEnabled ] --> <TouchSensor DEF='DisplayAllSensor' description='display/hide all rows'/> |
133 | <Shape> |
134 | <Appearance> |
135 |
<!-- Material
DisplayAllMaterial is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3
<!-- ROUTE information for DisplayAllMaterial node: [from DisplayLayerScript.displayAllColor to diffuseColor ] --> <Material DEF='DisplayAllMaterial' diffuseColor='0 0.35 0.8'/> |
136 | </Appearance> |
137 | <Cylinder height='1.65' radius='0.1'/> |
138 | </Shape> |
139 | </Transform> |
140 | <Transform DEF='DisplayTopLayerToggle' translation='0.25 0.575 0'> |
141 | <Shape> |
142 | <Appearance USE='ButtonBaseAppearance'/> |
143 | <Box size='0.25 0.6 0.05'/> |
144 | </Shape> |
145 |
<!-- ROUTE information for DisplayTopLayerSensor node:
[from isActive to DisplayLayerScript.topLayerToggleEnabled
]
-->
<TouchSensor DEF='DisplayTopLayerSensor' description='hide top row'/> |
146 | <Shape> |
147 | <Appearance> |
148 |
<!-- Material
DisplayControlMaterial is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <Material DEF='DisplayControlMaterial' diffuseColor='0 0.35 0.8'/> |
149 | </Appearance> |
150 | <Cylinder height='0.5' radius='0.1'/> |
151 | </Shape> |
152 | </Transform> |
153 |
<!-- Transform
DisplayMidLayerToggle is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='DisplayMidLayerToggle' translation='0.25 0 0'> |
154 | <Shape> |
155 | <Appearance USE='ButtonBaseAppearance'/> |
156 | <Box size='0.25 0.6 0.05'/> |
157 | </Shape> |
158 |
<!-- ROUTE information for DisplayMidLayerSensor node:
[from isActive to DisplayLayerScript.midLayerToggleEnabled
]
-->
<TouchSensor DEF='DisplayMidLayerSensor' description='hide middle row'/> |
159 | <Shape> |
160 | <Appearance> |
161 | <Material USE='DisplayControlMaterial'/> |
162 | </Appearance> |
163 | <Cylinder height='0.5' radius='0.1'/> |
164 | </Shape> |
165 | </Transform> |
166 |
<!-- Transform
DisplayBottomLayerToggle is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Transform DEF='DisplayBottomLayerToggle' translation='0.25 -0.575 0'> |
167 | <Shape> |
168 | <Appearance USE='ButtonBaseAppearance'/> |
169 | <Box size='0.25 0.6 0.05'/> |
170 | </Shape> |
171 |
<!-- ROUTE information for DisplayBottomLayerSensor node:
[from isActive to DisplayLayerScript.bottomLayerToggleEnabled
]
-->
<TouchSensor DEF='DisplayBottomLayerSensor' description='hide bottom row'/> |
172 | <Shape> |
173 | <Appearance> |
174 | <Material USE='DisplayControlMaterial'/> |
175 | </Appearance> |
176 | <Cylinder height='0.5' radius='0.1'/> |
177 | </Shape> |
178 | </Transform> |
179 | </Transform> |
180 | <Transform DEF='DisplayTwoLayer'> |
181 | <Transform DEF='DisplayTwoToggle' translation='0 -0.285 0'> |
182 | <Shape> |
183 | <Appearance USE='ButtonBaseAppearance'/> |
184 | <Box size='0.25 1.175 0.05'/> |
185 | </Shape> |
186 | <TouchSensor USE='DisplayAllSensor'/> |
187 | <Shape> |
188 | <Appearance> |
189 | <Material USE='DisplayAllMaterial'/> |
190 | </Appearance> |
191 | <Cylinder height='1.08' radius='0.1'/> |
192 | </Shape> |
193 | </Transform> |
194 | <Transform USE='DisplayMidLayerToggle'/> |
195 | <Transform USE='DisplayBottomLayerToggle'/> |
196 | </Transform> |
197 | <Transform DEF='DisplayOneLayer'> |
198 | <Transform DEF='DisplayOneToggle' translation='0 -0.575 0'> |
199 | <Shape> |
200 | <Appearance USE='ButtonBaseAppearance'/> |
201 | <Box size='0.25 0.6 0.05'/> |
202 | </Shape> |
203 | <TouchSensor USE='DisplayAllSensor'/> |
204 | <Shape> |
205 | <Appearance> |
206 | <Material USE='DisplayAllMaterial'/> |
207 | </Appearance> |
208 | <Cylinder height='0.5' radius='0.1'/> |
209 | </Shape> |
210 | </Transform> |
211 | <Transform USE='DisplayBottomLayerToggle'/> |
212 | </Transform> |
213 | <Transform DEF='DisplayNoLayer'> |
214 | <Transform DEF='DisplayNoToggle' translation='0 -0.575 0'> |
215 | <Shape> |
216 | <Appearance USE='ButtonBaseAppearance'/> |
217 | <Box size='0.25 0.6 0.05'/> |
218 | </Shape> |
219 | <TouchSensor USE='DisplayAllSensor'/> |
220 | <Shape> |
221 | <Appearance> |
222 | <Material USE='DisplayAllMaterial'/> |
223 | </Appearance> |
224 | <Cylinder height='0.5' radius='0.1'/> |
225 | </Shape> |
226 | </Transform> |
227 | </Transform> |
228 | </Switch> |
229 |
<!-- ROUTE information for DisplayLayerScript node:
[from DisplayAllSensor.isActive to displayAllToggleEnabled
]
[from DisplayTopLayerSensor.isActive to topLayerToggleEnabled
]
[from DisplayMidLayerSensor.isActive to midLayerToggleEnabled
]
[from DisplayBottomLayerSensor.isActive to bottomLayerToggleEnabled
]
[from movementControlSwitchSelection to MovementControlSwitch.whichChoice
]
[from displayControlSwitchSelection to DisplayControlSwitch.whichChoice
]
[from displayAllColor to DisplayAllMaterial.diffuseColor
]
[from topLayerSwitchSelection to TopLayerSwitch.whichChoice
]
[from midLayerSwitchSelection to MidLayerSwitch.whichChoice
]
[from bottomLayerSwitchSelection to BottomLayerSwitch.whichChoice
]
-->
<Script DEF='DisplayLayerScript'> |
230 | <field name='description' type='SFString' accessType='initializeOnly'/> |
231 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
232 | <field name='displayMode' type='SFString' accessType='initializeOnly'/> |
233 | <field name='setDisplayMode' type='SFString' accessType='inputOnly'/> |
234 | <field name='displayAllToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
235 | <field name='topLayerToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
236 | <field name='midLayerToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
237 | <field name='bottomLayerToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
238 | <field name='displayAllToggleEnabled' type='SFBool' accessType='inputOnly'/> |
239 | <field name='topLayerToggleEnabled' type='SFBool' accessType='inputOnly'/> |
240 | <field name='midLayerToggleEnabled' type='SFBool' accessType='inputOnly'/> |
241 | <field name='bottomLayerToggleEnabled' type='SFBool' accessType='inputOnly'/> |
242 | <field name='displayAllColor' type='SFColor' accessType='outputOnly'/> |
243 |
<field name='movementControlSwitchSelection' type='SFInt32' accessType='outputOnly'
appinfo='0 - Display all three animation controls (DIS Mode Selection Playback Controls and Time scale) in a three layer stack. 1 - Display two of the three animation controls in a two layer stack. 2 - Display one of the three animation controls in a one layer stack.'/> |
244 |
<field name='displayControlSwitchSelection' type='SFInt32' accessType='outputOnly'
appinfo='0 - Display all three animation controls (DIS Mode Selection Playback Controls and Time scale) in a three layer stack. 1 - Display two of the three animation controls in a two layer stack. 2 - Display one of the three animation controls in a one layer stack. 3 - Display no layers of animation controls.'/> |
245 |
<field name='topLayerSwitchSelection' type='SFInt32' accessType='outputOnly'
appinfo='0 - Display DIS Mode (Master Remote Local) Selection at top layer. 1 - Do not display anything at top layer.'/> |
246 |
<field name='midLayerSwitchSelection' type='SFInt32' accessType='outputOnly'
appinfo='0 - Display Playback Control Buttons (Reset to Start Fast Rewind Rewind Pause Play Fast Forward Reset To End) at the mid layer. 1 - Display DIS Mode Selection at the mid layer. 2 - Display nothing at the mid layer.'/> |
247 |
<field name='bottomLayerSwitchSelection' type='SFInt32' accessType='outputOnly'
appinfo='0 - Display Time Scale at the bottom layer. 1 - Display DIS Mode Selection at the bottom layer. 2 - Display Playback Control Buttons at the bottom layer. 3 - Display nothing at the bottom layer.'/> |
248 | <IS> |
249 | <connect nodeField='description' protoField='description'/> |
250 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
251 | <connect nodeField='displayMode' protoField='displayMode'/> |
252 | <connect nodeField='setDisplayMode' protoField='setDisplayMode'/> |
253 | </IS> |
<![CDATA[
ecmascript: function initialize() { setDisplayMode(displayMode, -1); } function tracePrint (text) { if (traceEnabled) Browser.println ('[DvdController ' + description + ' DisplayLayerScript] ' + text); } function setDisplayMode(value, timeStamp) { // javascript switch statement is convenient but not consistently supported, so test the old-fashioned way: if (displayMode == 'ALL') { movementControlSwitchSelection = 0; //AllLayer displayControlSwitchSelection = 0; //DisplayAllLayer displayAllColor = new SFColor(0, 0.35, 0.8); topLayerSwitchSelection = 0; midLayerSwitchSelection = 0; bottomLayerSwitchSelection = 0; } else if (displayMode == 'DIS_ONLY') { movementControlSwitchSelection = 2; //OneLayer displayControlSwitchSelection = 2; //DisplayOneLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 2; //DisplayNoneMid bottomLayerSwitchSelection = 1; //DisplayDISModeBottom } else if (displayMode == 'PLAYBACK_ONLY') { movementControlSwitchSelection = 2; //OneLayer displayControlSwitchSelection = 2; //DisplayOneLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 2; //DisplayNoneMid bottomLayerSwitchSelection = 2; //DisplayPlaybackButtonsBottom } else if (displayMode == 'SLIDER_ONLY') { movementControlSwitchSelection = 2; //OneLayer displayControlSwitchSelection = 2; //DisplayOneLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 2; //DisplayNoneMid bottomLayerSwitchSelection = 0; //DiaplaySliderBottom } else if (displayMode == 'DIS_PLAYBACK') { movementControlSwitchSelection = 1; //TwoLayer displayControlSwitchSelection = 1; //DisplayTwoLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 1; //DisplayDISModeMid bottomLayerSwitchSelection = 2; //DisplayPlaybackButtonsBottom } else if (displayMode == 'DIS_SLIDER') { movementControlSwitchSelection = 1; //TwoLayer displayControlSwitchSelection = 1; //DisplayTwoLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 1; //DisplayDISModeMid bottomLayerSwitchSelection = 0; //DisplaySliderBottom } else if (displayMode == 'PLAYBACK_SLIDER') { movementControlSwitchSelection = 1; //TwoLayer displayControlSwitchSelection = 1; //DisplayTwoLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 0; //DisplayPlaybackButtosMid bottomLayerSwitchSelection = 0; //DisplaySliderBottom } else { if (displayMode != 'NONE') Browser.println ('Unknown value for displayMode=' + displayMode + ', assuming value of NONE'); movementControlSwitchSelection = 2; //OneLayer displayControlSwitchSelection = 3; //DisplayNoLayer displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; //DisplayNoneTop midLayerSwitchSelection = 2; //DisplayNoneMid bottomLayerSwitchSelection = 3; //DisplayNoneBottom } } function displayAllToggleEnabled(value, timeStamp) { if (displayAllToggleArmed == false) { displayAllToggleArmed = true; if (displayControlSwitchSelection == 0) { movementControlSwitchSelection = 2; displayControlSwitchSelection = 3; displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; midLayerSwitchSelection = 2; bottomLayerSwitchSelection = 3; tracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection); tracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection); tracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection); tracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection); tracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection); } else //displayControlSwitchSelection not 0 { movementControlSwitchSelection = 0; displayControlSwitchSelection = 0; displayAllColor = new SFColor(0, 0.35, 0.8); topLayerSwitchSelection = 0; midLayerSwitchSelection = 0; bottomLayerSwitchSelection = 0; tracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection); tracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection); tracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection); tracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection); tracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection); } } else { displayAllToggleArmed = false; return; } } function topLayerToggleEnabled(value, timeStamp) { if (topLayerToggleArmed == false) { topLayerToggleArmed = true; displayControlSwitchSelection += 1; if (displayControlSwitchSelection == 3) movementControlSwitchSelection = 2; else movementControlSwitchSelection = displayControlSwitchSelection; displayAllColor = new SFColor(1, 0, 0); topLayerSwitchSelection = 1; tracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection); tracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection); tracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection); } else { topLayerToggleArmed = false; return; } } function midLayerToggleEnabled(value, timeStamp) { if (midLayerToggleArmed == false) { midLayerToggleArmed = true; displayControlSwitchSelection += 1; if (displayControlSwitchSelection == 3) movementControlSwitchSelection = 2; else movementControlSwitchSelection = displayControlSwitchSelection; displayAllColor = new SFColor(1, 0, 0); if (topLayerSwitchSelection == 0) { topLayerSwitchSelection = 1; midLayerSwitchSelection = 1; } else { midLayerSwitchSelection = 2; } tracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection); tracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection); tracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection); tracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection); } else { midLayerToggleArmed = false; return; } } function bottomLayerToggleEnabled(value, timeStamp) { if (bottomLayerToggleArmed == false) { bottomLayerToggleArmed = true; displayControlSwitchSelection += 1; if (displayControlSwitchSelection == 3) movementControlSwitchSelection = 2; else movementControlSwitchSelection = displayControlSwitchSelection; displayAllColor = new SFColor(1, 0, 0); if (topLayerSwitchSelection == 0) //if top display animation mode selection { topLayerSwitchSelection = 1; //top display nothing midLayerSwitchSelection = 1; //mid display animation mode selection bottomLayerSwitchSelection = 2; //bottom display playback control buttons } else if (midLayerSwitchSelection == 0) //if mid display playback control buttons { //top display nothing implied midLayerSwitchSelection = 2; //mid display nothing bottomLayerSwitchSelection = 2; //bottom display playback control buttons } else if (midLayerSwitchSelection == 1) //if mid display animation mode selection { //top display nothing implied midLayerSwitchSelection = 2; //mid display nothing bottomLayerSwitchSelection = 1; //bottom display animation mode selection } else //if mid display nothing { //top display nothing implied //mid display nothing implied bottomLayerSwitchSelection = 3; //bottom display nothing } tracePrint('movementControlSwitchSelection =' + movementControlSwitchSelection); tracePrint('displayControlSwitchSelection =' + displayControlSwitchSelection); tracePrint('topLayerSwitchSelection =' + topLayerSwitchSelection); tracePrint('midLayerSwitchSelection =' + midLayerSwitchSelection); tracePrint('bottomLayerSwitchSelection =' + bottomLayerSwitchSelection); } else { bottomLayerToggleArmed = false; return; } }
]]>
|
|
255 | </Script> |
256 | < ROUTE fromNode='DisplayAllSensor' fromField='isActive' toNode='DisplayLayerScript' toField='displayAllToggleEnabled'/> |
257 | < ROUTE fromNode='DisplayTopLayerSensor' fromField='isActive' toNode='DisplayLayerScript' toField='topLayerToggleEnabled'/> |
258 | < ROUTE fromNode='DisplayMidLayerSensor' fromField='isActive' toNode='DisplayLayerScript' toField='midLayerToggleEnabled'/> |
259 | < ROUTE fromNode='DisplayBottomLayerSensor' fromField='isActive' toNode='DisplayLayerScript' toField='bottomLayerToggleEnabled'/> |
260 | < ROUTE fromNode='DisplayLayerScript' fromField='movementControlSwitchSelection' toNode='MovementControlSwitch' toField='whichChoice'/> |
261 | < ROUTE fromNode='DisplayLayerScript' fromField='displayControlSwitchSelection' toNode='DisplayControlSwitch' toField='whichChoice'/> |
262 | < ROUTE fromNode='DisplayLayerScript' fromField='displayAllColor' toNode='DisplayAllMaterial' toField='diffuseColor'/> |
263 |
<!-- ROUTE information for TopLayerSwitch node:
[from DisplayLayerScript.topLayerSwitchSelection to whichChoice
]
-->
<Switch DEF='TopLayerSwitch' whichChoice='0'> |
264 | <Transform DEF='DisplayDISModeTop' translation='2.86 0.58 0'> |
265 |
<!-- Transform
DISModeButtons is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Transform DEF='DISModeButtons'> |
266 |
<!-- Shape
GroupButtonBaseShape is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Shape DEF='GroupButtonBaseShape'> |
267 | <Appearance USE='ButtonBaseAppearance'/> |
268 | <Box size='5 0.6 0.05'/> |
269 | </Shape> |
270 | <Transform translation='-1.6 0 0'> |
271 |
<!-- ROUTE information for MasterSensor node:
[from isActive to DISModeScript.masterToggleEnabled
]
-->
<TouchSensor DEF='MasterSensor' description='Master entity, send DIS PDU packets'/> |
272 |
<!-- Shape
PushButton is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Shape DEF='PushButton'> |
273 | <Appearance> |
274 |
<!-- ROUTE information for MasterButtonMaterial node:
[from DISModeScript.masterButtonColor to diffuseColor
]
-->
<Material DEF='MasterButtonMaterial' diffuseColor='0.9 0.9 0.9' transparency='1'/> |
275 | </Appearance> |
276 | <IndexedFaceSet DEF='DISModePushButton' ccw='false' solid='false' coordIndex='0 1 2 3 0 -1'> |
277 | <Coordinate point='-0.8 0.25 0.05 0.8 0.25 0.05 0.8 -0.25 0.05 -0.8 -0.25 0.05'/> |
278 | </IndexedFaceSet> |
279 | </Shape> |
280 | <Transform translation='0 0 0.15'> |
281 | <Shape> |
282 | <Appearance> |
283 |
<!-- ROUTE information for MasterLabelMaterial node:
[from DISModeScript.masterLabelColor to diffuseColor
]
-->
<Material DEF='MasterLabelMaterial'/> |
284 | </Appearance> |
285 | <Text string='"networkWriter"'> |
286 | |
287 | </Text> |
288 | </Shape> |
289 | </Transform> |
290 | </Transform> |
291 | <Transform> |
292 |
<!-- ROUTE information for RemoteSensor node:
[from isActive to DISModeScript.remoteToggleEnabled
]
-->
<TouchSensor DEF='RemoteSensor' description='Remote entity, read DIS PDU packets'/> |
293 | <Shape USE='PushButton'/> |
294 | <Transform translation='0.1 0 0.25'> |
295 | <Shape> |
296 | <Appearance> |
297 |
<!-- ROUTE information for RemoteLabelMaterial node:
[from DISModeScript.remoteLabelColor to diffuseColor
]
-->
<Material DEF='RemoteLabelMaterial'/> |
298 | </Appearance> |
299 | <Text string='"networkReader"'> |
300 | <FontStyle USE='LabelFont'/> |
301 | </Text> |
302 | </Shape> |
303 | </Transform> |
304 | </Transform> |
305 | <Transform translation='1.6 0 0'> |
306 |
<!-- ROUTE information for LocalSensor node:
[from isActive to DISModeScript.localToggleEnabled
]
-->
<TouchSensor DEF='LocalSensor' description='Local entity, no DIS traffic'/> |
307 | <Shape USE='PushButton'/> |
308 | <Transform translation='0 0 0.15'> |
309 | <Shape> |
310 | <Appearance> |
311 |
<!-- ROUTE information for LocalLabelMaterial node:
[from DISModeScript.localLabelColor to diffuseColor
]
-->
<Material DEF='LocalLabelMaterial'/> |
312 | </Appearance> |
313 | <Text string='"standAlone"'> |
314 | <FontStyle USE='LabelFont'/> |
315 | </Text> |
316 | </Shape> |
317 | </Transform> |
318 | </Transform> |
319 |
<!-- ROUTE information for DISModeScript node:
[from MasterSensor.isActive to masterToggleEnabled
]
[from RemoteSensor.isActive to remoteToggleEnabled
]
[from LocalSensor.isActive to localToggleEnabled
]
[from masterButtonColor to MasterButtonMaterial.diffuseColor
]
[from masterLabelColor to MasterLabelMaterial.diffuseColor
]
[from remoteLabelColor to RemoteLabelMaterial.diffuseColor
]
[from localLabelColor to LocalLabelMaterial.diffuseColor
]
[from arePlaybackButtonsActive to PlaybackControlScript.setIsActive
]
[from resetToStartEnabled to PlaybackControlScript.resetToStartToggleEnabled
]
[from playbackButtonLabelColor to ResetToStartLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to FastRewindLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to RewindLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to PauseLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to PlayLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to FastForwardLabelMaterial.diffuseColor
]
[from playbackButtonLabelColor to ResetToEndLabelMaterial.diffuseColor
]
[from arePlaybackButtonsActive to ResetToStartSensor.enabled
]
[from arePlaybackButtonsActive to FastRewindSensor.enabled
]
[from arePlaybackButtonsActive to RewindSensor.enabled
]
[from arePlaybackButtonsActive to PauseSensor.enabled
]
[from arePlaybackButtonsActive to PlaySensor.enabled
]
[from arePlaybackButtonsActive to FastForwardSensor.enabled
]
[from arePlaybackButtonsActive to ResetToEndSensor.enabled
]
[from arePlaybackButtonsActive to ClockScript.setarePlaybackButtonsActive
]
-->
<Script DEF='DISModeScript'> |
320 | <field name='description' type='SFString' accessType='initializeOnly'/> |
321 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
322 | <field name='buttonColor' type='SFColor' accessType='initializeOnly'/> |
323 | <field name='activeButtonColor' type='SFColor' accessType='initializeOnly'/> |
324 | <field name='labelColor' type='SFColor' accessType='initializeOnly'/> |
325 | <field name='activeLabelColor' type='SFColor' accessType='initializeOnly'/> |
326 | <field name='masterToggleEnabled' type='SFBool' accessType='inputOnly'/> |
327 | <field name='remoteToggleEnabled' type='SFBool' accessType='inputOnly'/> |
328 | <field name='localToggleEnabled' type='SFBool' accessType='inputOnly'/> |
329 | <field name='masterButtonColor' type='SFColor' accessType='outputOnly'/> |
330 | <field name='masterLabelColor' type='SFColor' accessType='outputOnly'/> |
331 | <field name='remoteButtonColor' type='SFColor' accessType='outputOnly'/> |
332 | <field name='remoteLabelColor' type='SFColor' accessType='outputOnly'/> |
333 | <field name='localButtonColor' type='SFColor' accessType='outputOnly'/> |
334 | <field name='localLabelColor' type='SFColor' accessType='outputOnly'/> |
335 | <field name='isMaster' type='SFBool' accessType='outputOnly'/> |
336 | <field name='isRemote' type='SFBool' accessType='outputOnly'/> |
337 | <field name='isLocal' type='SFBool' accessType='outputOnly'/> |
338 | <field name='arePlaybackButtonsActive' type='SFBool' accessType='outputOnly'/> |
339 | <field name='playbackButtonLabelColor' type='SFColor' accessType='outputOnly'/> |
340 | <field name='resetToStartEnabled' type='SFBool' accessType='outputOnly'/> |
341 | <IS> |
342 | <connect nodeField='description' protoField='description'/> |
343 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
344 | <connect nodeField='buttonColor' protoField='buttonColor'/> |
345 | <connect nodeField='activeButtonColor' protoField='selectedButtonColor'/> |
346 | <connect nodeField='labelColor' protoField='labelColor'/> |
347 | <connect nodeField='activeLabelColor' protoField='selectedLabelColor'/> |
348 | <connect nodeField='isMaster' protoField='isMaster'/> |
349 | <connect nodeField='isRemote' protoField='isRemote'/> |
350 | <connect nodeField='isLocal' protoField='isLocal'/> |
351 | </IS> |
<![CDATA[
ecmascript: function tracePrint (text) { if (traceEnabled) Browser.println ('[DvdController ' + description + ' DISModeScript] ' + text); } function initialize() { masterButtonColor = buttonColor; remoteButtonColor = buttonColor; localButtonColor = activeButtonColor; masterLabelColor = labelColor; remoteLabelColor = labelColor; localLabelColor = activeLabelColor; isMaster = false; isRemote = false; isLocal = true; arePlaybackButtonsActive = true; //set default mode localToggleEnabled(true, -1); } function masterToggleEnabled(value, timeStamp) { masterButtonColor = activeButtonColor; remoteButtonColor = buttonColor; localButtonColor = buttonColor; masterLabelColor = activeLabelColor; remoteLabelColor = labelColor; localLabelColor = labelColor; isMaster = true; isRemote = false; isLocal = false; if (!arePlaybackButtonsActive) playbackButtonLabelColor = labelColor; arePlaybackButtonsActive = true; } function remoteToggleEnabled(value, timeStamp) { masterButtonColor = buttonColor; remoteButtonColor = activeButtonColor; localButtonColor = buttonColor; masterLabelColor = labelColor; remoteLabelColor = activeLabelColor; localLabelColor = labelColor; isMaster = false; isRemote = true; isLocal = false; arePlaybackButtonsActive = false; playbackButtonLabelColor = labelColor; resetToStartEnabled = true; } function localToggleEnabled(value, timeStamp) { masterButtonColor = buttonColor; remoteButtonColor = buttonColor; localButtonColor = activeButtonColor; masterLabelColor = labelColor; remoteLabelColor = labelColor; localLabelColor = activeLabelColor; isMaster = false; isRemote = false; isLocal = true; if (!arePlaybackButtonsActive) playbackButtonLabelColor = labelColor; arePlaybackButtonsActive = true; }
]]>
|
|
353 | </Script> |
354 | < ROUTE fromNode='DISModeScript' fromField='masterButtonColor' toNode='MasterButtonMaterial' toField='diffuseColor'/> |
355 | < ROUTE fromNode='DISModeScript' fromField='masterLabelColor' toNode='MasterLabelMaterial' toField='diffuseColor'/> |
356 | < ROUTE fromNode='DISModeScript' fromField='remoteLabelColor' toNode='RemoteLabelMaterial' toField='diffuseColor'/> |
357 | < ROUTE fromNode='DISModeScript' fromField='localLabelColor' toNode='LocalLabelMaterial' toField='diffuseColor'/> |
358 | < ROUTE fromNode='MasterSensor' fromField='isActive' toNode='DISModeScript' toField='masterToggleEnabled'/> |
359 | < ROUTE fromNode='RemoteSensor' fromField='isActive' toNode='DISModeScript' toField='remoteToggleEnabled'/> |
360 | < ROUTE fromNode='LocalSensor' fromField='isActive' toNode='DISModeScript' toField='localToggleEnabled'/> |
361 | </Transform> |
362 | </Transform> |
363 | <Transform DEF='DisplayNoneTop'/> |
364 | </Switch> |
365 | < ROUTE fromNode='DisplayLayerScript' fromField='topLayerSwitchSelection' toNode='TopLayerSwitch' toField='whichChoice'/> |
366 |
<!-- ROUTE information for MidLayerSwitch node:
[from DisplayLayerScript.midLayerSwitchSelection to whichChoice
]
-->
<Switch DEF='MidLayerSwitch' whichChoice='0'> |
367 | <Transform DEF='DisplayPlaybackButtonsMid' translation='2.86 0 0'> |
368 |
<!-- Transform
PlaybackButtons is a DEF node that has 1 USE node: USE_1 -->
<Transform DEF='PlaybackButtons'> |
369 | <Shape USE='GroupButtonBaseShape'/> |
370 | <Transform translation='-2.05 0 0'> |
371 |
<!-- ROUTE information for ResetToStartSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.resetToStartToggleEnabled
]
-->
<TouchSensor DEF='ResetToStartSensor' description='reset clock to beginning'/> |
372 | |
373 | <Shape> |
374 | <Appearance> |
375 | <Material transparency='1'/> |
376 | </Appearance> |
377 | <Box size='0.6 0.4 0.001'/> |
378 | </Shape> |
379 | </Transform> |
380 | <Shape> |
381 | <Appearance> |
382 |
<!-- ROUTE information for ResetToStartButtonMaterial node:
[from PlaybackControlScript.resetToStartButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
-->
<Material DEF='ResetToStartButtonMaterial' transparency='0.9'/> |
383 | </Appearance> |
384 | |
385 | <Coordinate point='-0.375 0.25 0.05 0.375 0.25 0.05 0.375 -0.25 0.05 -0.375 -0.25 0.05'/> |
386 | </IndexedFaceSet> |
387 | </Shape> |
388 | <Transform> |
389 | <Transform translation='-0.12 0 0'> |
390 | <Shape> |
391 | <Appearance> |
392 |
<!-- Material
ResetToStartLabelMaterial is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for ResetToStartLabelMaterial node: [from DISModeScript.playbackButtonLabelColor to diffuseColor ] [from PlaybackControlScript.resetToStartLabelColor to diffuseColor ] [from ClockScript.deactivateLabelColorChanged to diffuseColor ] --> <Material DEF='ResetToStartLabelMaterial'/> |
393 | </Appearance> |
394 | |
395 | </Shape> |
396 | </Transform> |
397 | <Transform translation='0.01 0 0'> |
398 | <Shape> |
399 | <Appearance> |
400 | <Material USE='ResetToStartLabelMaterial'/> |
401 | </Appearance> |
402 | |
403 | <Coordinate point='-0.15 0 0.051 0.15 -0.15 0.051 0.15 0.15 0.051'/> |
404 | </IndexedFaceSet> |
405 | </Shape> |
406 | </Transform> |
407 | </Transform> |
408 | </Transform> |
409 | <Transform translation='-1.36 0 0'> |
410 |
<!-- ROUTE information for FastRewindSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.fastRewindToggleEnabled
]
-->
<TouchSensor DEF='FastRewindSensor' description='fast rewind'/> |
411 | <Transform USE='InvisibleButtonBox'/> |
412 | <Shape> |
413 | <Appearance> |
414 |
<!-- ROUTE information for FastRewindButtonMaterial node:
[from PlaybackControlScript.fastRewindButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
-->
<Material DEF='FastRewindButtonMaterial' transparency='0.9'/> |
415 | </Appearance> |
416 | <IndexedFaceSet USE='PlaybackButton'/> |
417 | </Shape> |
418 | <Transform> |
419 | <Transform translation='-0.15 0.0 0'> |
420 | <Shape> |
421 | <Appearance> |
422 |
<!-- Material
FastRewindLabelMaterial is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for FastRewindLabelMaterial node: [from DISModeScript.playbackButtonLabelColor to diffuseColor ] [from PlaybackControlScript.fastRewindLabelColor to diffuseColor ] [from ClockScript.deactivateLabelColorChanged to diffuseColor ] --> <Material DEF='FastRewindLabelMaterial'/> |
423 | </Appearance> |
424 | <IndexedFaceSet USE='Triangle'/> |
425 | </Shape> |
426 | </Transform> |
427 | <Transform translation='0.1 0 0'> |
428 | <Shape> |
429 | <Appearance> |
430 | <Material USE='FastRewindLabelMaterial'/> |
431 | </Appearance> |
432 | <IndexedFaceSet USE='Triangle'/> |
433 | </Shape> |
434 | </Transform> |
435 | </Transform> |
436 | </Transform> |
437 | <Transform translation='-0.68 0 0'> |
438 |
<!-- ROUTE information for RewindSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.rewindToggleEnabled
]
-->
<TouchSensor DEF='RewindSensor' description='rewind'/> |
439 | <Transform USE='InvisibleButtonBox'/> |
440 | <Shape> |
441 | <Appearance> |
442 |
<!-- ROUTE information for RewindButtonMaterial node:
[from PlaybackControlScript.rewindButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
[from ClockScript.rewindButtonActivateColorChanged to diffuseColor
]
-->
<Material DEF='RewindButtonMaterial' transparency='0.9'/> |
443 | </Appearance> |
444 | <IndexedFaceSet USE='PlaybackButton'/> |
445 | </Shape> |
446 | <Transform> |
447 | <Shape> |
448 | <Appearance> |
449 |
<!-- ROUTE information for RewindLabelMaterial node:
[from DISModeScript.playbackButtonLabelColor to diffuseColor
]
[from PlaybackControlScript.rewindLabelColor to diffuseColor
]
[from ClockScript.deactivateLabelColorChanged to diffuseColor
]
[from ClockScript.rewindLabelActivateColorChanged to diffuseColor
]
-->
<Material DEF='RewindLabelMaterial'/> |
450 | </Appearance> |
451 | <IndexedFaceSet USE='Triangle'/> |
452 | </Shape> |
453 | </Transform> |
454 | </Transform> |
455 | <Transform> |
456 |
<!-- ROUTE information for PauseSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.pauseToggleEnabled
]
-->
<TouchSensor DEF='PauseSensor' description='pause'/> |
457 | <Transform USE='InvisibleButtonBox'/> |
458 | <Shape> |
459 | <Appearance> |
460 |
<!-- ROUTE information for PauseButtonMaterial node:
[from PlaybackControlScript.pauseButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
-->
<Material DEF='PauseButtonMaterial' transparency='0.9'/> |
461 | </Appearance> |
462 | <IndexedFaceSet USE='PlaybackButton'/> |
463 | </Shape> |
464 | <Transform> |
465 | <Transform translation='-0.05 0 0'> |
466 | <Shape> |
467 | <Appearance> |
468 |
<!-- Material
PauseLabelMaterial is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for PauseLabelMaterial node: [from DISModeScript.playbackButtonLabelColor to diffuseColor ] [from PlaybackControlScript.pauseLabelColor to diffuseColor ] [from ClockScript.deactivateLabelColorChanged to diffuseColor ] --> <Material DEF='PauseLabelMaterial'/> |
469 | </Appearance> |
470 | <Box USE='Bar'/> |
471 | </Shape> |
472 | </Transform> |
473 | <Transform translation='0.085 0 0'> |
474 | <Shape> |
475 | <Appearance> |
476 | <Material USE='PauseLabelMaterial'/> |
477 | </Appearance> |
478 | <Box USE='Bar'/> |
479 | </Shape> |
480 | </Transform> |
481 | </Transform> |
482 | </Transform> |
483 | <Transform translation='0.68 0 0'> |
484 |
<!-- ROUTE information for PlaySensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.playToggleEnabled
]
-->
<TouchSensor DEF='PlaySensor' description='play'/> |
485 | <Transform USE='InvisibleButtonBox'/> |
486 | <Shape> |
487 | <Appearance> |
488 |
<!-- ROUTE information for PlayButtonMaterial node:
[from PlaybackControlScript.playButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
[from ClockScript.playButtonActivateColorChanged to diffuseColor
]
-->
<Material DEF='PlayButtonMaterial' transparency='0.9'/> |
489 | </Appearance> |
490 | <IndexedFaceSet USE='PlaybackButton'/> |
491 | </Shape> |
492 | <Transform rotation='0 0 1 3.14' translation='0.05 0 0'> |
493 | <Shape> |
494 | <Appearance> |
495 |
<!-- ROUTE information for PlayLabelMaterial node:
[from DISModeScript.playbackButtonLabelColor to diffuseColor
]
[from PlaybackControlScript.playLabelColor to diffuseColor
]
[from ClockScript.deactivateLabelColorChanged to diffuseColor
]
[from ClockScript.playLabelActivateColorChanged to diffuseColor
]
-->
<Material DEF='PlayLabelMaterial'/> |
496 | </Appearance> |
497 | <IndexedFaceSet USE='Triangle'/> |
498 | </Shape> |
499 | </Transform> |
500 | </Transform> |
501 | <Transform translation='1.36 0 0'> |
502 |
<!-- ROUTE information for FastForwardSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.fastForwardToggleEnabled
]
-->
<TouchSensor DEF='FastForwardSensor' description='fast forward'/> |
503 | <Transform USE='InvisibleButtonBox'/> |
504 | <Shape> |
505 | <Appearance> |
506 |
<!-- ROUTE information for FastForwardButtonMaterial node:
[from PlaybackControlScript.fastForwardButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
-->
<Material DEF='FastForwardButtonMaterial' transparency='0.9'/> |
507 | </Appearance> |
508 | <IndexedFaceSet USE='PlaybackButton'/> |
509 | </Shape> |
510 | <Transform rotation='0 0 1 3.14'> |
511 | <Transform translation='-0.15 0 0'> |
512 | <Shape> |
513 | <Appearance> |
514 |
<!-- Material
FastForwardLabelMaterial is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for FastForwardLabelMaterial node: [from DISModeScript.playbackButtonLabelColor to diffuseColor ] [from PlaybackControlScript.fastForwardLabelColor to diffuseColor ] [from ClockScript.deactivateLabelColorChanged to diffuseColor ] --> <Material DEF='FastForwardLabelMaterial'/> |
515 | </Appearance> |
516 | <IndexedFaceSet USE='Triangle'/> |
517 | </Shape> |
518 | </Transform> |
519 | <Transform translation='0.1 0 0'> |
520 | <Shape> |
521 | <Appearance> |
522 | <Material USE='FastForwardLabelMaterial'/> |
523 | </Appearance> |
524 | <IndexedFaceSet USE='Triangle'/> |
525 | </Shape> |
526 | </Transform> |
527 | </Transform> |
528 | </Transform> |
529 | <Transform translation='2.05 0 0'> |
530 |
<!-- ROUTE information for ResetToEndSensor node:
[from DISModeScript.arePlaybackButtonsActive to enabled
]
[from isActive to PlaybackControlScript.resetToEndToggleEnabled
]
-->
<TouchSensor DEF='ResetToEndSensor' description='reset clock to end'/> |
531 | <Transform USE='InvisibleButtonBox'/> |
532 | <Shape> |
533 | <Appearance> |
534 |
<!-- ROUTE information for ResetToEndButtonMaterial node:
[from PlaybackControlScript.resetToEndButtonColor to diffuseColor
]
[from ClockScript.deactivateButtonColorChanged to diffuseColor
]
-->
<Material DEF='ResetToEndButtonMaterial' transparency='0.9'/> |
535 | </Appearance> |
536 | <IndexedFaceSet USE='PlaybackButton'/> |
537 | </Shape> |
538 | <Transform> |
539 | <Transform rotation='0 0 1 3.14'> |
540 | <Shape> |
541 | <Appearance> |
542 |
<!-- Material
ResetToEndLabelMaterial is a DEF node that has 1 USE node: USE_1
<!-- ROUTE information for ResetToEndLabelMaterial node: [from DISModeScript.playbackButtonLabelColor to diffuseColor ] [from PlaybackControlScript.resetToEndLabelColor to diffuseColor ] [from ClockScript.deactivateLabelColorChanged to diffuseColor ] --> <Material DEF='ResetToEndLabelMaterial'/> |
543 | </Appearance> |
544 | <IndexedFaceSet USE='Triangle'/> |
545 | </Shape> |
546 | </Transform> |
547 | <Transform translation='0.12 0 0'> |
548 | <Shape> |
549 | <Appearance> |
550 | <Material USE='ResetToEndLabelMaterial'/> |
551 | </Appearance> |
552 | <Box USE='Bar'/> |
553 | </Shape> |
554 | </Transform> |
555 | </Transform> |
556 | </Transform> |
557 |
<!-- ROUTE information for PlaybackControlScript node:
[from DISModeScript.arePlaybackButtonsActive to setIsActive
]
[from DISModeScript.resetToStartEnabled to resetToStartToggleEnabled
]
[from ResetToStartSensor.isActive to resetToStartToggleEnabled
]
[from FastRewindSensor.isActive to fastRewindToggleEnabled
]
[from RewindSensor.isActive to rewindToggleEnabled
]
[from PauseSensor.isActive to pauseToggleEnabled
]
[from PlaySensor.isActive to playToggleEnabled
]
[from FastForwardSensor.isActive to fastForwardToggleEnabled
]
[from ResetToEndSensor.isActive to resetToEndToggleEnabled
]
[from resetToStartButtonColor to ResetToStartButtonMaterial.diffuseColor
]
[from resetToStartLabelColor to ResetToStartLabelMaterial.diffuseColor
]
[from fastRewindButtonColor to FastRewindButtonMaterial.diffuseColor
]
[from fastRewindLabelColor to FastRewindLabelMaterial.diffuseColor
]
[from rewindButtonColor to RewindButtonMaterial.diffuseColor
]
[from rewindLabelColor to RewindLabelMaterial.diffuseColor
]
[from pauseButtonColor to PauseButtonMaterial.diffuseColor
]
[from pauseLabelColor to PauseLabelMaterial.diffuseColor
]
[from playButtonColor to PlayButtonMaterial.diffuseColor
]
[from playLabelColor to PlayLabelMaterial.diffuseColor
]
[from fastForwardButtonColor to FastForwardButtonMaterial.diffuseColor
]
[from fastForwardLabelColor to FastForwardLabelMaterial.diffuseColor
]
[from resetToEndButtonColor to ResetToEndButtonMaterial.diffuseColor
]
[from resetToEndLabelColor to ResetToEndLabelMaterial.diffuseColor
]
[from resetToStartChanged to ClockScript.setResetToStart
]
[from fastRewindChanged to ClockScript.setFastRewind
]
[from rewindChanged to ClockScript.setRewind
]
[from pauseChanged to ClockScript.setPaused
]
[from playChanged to ClockScript.setPlay
]
[from fastForwardChanged to ClockScript.setFastForward
]
[from resetToEndChanged to ClockScript.setResetToEnd
]
-->
<Script DEF='PlaybackControlScript'> |
558 | <field name='description' type='SFString' accessType='initializeOnly'/> |
559 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
560 | <field name='playEnabled' type='SFBool' accessType='initializeOnly'/> |
561 | <field name='buttonColor' type='SFColor' accessType='initializeOnly'/> |
562 | <field name='activeButtonColor' type='SFColor' accessType='initializeOnly'/> |
563 | <field name='labelColor' type='SFColor' accessType='initializeOnly'/> |
564 | <field name='activeLabelColor' type='SFColor' accessType='initializeOnly'/> |
565 | <field name='isActive' type='SFBool' value='true' accessType='initializeOnly'/> |
566 | <field name='setIsActive' type='SFBool' accessType='inputOnly'/> |
567 | <field name='resetToStartToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
568 | <field name='fastRewindToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
569 | <field name='rewindToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
570 | <field name='pauseToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
571 | <field name='playToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
572 | <field name='fastForwardToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
573 | <field name='resetToEndToggleArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
574 | <field name='resetToStartToggleEnabled' type='SFBool' accessType='inputOnly'/> |
575 | <field name='fastRewindToggleEnabled' type='SFBool' accessType='inputOnly'/> |
576 | <field name='rewindToggleEnabled' type='SFBool' accessType='inputOnly'/> |
577 | <field name='pauseToggleEnabled' type='SFBool' accessType='inputOnly'/> |
578 | <field name='playToggleEnabled' type='SFBool' accessType='inputOnly'/> |
579 | <field name='fastForwardToggleEnabled' type='SFBool' accessType='inputOnly'/> |
580 | <field name='resetToEndToggleEnabled' type='SFBool' accessType='inputOnly'/> |
581 | <field name='resetToStartButtonColor' type='SFColor' accessType='outputOnly'/> |
582 | <field name='resetToStartLabelColor' type='SFColor' accessType='outputOnly'/> |
583 | <field name='fastRewindButtonColor' type='SFColor' accessType='outputOnly'/> |
584 | <field name='fastRewindLabelColor' type='SFColor' accessType='outputOnly'/> |
585 | <field name='rewindButtonColor' type='SFColor' accessType='outputOnly'/> |
586 | <field name='rewindLabelColor' type='SFColor' accessType='outputOnly'/> |
587 | <field name='pauseButtonColor' type='SFColor' accessType='outputOnly'/> |
588 | <field name='pauseLabelColor' type='SFColor' accessType='outputOnly'/> |
589 | <field name='playButtonColor' type='SFColor' accessType='outputOnly'/> |
590 | <field name='playLabelColor' type='SFColor' accessType='outputOnly'/> |
591 | <field name='fastForwardButtonColor' type='SFColor' accessType='outputOnly'/> |
592 | <field name='fastForwardLabelColor' type='SFColor' accessType='outputOnly'/> |
593 | <field name='resetToEndButtonColor' type='SFColor' accessType='outputOnly'/> |
594 | <field name='resetToEndLabelColor' type='SFColor' accessType='outputOnly'/> |
595 | <field name='isPaused' type='SFBool' accessType='outputOnly'/> |
596 | <field name='isRunning' type='SFBool' accessType='outputOnly'/> |
597 | <field name='resetToStartChanged' type='SFBool' accessType='outputOnly'/> |
598 | <field name='fastRewindChanged' type='SFBool' accessType='outputOnly'/> |
599 | <field name='rewindChanged' type='SFBool' accessType='outputOnly'/> |
600 | <field name='pauseChanged' type='SFBool' accessType='outputOnly'/> |
601 | <field name='playChanged' type='SFBool' accessType='outputOnly'/> |
602 | <field name='fastForwardChanged' type='SFBool' accessType='outputOnly'/> |
603 | <field name='resetToEndChanged' type='SFBool' accessType='outputOnly'/> |
604 | <IS> |
605 | <connect nodeField='description' protoField='description'/> |
606 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
607 | <connect nodeField='playEnabled' protoField='playEnabled'/> |
608 | <connect nodeField='buttonColor' protoField='buttonColor'/> |
609 | <connect nodeField='activeButtonColor' protoField='selectedButtonColor'/> |
610 | <connect nodeField='labelColor' protoField='labelColor'/> |
611 | <connect nodeField='activeLabelColor' protoField='selectedLabelColor'/> |
612 | <connect nodeField='isPaused' protoField='isPaused'/> |
613 | <connect nodeField='isRunning' protoField='isRunning'/> |
614 | </IS> |
<![CDATA[
ecmascript: function tracePrint (text) { if (traceEnabled) Browser.println ('[DvdController ' + description + ' PlaybackControlScript] ' + text); } function TraceLabelColors () { if (traceEnabled == false) return; Browser.println (' buttonColor=' + buttonColor.toString()); Browser.println (' activeButtonColor=' + activeButtonColor.toString()); Browser.println (' labelColor=' + labelColor.toString()); Browser.println (' activeLabelColor=' + activeLabelColor.toString()); Browser.println (' resetToStartLabelColor=' + resetToStartLabelColor.toString()); Browser.println (' fastRewindLabelColor=' + fastRewindLabelColor.toString()); Browser.println (' rewindLabelColor=' + rewindLabelColor.toString()); Browser.println (' pauseLabelColor=' + pauseLabelColor.toString()); Browser.println (' playLabelColor=' + playLabelColor.toString()); Browser.println (' fastForwardLabelColor=' + fastForwardLabelColor.toString()); Browser.println (' resetToEndLabelColor=' + resetToEndLabelColor.toString()); } function initialize() { tracePrint ('initialize() starting...'); if (!playEnabled) { resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = activeButtonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = activeLabelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; isPaused = true; isRunning = false; TraceLabelColors (); } else // playEnabled == true { playToggleEnabled(true, -1); // dummy timeStamp playToggleArmed = false; } tracePrint ('...initialize() complete'); } function setIsActive(value, timeStamp) { isActive = value; } function resetToStartToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('resetToStartToggleEnabled (' + value + ')' + ', resetToStartToggleArmed=' + resetToStartToggleArmed); if (!resetToStartToggleArmed) { resetToStartButtonColor = activeButtonColor; resetToStartLabelColor = activeLabelColor; resetToStartToggleArmed = true; return; } isPaused = true; isRunning = false; resetToStartChanged = true; if (!isActive) return; resetToStartButtonColor = activeButtonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = buttonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = activeLabelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = labelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function fastRewindToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('fastRewindToggleEnabled (' + value + ')' + ', fastRewindToggleArmed=' + fastRewindToggleArmed); if (fastRewindToggleArmed) { fastRewindToggleArmed = false; return; } isPaused = true; isRunning = false; fastRewindChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = activeButtonColor; rewindButtonColor = buttonColor; pauseButtonColor = buttonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = activeLabelColor; rewindLabelColor = labelColor; pauseLabelColor = labelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function rewindToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('rewindToggleEnabled (' + value + ')' + ', rewindToggleArmed=' + rewindToggleArmed); if (rewindToggleArmed) { rewindToggleArmed = false; return; } isPaused = true; isRunning = false; rewindChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = activeButtonColor; pauseButtonColor = buttonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = activeLabelColor; pauseLabelColor = labelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function pauseToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('pauseToggleEnabled (' + value + ')' + ', pauseToggleArmed=' + pauseToggleArmed); if (pauseToggleArmed) { pauseToggleArmed = false; return; } isPaused = true; isRunning = false; pauseChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = activeButtonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = activeLabelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function playToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('playToggleEnabled (' + value + ')' + ', pauseToggleArmed=' + playToggleArmed); if (playToggleArmed) { playToggleArmed = false; return; } isPaused = false; isRunning = true; playChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = buttonColor; playButtonColor = activeButtonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = labelColor; playLabelColor = activeLabelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function fastForwardToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('fastForwardToggleEnabled (' + value + ')' + ', fastForwardToggleArmed=' + fastForwardToggleArmed); if (fastForwardToggleArmed) { fastForwardToggleArmed = false; return; } isPaused = false; isRunning = true; fastForwardChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = buttonColor; playButtonColor = buttonColor; fastForwardButtonColor = activeButtonColor; resetToEndButtonColor = buttonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = labelColor; playLabelColor = labelColor; fastForwardLabelColor = activeLabelColor; resetToEndLabelColor = labelColor; TraceLabelColors (); } function resetToEndToggleEnabled(value, timeStamp) { if (value == false) return; tracePrint ('resetToEndToggleEnabled (' + value + ')' + ', resetToEndToggleArmed=' + resetToEndToggleArmed); if (!resetToEndToggleArmed) { resetToEndButtonColor = activeButtonColor; resetToEndLabelColor = activeLabelColor; resetToEndToggleArmed = true; return; } isPaused = true; isRunning = false; resetToEndChanged = true; if (!isActive) return; resetToStartButtonColor = buttonColor; fastRewindButtonColor = buttonColor; rewindButtonColor = buttonColor; pauseButtonColor = buttonColor; playButtonColor = buttonColor; fastForwardButtonColor = buttonColor; resetToEndButtonColor = activeButtonColor; resetToStartLabelColor = labelColor; fastRewindLabelColor = labelColor; rewindLabelColor = labelColor; pauseLabelColor = labelColor; playLabelColor = labelColor; fastForwardLabelColor = labelColor; resetToEndLabelColor = activeLabelColor; TraceLabelColors (); }
]]>
|
|
616 | </Script> |
617 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='PlaybackControlScript' toField='setIsActive'/> |
618 | < ROUTE fromNode='DISModeScript' fromField='resetToStartEnabled' toNode='PlaybackControlScript' toField='resetToStartToggleEnabled'/> |
619 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='ResetToStartLabelMaterial' toField='diffuseColor'/> |
620 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='FastRewindLabelMaterial' toField='diffuseColor'/> |
621 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='RewindLabelMaterial' toField='diffuseColor'/> |
622 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='PauseLabelMaterial' toField='diffuseColor'/> |
623 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='PlayLabelMaterial' toField='diffuseColor'/> |
624 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='FastForwardLabelMaterial' toField='diffuseColor'/> |
625 | < ROUTE fromNode='DISModeScript' fromField='playbackButtonLabelColor' toNode='ResetToEndLabelMaterial' toField='diffuseColor'/> |
626 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='ResetToStartSensor' toField='enabled'/> |
627 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='FastRewindSensor' toField='enabled'/> |
628 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='RewindSensor' toField='enabled'/> |
629 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='PauseSensor' toField='enabled'/> |
630 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='PlaySensor' toField='enabled'/> |
631 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='FastForwardSensor' toField='enabled'/> |
632 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='ResetToEndSensor' toField='enabled'/> |
633 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToStartButtonColor' toNode='ResetToStartButtonMaterial' toField='diffuseColor'/> |
634 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToStartLabelColor' toNode='ResetToStartLabelMaterial' toField='diffuseColor'/> |
635 | < ROUTE fromNode='PlaybackControlScript' fromField='fastRewindButtonColor' toNode='FastRewindButtonMaterial' toField='diffuseColor'/> |
636 | < ROUTE fromNode='PlaybackControlScript' fromField='fastRewindLabelColor' toNode='FastRewindLabelMaterial' toField='diffuseColor'/> |
637 | < ROUTE fromNode='PlaybackControlScript' fromField='rewindButtonColor' toNode='RewindButtonMaterial' toField='diffuseColor'/> |
638 | < ROUTE fromNode='PlaybackControlScript' fromField='rewindLabelColor' toNode='RewindLabelMaterial' toField='diffuseColor'/> |
639 | < ROUTE fromNode='PlaybackControlScript' fromField='pauseButtonColor' toNode='PauseButtonMaterial' toField='diffuseColor'/> |
640 | < ROUTE fromNode='PlaybackControlScript' fromField='pauseLabelColor' toNode='PauseLabelMaterial' toField='diffuseColor'/> |
641 | < ROUTE fromNode='PlaybackControlScript' fromField='playButtonColor' toNode='PlayButtonMaterial' toField='diffuseColor'/> |
642 | < ROUTE fromNode='PlaybackControlScript' fromField='playLabelColor' toNode='PlayLabelMaterial' toField='diffuseColor'/> |
643 | < ROUTE fromNode='PlaybackControlScript' fromField='fastForwardButtonColor' toNode='FastForwardButtonMaterial' toField='diffuseColor'/> |
644 | < ROUTE fromNode='PlaybackControlScript' fromField='fastForwardLabelColor' toNode='FastForwardLabelMaterial' toField='diffuseColor'/> |
645 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToEndButtonColor' toNode='ResetToEndButtonMaterial' toField='diffuseColor'/> |
646 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToEndLabelColor' toNode='ResetToEndLabelMaterial' toField='diffuseColor'/> |
647 | < ROUTE fromNode='ResetToStartSensor' fromField='isActive' toNode='PlaybackControlScript' toField='resetToStartToggleEnabled'/> |
648 | < ROUTE fromNode='FastRewindSensor' fromField='isActive' toNode='PlaybackControlScript' toField='fastRewindToggleEnabled'/> |
649 | < ROUTE fromNode='RewindSensor' fromField='isActive' toNode='PlaybackControlScript' toField='rewindToggleEnabled'/> |
650 | < ROUTE fromNode='PauseSensor' fromField='isActive' toNode='PlaybackControlScript' toField='pauseToggleEnabled'/> |
651 | < ROUTE fromNode='PlaySensor' fromField='isActive' toNode='PlaybackControlScript' toField='playToggleEnabled'/> |
652 | < ROUTE fromNode='FastForwardSensor' fromField='isActive' toNode='PlaybackControlScript' toField='fastForwardToggleEnabled'/> |
653 | < ROUTE fromNode='ResetToEndSensor' fromField='isActive' toNode='PlaybackControlScript' toField='resetToEndToggleEnabled'/> |
654 | </Transform> |
655 | </Transform> |
656 | <Transform DEF='DisplayDISModeMid' translation='2.86 0 0'> |
657 | <Transform USE='DISModeButtons'/> |
658 | </Transform> |
659 | <Transform DEF='DisplayNoneMid'/> |
660 | </Switch> |
661 | < ROUTE fromNode='DisplayLayerScript' fromField='midLayerSwitchSelection' toNode='MidLayerSwitch' toField='whichChoice'/> |
662 |
<!-- ROUTE information for BottomLayerSwitch node:
[from DisplayLayerScript.bottomLayerSwitchSelection to whichChoice
]
-->
<Switch DEF='BottomLayerSwitch' whichChoice='0'> |
663 | <Transform DEF='DisplaySliderBottom' translation='2.86 -0.58 0'> |
664 | <Transform DEF='TimeScale'> |
665 | <Shape USE='GroupButtonBaseShape'/> |
666 | <Transform translation='0 -0.15 0'> |
667 |
<!-- ROUTE information for Slider node:
[from ClockScript.fraction_changed to setValue
]
[from valueChanged to ClockScript.setSliderDragFraction
]
-->
<ProtoInstance name='SliderFloat' DEF='Slider'> |
668 | <fieldValue name='layoutDirection' value='horizontal'/> |
669 | <fieldValue name='height' value='4.725'/> |
670 | <fieldValue name='radius' value='0.1'/> |
671 | <fieldValue name='barRadius' value='0.035'/> |
672 | <fieldValue name='min' value='0.0'/> |
673 | <fieldValue name='max' value='1.0'/> |
674 | <fieldValue name='value' value='0.0'/> |
675 | <fieldValue name='traceEnabled' value='true'/> |
676 | </ProtoInstance> |
677 | </Transform> |
678 | <Transform translation='0 0 0.05'> |
679 | <Transform translation='-1.4 0 0'> |
680 | <Shape> |
681 |
<!-- Appearance
TimeLabelAppearance is a DEF node that has 1 USE node: USE_1 -->
<Appearance DEF='TimeLabelAppearance'> |
682 |
<!-- Material
TimeLabelMaterial is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
<Material DEF='TimeLabelMaterial'> |
683 | <IS> |
684 | <connect nodeField='diffuseColor' protoField='labelColor'/> |
685 | </IS> |
686 | </Material> |
687 | </Appearance> |
688 |
<!-- ROUTE information for DurationText node:
[from TimeScaleScript.durationOutput to string
]
-->
<Text DEF='DurationText' string='"00h00m00s"'> |
689 |
<!-- FontStyle
TimeLabelFont is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 --> <FontStyle DEF='TimeLabelFont' size='0.2' style='ITALIC'/> |
690 | </Text> |
691 | </Shape> |
692 | </Transform> |
693 | <Transform translation='-2.4 0 0'> |
694 | <Shape> |
695 | <Appearance USE='TimeLabelAppearance'/> |
696 | <Text string='"duration:"'> |
697 | <FontStyle USE='TimeLabelFont'/> |
698 | </Text> |
699 | </Shape> |
700 | </Transform> |
701 | <Transform translation='0.0 0 0'> |
702 | <Shape> |
703 | <Appearance> |
704 | <Material USE='TimeLabelMaterial'/> |
705 | </Appearance> |
706 | <Text string='"elapsed:"'> |
707 | <FontStyle USE='TimeLabelFont'/> |
708 | </Text> |
709 | </Shape> |
710 | </Transform> |
711 | <Transform translation='0.9 0 0'> |
712 | <Shape> |
713 | <Appearance> |
714 | <Material USE='TimeLabelMaterial'/> |
715 | </Appearance> |
716 |
<!-- ROUTE information for secondsElapsedText node:
[from TimeScaleScript.secondsElapsedOutput to string
]
-->
<Text DEF='secondsElapsedText' string='"00h00m00s"'> |
717 | <FontStyle USE='TimeLabelFont'/> |
718 | </Text> |
719 | </Shape> |
720 | </Transform> |
721 |
<!-- ROUTE information for TimeScaleScript node:
[from ClockScript.secondsElapsed to setSecondsElapsed
]
[from durationOutput to DurationText.string
]
[from secondsElapsedOutput to secondsElapsedText.string
]
-->
<Script DEF='TimeScaleScript'> |
722 | <field name='description' type='SFString' accessType='initializeOnly'/> |
723 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
724 | <field name='duration' type='SFTime' accessType='inputOutput'/> |
725 | <field name='secondsElapsed' type='SFTime' value='0' accessType='initializeOnly'/> |
726 | <field name='setSecondsElapsed' type='SFTime' accessType='inputOnly'/> |
727 | <field name='durationOutput' type='MFString' accessType='outputOnly'/> |
728 | <field name='secondsElapsedOutput' type='MFString' accessType='outputOnly'/> |
729 | <IS> |
730 | <connect nodeField='description' protoField='description'/> |
731 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
732 | <connect nodeField='duration' protoField='cycleInterval'/> |
733 | </IS> |
<![CDATA[
ecmascript: function tracePrint (text) { if (traceEnabled) forcePrint (text); } function forcePrint (text) { Browser.println ('[DvdController ' + description + ' TimeScaleScript] ' + text); } function initialize() { tracePrint ('initialize duration:'); set_duration(duration, -1); // dummy timeStamp secondsElapsedOutput = new MFString('00h00m00s'); } function set_duration(value, timeStamp) { duration = Math.floor(value); tracePrint ('set_cycleInterval value=' + value + ', duration=' + duration); durationOutput = new MFString(printTime(duration)); forcePrint ('duration=' + durationOutput.toString()); } function setSecondsElapsed(value, timeStamp) { secondsElapsed = Math.floor(value); secondsElapsedOutput = new MFString(printTime(secondsElapsed)); tracePrint ('secondsElapsedOutput=' + secondsElapsedOutput.toString()); } function printTime(value) { timeInSeconds = value; seconds = timeInSeconds % 60; minute = ((timeInSeconds - seconds) / 60) % 60; hour = (timeInSeconds - minute * 60 - seconds) / 3600; hStr = (hour < 10 ? '0' + hour : '' + hour); mStr = (minute < 10 ? '0' + minute : '' + minute); sStr = (seconds < 10 ? '0' + seconds : '' + seconds); timeString = new SFString( hStr + 'h' + mStr + 'm' + sStr + 's'); tracePrint ('timeString=' + timeString.toString()); return timeString; }
]]>
|
|
735 | </Script> |
736 | < ROUTE fromNode='TimeScaleScript' fromField='durationOutput' toNode='DurationText' toField='string'/> |
737 | < ROUTE fromNode='TimeScaleScript' fromField='secondsElapsedOutput' toNode='secondsElapsedText' toField='string'/> |
738 | </Transform> |
739 | </Transform> |
740 | </Transform> |
741 | <Transform DEF='DisplayDISModeBottom' translation='2.86 -0.58 0'> |
742 | <Transform USE='DISModeButtons'/> |
743 | </Transform> |
744 | <Transform DEF='DisplayPlaybackButtonsBottom' translation='2.86 -0.58 0'> |
745 | <Transform USE='PlaybackButtons'/> |
746 | </Transform> |
747 | <Transform DEF='DisplayNoneBottom'/> |
748 | </Switch> |
749 | < ROUTE fromNode='DisplayLayerScript' fromField='bottomLayerSwitchSelection' toNode='BottomLayerSwitch' toField='whichChoice'/> |
750 | </Transform> |
751 | < ROUTE fromNode='PlaneMovementSensor' fromField='translation_changed' toNode='MovableLocation' toField='set_translation'/> |
752 | < ROUTE fromNode='VisibilityControlScript' fromField='translationChanged' toNode='MovableLocation' toField='set_translation'/> |
753 | < ROUTE fromNode='VisibilityControlScript' fromField='translationOffsetChanged' toNode='PlaneMovementSensor' toField='set_offset'/> |
754 | </Transform> |
755 | </Transform> |
756 | < ROUTE fromNode='WhereSensor' fromField='position_changed' toNode='FixedLocation' toField='set_translation'/> |
757 | < ROUTE fromNode='WhereSensor' fromField='orientation_changed' toNode='FixedLocation' toField='set_rotation'/> |
758 |
<!-- ROUTE information for ForwardClock node:
[from ClockScript.isPlaying to set_enabled
]
[from ClockScript.forwardCycleInterval to set_cycleInterval
]
[from ClockScript.startTime_changed to set_startTime
]
[from ClockScript.stopTime_changed to set_stopTime
]
[from isActive to ClockScript.setIsClockActive
]
[from fraction_changed to ClockScript.setFraction
]
[from time to ClockScript.setTime
]
-->
<TimeSensor DEF='ForwardClock'/> |
759 |
<!-- ROUTE information for FastForwardClock node:
[from ClockScript.isFastForward to set_enabled
]
[from ClockScript.fastForwardCycleInterval to set_cycleInterval
]
[from ClockScript.fastForwardStartTime to set_startTime
]
[from ClockScript.fastForwardStopTime to set_stopTime
]
[from isActive to ClockScript.setIsClockActive
]
[from fraction_changed to ClockScript.setFastForwardFraction
]
[from time to ClockScript.setTime
]
-->
<TimeSensor DEF='FastForwardClock'/> |
760 |
<!-- ROUTE information for RewindClock node:
[from ClockScript.isRewinding to set_enabled
]
[from ClockScript.rewindCycleInterval to set_cycleInterval
]
[from ClockScript.rewindStartTime to set_startTime
]
[from ClockScript.rewindStopTime to set_stopTime
]
[from isActive to ClockScript.setIsClockActive
]
[from fraction_changed to ClockScript.setRewindFraction
]
[from time to ClockScript.setTime
]
-->
<TimeSensor DEF='RewindClock'/> |
761 |
<!-- ROUTE information for FastRewindClock node:
[from ClockScript.isFastRewind to set_enabled
]
[from ClockScript.fastRewindCycleInterval to set_cycleInterval
]
[from ClockScript.fastRewindStartTime to set_startTime
]
[from ClockScript.fastRewindStopTime to set_stopTime
]
[from isActive to ClockScript.setIsClockActive
]
[from fraction_changed to ClockScript.setFastRewindFraction
]
[from time to ClockScript.setTime
]
-->
<TimeSensor DEF='FastRewindClock'/> |
762 |
<!-- ROUTE information for SliderClock node:
[from ClockScript.sliderClockEnabled to set_enabled
]
[from ClockScript.sliderClockCycleInterval to set_cycleInterval
]
[from ClockScript.sliderClockStartTime to set_startTime
]
[from ClockScript.sliderClockStopTime to set_stopTime
]
[from isActive to ClockScript.setIsClockActive
]
[from fraction_changed to ClockScript.setSliderClockFraction
]
[from time to ClockScript.setTime
]
-->
<TimeSensor DEF='SliderClock'/> |
763 |
<!-- ROUTE information for ClockScript node:
[from DISModeScript.arePlaybackButtonsActive to setarePlaybackButtonsActive
]
[from PlaybackControlScript.resetToStartChanged to setResetToStart
]
[from PlaybackControlScript.fastRewindChanged to setFastRewind
]
[from PlaybackControlScript.rewindChanged to setRewind
]
[from PlaybackControlScript.pauseChanged to setPaused
]
[from PlaybackControlScript.playChanged to setPlay
]
[from PlaybackControlScript.fastForwardChanged to setFastForward
]
[from PlaybackControlScript.resetToEndChanged to setResetToEnd
]
[from ForwardClock.isActive to setIsClockActive
]
[from ForwardClock.fraction_changed to setFraction
]
[from ForwardClock.time to setTime
]
[from RewindClock.isActive to setIsClockActive
]
[from RewindClock.fraction_changed to setRewindFraction
]
[from RewindClock.time to setTime
]
[from FastForwardClock.isActive to setIsClockActive
]
[from FastForwardClock.fraction_changed to setFastForwardFraction
]
[from FastForwardClock.time to setTime
]
[from FastRewindClock.isActive to setIsClockActive
]
[from FastRewindClock.fraction_changed to setFastRewindFraction
]
[from FastRewindClock.time to setTime
]
[from SliderClock.isActive to setIsClockActive
]
[from SliderClock.fraction_changed to setSliderClockFraction
]
[from SliderClock.time to setTime
]
[from Slider.valueChanged to setSliderDragFraction
]
[from isPlaying to ForwardClock.set_enabled
]
[from isRewinding to RewindClock.set_enabled
]
[from isFastForward to FastForwardClock.set_enabled
]
[from isFastRewind to FastRewindClock.set_enabled
]
[from sliderClockEnabled to SliderClock.set_enabled
]
[from forwardCycleInterval to ForwardClock.set_cycleInterval
]
[from rewindCycleInterval to RewindClock.set_cycleInterval
]
[from fastForwardCycleInterval to FastForwardClock.set_cycleInterval
]
[from fastRewindCycleInterval to FastRewindClock.set_cycleInterval
]
[from sliderClockCycleInterval to SliderClock.set_cycleInterval
]
[from startTime_changed to ForwardClock.set_startTime
]
[from stopTime_changed to ForwardClock.set_stopTime
]
[from rewindStartTime to RewindClock.set_startTime
]
[from rewindStopTime to RewindClock.set_stopTime
]
[from fastForwardStartTime to FastForwardClock.set_startTime
]
[from fastForwardStopTime to FastForwardClock.set_stopTime
]
[from fastRewindStartTime to FastRewindClock.set_startTime
]
[from fastRewindStopTime to FastRewindClock.set_stopTime
]
[from sliderClockStartTime to SliderClock.set_startTime
]
[from sliderClockStopTime to SliderClock.set_stopTime
]
[from fraction_changed to Slider.setValue
]
[from deactivateButtonColorChanged to ResetToStartButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to ResetToStartLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to FastRewindButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to FastRewindLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to RewindButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to RewindLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to PauseButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to PauseLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to PlayButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to PlayLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to FastForwardButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to FastForwardLabelMaterial.diffuseColor
]
[from deactivateButtonColorChanged to ResetToEndButtonMaterial.diffuseColor
]
[from deactivateLabelColorChanged to ResetToEndLabelMaterial.diffuseColor
]
[from playButtonActivateColorChanged to PlayButtonMaterial.diffuseColor
]
[from playLabelActivateColorChanged to PlayLabelMaterial.diffuseColor
]
[from rewindButtonActivateColorChanged to RewindButtonMaterial.diffuseColor
]
[from rewindLabelActivateColorChanged to RewindLabelMaterial.diffuseColor
]
[from secondsElapsed to TimeScaleScript.setSecondsElapsed
]
-->
<Script DEF='ClockScript'> |
764 | <field name='description' type='SFString' accessType='initializeOnly'/> |
765 | <field name='traceEnabled' type='SFBool' accessType='initializeOnly'/> |
766 | <field name='duration' type='SFTime' accessType='initializeOnly'/> |
767 | <field name='set_duration' type='SFTime' accessType='inputOnly'/> |
768 | <field name='durationChanged' type='SFTime' accessType='outputOnly'/> |
769 | <field name='forwardCycleInterval' type='SFTime' accessType='outputOnly'/> |
770 | <field name='fastForwardCycleInterval' type='SFTime' accessType='outputOnly'/> |
771 | <field name='rewindCycleInterval' type='SFTime' accessType='outputOnly'/> |
772 | <field name='fastRewindCycleInterval' type='SFTime' accessType='outputOnly'/> |
773 | <field name='sliderClockCycleInterval' type='SFTime' accessType='outputOnly'/> |
774 | <field name='speedFactor' type='SFFloat' accessType='initializeOnly'/> |
775 | <field name='startTime' type='SFTime' value='-1' accessType='initializeOnly'/> |
776 | <field name='startTime_changed' type='SFTime' accessType='outputOnly'/> |
777 | <field name='stopTime' type='SFTime' value='-1' accessType='initializeOnly'/> |
778 | <field name='stopTime_changed' type='SFTime' accessType='outputOnly'/> |
779 | <field name='rewindStartTime' type='SFTime' accessType='outputOnly'/> |
780 | <field name='rewindStopTime' type='SFTime' accessType='outputOnly'/> |
781 | <field name='fastForwardStartTime' type='SFTime' accessType='outputOnly'/> |
782 | <field name='fastForwardStopTime' type='SFTime' accessType='outputOnly'/> |
783 | <field name='fastRewindStartTime' type='SFTime' accessType='outputOnly'/> |
784 | <field name='fastRewindStopTime' type='SFTime' accessType='outputOnly'/> |
785 | <field name='sliderClockStartTime' type='SFTime' accessType='outputOnly'/> |
786 | <field name='sliderClockStopTime' type='SFTime' accessType='outputOnly'/> |
787 | <field name='time' type='SFTime' value='-1' accessType='initializeOnly'/> |
788 | <field name='setTime' type='SFTime' accessType='inputOnly'/> |
789 | <field name='time_changed' type='SFTime' accessType='outputOnly'/> |
790 | <field name='isClockActive' type='SFBool' value='false' accessType='initializeOnly'/> |
791 | <field name='setIsClockActive' type='SFBool' accessType='inputOnly'/> |
792 | <field name='isClockActiveChanged' type='SFBool' accessType='outputOnly'/> |
793 | <field name='secondsElapsed' type='SFTime' accessType='outputOnly'/> |
794 | <field name='fraction' type='SFFloat' value='0' accessType='initializeOnly'/> |
795 | <field name='setFraction' type='SFFloat' accessType='inputOnly'/> |
796 | <field name='setFastForwardFraction' type='SFFloat' accessType='inputOnly'/> |
797 | <field name='setRewindFraction' type='SFFloat' accessType='inputOnly'/> |
798 | <field name='setFastRewindFraction' type='SFFloat' accessType='inputOnly'/> |
799 | <field name='setSliderDragFraction' type='SFFloat' accessType='inputOnly'/> |
800 | <field name='setSliderClockFraction' type='SFFloat' accessType='inputOnly'/> |
801 | <field name='fraction_changed' type='SFFloat' accessType='outputOnly'/> |
802 | <field name='isResetToStart' type='SFBool' accessType='outputOnly'/> |
803 | <field name='setResetToStart' type='SFBool' accessType='inputOnly'/> |
804 | <field name='isFastRewind' type='SFBool' accessType='outputOnly'/> |
805 | <field name='setFastRewind' type='SFBool' accessType='inputOnly'/> |
806 | <field name='isRewinding' type='SFBool' accessType='outputOnly'/> |
807 | <field name='setRewind' type='SFBool' accessType='inputOnly'/> |
808 | <field name='setPaused' type='SFBool' accessType='inputOnly'/> |
809 | <field name='isPlaying' type='SFBool' accessType='outputOnly'/> |
810 | <field name='setPlay' type='SFBool' accessType='inputOnly'/> |
811 | <field name='isFastForward' type='SFBool' accessType='outputOnly'/> |
812 | <field name='setFastForward' type='SFBool' accessType='inputOnly'/> |
813 | <field name='isResetToEnd' type='SFBool' accessType='outputOnly'/> |
814 | <field name='setResetToEnd' type='SFBool' accessType='inputOnly'/> |
815 | <field name='sliderClockEnabled' type='SFBool' accessType='outputOnly'/> |
816 | <field name='sliderDragArmed' type='SFBool' value='false' accessType='initializeOnly'/> |
817 | <field name='setSliderDragged' type='SFBool' accessType='inputOnly'/> |
818 | <field name='pauseTime' type='SFTime' value='-1' accessType='initializeOnly'/> |
819 | <field name='activateButtonColor' type='SFColor' accessType='initializeOnly'/> |
820 | <field name='activateLabelColor' type='SFColor' accessType='initializeOnly'/> |
821 | <field name='deactivateButtonColor' type='SFColor' accessType='initializeOnly'/> |
822 | <field name='arePlaybackButtonsActive' type='SFBool' value='true' accessType='initializeOnly'/> |
823 | <field name='setarePlaybackButtonsActive' type='SFBool' accessType='inputOnly'/> |
824 | <field name='deactivateButtonColorChanged' type='SFColor' accessType='outputOnly'/> |
825 | <field name='deactivateLabelColor' type='SFColor' accessType='initializeOnly'/> |
826 | <field name='deactivateLabelColorChanged' type='SFColor' accessType='outputOnly'/> |
827 | <field name='playButtonActivateColorChanged' type='SFColor' accessType='outputOnly'/> |
828 | <field name='playLabelActivateColorChanged' type='SFColor' accessType='outputOnly'/> |
829 | <field name='rewindButtonActivateColorChanged' type='SFColor' accessType='outputOnly'/> |
830 | <field name='rewindLabelActivateColorChanged' type='SFColor' accessType='outputOnly'/> |
831 | <field name='rewindStart_fraction' type='SFFloat' value='0' accessType='initializeOnly'/> |
832 | <field name='fastRewindStart_fraction' type='SFFloat' value='0' accessType='initializeOnly'/> |
833 | <field name='sliderClockStart_fraction' type='SFFloat' value='0' accessType='initializeOnly'/> |
834 | <field name='fastRewind_level' type='SFFloat' value='0' accessType='initializeOnly'/> |
835 | <field name='fastForward_level' type='SFFloat' value='0' accessType='initializeOnly'/> |
836 | <field name='preDrag_fraction' type='SFFloat' value='0' accessType='initializeOnly'/> |
837 | <IS> |
838 | <connect nodeField='description' protoField='description'/> |
839 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
840 | <connect nodeField='deactivateButtonColor' protoField='buttonColor'/> |
841 | <connect nodeField='activateButtonColor' protoField='selectedButtonColor'/> |
842 | <connect nodeField='deactivateLabelColor' protoField='labelColor'/> |
843 | <connect nodeField='activateLabelColor' protoField='selectedLabelColor'/> |
844 | <connect nodeField='duration' protoField='cycleInterval'/> |
845 | <connect nodeField='set_duration' protoField='set_cycleInterval'/> |
846 | <connect nodeField='durationChanged' protoField='cycleInterval_changed'/> |
847 | <connect nodeField='speedFactor' protoField='speedFactor'/> |
848 | <connect nodeField='isClockActiveChanged' protoField='isActive'/> |
849 | <connect nodeField='startTime_changed' protoField='startTime_changed'/> |
850 | <connect nodeField='stopTime_changed' protoField='stopTime_changed'/> |
851 | <connect nodeField='time_changed' protoField='time_changed'/> |
852 | <connect nodeField='fraction_changed' protoField='fraction_changed'/> |
853 | <connect nodeField='secondsElapsed' protoField='secondsElapsed'/> |
854 | </IS> |
<![CDATA[
ecmascript: function tracePrint (text) { if (traceEnabled) Browser.println ('[DvdController ' + description + ' ClockScript] ' + text); } function alwaysPrint(output) { Browser.println ('[DvdController ' + description + ' ClockScript] ' + output); } function initialize() { isResetToStart = false; isFastRewind = false; isRewinding = false; isPlaying = false; isFastForward = false; isResetToEnd = false; durationChanged = duration; forwardCycleInterval = duration; fastForwardCycleInterval = duration; rewindCycleInterval = duration; fastRewindCycleInterval = duration; sliderClockCycleInterval = duration; fraction = 0; fastRewind_level = 0; fastForward_level = 0; sliderClockStart_fraction = 0; } function set_duration(value, timeStamp) { duration = value; durationChanged = value; forwardCycleInterval = duration; fastForwardCycleInterval = duration; rewindCycleInterval = duration; fastRewindCycleInterval = duration; sliderClockCycleInterval = duration; alwaysPrint ('set_duration (' + duration + ') complete'); } function setarePlaybackButtonsActive(value, timeStamp) { arePlaybackButtonsActive = value; tracePrint('arePlaybackButtonsActive=' + arePlaybackButtonsActive); } function setIsClockActive(value, timeStamp) { isClockActive = isClockActiveChanged = value; tracePrint('isClockActive=' + isClockActive); } function setResetToStart(value, timeStamp) { tracePrint('setResetToStart(' + value + ')'); isResetToStart = true; //Stop all clocks isPlaying = false; isRewinding = false; isFastForward = false; isFastRewind = false; sliderClockEnabled = false; fraction = fraction_changed = 0.0; secondsElapsed = 0.0; startTime = startTime_changed = timeStamp; stopTime = stopTime_changed = startTime + duration; deactivateButtonColorChanged = deactivateButtonColor; if (!arePlaybackButtonsActive) return; deactivateLabelColorChanged = deactivateLabelColor; } function setFastRewind(value, timeStamp) { tracePrint('setFastRewind(' + value + ')'); if (!isFastRewind) fastRewindStart_fraction = fraction; isFastRewind = true; isPlaying = false; isRewinding = false; isFastForward = false; sliderClockEnabled = false; if (fastRewind_level < 1) { ++fastRewind_level; fastRewindCycleInterval = duration / (speedFactor * fastRewind_level); } if (fraction == 0) //start reached { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; return; } fastRewindStartTime = timeStamp; fastRewindStopTime = fastRewindStartTime + secondsElapsed / (speedFactor * fastRewind_level); startTime = startTime_changed = fastRewindStopTime; } function setRewind(value, timeStamp) { tracePrint('setRewind(' + value + ')'); if (!isRewinding) rewindStart_fraction = fraction; isRewinding = true; isPlaying = false; isFastForward = false; isFastRewind = false; sliderClockEnabled = false; fastRewind_level = 0; //reset rewindCycleInterval = duration; if (fraction == 0) //start reached { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; return; } rewindStartTime = timeStamp; rewindStopTime = rewindStartTime + secondsElapsed; startTime = startTime_changed = rewindStopTime; } function setPaused(value, timeStamp) { tracePrint('setPaused(' + value + ')'); if (value == true) { now = new Date(); pauseTime = now.getTime() / 1000.0; isFastRewind = false; isRewinding = false; isPlaying = false; isFastForward = false; sliderClockEnabled = false; } } function setPlay(value, timeStamp) { tracePrint('setPlay(' + value + ')'); isPlaying = true; isRewinding = false; isFastForward = false; isFastRewind = false; sliderClockEnabled = false; fastRewind_level = 0; //reset fast rewind forwardCycleInterval = duration; if (fraction == 0 || fraction == 1) //start or restart from beginning { startTime = startTime_changed = timeStamp; stopTime = stopTime_changed = startTime + duration; } else { startTime = startTime_changed = timeStamp - secondsElapsed; stopTime = stopTime_changed = startTime + duration; } } function setFastForward(value, timeStamp) { tracePrint('setFastForward(' + value + ')'); isFastForward = true; isPlaying = false; isRewinding = false; isFastRewind = false; sliderClockEnabled = false; if (fastForward_level < 1) { ++fastForward_level; fastForwardCycleInterval = duration / (speedFactor * fastForward_level); } fastForwardStartTime = timeStamp - secondsElapsed / (speedFactor * fastForward_level); fastForwardStopTime = fastForwardStartTime + duration / (speedFactor * fastForward_level); startTime = startTime_changed = fastForwardStartTime; } function setResetToEnd(value, timeStamp) { tracePrint('setResetToEnd(' + value + ')'); isResetToEnd = true; //Stop all clocks isPlaying = false; isRewinding = false; isFastForward = false; isFastRewind = false; sliderClockEnabled = false; fraction = fraction_changed = 1.0; secondsElapsed = duration; stopTime = stopTime_changed = timeStamp; startTime = startTime_changed = stopTime - duration; deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; } function setFraction(value, timeStamp) { if (isRewinding || isFastForward || isFastRewind || sliderClockEnabled || sliderDragArmed) { // tracePrint('setFraction immediate return..'); return; } // tracePrint('setFraction(' + value + ')'); if (isResetToStart) { tracePrint('setFraction isResetToStart=true, reset..'); isResetToStart = false; //reset return; } else if (isResetToEnd) { tracePrint('setFraction isResetToEnd=true, reset..'); isResetToEnd = false; //reset return; } fraction = fraction_changed = value; tracePrint('fraction_changed=' + fraction_changed); if (fraction >= 1) //end reached { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; fraction = fraction_changed = 1.0; } } function setFastForwardFraction(value, timeStamp) { tracePrint('setFastForwardFraction(' + value + ')'); if (isPlaying || isFastRewind || isRewinding || sliderClockEnabled || sliderDragArmed) return; if (isResetToStart) { isResetToStart = false; //reset return; } else if (isResetToEnd) { isResetToEnd = false; //reset return; } fraction = fraction_changed = value; if (fraction >= 1) //end reached { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; isFastForward = false; fraction = fraction_changed = 1.0; secondsElapsed = duration; } } function setRewindFraction(value, timeStamp) { tracePrint('setRewindFraction(' + value + ')'); if (isPlaying || isFastForward || isFastRewind || sliderClockEnabled || sliderDragArmed) return; if (isResetToStart) { isResetToStart = false; //reset return; } else if (isResetToEnd) { isResetToEnd = false; //reset return; } fraction = fraction_changed = 1 - value - (1 - rewindStart_fraction); if (fraction <= 0.0000001) //start reached - rounded off { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; isRewinding = false; fraction = fraction_changed = 0.0; secondsElapsed = 0.0; } } function setFastRewindFraction(value, timeStamp) { tracePrint('setFastRewindFraction(' + value + ')'); if (isPlaying || isFastForward || isRewinding || sliderClockEnabled || sliderDragArmed) return; if (isResetToStart) { isResetToStart = false; //reset return; } else if (isResetToEnd) { isResetToEnd = false; //reset return; } fraction = fraction_changed = 1 - value - (1 - fastRewindStart_fraction); if (fraction <= 0.0000001) //start reached - rounded off { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; isFastRewind = false; fraction = fraction_changed = 0.0; fastRewindStart_fraction = -1; //reset secondsElapsed = 0.0; } } function setTime(value, timeStamp) { // Check if pause option is selected if (!isPlaying && !isRewinding && !isFastForward && !isFastRewind && !sliderClockEnabled) { tracePrint('setTime(' + value + ') immediate return'); return; } tracePrint('setTime(' + value + ')'); time = time_changed = value; // time_changed is output event via IS/connect secondsElapsed = Math.abs(value - startTime); tracePrint ('time=' + time + ', secondsElapsed=' + secondsElapsed); if (isFastRewind) secondsElapsed = secondsElapsed * (speedFactor * fastRewind_level); else if (isFastForward) secondsElapsed = secondsElapsed * (speedFactor * fastForward_level); if (fraction == 0) secondsElapsed = 0.0; else if (fraction == 1) secondsElapsed = duration; } function setSliderDragged(value, timeStamp) { if (value == true) //Drag started { tracePrint ('Drag started'); preDrag_fraction = fraction; sliderDragArmed = true; isPlaying = false; isRewinding = false; isFastForward = false; isFastRewind = false; sliderClockEnabled = false; } else //Drag finished { tracePrint ('Drag finished'); deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; sliderDragArmed = false; secondsElapsed = duration * fraction; sliderClockEnabled = true; if (fraction == 0 || fraction == 1) //start or end reached return; sliderClockCycleInterval = duration; if (fraction >= preDrag_fraction) //play { drag_forward = true; drag_backward = false; sliderClockStartTime = timeStamp - secondsElapsed; sliderClockStopTime = sliderClockStartTime + duration; startTime = startTime_changed = sliderClockStartTime; playButtonActivateColorChanged = activateButtonColor; playLabelActivateColorChanged = activateLabelColor; } else if (fraction < preDrag_fraction) //rewind { drag_forward = false; drag_backward = true; sliderClockStartTime = timeStamp; sliderClockStopTime = timeStamp + secondsElapsed; startTime = startTime_changed = sliderClockStopTime; rewindButtonActivateColorChanged = activateButtonColor; rewindLabelActivateColorChanged = activateLabelColor; } sliderClockStart_fraction = fraction; } } function setSliderDragFraction(value, timeStamp) { if (isPlaying || isRewinding || isFastForward || isFastRewind || sliderClockEnabled) { // tracePrint('setSliderDragFraction immediate return'); return; } tracePrint('setSliderDragFraction(' + value + ')'); if (sliderDragArmed) fraction = fraction_changed = value; } function setSliderClockFraction(value, timeStamp) { if (isPlaying || isRewinding || isFastForward || isFastRewind) { // tracePrint('setSliderClockFraction immediate return'); return; } tracePrint('setSliderClockFraction(' + value + ')'); if (isResetToStart) { isResetToStart = false; //reset return; } else if (isResetToEnd) { isResetToEnd = false; //reset return; } if (drag_forward) fraction = fraction_changed = value; else if (drag_backward) fraction = fraction_changed = 1 - value - (1 - sliderClockStart_fraction); if (fraction <= 0.0000001) { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; sliderClockEnabled = false; fraction = fraction_changed = 0.0; secondsElapsed = 0.0; } else if (fraction >= 1) { deactivateButtonColorChanged = deactivateButtonColor; deactivateLabelColorChanged = deactivateLabelColor; sliderClockEnabled = false; fraction = fraction_changed = 1.0; secondsElapsed = duration; } }
]]>
|
|
856 | </Script> |
857 | < ROUTE fromNode='DISModeScript' fromField='arePlaybackButtonsActive' toNode='ClockScript' toField='setarePlaybackButtonsActive'/> |
858 | <!-- TODO use or remove <ROUTE fromField='arePlaybackButtonsActive' fromNode='DISModeScript' toField='setDragEnabled' toNode='Slider'/> --> |
859 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToStartChanged' toNode='ClockScript' toField='setResetToStart'/> |
860 | < ROUTE fromNode='PlaybackControlScript' fromField='fastRewindChanged' toNode='ClockScript' toField='setFastRewind'/> |
861 | < ROUTE fromNode='PlaybackControlScript' fromField='rewindChanged' toNode='ClockScript' toField='setRewind'/> |
862 | < ROUTE fromNode='PlaybackControlScript' fromField='pauseChanged' toNode='ClockScript' toField='setPaused'/> |
863 | < ROUTE fromNode='PlaybackControlScript' fromField='playChanged' toNode='ClockScript' toField='setPlay'/> |
864 | < ROUTE fromNode='PlaybackControlScript' fromField='fastForwardChanged' toNode='ClockScript' toField='setFastForward'/> |
865 | < ROUTE fromNode='PlaybackControlScript' fromField='resetToEndChanged' toNode='ClockScript' toField='setResetToEnd'/> |
866 | < ROUTE fromNode='ForwardClock' fromField='isActive' toNode='ClockScript' toField='setIsClockActive'/> |
867 | < ROUTE fromNode='ForwardClock' fromField='fraction_changed' toNode='ClockScript' toField='setFraction'/> |
868 | < ROUTE fromNode='ForwardClock' fromField='time' toNode='ClockScript' toField='setTime'/> |
869 | < ROUTE fromNode='RewindClock' fromField='isActive' toNode='ClockScript' toField='setIsClockActive'/> |
870 | < ROUTE fromNode='RewindClock' fromField='fraction_changed' toNode='ClockScript' toField='setRewindFraction'/> |
871 | < ROUTE fromNode='RewindClock' fromField='time' toNode='ClockScript' toField='setTime'/> |
872 | < ROUTE fromNode='FastForwardClock' fromField='isActive' toNode='ClockScript' toField='setIsClockActive'/> |
873 | < ROUTE fromNode='FastForwardClock' fromField='fraction_changed' toNode='ClockScript' toField='setFastForwardFraction'/> |
874 | < ROUTE fromNode='FastForwardClock' fromField='time' toNode='ClockScript' toField='setTime'/> |
875 | < ROUTE fromNode='FastRewindClock' fromField='isActive' toNode='ClockScript' toField='setIsClockActive'/> |
876 | < ROUTE fromNode='FastRewindClock' fromField='fraction_changed' toNode='ClockScript' toField='setFastRewindFraction'/> |
877 | < ROUTE fromNode='FastRewindClock' fromField='time' toNode='ClockScript' toField='setTime'/> |
878 | < ROUTE fromNode='SliderClock' fromField='isActive' toNode='ClockScript' toField='setIsClockActive'/> |
879 | < ROUTE fromNode='SliderClock' fromField='fraction_changed' toNode='ClockScript' toField='setSliderClockFraction'/> |
880 | < ROUTE fromNode='SliderClock' fromField='time' toNode='ClockScript' toField='setTime'/> |
881 | < ROUTE fromNode='ClockScript' fromField='isPlaying' toNode='ForwardClock' toField='set_enabled'/> |
882 | < ROUTE fromNode='ClockScript' fromField='isRewinding' toNode='RewindClock' toField='set_enabled'/> |
883 | < ROUTE fromNode='ClockScript' fromField='isFastForward' toNode='FastForwardClock' toField='set_enabled'/> |
884 | < ROUTE fromNode='ClockScript' fromField='isFastRewind' toNode='FastRewindClock' toField='set_enabled'/> |
885 | < ROUTE fromNode='ClockScript' fromField='sliderClockEnabled' toNode='SliderClock' toField='set_enabled'/> |
886 | < ROUTE fromNode='ClockScript' fromField='forwardCycleInterval' toNode='ForwardClock' toField='set_cycleInterval'/> |
887 | < ROUTE fromNode='ClockScript' fromField='rewindCycleInterval' toNode='RewindClock' toField='set_cycleInterval'/> |
888 | < ROUTE fromNode='ClockScript' fromField='fastForwardCycleInterval' toNode='FastForwardClock' toField='set_cycleInterval'/> |
889 | < ROUTE fromNode='ClockScript' fromField='fastRewindCycleInterval' toNode='FastRewindClock' toField='set_cycleInterval'/> |
890 | < ROUTE fromNode='ClockScript' fromField='sliderClockCycleInterval' toNode='SliderClock' toField='set_cycleInterval'/> |
891 | < ROUTE fromNode='ClockScript' fromField='startTime_changed' toNode='ForwardClock' toField='set_startTime'/> |
892 | < ROUTE fromNode='ClockScript' fromField='stopTime_changed' toNode='ForwardClock' toField='set_stopTime'/> |
893 | < ROUTE fromNode='ClockScript' fromField='rewindStartTime' toNode='RewindClock' toField='set_startTime'/> |
894 | < ROUTE fromNode='ClockScript' fromField='rewindStopTime' toNode='RewindClock' toField='set_stopTime'/> |
895 | < ROUTE fromNode='ClockScript' fromField='fastForwardStartTime' toNode='FastForwardClock' toField='set_startTime'/> |
896 | < ROUTE fromNode='ClockScript' fromField='fastForwardStopTime' toNode='FastForwardClock' toField='set_stopTime'/> |
897 | < ROUTE fromNode='ClockScript' fromField='fastRewindStartTime' toNode='FastRewindClock' toField='set_startTime'/> |
898 | < ROUTE fromNode='ClockScript' fromField='fastRewindStopTime' toNode='FastRewindClock' toField='set_stopTime'/> |
899 | < ROUTE fromNode='ClockScript' fromField='sliderClockStartTime' toNode='SliderClock' toField='set_startTime'/> |
900 | < ROUTE fromNode='ClockScript' fromField='sliderClockStopTime' toNode='SliderClock' toField='set_stopTime'/> |
901 | < ROUTE fromNode='ClockScript' fromField='fraction_changed' toNode='Slider' toField='setValue'/> |
902 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='ResetToStartButtonMaterial' toField='diffuseColor'/> |
903 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='ResetToStartLabelMaterial' toField='diffuseColor'/> |
904 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='FastRewindButtonMaterial' toField='diffuseColor'/> |
905 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='FastRewindLabelMaterial' toField='diffuseColor'/> |
906 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='RewindButtonMaterial' toField='diffuseColor'/> |
907 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='RewindLabelMaterial' toField='diffuseColor'/> |
908 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='PauseButtonMaterial' toField='diffuseColor'/> |
909 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='PauseLabelMaterial' toField='diffuseColor'/> |
910 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='PlayButtonMaterial' toField='diffuseColor'/> |
911 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='PlayLabelMaterial' toField='diffuseColor'/> |
912 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='FastForwardButtonMaterial' toField='diffuseColor'/> |
913 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='FastForwardLabelMaterial' toField='diffuseColor'/> |
914 | < ROUTE fromNode='ClockScript' fromField='deactivateButtonColorChanged' toNode='ResetToEndButtonMaterial' toField='diffuseColor'/> |
915 | < ROUTE fromNode='ClockScript' fromField='deactivateLabelColorChanged' toNode='ResetToEndLabelMaterial' toField='diffuseColor'/> |
916 | < ROUTE fromNode='ClockScript' fromField='playButtonActivateColorChanged' toNode='PlayButtonMaterial' toField='diffuseColor'/> |
917 | < ROUTE fromNode='ClockScript' fromField='playLabelActivateColorChanged' toNode='PlayLabelMaterial' toField='diffuseColor'/> |
918 | < ROUTE fromNode='ClockScript' fromField='rewindButtonActivateColorChanged' toNode='RewindButtonMaterial' toField='diffuseColor'/> |
919 | < ROUTE fromNode='ClockScript' fromField='rewindLabelActivateColorChanged' toNode='RewindLabelMaterial' toField='diffuseColor'/> |
920 | < ROUTE fromNode='Slider' fromField='valueChanged' toNode='ClockScript' toField='setSliderDragFraction'/> |
921 | <!-- fix or omit <ROUTE fromField='isDragged' fromNode='Slider' toField='setSliderDragged' toNode='ClockScript'/> --> |
922 | < ROUTE fromNode='ClockScript' fromField='secondsElapsed' toNode='TimeScaleScript' toField='setSecondsElapsed'/> |
923 | </Transform> |
924 | </ProtoBody> |
925 | </ProtoDeclare> |
926 | <!-- ==================== --> |
927 | <Anchor description='DvdController Example' url=' "DvdControllerExample.x3d" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerExample.x3d" "DvdControllerExample.wrl" "https://www.web3d.org/x3d/content/examples/Savage/Tools/HeadsUpDisplays/DvdControllerExample.wrl" '> |
928 | <Shape> |
929 | <Appearance> |
930 | <Material diffuseColor='0 1 1' emissiveColor='0 1 1'/> |
931 | </Appearance> |
932 | <Text string='"DvdControllerPrototype" "is a Prototype definition file." "" "To see an example scene" "select this text and view" "DvdControllerExample"'> |
933 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.8'/> |
934 | </Text> |
935 | </Shape> |
936 | </Anchor> |
937 | </Scene> |
938 | </X3D> |
Event Graph ROUTE Table entries with 128 ROUTE connections total, showing X3D event-model relationships for this scene.
Each row shows an event cascade that may occur during a single timestamp interval between frame renderings, as part of the X3D execution model.
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
FastForwardSensor
TouchSensor isActive SFBool |
PlaybackControlScript
Script fastForwardToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
FastRewindSensor
TouchSensor isActive SFBool |
PlaybackControlScript
Script fastRewindToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
LocalSensor
TouchSensor isActive SFBool |
DISModeScript
Script localToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
MasterSensor
TouchSensor isActive SFBool |
DISModeScript
Script masterToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
PauseSensor
TouchSensor isActive SFBool |
PlaybackControlScript
Script pauseToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
PlaySensor
TouchSensor isActive SFBool |
PlaybackControlScript
Script playToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
RemoteSensor
TouchSensor isActive SFBool |
DISModeScript
Script remoteToggleEnabled SFBool |
The following
ROUTE
chain begins an event-routing loop! Loop occurs at nodeDepth=2.
ROUTE ClockScript.isPlaying TO ForwardClock.set_enabled |
||||||
ResetToEndSensor
TouchSensor isActive SFBool |