1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
|
3 | <X3D profile='Immersive' version='3.2' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'> |
4 | <head> |
5 | <meta name='title' content='TestSliders.x3d'/> |
6 | <meta name='description' content='X3D Follower example'/> |
7 | <meta name='creator' content='Herbert Stocker'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='18 April 2006'/> |
10 | <meta name='translated' content='2 December 2011'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='originals/test_Sliders.wrl'/> |
13 | <meta name='reference' content='Stocker_06_Followers.pdf'/> |
14 | <meta name='reference' content='http://www.hersto.com/Publications/Followers'/> |
15 | <meta name='requires' content='X3D version 3.2 or greater'/> |
16 | <meta name='subject' content='X3D Follower Chaser Damper'/> |
17 | <meta name=' warning ' content=' under development '/> |
18 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html'/> |
19 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/Followers/TestSliders.x3d'/> |
20 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
21 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
22 | <meta name='license' content='../../license.html'/> |
23 | </head> |
24 | <Scene> |
25 | <WorldInfo title='TestSliders.x3d'/> |
26 | <ExternProtoDeclare name='Slider' url=' "Slider.x3d#Slider" "https://www.web3d.org/x3d/content/examples/Basic/Followers/Slider.x3d#Slider" "Slider.wrl#Slider" "https://www.web3d.org/x3d/content/examples/Basic/Followers/Slider.wrl#Slider" '> |
27 | <field name='initial_position' type='SFFloat' accessType='initializeOnly'/> |
28 | <field name='radiusKnob' type='SFFloat' accessType='inputOutput'/> |
29 | <field name='radiusStick' type='SFFloat' accessType='inputOutput'/> |
30 | <field name='min' type='SFFloat' accessType='inputOutput'/> |
31 | <field name='position_changed' type='SFFloat' accessType='outputOnly'/> |
32 | <field name='appearance' type='SFNode' accessType='inputOutput'/> |
33 | <field name='smoothMovements' type='SFBool' accessType='inputOutput'/> |
34 | <field name='set_position' type='SFFloat' accessType='inputOnly'/> |
35 | <field name='pageSize' type='SFFloat' accessType='inputOutput'/> |
36 | <field name='max' type='SFFloat' accessType='inputOutput'/> |
37 | <field name='height' type='SFFloat' accessType='inputOutput'/> |
38 | </ExternProtoDeclare> |
39 | <NavigationInfo type='"EXAMINE"'/> |
40 | <Viewpoint description='view 1' orientation='-0.527 0.846 0.075 0.462' position='2.741 3.259 6.6'/> |
41 | <Viewpoint description='view 2' orientation='0.973 0.232 0.024 0.466' position='0.865 -1.591 6.723'/> |
42 | <Viewpoint description='view 3' orientation='0.997 0.06 0.05 1.705' position='0.934 -5.744 -0.794'/> |
43 | <Viewpoint description='view 4' orientation='0.888 0.23 0.399 3.139' position='5.165 3.009 -4.663'/> |
44 | <Viewpoint description='view 5' orientation='0.116 0.234 -0.965 1.866' position='0.424 -2.489 8.627'/> |
45 | <Viewpoint description='view 6' orientation='-0.3 0.639 -0.708 1.922' position='6.309 -1.261 2.853'/> |
46 | <Transform> |
47 | <Transform rotation='0.983 0.152 0.098 0.286'> |
48 | <Transform rotation='0.705 0.654 -0.274 -1.09'> |
49 | <Transform rotation='0.0 0.0 -1.0 1.5708' translation='2.5 0.0 0.0'> |
50 |
<!-- ROUTE information for SldX node:
[from position_changed to Worker.set_X
]
-->
<ProtoInstance name='Slider' DEF='SldX'> |
51 | <fieldValue name='initial_position' value='2.5'/> |
52 | <fieldValue name='radiusKnob' value='0.225'/> |
53 | <fieldValue name='min' value='1.0'/> |
54 | <fieldValue name='radiusStick' value='0.15'/> |
55 | <fieldValue name='appearance'> |
56 | |
57 | <Material ambientIntensity='0.055' diffuseColor='0.75 0.0 0.55' emissiveColor='0.1 0.0 0.07' shininess='0.157' specularColor='0.67 0.67 0.67'/> |
58 | </Appearance> |
59 | </fieldValue> |
60 | <fieldValue name='pageSize' value='1.0'/> |
61 | <fieldValue name='max' value='5.0'/> |
62 | </ProtoInstance> |
63 | <Transform translation='0.0 -1.25 0.0'> |
64 | <Shape> |
65 | <Appearance USE='App'/> |
66 | <Cylinder height='2.5' radius='0.02'/> |
67 | </Shape> |
68 | </Transform> |
69 | </Transform> |
70 | <Transform translation='0.0 2.5 0.0'> |
71 |
<!-- ROUTE information for SldY node:
[from position_changed to Worker.set_Y
]
-->
<ProtoInstance name='Slider' DEF='SldY'> |
72 | <fieldValue name='initial_position' value='2.5'/> |
73 | <fieldValue name='radiusKnob' value='0.225'/> |
74 | <fieldValue name='min' value='1.0'/> |
75 | <fieldValue name='radiusStick' value='0.15'/> |
76 | <fieldValue name='appearance'> |
77 | <Appearance USE='App'/> |
78 | </fieldValue> |
79 | <fieldValue name='pageSize' value='1.0'/> |
80 | <fieldValue name='max' value='5.0'/> |
81 | </ProtoInstance> |
82 | <Transform translation='0.0 -1.25 0.0'> |
83 | <Shape> |
84 | <Appearance USE='App'/> |
85 | <Cylinder height='2.5' radius='0.02'/> |
86 | </Shape> |
87 | </Transform> |
88 | </Transform> |
89 | <Transform rotation='1.0 0.0 0.0 1.5708' translation='0.0 0.0 2.5'> |
90 |
<!-- ROUTE information for SldZ node:
[from position_changed to Worker.set_Z
]
-->
<ProtoInstance name='Slider' DEF='SldZ'> |
91 | <fieldValue name='initial_position' value='2.5'/> |
92 | <fieldValue name='radiusKnob' value='0.225'/> |
93 | <fieldValue name='min' value='1.0'/> |
94 | <fieldValue name='radiusStick' value='0.15'/> |
95 | <fieldValue name='appearance'> |
96 | <Appearance USE='App'/> |
97 | </fieldValue> |
98 | <fieldValue name='pageSize' value='1.0'/> |
99 | <fieldValue name='max' value='5.0'/> |
100 | </ProtoInstance> |
101 | <Transform translation='0.0 -1.25 0.0'> |
102 | <Shape> |
103 | <Appearance USE='App'/> |
104 | <Cylinder height='2.5' radius='0.02'/> |
105 | </Shape> |
106 | </Transform> |
107 | </Transform> |
108 | </Transform> |
109 | </Transform> |
110 | </Transform> |
111 | <Transform rotation='0.983 0.152 0.098 0.286'> |
112 | <Transform rotation='0.705 0.654 -0.274 -1.09'> |
113 |
<!-- ROUTE information for Trans node:
[from Worker.Pos_changed to scale
]
-->
<Transform DEF='Trans'> |
114 |
<!-- ROUTE information for TchBox node:
[from touchTime to SmoothWorker.Box_touched
]
-->
<TouchSensor DEF='TchBox' description='touch to activate'/> |
115 | <Shape> |
116 | <Appearance> |
117 | <Material ambientIntensity='0.0933' diffuseColor='0.37 0.0 0.75' emissiveColor='0.05 0.0 0.1' shininess='0.41' specularColor='0.91 0.91 0.91'/> |
118 | </Appearance> |
119 | <Box size='0.3 0.3 0.3'/> |
120 | </Shape> |
121 | </Transform> |
122 | </Transform> |
123 | </Transform> |
124 |
<!-- ROUTE information for Worker node:
[from SldX.position_changed to set_X
]
[from SldY.position_changed to set_Y
]
[from SldZ.position_changed to set_Z
]
[from Pos_changed to Trans.scale
]
-->
<Script DEF='Worker'> |
125 | <field name='set_Z' type='SFFloat' accessType='inputOnly'/> |
126 | <field name='set_Y' type='SFFloat' accessType='inputOnly'/> |
127 | <field name='set_X' type='SFFloat' accessType='inputOnly'/> |
128 | <field name='Pos' type='SFVec3f' value='1.0 1.0 1.0' accessType='initializeOnly'/> |
129 | <field name='Pos_changed' type='SFVec3f' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function set_X(x) { Pos.x= x; } function set_Y(y) { Pos.y= y; } function set_Z(z) { Pos.z= z; } function eventsProcessed() { Pos_changed= Pos; }
]]>
|
|
131 | </Script> |
132 | < ROUTE fromNode='SldX' fromField='position_changed' toNode='Worker' toField='set_X'/> |
133 | < ROUTE fromNode='SldY' fromField='position_changed' toNode='Worker' toField='set_Y'/> |
134 | < ROUTE fromNode='SldZ' fromField='position_changed' toNode='Worker' toField='set_Z'/> |
135 | < ROUTE fromNode='Worker' fromField='Pos_changed' toNode='Trans' toField='scale'/> |
136 |
<!-- ROUTE information for SmoothWorker node:
[from TchBox.touchTime to Box_touched
]
-->
<Script DEF='SmoothWorker'> |
137 | <field name='SmoothMovements' type='SFBool' accessType='outputOnly'/> |
138 | <field name='Box_touched' type='SFTime' accessType='inputOnly'/> |
<![CDATA[
ecmascript: function initialize() { SmoothMovements= true; } function Box_touched(now) { SmoothMovements= !SmoothMovements; }
]]>
|
|
140 | </Script> |
141 | < ROUTE fromNode='TchBox' fromField='touchTime' toNode='SmoothWorker' toField='Box_touched'/> |
142 | </Scene> |
143 | </X3D> |
Event Graph ROUTE Table entries with 5 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.
TchBox
TouchSensor touchTime SFTime |
SmoothWorker
Script Box_touched SFTime |
SmoothWorker
Script |
No ROUTE connection found for output events from this node. This Script has no direct access to other nodes. |
SldX
ProtoInstance position_changed SFFloat |
Worker
Script set_X SFFloat |
then
|
Worker
Script Pos_changed SFVec3f |
Trans
Transform scale SFVec3f |
SldY
ProtoInstance position_changed SFFloat |
Worker
Script set_Y SFFloat |
then
|
Worker
Script Pos_changed SFVec3f |
Trans
Transform scale SFVec3f |
SldZ
ProtoInstance position_changed SFFloat |
Worker
Script set_Z SFFloat |
then
|
Worker
Script Pos_changed SFVec3f |
Trans
Transform scale SFVec3f |
<!--
Color legend: X3D terminology
<X3dNode
DEF='idName' field='value'/>
matches XML terminology
<XmlElement
DEF='idName' attribute='value'/>
(Light-blue background: event-based behavior node or statement)
(Grey background inside box: inserted documentation)
(Magenta background: X3D Extensibility)
<ProtoInstance
name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->