X3D Model Documentation: Doorway.x3d

  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='titlecontent='Doorway.x3d'/>
  6            <meta name='descriptioncontent='The Doorway scene consists of four sliding stairs that lead forward along a path to a glowing white doorway.'/>
  7            <meta name='creatorcontent='David R. Nadeau'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='1 July 1998'/>
 10            <meta name='translatedcontent='2 February 2014'/>
 11            <meta name='modifiedcontent='20 October 2019'/>
 12            <meta name='referencecontent='originals/doorway.wrl'/>
 13            <meta name='referencecontent='http://www.siggraph.org/s98'/>
 14            <meta name='referencecontent='http://www.siggraph.org/s98/conference/courses/18.html'/>
 15            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0383.htm'/>
 16            <meta name='referencecontent='http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm'/>
 17            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dResources.html'/>
 18            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Doorway.x3d'/>
 19            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 20            <meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
 21            <meta name='licensecontent='../license.html'/>
 22       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: ArchBox, Entry, Granit, Proximity, Stair, Stair1, Stair1Path, Stair1Timer, Stair2, Stair2Path, Stair2Timer, Stair3, Stair3Path, Stair3Timer, Stair4, Stair4Path, Stair4Timer

Index for Viewpoint node: Entry
-->
 23       <Scene>
 24            <!-- A ProximitySensor routes to four TimeSensors, one per sliding stair. Each stair's timer routes to a PositionInterpolator that outputs varying positions side-to-side along the X axis. The PositionInterpolator's positions are routed into translation fields for Transform nodes surrounding each stair. -->
 25            <!-- By using different starting positions, the four stairs are made to slide back and forth in a pattern. -->
 26            <!-- Things to experiment with: -->
 27            <!-- Add sound! Perhaps the crackling of fire below and the grinding sliding sounds of the stone stairs. -->
 28            <!-- Use a ScalarInterpolator to flicker the red light as if there is fire below. -->
 29            <!-- Surround the doorway with an Anchor node that leads somewhere! -->
 30            <!-- Place a ProximitySensor around the doorway. As you approach it, the ProximitySensor triggers an OrientationInterpolator which slowly rotates the door open. The open door reveals ... ! -->
 31            <WorldInfo info='"Copyright (c) 1997, David R. Nadeau"title='The Doorway'/>
 32            <Viewpoint DEF='Entrydescription='Entry viewposition='0.0 3.1 10.0'/>
 33            <NavigationInfo avatarSize='0.5 3.0 1.5headlight='falsetype='"WALK" "ANY"'/>
 34 
          <!-- ROUTE information for Proximity node:  [from enterTime to Stair1Timer.set_startTime ] [from enterTime to Stair2Timer.set_startTime ] [from enterTime to Stair3Timer.set_startTime ] [from enterTime to Stair4Timer.set_startTime ] -->
          <ProximitySensor DEF='Proximitysize='10.0 10.0 50.0'/>
 35            <Background skyAngle='1.47 1.67skyColor='0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0'/>
 36            <DirectionalLight ambientIntensity='0.5color='0.0 0.3 1.0direction='1.0 -1.0 -3.0'/>
 37            <DirectionalLight ambientIntensity='0.3color='1.0 0.0 0.0direction='-1.0 2.5 -1.0'/>
 38            <DirectionalLight color='1.0 0.0 0.0direction='-1.0 2.5 -1.0'/>
 39            <Transform translation='0.0 -0.5 8.0'>
 40                 <Shape>
 41                      <Appearance>
 42                           <TextureTransform scale='0.5 0.5'/>
 43                           <Material/>
 44                           <ImageTexture DEF='Granit'   url=' "granit_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/granit_g.jpg " '/>
 45                      </Appearance>
 46                      <Box size='4.0 0.4 16.0'/>
 47                 </Shape>
 48            </Transform>
 49 
          <!-- ROUTE information for Stair1 node:  [from Stair1Path.value_changed to set_translation ] -->
          <Transform DEF='Stair1'>
 50 
               <!-- Inline Stair is a DEF node that has 4 USE nodes: USE_1, USE_2, USE_3, USE_4 -->
               <Inline DEF='Stair'   url=' "Tread.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Tread.x3d" "Tread.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Tread.wrl" '/>
 51            </Transform>
 52            <Transform translation='-1.0 0.5 -2.0'>
 53 
               <!-- ROUTE information for Stair2 node:  [from Stair2Path.value_changed to set_translation ] -->
               <Transform DEF='Stair2'>
 54                      <Inline USE='Stair'/>
 55                 </Transform>
 56            </Transform>
 57            <Transform translation='1.5 1.0 -4.0'>
 58 
               <!-- ROUTE information for Stair3 node:  [from Stair3Path.value_changed to set_translation ] -->
               <Transform DEF='Stair3'>
 59                      <Inline USE='Stair'/>
 60                 </Transform>
 61            </Transform>
 62            <Transform translation='0.0 1.5 -6.0'>
 63 
               <!-- ROUTE information for Stair4 node:  [from Stair4Path.value_changed to set_translation ] -->
               <Transform DEF='Stair4'>
 64                      <Inline USE='Stair'/>
 65                 </Transform>
 66            </Transform>
 67            <Transform translation='0.0 2.0 -8.0'>
 68                 <Inline USE='Stair'/>
 69            </Transform>
 70            <Transform scale='0.7 0.7 0.7translation='0.0 2.0 -10.0'>
 71                 <Inline   url=' "GlowDoor.x3d" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/GlowDoor.x3d" "GlowDoor.wrl" "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/GlowDoor.wrl" '/>
 72            </Transform>
 73            <Transform rotation='0.0 0.0 1.0 0.785translation='-2.0 6.0 -10.0'>
 74 
               <!-- Shape ArchBox is a DEF node that has 5 USE nodes: USE_1, USE_2, USE_3, USE_4, USE_5 -->
               <Shape DEF='ArchBox'>
 75                      <Appearance>
 76                           <Material ambientIntensity='0.0diffuseColor='1.0 1.0 1.0emissiveColor='0.4 0.4 0.4'/>
 77                           <ImageTexture   url=' "marble_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg " '/>
 78                      </Appearance>
 79                      <Box size='4.0 0.2 2.0'/>
 80                 </Shape>
 81                 <Transform translation='1.0 0.2 1.0'>
 82                      <Shape USE='ArchBox'/>
 83                 </Transform>
 84                 <Transform translation='2.0 0.4 2.0'>
 85                      <Shape USE='ArchBox'/>
 86                 </Transform>
 87            </Transform>
 88            <Transform rotation='0.0 0.0 1.0 -0.785translation='2.0 6.0 -10.0'>
 89                 <Shape USE='ArchBox'/>
 90                 <Transform translation='-1.0 0.2 1.0'>
 91                      <Shape USE='ArchBox'/>
 92                 </Transform>
 93                 <Transform translation='-2.0 0.4 2.0'>
 94                      <Shape USE='ArchBox'/>
 95                 </Transform>
 96            </Transform>
 97 
          <!-- ROUTE information for Stair1Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair1Path.set_fraction ] -->
          <TimeSensor DEF='Stair1TimercycleInterval='4.0loop='true'/>
 98 
          <!-- ROUTE information for Stair1Path node:  [from Stair1Timer.fraction_changed to set_fraction ] [from value_changed to Stair1.set_translation ] -->
          <PositionInterpolator DEF='Stair1Pathkey='0.0 0.25 0.5 0.75 1.0keyValue='0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0'/>
 99            < ROUTE  fromNode='Proximity' fromField='enterTime' toNode='Stair1Timer' toField='set_startTime'/>
