<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "https://www.web3d.org/specifications/x3d-3.3.dtd">
<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 ' >
<head>
<meta name='titlecontent='Doorway.x3d'/>
<meta name='descriptioncontent='The Doorway scene consists of four sliding stairs that lead forward along a path to a glowing white doorway.'/>
<meta name='creatorcontent='David R. Nadeau'/>
<meta name='translatorcontent='Don Brutzman'/>
<meta name='createdcontent='1 July 1998'/>
<meta name='translatedcontent='2 February 2014'/>
<meta name='modifiedcontent='20 October 2019'/>
<meta name='referencecontent='originals/doorway.wrl'/>
<meta name='referencecontent=' http://www.siggraph.org/s98 '/>
<meta name='referencecontent=' http://www.siggraph.org/s98/conference/courses/18.html '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/slides/mt0383.htm '/>
<meta name='referencecontent=' http://www.sdsc.edu/~moreland/courses/Siggraph98/vrml97/vrml97.htm '/>
<meta name='referencecontent=' https://www.web3d.org/x3d/content/examples/X3dResources.html '/>
<meta name='identifiercontent=' https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/Doorway.x3d '/>
<meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
<meta name='generatorcontent='X3D-Edit, https://savage.nps.edu/X3D-Edit'/>
<meta name='licensecontent=' ../license.html'/>
</head>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- 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
-->
<Scene>
<!-- 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. -->
<!-- By using different starting positions, the four stairs are made to slide back and forth in a pattern. -->
<!-- Things to experiment with: -->
<!-- Add sound! Perhaps the crackling of fire below and the grinding sliding sounds of the stone stairs. -->
<!-- Use a ScalarInterpolator to flicker the red light as if there is fire below. -->
<!-- Surround the doorway with an Anchor node that leads somewhere! -->
<!-- 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 ... ! -->
<WorldInfo info='"Copyright (c) 1997, David R. Nadeau"title='The Doorway'/>
<Viewpoint DEF='Entrydescription='Entry viewposition='0.0 3.1 10.0'/>
<NavigationInfo avatarSize='0.5 3.0 1.5headlight='falsetype='"WALK" "ANY"'/>

<Background skyAngle='1.47 1.67skyColor='0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0'/>
<DirectionalLight ambientIntensity='0.5color='0.0 0.3 1.0direction='1.0 -1.0 -3.0'/>
<DirectionalLight ambientIntensity='0.3color='1.0 0.0 0.0direction='-1.0 2.5 -1.0'/>
<DirectionalLight color='1.0 0.0 0.0direction='-1.0 2.5 -1.0'/>
<Transform translation='0.0 -0.5 8.0'>
<Shape>
<Appearance>
<TextureTransform scale='0.5 0.5'/>
<Material/>
<ImageTexture DEF='Granit'
  url=' "granit_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/granit_g.jpg " ' />
</Appearance>
<Box size='4.0 0.4 16.0'/>
</Shape>
</Transform>
<!-- ROUTE information for Stair1 node:  [from Stair1Path.value_changed to set_translation ] -->
<Transform DEF='Stair1'>
</Transform>
<Transform translation='-1.0 0.5 -2.0'>
<!-- ROUTE information for Stair2 node:  [from Stair2Path.value_changed to set_translation ] -->
<Transform DEF='Stair2'>
<Inline USE=' Stair'/>
</Transform>
</Transform>
<Transform translation='1.5 1.0 -4.0'>
<!-- ROUTE information for Stair3 node:  [from Stair3Path.value_changed to set_translation ] -->
<Transform DEF='Stair3'>
<Inline USE=' Stair'/>
</Transform>
</Transform>
<Transform translation='0.0 1.5 -6.0'>
<!-- ROUTE information for Stair4 node:  [from Stair4Path.value_changed to set_translation ] -->
<Transform DEF='Stair4'>
<Inline USE=' Stair'/>
</Transform>
</Transform>
<Transform translation='0.0 2.0 -8.0'>
<Inline USE=' Stair'/>
</Transform>
<Transform scale='0.7 0.7 0.7translation='0.0 2.0 -10.0'> </Transform>
<Transform rotation='0.0 0.0 1.0 0.785translation='-2.0 6.0 -10.0'>
<Shape DEF='ArchBox'>
<Appearance>
<Material ambientIntensity='0.0diffuseColor='1.0 1.0 1.0emissiveColor='0.4 0.4 0.4'/>
<ImageTexture
  url=' "marble_g.jpg " "https://www.web3d.org/x3d/content/examples/Vrml2Sourcebook/Siggraph98Course/marble_g.jpg " ' />
