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='Towers.x3d'/> |
6 | <meta name='description' content='This world illustrates the use of translation, rotation, and scaling to build a multi-level tower.'/> |
7 | <meta name='creator' content='David R. Nadeau, John L. Moreland, Michael M. Heck'/> |
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/towers.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/mt0051.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/Towers.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 | <!-- A tower is built starting with a single pole and archway inlined from towerprt.wrl. This part is instanced 12 times around the perimeter of the tower by doing successive rotations. Add a cylinder for the ceiling, and a level is complete. --> |
25 | <!-- A level is then instanced three more times to build the next three upper levels of the tower. Each instance moves up to the next level, then scales the generic level down a bit and puts it there. This repeated scaling is what gives the tower it's diminishing size for the upper levels. --> |
26 | <!-- A glowing, rotating cube is added to the top of the generic tower. An OrientationInterpolator keeps the cube rotating. --> |
27 | <!-- Things to experiment with: --> |
28 | <!-- Add sound! --> |
29 | <!-- Add a spiraling ramp that leads to the upper levels. Perhaps put something interesting on each level. Perhaps make the rotating cube on top do something... such as be an Anchor leading to another world! --> |
30 | <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"' title='The Tower'/> |
31 | <Viewpoint description='Entry view' orientation='1.0 0.0 0.0 0.2' position='0.0 1.6 20.0'/> |
32 | <NavigationInfo headlight='false' speed='2.0'/> |
33 | <Background skyAngle='1.37 1.57' skyColor='0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.5 0.0'/> |
34 | <DirectionalLight ambientIntensity='0.2' direction='1.0 -0.5 -1.0'/> |
35 | <DirectionalLight ambientIntensity='0.2' color='0.0 0.3 1.0' direction='-1.0 1.0 -1.0' intensity='0.7'/> |
36 | <Transform scale='0.4 0.4 0.4'> |
37 | |
38 | |
39 | |
40 | <Inline url=' "TowerPart.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TowerPart.x3d" "TowerPart.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/TowerPart.wrl" '/> |
41 | </Transform> |
42 | <Transform rotation='0.0 1.0 0.0 0.52'> |
43 | <Transform USE='Part'/> |
44 | </Transform> |
45 | <Transform rotation='0.0 1.0 0.0 1.05'> |
46 | <Transform USE='Part'/> |
47 | </Transform> |
48 | <Transform rotation='0.0 1.0 0.0 1.57'> |
49 | <Transform USE='Part'/> |
50 | </Transform> |
51 | <Transform rotation='0.0 1.0 0.0 2.09'> |
52 | <Transform USE='Part'/> |
53 | </Transform> |
54 | <Transform rotation='0.0 1.0 0.0 2.62'> |
55 | <Transform USE='Part'/> |
56 | </Transform> |
57 | </Group> |
58 | <Transform rotation='0.0 1.0 0.0 3.14'> |
59 | <Group USE='HalfLevel'/> |
60 | </Transform> |
61 | <Transform translation='0.0 3.5 0.0'> |
62 | <Shape> |
63 | <Appearance> |
64 | <TextureTransform/> |
65 | <Material ambientIntensity='0.6'/> |
66 | <ImageTexture url=' "marble_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg " '/> |
67 | </Appearance> |
68 | <Cylinder height='0.05' radius='8.2' side='false'/> |
69 | </Shape> |
70 | </Transform> |
71 | </Transform> |
72 | <Shape> |
73 | <Appearance> |
74 | <Material diffuseColor='0.0 0.0 0.0' transparency='0.25'/> |
75 | </Appearance> |
76 | <Cylinder bottom='false' height='0.05' radius='16.4' side='false'/> |
77 | </Shape> |
78 | <Transform rotation='0.0 1.0 0.0 0.26' scale='0.8 0.9 0.8' translation='0.0 7.0 0.0'> |
79 | <Transform USE='OneLevel'/> |
80 | </Transform> |
81 | <Transform scale='0.6 0.8 0.6' translation='0.0 13.3 0.0'> |
82 | <Transform USE='OneLevel'/> |
83 | </Transform> |
84 | <Transform rotation='0.0 1.0 0.0 0.26' scale='0.4 0.7 0.4' translation='0.0 18.9 0.0'> |
85 | <Transform USE='OneLevel'/> |
86 | </Transform> |
87 |
<!-- ROUTE information for Thing node:
[from ThingSpinner.value_changed to set_rotation
]
-->
<Transform DEF='Thing' translation='0.0 31.0 0.0'> |
88 | <Transform rotation='-1.0 1.0 1.0 0.785'> |
89 | <Shape> |
90 | <Appearance> |
91 | <Material ambientIntensity='1.0' diffuseColor='0.0 1.0 0.0'/> |
92 |
<!-- ImageTexture
BlurImage is a DEF node that has 1 USE node: USE_1 --> <ImageTexture DEF='BlurImage' url=' "fire_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/fire_g.jpg " '/> |
93 | </Appearance> |
94 | <Box size='3.0 3.0 3.0'/> |
95 | </Shape> |
96 | </Transform> |
97 | </Transform> |
98 | </Transform> |
99 | <Shape> |
100 | <Appearance> |
101 | <TextureTransform scale='5.0 5.0'/> |
102 | <Material ambientIntensity='0.8' diffuseColor='0.0 1.0 0.3'/> |
103 | <ImageTexture USE='BlurImage'/> |
104 | </Appearance> |
105 | <IndexedFaceSet coordIndex='0 1 2 3 -1'> |
106 | <Coordinate point='-40.0 0.0 80.0 40.0 0.0 80.0 40.0 0.0 -40.0 -40.0 0.0 -40.0'/> |
107 | </IndexedFaceSet> |
108 | </Shape> |
109 |
<!-- ROUTE information for ThingTimer node:
[from fraction_changed to ThingSpinner.set_fraction
]
-->
<TimeSensor DEF='ThingTimer' cycleInterval='4.0' loop='true' startTime='1.0'/> |
110 |
<!-- ROUTE information for ThingSpinner node:
[from ThingTimer.fraction_changed to set_fraction
]
[from value_changed to Thing.set_rotation
]
-->
<OrientationInterpolator DEF='ThingSpinner' key='0.0 0.5 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'/> |
111 | < ROUTE fromNode='ThingTimer' fromField='fraction_changed' toNode='ThingSpinner' toField='set_fraction'/> |
112 | < ROUTE fromNode='ThingSpinner' fromField='value_changed' toNode='Thing' toField='set_rotation'/> |
113 | </Scene> |
114 | </X3D> |
Event Graph ROUTE Table with 2 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.
ThingTimer
TimeSensor fraction_changed SFFloat |
ThingSpinner
OrientationInterpolator set_fraction SFFloat |
then
|
ThingSpinner
OrientationInterpolator value_changed SFRotation |
Thing
Transform set_rotation SFRotation |
<!--
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. -->