1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 4.0//EN" "https://www.web3d.org/specifications/x3d-4.0.dtd">
|
3 | <X3D profile='Immersive' version='4.0' xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-4.0.xsd'> |
4 | <head> |
5 | <meta name='title' content='TestScriptFieldSFTime.x3d'/> |
6 | <meta name='description' content='Test correct conversion of X3D SFTime field initializations from XML to Java to ClassicVRML'/> |
7 | <meta name='creator' content='Don Brutzman'/> |
8 | <meta name='created' content='17 November 2024'/> |
9 | <meta name='modified' content='17 November 2024'/> |
10 | <meta name='reference' content='../Followers/CoasterDamper.x3d'/> |
11 | <meta name='subject' content='X3D conversion test'/> |
12 | <meta name=' warning ' content=' under development '/> |
13 | <meta name='identifier' content='TestScriptFieldSFTime.x3d'/> |
14 | <meta name='generator' content='X3D-Edit 4.0, https://savage.nps.edu/X3D-Edit'/> |
15 | <meta name='license' content='../license.html'/> |
16 | </head> |
17 | <Scene> |
18 | <WorldInfo title='TestScriptFieldSFTime.x3d'/> |
19 | <Script DEF='TestScript'> |
20 | <field name='initialTime' type='SFTime' value='0' accessType='initializeOnly'/> |
21 | <field name='timeIncrement' type='SFTime' value='1' accessType='inputOutput'/> |
22 | <field name='timeStepTrigger' type='SFTime' accessType='inputOnly'/> |
23 | <field name='currentTime' type='SFTime' accessType='outputOnly'/> |
<![CDATA[
ecmascript: function initialize (eventValue) { currentTime initialTime; // sends output event } function timeStepTrigger (eventValue) { currentTime += timeIncrement; // sends output event }
]]>
|
|
25 | </Script> |
26 | </Scene> |
27 | </X3D> |
<!--
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. -->