</Appearance>
<Box size='4.0 0.2 2.0'/>
</Shape>
<Transform translation='1.0 0.2 1.0'>
<Shape USE=' ArchBox'/>
</Transform>
<Transform translation='2.0 0.4 2.0'>
<Shape USE=' ArchBox'/>
</Transform>
</Transform>
<Transform rotation='0.0 0.0 1.0 -0.785translation='2.0 6.0 -10.0'>
<Shape USE=' ArchBox'/>
<Transform translation='-1.0 0.2 1.0'>
<Shape USE=' ArchBox'/>
</Transform>
<Transform translation='-2.0 0.4 2.0'>
<Shape USE=' ArchBox'/>
</Transform>
</Transform>
<!-- ROUTE information for Stair1Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair1Path.set_fraction ] -->
<TimeSensor DEF='Stair1TimercycleInterval='4.0loop='true'/>

<!-- 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'/>

< ROUTE  fromNode=' Proximity' fromField='enterTime' toNode=' Stair1Timer' toField='set_startTime'/>
< ROUTE  fromNode=' Stair1Timer' fromField='fraction_changed' toNode=' Stair1Path' toField='set_fraction'/>
< ROUTE  fromNode=' Stair1Path' fromField='value_changed' toNode=' Stair1' toField='set_translation'/>
<!-- ROUTE information for Stair2Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair2Path.set_fraction ] -->
<TimeSensor DEF='Stair2TimercycleInterval='4.0loop='true'/>

<!-- 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'/>

< ROUTE  fromNode=' Proximity' fromField='enterTime' toNode=' Stair2Timer' toField='set_startTime'/>
< ROUTE  fromNode=' Stair2Timer' fromField='fraction_changed' toNode=' Stair2Path' toField='set_fraction'/>
< ROUTE  fromNode=' Stair2Path' fromField='value_changed' toNode=' Stair2' toField='set_translation'/>
<!-- ROUTE information for Stair3Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair3Path.set_fraction ] -->
<TimeSensor DEF='Stair3TimercycleInterval='4.0loop='true'/>

<!-- 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'/>

< ROUTE  fromNode=' Proximity' fromField='enterTime' toNode=' Stair3Timer' toField='set_startTime'/>
< ROUTE  fromNode=' Stair3Timer' fromField='fraction_changed' toNode=' Stair3Path' toField='set_fraction'/>
< ROUTE  fromNode=' Stair3Path' fromField='value_changed' toNode=' Stair3' toField='set_translation'/>
<!-- ROUTE information for Stair4Timer node:  [from Proximity.enterTime to set_startTime ] [from fraction_changed to Stair4Path.set_fraction ] -->
<TimeSensor DEF='Stair4TimercycleInterval='4.0loop='true'/>

<!-- 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'/>

< ROUTE  fromNode=' Proximity' fromField='enterTime' toNode=' Stair4Timer' toField='set_startTime'/>
< ROUTE  fromNode=' Stair4Timer' fromField='fraction_changed' toNode=' Stair4Path' toField='set_fraction'/>
< ROUTE  fromNode=' Stair4Path' fromField='value_changed' toNode=' Stair4' toField='set_translation'/>
</Scene>
</X3D>
<!--

to top <!-- Event Graph ROUTE Table shows event connections -->
 
<!-- 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
-->

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.

Stair1Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Stair1Path
PositionInterpolator
set_fraction
SFFloat

 
 
then
Stair1Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
Stair1
Transform
set_translation
SFVec3f


Stair2Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Stair2Path
PositionInterpolator
set_fraction
SFFloat

 
 
then
Stair2Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
Stair2
Transform
set_translation
SFVec3f


Stair3Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Stair3Path
PositionInterpolator
set_fraction
SFFloat

 
 
then
Stair3Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
Stair3
Transform
set_translation
SFVec3f


Stair4Timer
TimeSensor
fraction_changed
SFFloat

ROUTE
event to
(1)
Stair4Path
PositionInterpolator
set_fraction
SFFloat

 
 
then
Stair4Path
PositionInterpolator
value_changed
SFVec3f

ROUTE
event to
(2)
Stair4
Transform
set_translation
SFVec3f


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


-->

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