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='Rotor.x3d'/> |
6 | <meta name='creator' content='X3D working group'/> |
7 | <meta name='creator' content='Don Brutzman'/> |
8 | <meta name='created' content='24 May 2000'/> |
9 | <meta name='modified' content='28 October 2019'/> |
10 | <meta name='description' content='VRML 97 specification example: spinning rotor (with replacable children) Prototype for Example D 16 Chopper.'/> |
11 | <meta name='specificationSection' content='VRML 97, ISO/IEC 14772-1, Part 1: Functional specification and UTF-8 encoding, D.16 Chopper'/> |
12 | <meta name='specificationUrl' content='https://www.web3d.org/documents/specifications/14772/V2.0/part1/examples.html#D.16'/> |
13 | <meta name='identifier' content='https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Rotor.x3d'/> |
14 | <meta name='generator' content='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/> |
15 | <meta name='license' content='../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <WorldInfo title='Rotor.x3d'/> |
19 | <ProtoDeclare name='Rotor' appinfo='Rotor prototype to spin children geometry'> |
20 | <ProtoInterface> |
21 |
<field name='rate' type='SFTime' value='1' accessType='initializeOnly'
appinfo='rotation rate'/> |
22 |
<field name='children' type='MFNode' accessType='initializeOnly'
appinfo='children geometry to spin'/> |
23 |
<field name='startTime' type='SFTime' value='0' accessType='inputOutput'
appinfo='exposed TimeSensor field for animation'/> |
24 |
<field name='stopTime' type='SFTime' value='0' accessType='inputOutput'
appinfo='exposed TimeSensor field for animation'/> |
25 | </ProtoInterface> |
26 | <ProtoBody> |
27 |
<!-- ROUTE information for F node:
[from I.value_changed to set_rotation
]
-->
<Transform DEF='F'> |
28 | <IS> |
29 | <connect nodeField='children' protoField='children'/> |
30 | </IS> |
31 | </Transform> |
32 |
<!-- ROUTE information for T node:
[from fraction_changed to I.set_fraction
]
-->
<TimeSensor DEF='T' loop='true'> |
33 | <IS> |
34 | <connect nodeField='cycleInterval' protoField='rate'/> |
35 | <connect nodeField='startTime' protoField='startTime'/> |
36 | <connect nodeField='stopTime' protoField='stopTime'/> |
37 | </IS> |
38 | </TimeSensor> |
39 |
<!-- ROUTE information for I node:
[from T.fraction_changed to set_fraction
]
[from value_changed to F.set_rotation
]
-->
<OrientationInterpolator DEF='I' key='0 0.25 0.5 0.75 1' keyValue='0 1 0 0 0 1 0 1.57 0 1 0 3.14 0 1 0 4.71 0 1 0 0'/> |
40 | < ROUTE fromNode='T' fromField='fraction_changed' toNode='I' toField='set_fraction'/> |
41 | < ROUTE fromNode='I' fromField='value_changed' toNode='F' toField='set_rotation'/> |
42 | </ProtoBody> |
43 | </ProtoDeclare> |
44 | <!-- ==================== --> |
45 | <ProtoInstance name='Rotor'> |
46 | <fieldValue name='children'> |
47 | <Shape> |
48 | <Box size='4 0.2 0.1'/> |
49 | <Appearance> |
50 | <Material/> |
51 | </Appearance> |
52 | </Shape> |
53 | </fieldValue> |
54 | </ProtoInstance> |
55 | <Anchor DEF='TouchTextForExample' description='Touch Text For Example' parameter='"target=_blank"' url=' "Example16.x3d" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example16.x3d" "Example16.wrl" "https://www.web3d.org/x3d/content/examples/Basic/Vrml97Specification/Example16.wrl" '> |
56 | <Shape> |
57 | <Appearance> |
58 | <Material diffuseColor='0.1 0.4 0.8'/> |
59 | </Appearance> |
60 | <Text string='"Rotor is a" "Prototype (PROTO) declaration." "" "To see an example scene using this new node," "click text and view Example 16"'> |
61 | <FontStyle justify='"MIDDLE" "MIDDLE"' size='0.65'/> |
62 | </Text> |
63 | </Shape> |
64 | </Anchor> |
65 | </Scene> |
66 | </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.
T
TimeSensor fraction_changed SFFloat |
I
OrientationInterpolator set_fraction SFFloat |
then
|
I
OrientationInterpolator value_changed SFRotation |
F
Transform set_rotation SFRotation |
ProtoInstance Rotor |
No ROUTE connection found for output events from this node. This ProtoInstance contains SFNode/MFNode fieldValue declaration with direct access to other nodes, and thus has potential to produce run-time animation. |
TouchTextForExample
Anchor |
description='Touch Text For Example' User-interaction hint for this node. |
<!--
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)
<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. -->