| 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=' Swing.x3d '/> |
| 6 | <meta name='description' content='This file draw the swing in the playground with animation.'/> |
| 7 | <meta name='creator' content='Kok Keng Ng'/> |
| 8 | <meta name='created' content='20 September 2002'/> |
| 9 | <meta name='modified' content='20 October 2019'/> |
| 10 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/Swing.x3d '/> |
| 11 | <meta name='generator' content='X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 12 | <meta name='license' content='../../license.html'/> |
| 13 | </head> |
| 14 | <Scene> |
| 15 | <WorldInfo title='Swing.x3d'/> |
| 16 | <Transform> |
| 17 | <Group> |
| 18 | <Transform center='0 1 0' rotation='1 0 0 0.5' translation='-2 0 0'> |
| 19 |
<!-- Shape
SWINGVBarGP is a DEF node that has 3 USE nodes: USE_1, USE_2, USE_3 -->
<Shape DEF='SWINGVBarGP'> |
| 20 | <Cylinder radius='0.1'/> |
| 21 | <Appearance> |
| 22 | <Material diffuseColor='0.1 0.7 0.3' emissiveColor='0.1 0.7 0.3' shininess='0.7' specularColor='0.5 0.5 0.5'/> |
| 23 |
<ImageTexture
url=' "wood.jpg
" "https://www.web3d.org/x3d/content/examples/Savage/Buildings/PlayGround/wood.jpg
" '/>
|
| 24 | </Appearance> |
| 25 | </Shape> |
| 26 | </Transform> |
| 27 | <Transform center='0 1 0' rotation='1 0 0 -0.5' translation='-2 0 0'> |
| 28 | <Shape USE='SWINGVBarGP'/> |
| 29 | </Transform> |
| 30 | <Transform center='0 1 0' rotation='1 0 0 0.5' translation='2 0 0'> |
| 31 | <Shape USE='SWINGVBarGP'/> |
| 32 | </Transform> |
| 33 | <Transform center='0 1 0' rotation='1 0 0 -0.5' translation='2 0 0'> |
| 34 | <Shape USE='SWINGVBarGP'/> |
| 35 | </Transform> |
| 36 | <Transform rotation='0 0 1 1.57' translation='0 1 0'> |
| 37 | <Shape DEF='SWINGCBarSH'> |
| 38 | <Cylinder height='4.2' radius='0.1'/> |
| 39 | <Appearance> |
| 40 | <Material/> |
| 41 | </Appearance> |
| 42 | </Shape> |
| 43 | </Transform> |
| 44 | <Transform translation='-1 0.85 0'> |
| 45 | |
| 46 | <Transform rotation='0 0 1 1.57' scale='0.03 0.03 0.03'> |
| 47 | <Shape> |
| 48 | <Appearance> |
| 49 | <Material diffuseColor='1 1 1'/> |
| 50 | </Appearance> |
| 51 | <Extrusion beginCap='false' convex='false' creaseAngle='1.57' crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00' endCap='false' spine='2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/> |
| 52 | </Shape> |
| 53 | </Transform> |
| 54 | </Group> |
| 55 | </Transform> |
| 56 | <Transform translation='-0.5 0.85 0'> |
| 57 | <Group USE='LOOPGP'/> |
| 58 | </Transform> |
| 59 | <Transform translation='0.5 0.85 0'> |
| 60 | <Group USE='LOOPGP'/> |
| 61 | </Transform> |
| 62 | <Transform translation='1 0.85 0'> |
| 63 | <Group USE='LOOPGP'/> |
| 64 | </Transform> |
| 65 |
<!-- ROUTE information for SWINGSensor node:
[from touchTime to SWINGSEAT1Timer.set_startTime
]
[from touchTime to SWINGSEAT2Timer.set_startTime
]
-->
<TouchSensor DEF='SWINGSensor'/> |
| 66 | <Transform/> |
| 67 | </Group> |
| 68 | <Transform> |
| 69 | <Group> |
| 70 | <Transform> |
| 71 |
<!-- ROUTE information for SWINGSEAT1TX node:
[from SWINGSEAT1Inter.value_changed to set_rotation
]
-->
<Transform DEF='SWINGSEAT1TX' center='0 0.85 0' rotation='1 0 0 0.0001'> |
| 72 | <Group DEF='SWINGSEAT1GP'> |
| 73 | <Group> |
| 74 | <Transform scale='0.5 0.5 0.5' translation='-1 0.8 0'> |
| 75 | |
| 76 | <Transform rotation='1 0 0 1.57' scale='0.05 0.05 0.05'> |
| 77 | |
| 78 | |
| 79 | <Material diffuseColor='1 1 1'/> |
| 80 | </Appearance> |
| 81 | <Extrusion beginCap='false' convex='false' creaseAngle='1.57' crossSection='1.00 0.00 0.92 -0.38 0.71 -0.71 0.38 -0.92 0.00 -1.00 -0.38 -0.92 -0.71 -0.71 -0.92 -0.38 -1.00 -0.00 -0.92 0.38 -0.71 0.71 -0.38 0.92 0.00 1.00 0.38 0.92 0.71 0.71 0.92 0.38 1.00 0.00' endCap='false' spine='2.00 0.0 0.00 1.85 0.0 0.77 1.41 0.0 1.41 0.77 0.0 1.85 0.00 0.0 2.00 -0.77 0.0 1.85 -1.41 0.0 1.41 -1.85 0.0 0.77 -2.00 0.0 0.00 -1.85 0.0 -0.77 -1.41 0.0 -1.41 -0.77 0.0 -1.85 0.00 0.0 -2.00 0.77 0.0 -1.85 1.41 0.0 -1.41 1.85 0.0 -0.77 2.00 0.0 0.00'/> |
| 82 | </Shape> |
| 83 | </Transform> |
| 84 | <Transform scale='0.05 0.05 0.05' translation='0 -1.475 0'> |
| 85 | <Shape> |
| 86 | <Appearance USE='ROPEApp'/> |
| 87 | <Cylinder height='55'/> |
| 88 | </Shape> |
| 89 | </Transform> |
| 90 | </Group> |
| 91 | <Transform translation='1 0 0'> |
| 92 | <Group USE='ROPELeft'/> |
| 93 | </Transform> |
| 94 | <Transform translation='0.5 -2.85 0'> |
| 95 | <Shape> |
| 96 | <Box size='1.15 0.08 0.3'/> |
| 97 | <Appearance> |
| 98 | <Material diffuseColor='0.95 0.1 0.1' emissiveColor='0.05 0.05 0.05'/> |
| 99 | </Appearance> |
| 100 | </Shape> |
| 101 | </Transform> |
| 102 |
<!-- ROUTE information for SWINGSEAT1Sensor node:
[from touchTime to SWINGSEAT1Timer.set_startTime
]
-->
<TouchSensor DEF='SWINGSEAT1Sensor'/> |
| 103 |
<!-- ROUTE information for SWINGSEAT1Timer node:
[from SWINGSensor.touchTime to set_startTime
]
[from SWINGSEAT1Sensor.touchTime to set_startTime
]
[from fraction_changed to SWINGSEAT1Inter.set_fraction
]
-->
<TimeSensor DEF='SWINGSEAT1Timer' cycleInterval='40'/> |
| 104 |
<!-- ROUTE information for SWINGSEAT1Inter node:
[from SWINGSEAT1Timer.fraction_changed to set_fraction
]
[from value_changed to SWINGSEAT1TX.set_rotation
]
-->
<OrientationInterpolator DEF='SWINGSEAT1Inter' key='0 0.025 0.075 0.125 0.175 0.225 0.275 0.325 0.375 0.425 0.475 0.525 0.575 0.625 0.675 0.725 0.775 0.825 0.875 0.925 0.975 1.0' keyValue='1 0 0 0 1 0 0 0.785 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.3 1 0 0 1.3 1 0 0 -1.35 1 0 0 1.35 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.25 1 0 0 0.785 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.3 1 0 0 1.3 1 0 0 -1.35 1 0 0 1.35 1 0 0 -1.2 1 0 0 1.2 1 0 0 -1.25 1 0 0 0'/> |
| 105 | </Transform> |
| 106 | </Group> |
| 107 | </Group> |
| 108 | </Transform> |
| 109 | </Transform> |
| 110 |
<!-- ROUTE information for SWINGSEAT2TX node:
[from SWINGSEAT2Inter.value_changed to set_rotation
]
-->
<Transform DEF='SWINGSEAT2TX' center='0 0.85 0'> |
| 111 | <Group DEF='SWINGSEAT2GP'> |
| 112 | <Group> |
| 113 | <Transform scale='0.5 0.5 0.5' translation='-1 0.8 0'> |
| 114 | <Transform translation='3 0 0'> |
| 115 | |
| 116 | <Transform rotation='1 0 0 1.57' scale='0.05 0.05 0.05'> |
| 117 | <Shape USE='SWINRING'/> |
| 118 | </Transform> |
| 119 | <Transform scale='0.05 0.05 0.05' translation='0 -1.37 0'> |
| 120 | <Shape> |
| 121 | <Appearance USE='ROPEApp'/> |
| 122 | <Cylinder height='50'/> |
| 123 | </Shape> |
| 124 | </Transform> |
| 125 | </Group> |
| 126 | <Transform translation='1 0 0'> |
| 127 | <Group USE='ROPELeft2'/> |
| 128 | </Transform> |
| 129 | <Transform translation='0.5 -2.6 0'> |
| 130 | <Shape> |
| 131 | <Box size='1.15 0.08 0.3'/> |
| 132 | <Appearance> |
| 133 | <Material diffuseColor='0.1 0.1 0.95' emissiveColor='0.05 0.05 0.1'/> |
| 134 | </Appearance> |
| 135 | </Shape> |
| 136 | </Transform> |
| 137 |
<!-- ROUTE information for SWINGSEAT2Sensor node:
[from touchTime to SWINGSEAT2Timer.set_startTime
]
-->
<TouchSensor DEF='SWINGSEAT2Sensor'/> |
| 138 |
<!-- ROUTE information for SWINGSEAT2Timer node:
[from SWINGSensor.touchTime to set_startTime
]
[from SWINGSEAT2Sensor.touchTime to set_startTime
]
[from fraction_changed to SWINGSEAT2Inter.set_fraction
]
-->
<TimeSensor DEF='SWINGSEAT2Timer' cycleInterval='35'/> |
| 139 |
<!-- ROUTE information for SWINGSEAT2Inter node:
[from SWINGSEAT2Timer.fraction_changed to set_fraction
]
[from value_changed to SWINGSEAT2TX.set_rotation
]
-->
<OrientationInterpolator DEF='SWINGSEAT2Inter' key='0 0.025 0.075 0.125 0.175 0.225 0.275 0.325 0.375 0.425 0.475 0.525 0.575 0.625 0.675 0.725 0.775 0.825 0.875 0.925 0.975 1.0' keyValue='1 0 0 0 1 0 0 0.785 1 0 0 -1.25 1 0 0 1.3 1 0 0 -1.3 1 0 0 1.35 1 0 0 -1.35 1 0 0 1.25 1 0 0 -1.25 1 0 0 1.2 1 0 0 -1.2 1 0 0 0.785 1 0 0 -1.25 1 0 0 1.3 1 0 0 -1.3 1 0 0 1.35 1 0 0 -1.35 1 0 0 1.25 1 0 0 -1.25 1 0 0 1.2 1 0 0 -1.2 1 0 0 0'/> |
| 140 | </Transform> |
| 141 | </Transform> |
| 142 | </Group> |
| 143 | </Group> |
| 144 | </Transform> |
| 145 | </Group> |
| 146 | </Transform> |
| 147 | <Transform/> |
| 148 | < ROUTE fromNode='SWINGSensor' fromField='touchTime' toNode='SWINGSEAT1Timer' toField='set_startTime'/> |
| 149 | < ROUTE fromNode='SWINGSensor' fromField='touchTime' toNode='SWINGSEAT2Timer' toField='set_startTime'/> |
| 150 | < ROUTE fromNode='SWINGSEAT1Sensor' fromField='touchTime' toNode='SWINGSEAT1Timer' toField='set_startTime'/> |
| 151 | < ROUTE fromNode='SWINGSEAT1Timer' fromField='fraction_changed' toNode='SWINGSEAT1Inter' toField='set_fraction'/> |
| 152 | < ROUTE fromNode='SWINGSEAT1Inter' fromField='value_changed' toNode='SWINGSEAT1TX' toField='set_rotation'/> |
| 153 | < ROUTE fromNode='SWINGSEAT2Sensor' fromField='touchTime' toNode='SWINGSEAT2Timer' toField='set_startTime'/> |
| 154 | < ROUTE fromNode='SWINGSEAT2Timer' fromField='fraction_changed' toNode='SWINGSEAT2Inter' toField='set_fraction'/> |
| 155 | < ROUTE fromNode='SWINGSEAT2Inter' fromField='value_changed' toNode='SWINGSEAT2TX' toField='set_rotation'/> |
| 156 | </Transform> |
| 157 | <Transform> |
| 158 | <Group> |
| 159 | <Transform/> |
| 160 | <Transform/> |
| 161 | </Group> |
| 162 | </Transform> |
| 163 | <Transform> |
| 164 | <Group/> |
| 165 | </Transform> |
| 166 | <Viewpoint description='Swing' position='0 0.65 6.5'/> |
| 167 | </Scene> |
| 168 | </X3D> |
Event Graph ROUTE Table entries with 8 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.
|
SWINGSEAT1Sensor
TouchSensor touchTime SFTime |
SWINGSEAT1Timer
TimeSensor set_startTime SFTime |
then
|
SWINGSEAT1Timer
TimeSensor fraction_changed SFFloat |
SWINGSEAT1Inter
OrientationInterpolator set_fraction SFFloat |
then
|
SWINGSEAT1Inter
OrientationInterpolator value_changed SFRotation |
SWINGSEAT1TX
Transform set_rotation SFRotation |
|
SWINGSEAT2Sensor
TouchSensor touchTime SFTime |
SWINGSEAT2Timer
TimeSensor set_startTime SFTime |
then
|
SWINGSEAT2Timer
TimeSensor fraction_changed SFFloat |
SWINGSEAT2Inter
OrientationInterpolator set_fraction SFFloat |
then
|
SWINGSEAT2Inter
OrientationInterpolator value_changed SFRotation |
SWINGSEAT2TX
Transform set_rotation SFRotation |
|
SWINGSensor
TouchSensor touchTime SFTime |
SWINGSEAT1Timer
TimeSensor set_startTime SFTime |
then
|
SWINGSEAT1Timer
TimeSensor fraction_changed SFFloat |
SWINGSEAT1Inter
OrientationInterpolator set_fraction SFFloat |
then
|
SWINGSEAT1Inter
OrientationInterpolator value_changed SFRotation |
SWINGSEAT1TX
Transform set_rotation SFRotation |
|||
|
SWINGSensor
TouchSensor touchTime SFTime |
SWINGSEAT2Timer
TimeSensor set_startTime SFTime |
then
|
SWINGSEAT2Timer
TimeSensor fraction_changed SFFloat |
SWINGSEAT2Inter
OrientationInterpolator set_fraction SFFloat |
then
|
SWINGSEAT2Inter
OrientationInterpolator value_changed SFRotation |
SWINGSEAT2TX
Transform set_rotation SFRotation |
<!--
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.
-->