100            < ROUTE  fromNode='Stair1Timer' fromField='fraction_changed' toNode='Stair1Path' toField='set_fraction'/>
101            < ROUTE  fromNode='Stair1Path' fromField='value_changed' toNode='Stair1' toField='set_translation'/>
102 
          <!-- ROUTE information for Stair2Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair2Path.set_fraction ] -->
          <TimeSensor DEF='Stair2TimercycleInterval='4.0loop='true'/>
103 
          <!-- ROUTE information for Stair2Path node:  [from Stair2Timer.fraction_changed to set_fraction ] [from value_changed to Stair2.set_translation ] -->
          <PositionInterpolator DEF='Stair2Pathkey='0.0 0.25 0.5 0.75 1.0keyValue='3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0'/>
104            < ROUTE  fromNode='Proximity' fromField='enterTime' toNode='Stair2Timer' toField='set_startTime'/>
105            < ROUTE  fromNode='Stair2Timer' fromField='fraction_changed' toNode='Stair2Path' toField='set_fraction'/>
106            < ROUTE  fromNode='Stair2Path' fromField='value_changed' toNode='Stair2' toField='set_translation'/>
107 
          <!-- ROUTE information for Stair3Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair3Path.set_fraction ] -->
          <TimeSensor DEF='Stair3TimercycleInterval='4.0loop='true'/>
