| 1 |
<?xml version="1.0" encoding="UTF-8"?>
|
| 2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
|
| 3 | <X3D profile='Immersive' version='3.2' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'> |
| 4 | <head> |
| 5 | <meta name='title' content=' DoorClassical.x3d '/> |
| 6 | <meta name='description' content='X3D Follower example'/> |
| 7 | <meta name='creator' content='Herbert Stocker'/> |
| 8 | <meta name='translator' content='Don Brutzman'/> |
| 9 | <meta name='created' content='18 April 2006'/> |
| 10 | <meta name='translated' content='2 December 2011'/> |
| 11 | <meta name='reference' content='originals/door-classical.wrl'/> |
| 12 | <meta name='reference' content=' Stocker_06_Followers.pdf '/> |
| 13 | <meta name='reference' content='http://www.hersto.com/Publications/Followers'/> |
| 14 | <meta name='requires' content='X3D version 3.2 or greater'/> |
| 15 | <meta name='subject' content='X3D Follower Chaser Damper'/> |
| 16 | <meta name='reference' content=' https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html '/> |
| 17 | <meta name='reference' content=' https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html '/> |
| 18 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Basic/Followers/originals/DoorClassical.x3d '/> |
| 19 | <meta name='generator' content=' Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html '/> |
| 20 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 21 | <meta name='license' content='../../license.html'/> |
| 22 | </head> |
| 23 | <Scene> |
| 24 | <WorldInfo title='DoorClassical.x3d'/> |
| 25 | <Background DEF='Bgnd' skyAngle='1.1 1.4 1.57' skyColor='0.176 0.314 0.529 0.176 0.314 0.529 0.314 0.549 0.784 0.706 0.824 0.922'/> |
| 26 | <Viewpoint description='initial View' fieldOfView='0.844' orientation='-0.0040 1.0 0.0030 0.439' position='3.163 1.65 5.877'/> |
| 27 | <Viewpoint description='from the top' fieldOfView='0.844' orientation='-0.979 -0.051 0.198 1.263' position='-1.216 9.189 2.77'/> |
| 28 | <Shape> |
| 29 | <Appearance> |
| 30 | <Material diffuseColor='0.0 0.0 0.0' emissiveColor='0.318 0.663 0.0'/> |
| 31 | </Appearance> |
| 32 | <Box size='100.0 0.1 100.0'/> |
| 33 | </Shape> |
| 34 | <Group> |
| 35 |
<!-- ROUTE information for TchCyls node:
[from touchTime to Worker.touched
]
-->
<TouchSensor DEF='TchCyls' description='touch to activate'/> |
| 36 | <Transform translation='-1.25 1.0 0.0'> |
| 37 | |
| 38 | <Appearance> |
| 39 | <Material ambientIntensity='0.00333' diffuseColor='0.52 0.26 0.0' emissiveColor='0.24 0.0 0.0' shininess='0.12' specularColor='0.97 0.98 0.12'/> |
| 40 | </Appearance> |
| 41 | <Cylinder radius='0.375'/> |
| 42 | </Shape> |
| 43 | </Transform> |
| 44 | <Transform translation='1.25 1.0 0.0'> |
| 45 | <Shape USE='ShCyl'/> |
| 46 | </Transform> |
| 47 | <Transform translation='-4.25 1.0 0.0'> |
| 48 | |
| 49 | <Appearance> |
| 50 | <Material ambientIntensity='0.00333' diffuseColor='0.425 0.182 0.0075' emissiveColor='0.425 0.182 0.0075' shininess='0.12'/> |
| 51 | </Appearance> |
| 52 | <Box size='6.0 1.99 0.1'/> |
| 53 | </Shape> |
| 54 | </Transform> |
| 55 | </Group> |
| 56 | <Transform translation='4.25 1.0 0.0'> |
| 57 | <Shape USE='ShWall'/> |
| 58 | </Transform> |
| 59 | <Transform translation='-1.25 0.0 0.0'> |
| 60 |
<!-- ROUTE information for TchDoor node:
[from touchTime to Worker.touched
]
-->
<TouchSensor DEF='TchDoor' description='touch to activate'/> |
| 61 |
<!-- ROUTE information for TransDoor node:
[from InpODoorOpen.value_changed to rotation
]
[from InpODoorClose.value_changed to rotation
]
-->
<Transform DEF='TransDoor'> |
| 62 | <Transform translation='1.25 1.0 0.0'> |
| 63 | <Shape> |
| 64 | <Appearance> |
| 65 | <Material diffuseColor='0.024 0.2 0.334' emissiveColor='0.05 0.4 0.666'/> |
| 66 | </Appearance> |
| 67 | <Box size='1.75 2.0 0.075'/> |
| 68 | </Shape> |
| 69 | </Transform> |
| 70 | </Transform> |
| 71 | </Transform> |
| 72 |
<!-- ROUTE information for TmrDoorOpen node:
[from Worker.doorOpenStart to startTime
]
[from Worker.doorOpenStop to stopTime
]
[from fraction_changed to InpODoorOpen.set_fraction
]
-->
<TimeSensor DEF='TmrDoorOpen' cycleInterval='1.3'/> |
| 73 |
<!-- ROUTE information for InpODoorOpen node:
[from TmrDoorOpen.fraction_changed to set_fraction
]
[from value_changed to TransDoor.rotation
]
-->
<OrientationInterpolator DEF='InpODoorOpen' key='0.0 1.0' keyValue='0.0 0.0 1.0 0.0 0.0 -1.0 0.0 2.5'/> |
| 74 |
<!-- ROUTE information for TmrDoorClose node:
[from Worker.doorCloseStart to startTime
]
[from Worker.doorCloseStop to stopTime
]
[from fraction_changed to InpODoorClose.set_fraction
]
-->
<TimeSensor DEF='TmrDoorClose' cycleInterval='1.3'/> |
| 75 |
<!-- ROUTE information for InpODoorClose node:
[from TmrDoorClose.fraction_changed to set_fraction
]
[from value_changed to TransDoor.rotation
]
-->
<OrientationInterpolator DEF='InpODoorClose' key='0.0 1.0' keyValue='0.0 -1.0 0.0 2.5 0.0 0.0 1.0 0.0'/> |
| 76 |
<!-- ROUTE information for Worker node:
[from TchDoor.touchTime to touched
]
[from TchCyls.touchTime to touched
]
[from doorOpenStart to TmrDoorOpen.startTime
]
[from doorOpenStop to TmrDoorOpen.stopTime
]
[from doorCloseStart to TmrDoorClose.startTime
]
[from doorCloseStop to TmrDoorClose.stopTime
]
-->
<Script DEF='Worker'> |
| 77 | <field name='touched' type='SFTime' accessType='inputOnly'/> |
| 78 | <field name='doorCloseStart' type='SFTime' accessType='outputOnly'/> |
| 79 | <field name='IsOpen' type='SFBool' value='false' accessType='initializeOnly'/> |
| 80 | <field name='doorOpenStop' type='SFTime' accessType='outputOnly'/> |
| 81 | <field name='doorCloseStop' type='SFTime' accessType='outputOnly'/> |
| 82 | <field name='doorOpenStart' type='SFTime' accessType='outputOnly'/> |
<![CDATA[
ecmascript:
function touched(now)
{
if(IsOpen)
{
doorCloseStart= now;
doorOpenStop= now;
IsOpen= false;
}else
{
doorOpenStart= now;
doorCloseStop= now;
IsOpen= true;
}
}
]]>
|
|
| 84 | </Script> |
| 85 | < ROUTE fromNode='TchDoor' fromField='touchTime' toNode='Worker' toField='touched'/> |
| 86 | < ROUTE fromNode='TchCyls' fromField='touchTime' toNode='Worker' toField='touched'/> |
| 87 | < ROUTE fromNode='Worker' fromField='doorOpenStart' toNode='TmrDoorOpen' toField='startTime'/> |
| 88 | < ROUTE fromNode='Worker' fromField='doorOpenStop' toNode='TmrDoorOpen' toField='stopTime'/> |
| 89 | < ROUTE fromNode='Worker' fromField='doorCloseStart' toNode='TmrDoorClose' toField='startTime'/> |
| 90 | < ROUTE fromNode='Worker' fromField='doorCloseStop' toNode='TmrDoorClose' toField='stopTime'/> |
| 91 | < ROUTE fromNode='TmrDoorOpen' fromField='fraction_changed' toNode='InpODoorOpen' toField='set_fraction'/> |
| 92 | < ROUTE fromNode='TmrDoorClose' fromField='fraction_changed' toNode='InpODoorClose' toField='set_fraction'/> |
| 93 | < ROUTE fromNode='InpODoorOpen' fromField='value_changed' toNode='TransDoor' toField='rotation'/> |
| 94 | < ROUTE fromNode='InpODoorClose' fromField='value_changed' toNode='TransDoor' toField='rotation'/> |
| 95 | </Scene> |
| 96 | </X3D> |
Event Graph ROUTE Table entries with 10 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.
<!--
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.
-->