<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
<![CDATA[
ecmascript: function A_in(a) { A_ot= (new SFVec3f(a.x, a.y, 0)).multiply(10).subtract(new SFVec3f(5, 5, 0)); } function B_in(b) { B_ot= (new SFVec3f(b.x, b.y, 0)).multiply(10).subtract(new SFVec3f(5, 5, 0)); } function C_in(c) { C_ot= (new SFVec3f(c.x, c.y, 0)).multiply(10).subtract(new SFVec3f(5, 5, 0)); }
]]>
<![CDATA[
ecmascript: function DamperSThere() { activate(initiallyOn); } function activate(a) { isOn= a; Tau= a? .1 : .2; Color= a? HottColor : ColdColor; } function set_id(i) { id= i; } function TS_Touched() { activate(!isOn); }
]]>
<![CDATA[
ecmascript: function traceValue (eventValue, timeStamp) { // input eventValue received for trace field if (timeStamp - timeStampPreviousReport >= reportInterval) { Browser.println ('Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau type=SFFloat value=' + eventValue); timeStampPreviousReport = timeStamp; } } function timeOfDay (someTime) { hh = Math.floor (someTime /(60*60)) % 24; mm = Math.floor (someTime / 60) % 60; ss = Math.floor (someTime) % 60; if (hh < 9) hour = '0' + hh; else hour = hh; if (mm < 9) minute = '0' + mm; else minute = mm; if (ss < 9) second = '0' + ss; else second = ss; return '(' + hour + ':' + minute + ':' + second + ' GMT)'; }
]]>
<![CDATA[
ecmascript: function BtnDamperIsOn(on) { WcDamper= on? 0:-1; } function BtnChaserIsOn(on) { WcChaser= on? 0:-1; }
]]>
<![CDATA[
ecmascript: function initialize() { DamperTrails.length= ChaserTrails.length= cNumTrailPoints; for(var C= 0; C<cNumTrailPoints; C++ ) { DamperTrails[C]= new SFNode('Transform{}'); ChaserTrails[C]= new SFNode('Transform{}'); DamperTrails[C].children[0]= cShapeDamperTrailPoint; ChaserTrails[C].children[0]= cShapeChaserTrailPoint; } GrDamperTrail.children= DamperTrails; GrChaserTrail.children= ChaserTrails; } function DamperPos(Pos) { lastDamperPos= Pos; } function ChaserPos(Pos) { lastChaserPos= Pos; } function Tick() { for(var C= cNumTrailPoints - 1; C>0; C-- ) { DamperTrails[C].translation= DamperTrails[ C - 1].translation; ChaserTrails[C].translation= ChaserTrails[C - 1].translation; } DamperTrails[0].translation= lastDamperPos; ChaserTrails[0].translation= lastChaserPos; }
]]>
Event Graph ROUTE Table entries with 20 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.
TmrTrail
TimeSensor cycleTime SFTime |
ScrTrailer
Script Tick SFTime |
ScrToggleButton
Script Tau SFFloat |
ColorDamperNode
ColorDamper tau SFTime |
|
ScrToggleButton
Script Color SFColor |
ColorDamperNode
ColorDamper set_destination SFColor |
|
ScrToggleButton
Script Tau SFFloat |
Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau
Script traceValue SFFloat |
ScrTrailer
Script |
No ROUTE connection found for output from this node. Contains SFNode field with indirect access to another node. |
BtnChaser
ProtoInstance isOn SFBool |
ScrBtnMgr
Script BtnChaserIsOn SFBool |
then |
ScrBtnMgr
Script WcChaser SFInt32 |
SwObjectFollowed
Switch whichChoice SFInt32 |
||
then |
ScrBtnMgr
Script WcChaser SFInt32 |
SwChaserTrail
Switch whichChoice SFInt32 |
||||
then |
ScrBtnMgr
Script WcDamper SFInt32 |
SwObjectDampered
Switch whichChoice SFInt32 |
||||
then |
ScrBtnMgr
Script WcDamper SFInt32 |
SwDamperTrail
Switch whichChoice SFInt32 |
BtnDamper
ProtoInstance isOn SFBool |
ScrBtnMgr
Script BtnDamperIsOn SFBool |
then |
ScrBtnMgr
Script WcChaser SFInt32 |
SwObjectFollowed
Switch whichChoice SFInt32 |
||
then |
ScrBtnMgr
Script WcChaser SFInt32 |
SwChaserTrail
Switch whichChoice SFInt32 |
||||
then |
ScrBtnMgr
Script WcDamper SFInt32 |
SwObjectDampered
Switch whichChoice SFInt32 |
||||
then |
ScrBtnMgr
Script WcDamper SFInt32 |
SwDamperTrail
Switch whichChoice SFInt32 |
<!--
Online at
https://www.web3d.org/x3d/content/examples/Basic/Followers/TestPosition2DFollowerIndex.html
-->
<!--
Version control at
https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/content/examples/Basic/Followers/TestPosition2DFollower.x3d
-->
<!--
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. -->