108 
          <!-- ROUTE information for Stair3Path node:  [from Stair3Timer.fraction_changed to set_fraction ] [from value_changed to Stair3.set_translation ] -->
          <PositionInterpolator DEF='Stair3Pathkey='0.0 0.25 0.5 0.75 1.0keyValue='-3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0 -3.0 0.0 0.0'/>
109            < ROUTE  fromNode='Proximity' fromField='enterTime' toNode='Stair3Timer' toField='set_startTime'/>
110            < ROUTE  fromNode='Stair3Timer' fromField='fraction_changed' toNode='Stair3Path' toField='set_fraction'/>
111            < ROUTE  fromNode='Stair3Path' fromField='value_changed' toNode='Stair3' toField='set_translation'/>
112 
          <!-- ROUTE information for Stair4Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair4Path.set_fraction ] -->
          <TimeSensor DEF='Stair4TimercycleInterval='4.0loop='true'/>
113 
          <!-- ROUTE information for Stair4Path node:  [from Stair4Timer.fraction_changed to set_fraction ] [from value_changed to Stair4.set_translation ] -->
          <PositionInterpolator DEF='Stair4Pathkey='0.0 0.25 0.5 0.75 1.0keyValue='0.0 0.0 0.0 -3.0 0.0 0.0 0.0 0.0 0.0 3.0 0.0 0.0 0.0 0.0 0.0'/>
114            < ROUTE  fromNode='Proximity' fromField='enterTime' toNode='Stair4Timer' toField='set_startTime'/>
115            < ROUTE  fromNode='Stair4Timer' fromField='fraction_changed' toNode='Stair4Path' toField='set_fraction'/>
116            < ROUTE  fromNode='Stair4Path' fromField='value_changed' toNode='Stair4' toField='set_translation'/>
117       </Scene>
118  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: ArchBox, Entry, Granit, Proximity, Stair, Stair1, Stair1Path, Stair1Timer, Stair2, Stair2Path, Stair2Timer, Stair3, Stair3Path, Stair3Timer, Stair4, Stair4Path, Stair4Timer

Index for Viewpoint node: Entry
-->
X3D Tooltips element index: Appearance, Background, Box, DirectionalLight, head, ImageTexture, Inline, Material, meta, NavigationInfo, PositionInterpolator, ProximitySensor, ROUTE, Scene, Shape, TextureTransform, TimeSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

Event Graph ROUTE Table entries with 12 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.

Proximity
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
Stair1Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
Stair1Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Stair1Path
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
Stair1Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
Stair1
Transform
set_translation
SFVec3f
Proximity
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
Stair2Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
Stair2Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Stair2Path
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
Stair2Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
Stair2
Transform
set_translation
SFVec3f
Proximity
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
Stair3Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
Stair3Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Stair3Path
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
Stair3Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
Stair3
Transform
set_translation
SFVec3f
Proximity
ProximitySensor
enterTime
SFTime

ROUTE
event to
(1)
Stair4Timer
TimeSensor
set_startTime
SFTime
then
 
 
 
Stair4Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(2)
Stair4Path
PositionInterpolator
set_fraction
SFFloat
then
 
 
 
Stair4Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(3)
Stair4
Transform
set_translation
SFVec3f
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- Online at
https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/DoorwayIndex.html -->
<!-- Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Doorway.x3d -->

<!-- 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)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->