Permalink
Cannot retrieve contributors at this time
Fetching contributors…
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.3//EN" "http://www.web3d.org/specifications/x3d-3.3.dtd"> | |
| <X3D profile='Full' version='3.3' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='http://www.web3d.org/specifications/x3d-3.3.xsd'> | |
| <head> | |
| <meta name='comment' content='World of Titania'/> | |
| <meta name='created' content='Mon, 14 Sep 2015 20:59:23 GMT'/> | |
| <meta name='creator' content='Holger Seelig'/> | |
| <meta name='generator' content='Titania V1.1.0, http://titania.create3000.de'/> | |
| <meta name='modified' content='Mon, 14 Sep 2015 20:59:23 GMT'/> | |
| </head> | |
| <Scene> | |
| <ProtoDeclare name='Rotor'> | |
| <ProtoInterface> | |
| <field accessType='inputOutput' type='SFBool' name='enabled' value='true'/> | |
| <field accessType='inputOutput' type='SFTime' name='cycleInterval' value='1'/> | |
| <field accessType='inputOutput' type='SFVec3f' name='axis' value='0 0 1'/> | |
| <field accessType='inputOutput' type='SFFloat' name='angle'/> | |
| <field accessType='inputOutput' type='SFBool' name='loop'/> | |
| <field accessType='inputOutput' type='SFTime' name='startTime'/> | |
| <field accessType='inputOutput' type='SFTime' name='pauseTime'/> | |
| <field accessType='inputOutput' type='SFTime' name='resumeTime'/> | |
| <field accessType='inputOutput' type='SFTime' name='stopTime'/> | |
| <field accessType='outputOnly' type='SFBool' name='isActive'/> | |
| <field accessType='outputOnly' type='SFTime' name='cycleTime'/> | |
| <field accessType='outputOnly' type='SFRotation' name='rotation_changed'/> | |
| </ProtoInterface> | |
| <ProtoBody> | |
| <TimeSensor DEF='Timer'> | |
| <IS> | |
| <connect nodeField='enabled' protoField='enabled'/> | |
| <connect nodeField='cycleInterval' protoField='cycleInterval'/> | |
| <connect nodeField='loop' protoField='loop'/> | |
| <connect nodeField='startTime' protoField='startTime'/> | |
| <connect nodeField='pauseTime' protoField='pauseTime'/> | |
| <connect nodeField='resumeTime' protoField='resumeTime'/> | |
| <connect nodeField='stopTime' protoField='stopTime'/> | |
| <connect nodeField='isActive' protoField='isActive'/> | |
| <connect nodeField='cycleTime' protoField='cycleTime'/> | |
| </IS> | |
| </TimeSensor> | |
| <OrientationInterpolator DEF='Interpolator' | |
| key='0, 0.25, 0.5, 0.75, 1' | |
| keyValue='0 0 1 0, 0 0 1 1.5708, 0 0 1 3.14159, 0 0 1 4.71239, 0 0 1 0'> | |
| <IS> | |
| <connect nodeField='value_changed' protoField='rotation_changed'/> | |
| </IS> | |
| </OrientationInterpolator> | |
| <Script DEF='Rotor'> | |
| <field accessType='inputOnly' type='SFVec3f' name='set_axis'/> | |
| <field accessType='inputOnly' type='SFFloat' name='set_angle'/> | |
| <field accessType='inputOutput' type='SFVec3f' name='axis'/> | |
| <field accessType='inputOutput' type='SFFloat' name='angle'/> | |
| <field accessType='initializeOnly' type='SFNode' name='interpolator'> | |
| <OrientationInterpolator USE='Interpolator'/> | |
| </field> | |
| <IS> | |
| <connect nodeField='axis' protoField='axis'/> | |
| <connect nodeField='angle' protoField='angle'/> | |
| </IS> | |
| <![CDATA[vrmlscript: | |
| function initialize () | |
| { | |
| eventsProcessed (); | |
| } | |
| function set_axis () | |
| { } | |
| function set_angle () | |
| { } | |
| function eventsProcessed () | |
| { | |
| var keyValue = interpolator .keyValue; | |
| for (var i = 0; i < 4; ++ i) | |
| keyValue [i] = new SFRotation (axis, angle + 2 * Math .PI / 4 * i); | |
| keyValue [4] = keyValue [0]; | |
| } | |
| ]]> | |
| </Script> | |
| <ROUTE fromNode='Timer' fromField='fraction_changed' toNode='Interpolator' toField='set_fraction'/> | |
| </ProtoBody> | |
| </ProtoDeclare> | |
| </Scene> | |
| </X3D> |