| 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=' StairStepPrototype.x3d '/> |
| 6 | <meta name='description' content='Build one or more stair steps, in a straight line'/> |
| 7 | <meta name='creator' content='Don Brutzman, Michele Foti, Chad Hutchins'/> |
| 8 | <meta name='created' content='25 January 2012'/> |
| 9 | <meta name='modified' content='20 October 2019'/> |
| 10 | <meta name=' warning ' content=' under development '/> |
| 11 | <meta name='identifier' content=' https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/StairStepPrototype.x3d '/> |
| 12 | <meta name='generator' content='X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit'/> |
| 13 | <meta name='license' content='../license.html'/> |
| 14 | </head> |
| 15 | <Scene> |
| 16 | <WorldInfo title='StairStepPrototype.x3d'/> |
| 17 | <Viewpoint description='hey step' orientation='-0.59028 0.76927 0.2445 0.98786' position='2 2 2'/> |
| 18 | <Background skyColor='1 1 1'/> |
| 19 | <ProtoDeclare name='StairSteps' appinfo='Generate multiple stair steps, bottom left-hand corner at origin, going up along X axis'> |
| 20 | <ProtoInterface> |
| 21 |
<field name='diffuseColor' type='SFColor' value='0.8 0.8 0.6' accessType='inputOutput'
appinfo='default value 0.8 0.8 0.6'/> |
| 22 |
<field name='scale' type='SFVec3f' value='1 0.2 0.3' accessType='inputOutput'
appinfo='size of step, default'/> |
| 23 |
<field name='numberOfSteps' type='SFInt32' value='1' accessType='inputOutput'
appinfo='TODO'/> |
| 24 |
<field name='traceEnabled' type='SFBool' value='true' accessType='inputOutput'
appinfo='debug trace to Browser output console'/> |
| 25 | </ProtoInterface> |
| 26 | <ProtoBody> |
| 27 | <!-- First node determines node type of this prototype --> |
| 28 | <Transform DEF='TransformXdepthYheightZwidth'> |
| 29 | <IS> |
| 30 | <connect nodeField='scale' protoField='scale'/> |
| 31 | </IS> |
| 32 | <Shape DEF='SingleStepShape'> |
| 33 |
<!-- ROUTE information for StepIFS node:
[from StairStepPrototypeScript.computedCoordIndex to set_coordIndex
]
-->
<IndexedFaceSet DEF='StepIFS' solid='false' coordIndex='0 1 2 3 -1 4 5 6 7 -1 0 1 5 4 -1 1 2 6 5 -1 0 3 7 4 -1 3 2 6 7 -1'> |
| 34 |
<!-- ROUTE information for StepCoordinate node:
[from StairStepPrototypeScript.computedPoints to point
]
-->
<Coordinate DEF='StepCoordinate' point='0 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 1 0 1 1 1 0 1 1'/> |
| 35 | </IndexedFaceSet> |
| 36 | <Appearance> |
| 37 | <Material> |
| 38 | <IS> |
| 39 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
| 40 | </IS> |
| 41 | </Material> |
| 42 | <!-- TODO expose ImageTexture --> |
| 43 | </Appearance> |
| 44 | </Shape> |
| 45 | </Transform> |
| 46 | <!-- Subsequent nodes do not render, but still must be a valid X3D subgraph --> |
| 47 | <!-- This Script provides the X3D author with additional visibility and control over prototype inputs and outputs --> |
| 48 |
<!-- ROUTE information for StairStepPrototypeScript node:
[from computedCoordIndex to StepIFS.set_coordIndex
]
[from computedPoints to StepCoordinate.point
]
-->
<Script DEF='StairStepPrototypeScript' directOutput='true' url=' "StairStepPrototypeScript.js" "https://www.web3d.org/x3d/content/examples/X3dForAdvancedModeling/GeometricShapes/StairStepPrototypeScript.js" '> |
| 49 |
<field name='diffuseColor' type='SFColor' accessType='inputOutput'
appinfo='default value 0.8 0.8 0.6'/> |
| 50 |
<field name='scale' type='SFVec3f' accessType='inputOutput'
appinfo='size of step'/> |
| 51 |
<field name='numberOfSteps' type='SFInt32' accessType='inputOutput'
appinfo='TODO'/> |
| 52 |
<field name='traceEnabled' type='SFBool' accessType='inputOutput'
appinfo='debug trace to Browser output console'/> |
| 53 | <field name='computedPoints' type='MFVec3f' accessType='outputOnly'/> |
| 54 | <field name='computedCoordIndex' type='MFInt32' accessType='outputOnly'/> |
| 55 | <IS> |
| 56 | <connect nodeField='diffuseColor' protoField='diffuseColor'/> |
| 57 | <connect nodeField='scale' protoField='scale'/> |
| 58 | <connect nodeField='numberOfSteps' protoField='numberOfSteps'/> |
| 59 | <connect nodeField='traceEnabled' protoField='traceEnabled'/> |
| 60 | </IS> |
| 61 | </Script> |
| 62 | < ROUTE fromNode='StairStepPrototypeScript' fromField='computedCoordIndex' toNode='StepIFS' toField='set_coordIndex'/> |
| 63 | < ROUTE fromNode='StairStepPrototypeScript' fromField='computedPoints' toNode='StepCoordinate' toField='point'/> |
| 64 | </ProtoBody> |
| 65 | </ProtoDeclare> |
| 66 | <ProtoInstance name='StairSteps' DEF='stairs'> |
| 67 | <fieldValue name='diffuseColor' value='0.0 0.3 0.6'/> |
| 68 | <fieldValue name='numberOfSteps' value='7'/> |
| 69 | <fieldValue name='scale' value='1.0 0.2 0.3'/> |
| 70 | </ProtoInstance> |
| 71 | <Inline DEF='CoordinateAxes' url=' "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "../../../Savage/Tools/Authoring/CoordinateAxes.x3d" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.x3d" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.x3d" "../../X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "../../../Savage/Tools/Authoring/CoordinateAxes.wrl" "https://www.web3d.org/x3d/content/examples/X3dForWebAuthors/Chapter03Grouping/CoordinateAxes.wrl" "https://savage.nps.edu/Savage/Tools/Authoring/CoordinateAxes.wrl" '/> |
| 72 | </Scene> |
| 73 | </X3D> |
Event Graph ROUTE Table entries 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.
|
StairStepPrototypeScript
Script computedCoordIndex MFInt32 |
StepIFS
IndexedFaceSet set_coordIndex MFInt32 |
|
|
StairStepPrototypeScript
Script computedPoints MFVec3f |
StepCoordinate
Coordinate point MFVec3f |
|
stairs
ProtoInstance StairSteps |
No direct ROUTE connection found for events to/from this node. This ProtoInstance contains SFNode/MFNode fieldValue declarations with direct access to other nodes, and thus has potential to produce run-time animation. |
<!--
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)
<ProtoInstance name='ProtoName'>
<field
name='fieldName'/> </ProtoInstance>
-->
<!--
For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints.
-->