X3D Model Documentation: TestScriptFieldSFTime.x3d

  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='titlecontent=' TestScriptFieldSFTime.x3d '/>
  6            <meta name='descriptioncontent='Test correct conversion of X3D SFTime field initializations from XML to Java to ClassicVRML'/>
  7            <meta name='creatorcontent='Don Brutzman'/>
  8            <meta name='createdcontent='17 November 2024'/>
  9            <meta name='modifiedcontent='17 November 2024'/>
 10            <meta name='referencecontent='../Followers/CoasterDamper.x3d'/>
 11            <meta name='subjectcontent='X3D conversion test'/>
 12            <meta name=' warning content=' under development '/>
 13            <meta name='identifiercontent=' TestScriptFieldSFTime.x3d '/>
 14            <meta name='generatorcontent='X3D-Edit 4.0, https://www.web3d.org/x3d/tools/X3D-Edit'/>
 15            <meta name='licensecontent='../license.html'/>
 16       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF node index: TestScript
-->
 17       <Scene>
 18            <WorldInfo title='TestScriptFieldSFTime.x3d'/>
 19            <Script DEF='TestScript'>
 20                 <field name='initialTimetype='SFTimevalue='0accessType='initializeOnly'/>
 21                 <field name='timeIncrementtype='SFTimevalue='1accessType='inputOutput'/>
 22                 <field name='timeStepTriggertype='SFTimeaccessType='inputOnly'/>
 23                 <field name='currentTimetype='SFTimeaccessType='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>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->
<!-- to top DEF node index: TestScript
-->
X3D Tooltips element index: field, head, meta, Scene, Script, WorldInfo, X3D, plus documentation for accessType definitions, type definitions, XML data types, and field types

Event Graph ROUTE Table with 0 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.


Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->

<!-- Color-coding legend: X3D terminology <X3dNode  DEF='idNamefield='value'/> matches XML terminology <XmlElement  DEF='idNameattribute='value'/>
(Light-blue background: event-based behavior node or statement) (Grey background inside box: inserted documentation) (Magenta background: X3D Extensibility)
-->

to top <!-- For additional help information about X3D scenes, please see X3D Tooltips, X3D Resources, and X3D Scene Authoring Hints. -->