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