1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
|
3 | <X3D profile='Immersive' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.3.xsd'> |
4 | <head> |
5 | <meta name='title' content='Proximity2.x3d'/> |
6 | <meta name='description' content='Proximity pillars example illustrates the use of proximity sensors to sense when the user gets close, and trigger animations or sounds.'/> |
7 | <meta name='creator' content='David R. Nadeau'/> |
8 | <meta name='translator' content='Don Brutzman'/> |
9 | <meta name='created' content='1 July 1998'/> |
10 | <meta name='translated' content='2 February 2014'/> |
11 | <meta name='modified' content='20 October 2019'/> |
12 | <meta name='reference' content='originals/prox2.wrl'/> |
13 | <meta name='reference' content='http://www.siggraph.org/s98'/> |
14 | <meta name='reference' content='http://www.siggraph.org/s98/conference/courses/18.html'/> |
15 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0376.htm'/> |
16 | <meta name='reference' content='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/> |
17 | <meta name='reference' content='https://www.web3d.org/x3d/content/examples/X3dResources.html'/> |
18 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Proximity2.x3d'/> |
19 | <meta name='generator' content='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/> |
20 | <meta name='generator' content='X3D-Edit, https://savage.nps.edu/X3D-Edit'/> |
21 | <meta name='license' content='../license.html'/> |
22 | </head> |
23 | <Scene> |
24 | <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"' title='Proximity pillars'/> |
25 | <Viewpoint description='Entry view' orientation='0.0 1.0 0.0 0.785' position='7.5 1.7 7.5'/> |
26 | <NavigationInfo headlight='false' speed='3.0'/> |
27 | <Background skyAngle='1.57 1.87' skyColor='0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 1.0'/> |
28 | <Fog color='0.1 0.1 0.1' visibilityRange='18.0'/> |
29 | <DirectionalLight direction='-1.0 -0.5 -0.5'/> |
30 | <Shape> |
31 | <Appearance> |
32 | <TextureTransform scale='16.0 16.0'/> |
33 | <ImageTexture url=' "grill.png " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/grill.png " '/> |
34 | </Appearance> |
35 | <IndexedFaceSet coordIndex='0 1 2 3' texCoordIndex='0 1 2 3'> |
36 | <TextureCoordinate point='0.0 0.0 1.0 0.0 1.0 1.0 0.0 1.0'/> |
37 | <Coordinate point='-16.0 0.0 16.0 16.0 0.0 16.0 16.0 0.0 -16.0 -16.0 0.0 -16.0'/> |
38 | </IndexedFaceSet> |
39 | </Shape> |
40 | <Sound maxBack='100.0' maxFront='100.0' minBack='100.0' minFront='100.0'> |
41 |
<!-- ROUTE information for Bonk node:
[from HitBar1.collideTime to set_startTime
]
[from HitBar2.collideTime to set_startTime
]
[from HitBar3.collideTime to set_startTime
]
[from HitBar4.collideTime to set_startTime
]
-->
<AudioClip DEF='Bonk' stopTime='1.0' url=' "dropbrk.wav" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/dropbrk.wav" '/> |
42 | </Sound> |
43 |
<!-- ROUTE information for HitBar1 node:
[from collideTime to Bonk.set_startTime
]
-->
<Collision DEF='HitBar1'> |
44 | <Transform translation='-2.0 0.0 2.0'> |
45 |
<!-- ROUTE information for NearBar1 node:
[from enterTime to ClockOnBar1.set_startTime
]
[from exitTime to ClockOffBar1.set_startTime
]
-->
<ProximitySensor DEF='NearBar1' size='14.0 14.0 14.0'/> |
46 | <Shape> |
47 | <Appearance> |
48 |
<!-- ROUTE information for MaterialBar1 node:
[from OnBar1.value_changed to set_transparency
]
[from OffBar1.value_changed to set_transparency
]
-->
<Material DEF='MaterialBar1' diffuseColor='0.0 0.3 1.0' transparency='1.0'/> |
49 | </Appearance> |
50 | <IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'> |
51 | <Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 4.0 0.5 0.5 4.0 0.5 0.5 4.0 -0.5 -0.5 4.0 -0.5'/> |
52 | </IndexedFaceSet> |
53 | </Shape> |
54 | </Transform> |
55 | </Collision> |
56 |
<!-- ROUTE information for ClockOnBar1 node:
[from NearBar1.enterTime to set_startTime
]
[from fraction_changed to OnBar1.set_fraction
]
-->
<TimeSensor DEF='ClockOnBar1' stopTime='1.0'/> |
57 |
<!-- ROUTE information for ClockOffBar1 node:
[from NearBar1.exitTime to set_startTime
]
[from fraction_changed to OffBar1.set_fraction
]
-->
<TimeSensor DEF='ClockOffBar1' stopTime='1.0'/> |
58 |
<!-- ROUTE information for OnBar1 node:
[from ClockOnBar1.fraction_changed to set_fraction
]
[from value_changed to MaterialBar1.set_transparency
]
-->
<ScalarInterpolator DEF='OnBar1' key='0.0 1.0' keyValue='1.0 0.0'/> |
59 |
<!-- ROUTE information for OffBar1 node:
[from ClockOffBar1.fraction_changed to set_fraction
]
[from value_changed to MaterialBar1.set_transparency
]
-->
<ScalarInterpolator DEF='OffBar1' key='0.0 1.0' keyValue='0.0 1.0'/> |
60 | < ROUTE fromNode='NearBar1' fromField='enterTime' toNode='ClockOnBar1' toField='set_startTime'/> |
61 | < ROUTE fromNode='NearBar1' fromField='exitTime' toNode='ClockOffBar1' toField='set_startTime'/> |
62 | < ROUTE fromNode='ClockOnBar1' fromField='fraction_changed' toNode='OnBar1' toField='set_fraction'/> |
63 | < ROUTE fromNode='ClockOffBar1' fromField='fraction_changed' toNode='OffBar1' toField='set_fraction'/> |
64 | < ROUTE fromNode='OnBar1' fromField='value_changed' toNode='MaterialBar1' toField='set_transparency'/> |
65 | < ROUTE fromNode='OffBar1' fromField='value_changed' toNode='MaterialBar1' toField='set_transparency'/> |
66 | < ROUTE fromNode='HitBar1' fromField='collideTime' toNode='Bonk' toField='set_startTime'/> |
67 |
<!-- ROUTE information for HitBar2 node:
[from collideTime to Bonk.set_startTime
]
-->
<Collision DEF='HitBar2'> |
68 | <Transform translation='4.0 0.0 0.0'> |
69 |
<!-- ROUTE information for NearBar2 node:
[from enterTime to ClockOnBar2.set_startTime
]
[from exitTime to ClockOffBar2.set_startTime
]
-->
<ProximitySensor DEF='NearBar2' size='14.0 14.0 14.0'/> |
70 | <Shape> |
71 | <Appearance> |
72 |
<!-- ROUTE information for MaterialBar2 node:
[from OnBar2.value_changed to set_transparency
]
[from OffBar2.value_changed to set_transparency
]
-->
<Material DEF='MaterialBar2' diffuseColor='0.0 1.0 0.0' transparency='1.0'/> |
73 | </Appearance> |
74 | <IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'> |
75 | <Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 2.0 0.5 0.5 2.0 0.5 0.5 2.0 -0.5 -0.5 2.0 -0.5'/> |
76 | </IndexedFaceSet> |
77 | </Shape> |
78 | </Transform> |
79 | </Collision> |
80 |
<!-- ROUTE information for ClockOnBar2 node:
[from NearBar2.enterTime to set_startTime
]
[from fraction_changed to OnBar2.set_fraction
]
-->
<TimeSensor DEF='ClockOnBar2' stopTime='1.0'/> |
81 |
<!-- ROUTE information for ClockOffBar2 node:
[from NearBar2.exitTime to set_startTime
]
[from fraction_changed to OffBar2.set_fraction
]
-->
<TimeSensor DEF='ClockOffBar2' stopTime='1.0'/> |
82 |
<!-- ROUTE information for OnBar2 node:
[from ClockOnBar2.fraction_changed to set_fraction
]
[from value_changed to MaterialBar2.set_transparency
]
-->
<ScalarInterpolator DEF='OnBar2' key='0.0 1.0' keyValue='1.0 0.0'/> |
83 |
<!-- ROUTE information for OffBar2 node:
[from ClockOffBar2.fraction_changed to set_fraction
]
[from value_changed to MaterialBar2.set_transparency
]
-->
<ScalarInterpolator DEF='OffBar2' key='0.0 1.0' keyValue='0.0 1.0'/> |
84 | < ROUTE fromNode='NearBar2' fromField='enterTime' toNode='ClockOnBar2' toField='set_startTime'/> |
85 | < ROUTE fromNode='NearBar2' fromField='exitTime' toNode='ClockOffBar2' toField='set_startTime'/> |
86 | < ROUTE fromNode='ClockOnBar2' fromField='fraction_changed' toNode='OnBar2' toField='set_fraction'/> |
87 | < ROUTE fromNode='ClockOffBar2' fromField='fraction_changed' toNode='OffBar2' toField='set_fraction'/> |
88 | < ROUTE fromNode='OnBar2' fromField='value_changed' toNode='MaterialBar2' toField='set_transparency'/> |
89 | < ROUTE fromNode='OffBar2' fromField='value_changed' toNode='MaterialBar2' toField='set_transparency'/> |
90 | < ROUTE fromNode='HitBar2' fromField='collideTime' toNode='Bonk' toField='set_startTime'/> |
91 |
<!-- ROUTE information for HitBar3 node:
[from collideTime to Bonk.set_startTime
]
-->
<Collision DEF='HitBar3'> |
92 | <Transform translation='-4.0 0.0 -4.0'> |
93 |
<!-- ROUTE information for NearBar3 node:
[from enterTime to ClockOnBar3.set_startTime
]
[from exitTime to ClockOffBar3.set_startTime
]
-->
<ProximitySensor DEF='NearBar3' size='14.0 14.0 14.0'/> |
94 | <Shape> |
95 | <Appearance> |
96 |
<!-- ROUTE information for MaterialBar3 node:
[from OnBar3.value_changed to set_transparency
]
[from OffBar3.value_changed to set_transparency
]
-->
<Material DEF='MaterialBar3' diffuseColor='1.0 1.0 0.0' transparency='1.0'/> |
97 | </Appearance> |
98 | <IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'> |
99 | <Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 4.0 0.5 0.5 4.0 0.5 0.5 4.0 -0.5 -0.5 4.0 -0.5'/> |
100 | </IndexedFaceSet> |
101 | </Shape> |
102 | </Transform> |
103 | </Collision> |
104 |
<!-- ROUTE information for ClockOnBar3 node:
[from NearBar3.enterTime to set_startTime
]
[from fraction_changed to OnBar3.set_fraction
]
-->
<TimeSensor DEF='ClockOnBar3' stopTime='1.0'/> |
105 |
<!-- ROUTE information for ClockOffBar3 node:
[from NearBar3.exitTime to set_startTime
]
[from fraction_changed to OffBar3.set_fraction
]
-->
<TimeSensor DEF='ClockOffBar3' stopTime='1.0'/> |
106 |
<!-- ROUTE information for OnBar3 node:
[from ClockOnBar3.fraction_changed to set_fraction
]
[from value_changed to MaterialBar3.set_transparency
]
-->
<ScalarInterpolator DEF='OnBar3' key='0.0 1.0' keyValue='1.0 0.0'/> |
107 |
<!-- ROUTE information for OffBar3 node:
[from ClockOffBar3.fraction_changed to set_fraction
]
[from value_changed to MaterialBar3.set_transparency
]
-->
<ScalarInterpolator DEF='OffBar3' key='0.0 1.0' keyValue='0.0 1.0'/> |
108 | < ROUTE fromNode='NearBar3' fromField='enterTime' toNode='ClockOnBar3' toField='set_startTime'/> |
109 | < ROUTE fromNode='NearBar3' fromField='exitTime' toNode='ClockOffBar3' toField='set_startTime'/> |
110 | < ROUTE fromNode='ClockOnBar3' fromField='fraction_changed' toNode='OnBar3' toField='set_fraction'/> |
111 | < ROUTE fromNode='ClockOffBar3' fromField='fraction_changed' toNode='OffBar3' toField='set_fraction'/> |
112 | < ROUTE fromNode='OnBar3' fromField='value_changed' toNode='MaterialBar3' toField='set_transparency'/> |
113 | < ROUTE fromNode='OffBar3' fromField='value_changed' toNode='MaterialBar3' toField='set_transparency'/> |
114 | < ROUTE fromNode='HitBar3' fromField='collideTime' toNode='Bonk' toField='set_startTime'/> |
115 |
<!-- ROUTE information for HitBar4 node:
[from collideTime to Bonk.set_startTime
]
-->
<Collision DEF='HitBar4'> |
116 | <Transform translation='2.0 0.0 -2.0'> |
117 |
<!-- ROUTE information for NearBar4 node:
[from enterTime to ClockOnBar4.set_startTime
]
[from exitTime to ClockOffBar4.set_startTime
]
-->
<ProximitySensor DEF='NearBar4' size='14.0 14.0 14.0'/> |
118 | <Shape> |
119 | <Appearance> |
120 |
<!-- ROUTE information for MaterialBar4 node:
[from OnBar4.value_changed to set_transparency
]
[from OffBar4.value_changed to set_transparency
]
-->
<Material DEF='MaterialBar4' diffuseColor='1.0 0.0 0.0' transparency='1.0'/> |
121 | </Appearance> |
122 | <IndexedFaceSet coordIndex='0 1 5 4 -1 1 2 6 5 -1 2 3 7 6 -1 3 0 4 7 -1 4 5 6 7 -1'> |
123 | <Coordinate point='-0.5 0.0 0.5 0.5 0.0 0.5 0.5 0.0 -0.5 -0.5 0.0 -0.5 -0.5 3.0 0.5 0.5 3.0 0.5 0.5 3.0 -0.5 -0.5 3.0 -0.5'/> |
124 | </IndexedFaceSet> |
125 | </Shape> |
126 | </Transform> |
127 | </Collision> |
128 |
<!-- ROUTE information for ClockOnBar4 node:
[from NearBar4.enterTime to set_startTime
]
[from fraction_changed to OnBar4.set_fraction
]
-->
<TimeSensor DEF='ClockOnBar4' stopTime='1.0'/> |
129 |
<!-- ROUTE information for ClockOffBar4 node:
[from NearBar4.exitTime to set_startTime
]
[from fraction_changed to OffBar4.set_fraction
]
-->
<TimeSensor DEF='ClockOffBar4' stopTime='1.0'/> |
130 |
<!-- ROUTE information for OnBar4 node:
[from ClockOnBar4.fraction_changed to set_fraction
]
[from value_changed to MaterialBar4.set_transparency
]
-->
<ScalarInterpolator DEF='OnBar4' key='0.0 1.0' keyValue='1.0 0.0'/> |
131 |
<!-- ROUTE information for OffBar4 node:
[from ClockOffBar4.fraction_changed to set_fraction
]
[from value_changed to MaterialBar4.set_transparency
]
-->
<ScalarInterpolator DEF='OffBar4' key='0.0 1.0' keyValue='0.0 1.0'/> |
132 | < ROUTE fromNode='NearBar4' fromField='enterTime' toNode='ClockOnBar4' toField='set_startTime'/> |
133 | < ROUTE fromNode='NearBar4' fromField='exitTime' toNode='ClockOffBar4' toField='set_startTime'/> |
134 | < ROUTE fromNode='ClockOnBar4' fromField='fraction_changed' toNode='OnBar4' toField='set_fraction'/> |
135 | < ROUTE fromNode='ClockOffBar4' fromField='fraction_changed' toNode='OffBar4' toField='set_fraction'/> |
136 | < ROUTE fromNode='OnBar4' fromField='value_changed' toNode='MaterialBar4' toField='set_transparency'/> |
137 | < ROUTE fromNode='OffBar4' fromField='value_changed' toNode='MaterialBar4' toField='set_transparency'/> |
138 | < ROUTE fromNode='HitBar4' fromField='collideTime' toNode='Bonk' toField='set_startTime'/> |
139 | </Scene> |
140 | </X3D> |
Event Graph ROUTE Table entries with 28 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.
NearBar1
ProximitySensor enterTime SFTime |
ClockOnBar1
TimeSensor set_startTime SFTime |
then
|
ClockOnBar1
TimeSensor fraction_changed SFFloat |
OnBar1
ScalarInterpolator set_fraction SFFloat |
then
|
OnBar1
ScalarInterpolator value_changed SFFloat |
MaterialBar1
Material set_transparency SFFloat |
|||
NearBar1
ProximitySensor exitTime SFTime |
ClockOffBar1
TimeSensor set_startTime SFTime |
then
|
ClockOffBar1
TimeSensor fraction_changed SFFloat |
OffBar1
ScalarInterpolator set_fraction SFFloat |
then
|
OffBar1
ScalarInterpolator value_changed SFFloat |
MaterialBar1
Material set_transparency SFFloat |
NearBar2
ProximitySensor enterTime SFTime |
ClockOnBar2
TimeSensor set_startTime SFTime |
then
|
ClockOnBar2
TimeSensor fraction_changed SFFloat |
OnBar2
ScalarInterpolator set_fraction SFFloat |
then
|
OnBar2
ScalarInterpolator value_changed SFFloat |
MaterialBar2
Material set_transparency SFFloat |
|||
NearBar2
ProximitySensor exitTime SFTime |
ClockOffBar2
TimeSensor set_startTime SFTime |
then
|
ClockOffBar2
TimeSensor fraction_changed SFFloat |
OffBar2
ScalarInterpolator set_fraction SFFloat |
then
|
OffBar2
ScalarInterpolator value_changed SFFloat |
MaterialBar2
Material set_transparency SFFloat |
NearBar3
ProximitySensor enterTime SFTime |
ClockOnBar3
TimeSensor set_startTime SFTime |
then
|
ClockOnBar3
TimeSensor fraction_changed SFFloat |
OnBar3
ScalarInterpolator set_fraction SFFloat |
then
|
OnBar3
ScalarInterpolator value_changed SFFloat |
MaterialBar3
Material set_transparency SFFloat |
|||
NearBar3
ProximitySensor exitTime SFTime |
ClockOffBar3
TimeSensor set_startTime SFTime |
then
|
ClockOffBar3
TimeSensor fraction_changed SFFloat |
OffBar3
ScalarInterpolator set_fraction SFFloat |
then
|
OffBar3
ScalarInterpolator value_changed SFFloat |
MaterialBar3
Material set_transparency SFFloat |
NearBar4
ProximitySensor enterTime SFTime |
ClockOnBar4
TimeSensor set_startTime SFTime |
then
|
ClockOnBar4
TimeSensor fraction_changed SFFloat |
OnBar4
ScalarInterpolator set_fraction SFFloat |
then
|
OnBar4
ScalarInterpolator value_changed SFFloat |
MaterialBar4
Material set_transparency SFFloat |
|||
NearBar4
ProximitySensor exitTime SFTime |
ClockOffBar4
TimeSensor set_startTime SFTime |
then
|
ClockOffBar4
TimeSensor fraction_changed SFFloat |
OffBar4
ScalarInterpolator set_fraction SFFloat |
then
|
OffBar4
ScalarInterpolator value_changed SFFloat |
MaterialBar4
Material set_transparency SFFloat |
<!--
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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->