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='AllenDuttonVillage.x3d'/> |
6 | <meta name='creator' content='LT Allen Dutton'/> |
7 | <meta name='created' content='26 February 2001'/> |
8 | <meta name='modified' content='20 October 2019'/> |
9 | <meta name='description' content='Primitive village. Move mouse over the hut roofs to see a demonstration of sensors and interpolators'/> |
10 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/AllenDuttonVillage.x3d'/> |
11 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
12 | <meta name='license' content='../license.html'/> |
13 | </head> |
14 | <Scene> |
15 | <WorldInfo title='AllenDuttonVillage.x3d'/> |
16 | <Viewpoint description='View from 80m away' orientation='-1 0 0 0.5' position='0 60 100'/> |
17 | <Viewpoint description='Default viewpoint at (0 0 10) is way too close!! That is a bad place to be, provide a replacement viewpoint instead.'/> |
18 | <Background skyColor='0 0 .7'/> |
19 | <DirectionalLight color='1 1 0.8' direction='0 -1 0' intensity='0.5'/> |
20 | <Group> |
21 | <Transform translation='0 -3.5 0'> |
22 | <Shape> |
23 | <Appearance> |
24 | <Material diffuseColor='0 .7 0'/> |
25 | <ImageTexture DEF='grass' url=' "grass.jpg " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/grass.jpg " '/> |
26 | <TextureTransform scale='20 20'/> |
27 | </Appearance> |
28 | <Box size='160 1 160'/> |
29 | </Shape> |
30 | </Transform> |
31 | </Group> |
32 | <Group> |
33 | <Transform rotation='0 1 0 2.7' scale='0.01 0.01 0.01' translation='5 12.3 30'> |
34 | <Inline url=' "ALLEN.WRL" "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/ALLEN.WRL" '/> |
35 | </Transform> |
36 | <Transform translation='5 0 30'> |
37 | <Shape> |
38 | <Box size='5 5 5'/> |
39 | <Appearance> |
40 | <Material diffuseColor='0.5 0.5 0.5'/> |
41 | </Appearance> |
42 | </Shape> |
43 | </Transform> |
44 | </Group> |
45 | |
46 | <Shape> |
47 | <Appearance> |
48 | |
49 |
<!-- ImageTexture
wood is a DEF node that has 2 USE nodes: USE_1, USE_2 --> <ImageTexture DEF='wood' url=' "wood.gif " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/wood.gif " '/> |
50 | <TextureTransform rotation='1.57079' scale='1.0 4.0'/> |
51 | </Appearance> |
52 | <Cylinder bottom='false' height='6' radius='4' top='false'/> |
53 | </Shape> |
54 |
<!-- ROUTE information for ROOF_TRANSFORM node:
[from RoofRotateInterpolator.value_changed to set_rotation
]
[from RoofTranslateInterpolator.value_changed to set_translation
]
-->
<Transform DEF='ROOF_TRANSFORM' translation='0 4 0'> |
55 | <Shape> |
56 | <Appearance> |
57 | <Material DEF='YELLOW' diffuseColor='0.8 0.8 0'/> |
58 | <ImageTexture DEF='straw' url=' "straw.jpg " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/straw.jpg " '/> |
59 | </Appearance> |
60 | <Cone bottomRadius='6' height='4'/> |
61 | </Shape> |
62 |
<!-- ROUTE information for MyTouchSensor node:
[from isOver to CLOCK.set_enabled
]
-->
<TouchSensor DEF='MyTouchSensor' description='raise the roof'/> |
63 | </Transform> |
64 |
<!-- ROUTE information for CLOCK node:
[from MyTouchSensor.isOver to set_enabled
]
[from fraction_changed to RoofRotateInterpolator.set_fraction
]
[from fraction_changed to RoofTranslateInterpolator.set_fraction
]
-->
<TimeSensor DEF='CLOCK' cycleInterval='4' enabled='false' loop='true'/> |
65 |
<!-- ROUTE information for RoofRotateInterpolator node:
[from CLOCK.fraction_changed to set_fraction
]
[from value_changed to ROOF_TRANSFORM.set_rotation
]
-->
<OrientationInterpolator DEF='RoofRotateInterpolator' key='0.0 0.50 1.0' keyValue='0.0 1.0 0.0 0.0 0.0 1.0 0.0 3.14 0.0 1.0 0.0 6.28'/> |
66 |
<!-- ROUTE information for RoofTranslateInterpolator node:
[from CLOCK.fraction_changed to set_fraction
]
[from value_changed to ROOF_TRANSFORM.set_translation
]
-->
<PositionInterpolator DEF='RoofTranslateInterpolator' key='0.0 0.5 1.0' keyValue='0.0 4.0 0.0 0.0 8.0 0.0 0.0 4.0 0.0'/> |
67 | </Group> |
68 | |
69 | <Transform translation='10 0 0'> |
70 | <Shape> |
71 | <Appearance> |
72 | <Material USE='BROWN'/> |
73 | <ImageTexture USE='wood'/> |
74 | </Appearance> |
75 | <Cylinder bottom='false' height='6' radius='0.5' top='false'/> |
76 | </Shape> |
77 | </Transform> |
78 | <Transform translation='10 3 0'> |
79 | <Shape> |
80 | <Appearance> |
81 | <Material diffuseColor='0 .3 0'/> |
82 |
<!-- ImageTexture
leaves is a DEF node that has 1 USE node: USE_1 --> <ImageTexture DEF='leaves' url=' "leaves.jpg " "https://www.web3d.org/x3d/content/examples/Basic/StudentProjects/leaves.jpg " '/> |
83 | </Appearance> |
84 | <Cone bottomRadius='2' height='6'/> |
85 | </Shape> |
86 | </Transform> |
87 | </Group> |
88 |
<!-- Group
SPHERE_TREE is a DEF node that has 1 USE node: USE_1 -->
<Group DEF='SPHERE_TREE'> |
89 | <Transform translation='-30 0 -3'> |
90 | <Shape> |
91 | <Appearance> |
92 | <Material USE='BROWN'/> |
93 | <ImageTexture USE='wood'/> |
94 | </Appearance> |
95 | <Cylinder bottom='false' height='6' radius='0.5' top='false'/> |
96 | </Shape> |
97 | </Transform> |
98 | <Transform translation='-30 6 -3'> |
99 | <Shape> |
100 | <Appearance> |
101 | <Material diffuseColor='0 .3 0'/> |
102 | <ImageTexture USE='leaves'/> |
103 | </Appearance> |
104 | <Sphere radius='3.5'/> |
105 | </Shape> |
106 | </Transform> |
107 | </Group> |
108 | <Group> |
109 | <Transform scale='.8 1 .8' translation='-45 0 10'> |
110 | <Group USE='HUT'/> |
111 | <Transform translation='0 11 0'> |
112 | <Shape> |
113 | <Text string='"Visitor's" "Center"'> |
114 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='5.0' style='BOLDITALIC'/> |
115 | </Text> |
116 | <Appearance> |
117 | <Material diffuseColor='0.8 0.1 0.4'/> |
118 | </Appearance> |
119 | </Shape> |
120 | </Transform> |
121 | </Transform> |
122 | </Group> |
123 | <Group> |
124 | <Transform scale='1.5 1 1.5' translation='30 0 20'> |
125 | <Group USE='HUT'/> |
126 | <Transform translation='1 8 0'> |
127 | <Shape> |
128 | <Text string='"Chief's Hut"'> |
129 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='4.0' style='BOLD'/> |
130 | </Text> |
131 | <Appearance> |
132 | <Material diffuseColor='0.8 0.1 0.4'/> |
133 | </Appearance> |
134 | </Shape> |
135 | </Transform> |
136 | </Transform> |
137 | </Group> |
138 | <Group> |
139 | <Transform scale='.5 1 .5' translation='-10 0 20'> |
140 | <Group USE='HUT'/> |
141 | <Transform translation='0 24 0'> |
142 | <Shape> |
143 | <Text string='"Outhouse"'> |
144 | <FontStyle family='"SANS"' horizontal='false' justify='"MIDDLE" "MIDDLE"' size='5.0' style='BOLD'/> |
145 | </Text> |
146 | <Appearance> |
147 | <Material diffuseColor='0.8 0.1 0.4'/> |
148 | </Appearance> |
149 | </Shape> |
150 | </Transform> |
151 | </Transform> |
152 | </Group> |
153 | <Group> |
154 | <Transform scale='0.5 1.0 0.5' translation='30 0 30'> |
155 | <Group USE='SPHERE_TREE'/> |
156 | </Transform> |
157 | </Group> |
158 | <Group> |
159 | <Transform scale='2 1.0 2' translation='-45 0 30'> |
160 | <Group USE='CONE_TREE'/> |
161 | </Transform> |
162 | </Group> |
163 | < ROUTE fromNode='MyTouchSensor' fromField='isOver' toNode='CLOCK' toField='set_enabled'/> |
164 | < ROUTE fromNode='CLOCK' fromField='fraction_changed' toNode='RoofRotateInterpolator' toField='set_fraction'/> |
165 | < ROUTE fromNode='RoofRotateInterpolator' fromField='value_changed' toNode='ROOF_TRANSFORM' toField='set_rotation'/> |
166 | < ROUTE fromNode='CLOCK' fromField='fraction_changed' toNode='RoofTranslateInterpolator' toField='set_fraction'/> |
167 | < ROUTE fromNode='RoofTranslateInterpolator' fromField='value_changed' toNode='ROOF_TRANSFORM' toField='set_translation'/> |
168 | </Scene> |
169 | </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.
MyTouchSensor
TouchSensor isOver SFBool |
CLOCK
TimeSensor set_enabled SFBool |
then
|
CLOCK
TimeSensor fraction_changed SFFloat |
RoofRotateInterpolator
OrientationInterpolator set_fraction SFFloat |
then
|
RoofRotateInterpolator
OrientationInterpolator value_changed SFRotation |
ROOF_TRANSFORM
Transform set_rotation SFRotation |
|||
then
|
CLOCK
TimeSensor fraction_changed SFFloat |
RoofTranslateInterpolator
PositionInterpolator set_fraction SFFloat |
then
|
RoofTranslateInterpolator
PositionInterpolator value_changed SFVec3f |
ROOF_TRANSFORM
Transform set_translation 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)
-->
<!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->