X3D Model Documentation: TestPosition2DFollower.x3d

  1  <?xml version="1.0" encoding="UTF-8"?>
  2  <!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.2//EN" "https://www.web3d.org/specifications/x3d-3.2.dtd">
  3  <X3D profile='Immersive' version='3.2 xmlns:xsd='http://www.w3.org/2001/XMLSchema-instance' xsd:noNamespaceSchemaLocation='https://www.web3d.org/specifications/x3d-3.2.xsd'>
  4       <head>
  5            <meta name='titlecontent='TestPosition2DFollower.x3d'/>
  6            <meta name='descriptioncontent='X3D Follower example'/>
  7            <meta name='creatorcontent='Herbert Stocker'/>
  8            <meta name='translatorcontent='Don Brutzman'/>
  9            <meta name='createdcontent='18 April 2006'/>
 10            <meta name='translatedcontent='2 December 2011'/>
 11            <meta name='modifiedcontent='11 August 2024'/>
 12            <meta name='referencecontent='originals/test_Pos2DFollower.wrl'/>
 13            <meta name='referencecontent='Stocker_06_Followers.pdf'/>
 14            <meta name='referencecontent='http://www.hersto.com/Publications/Followers'/>
 15            <meta name='requirescontent='X3D version 3.2 or greater'/>
 16            <meta name='subjectcontent='X3D Follower Chaser Damper'/>
 17            <meta name=' warning content=' under development, instantReality works but BS Contact fails silently '/>
 18            <meta name='referencecontent='https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html'/>
 19            <meta name='referencecontent='https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html'/>
 20            <meta name='identifiercontent='https://www.web3d.org/x3d/content/examples/Basic/Followers/TestPosition2DFollower.x3d'/>
 21            <meta name='generatorcontent='Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html'/>
 22            <meta name='generatorcontent='X3D-Edit 3.3, https://savage.nps.edu/X3D-Edit'/>
 23            <meta name='licensecontent='../../license.html'/>
 24       </head>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AppLabels, AppObjectDampered, AppObjectFollowed, BtnChaser, BtnDamper, ColorDamperNode, FntLabels, GeomObject, GeomTrail, GrChaserTrail, GrDamperTrail, Mat, PositionChaser2DNode, PositionDamper2DNode, PositionTouchSensor, ScrBtnMgr, ScrTexCoordTo3D, ScrToggleButton, ScrTrailer, ShRect, SwChaserTrail, SwDamperTrail, SwObjectDampered, SwObjectFollowed, TmrTrail, Touch, Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau, TrObjectDampered, TrObjectDirect, TrObjectFollowed

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: ToggleButton
-->
 25       <Scene>
 26            <WorldInfo title='TestPosition2DFollower.x3d'/>
 27            <Viewpoint fieldOfView='0.716position='0.0 0.0 15.0'/>
 28            <NavigationInfo type='"NONE"'/>
 29            <Group>
 30 
               <!-- ROUTE information for PositionTouchSensor node:  [from hitTexCoord_changed to ScrTexCoordTo3D.A_in ] [from hitTexCoord_changed to PositionDamper2DNode.set_destination ] [from hitTexCoord_changed to PositionChaser2DNode.set_destination ] -->
               <TouchSensor DEF='PositionTouchSensordescription='move ball to demonstrate PositionChaser2D, PositionDamper2D'/>
 31                 <Transform translation='0.0 0.0 -0.05'>
 32                      <Shape>
 33                           <Appearance>
 34                                <Material diffuseColor='0.0 0.0 0.0emissiveColor='0.28 0.27 0.24'/>
 35                           </Appearance>
 36                           <Box size='10.0 10.0 0.1'/>
 37                      </Shape>
 38                 </Transform>
 39            </Group>
 40 
          <!-- ROUTE information for TrObjectDirect node:  [from ScrTexCoordTo3D.A_ot to translation ] -->
          <Transform DEF='TrObjectDirectscale='0.8 0.8 0.8'>
 41                 <Shape>
 42                      <Appearance>
 43                           <Material ambientIntensity='0.0333diffuseColor='0.02 0.24 0.53emissiveColor='0.01 0.12 0.27shininess='0.54specularColor='0.32 0.4 0.4'/>
 44                      </Appearance>
 45 
                    <!-- Sphere GeomObject is a DEF node that has 2 USE nodes: USE_1, USE_2 -->
                    <Sphere DEF='GeomObjectradius='0.3'/>
 46                 </Shape>
 47            </Transform>
 48 
 49                 <field name='A_ottype='SFVec3faccessType='outputOnly'/>
 50                 <field name='B_intype='SFVec2faccessType='inputOnly'/>
 51                 <field name='A_intype='SFVec2faccessType='inputOnly'/>
 52                 <field name='C_ottype='SFVec3faccessType='outputOnly'/>
 53                 <field name='B_ottype='SFVec3faccessType='outputOnly'/>
 54                 <field name='C_intype='SFVec2faccessType='inputOnly'/>
  <![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)); }

    
]]>
 56            </Script>
 57            < ROUTE  fromNode='PositionTouchSensor' fromField='hitTexCoord_changed' toNode='ScrTexCoordTo3D' toField='A_in'/>
 58            < ROUTE  fromNode='ScrTexCoordTo3D' fromField='A_ot' toNode='TrObjectDirect' toField='translation'/>
 59 
          <!-- ROUTE information for SwObjectDampered node:  [from ScrBtnMgr.WcDamper to whichChoice ] -->
          <Switch DEF='SwObjectDamperedwhichChoice='0'>
 60 
               <!-- ROUTE information for TrObjectDampered node:  [from ScrTexCoordTo3D.B_ot to translation ] [from translation to ScrTrailer.DamperPos ] -->
               <Transform DEF='TrObjectDampered'>
 61                      <Shape>
 62 
                         <!-- Appearance AppObjectDampered is a DEF node that has 1 USE node: USE_1 -->
                         <Appearance DEF='AppObjectDampered'>
 63                                <Material ambientIntensity='0.0333diffuseColor='0.53 0.02 0.24emissiveColor='0.27 0.01 0.12shininess='0.54specularColor='0.4 0.32 0.4'/>
 64                           </Appearance>
 65                           <Sphere USE='GeomObject'/>
 66                      </Shape>
 67                 </Transform>
 68            </Switch>
 69 
          <!-- ROUTE information for PositionDamper2DNode node:  [from PositionTouchSensor.hitTexCoord_changed to set_destination ] [from value_changed to ScrTexCoordTo3D.B_in ] -->
          <PositionDamper2D DEF='PositionDamper2DNodecontainerField='children'/>
 70            < ROUTE  fromNode='PositionTouchSensor' fromField='hitTexCoord_changed' toNode='PositionDamper2DNode' toField='set_destination'/>
 71            < ROUTE  fromNode='PositionDamper2DNode' fromField='value_changed' toNode='ScrTexCoordTo3D' toField='B_in'/>
 72            < ROUTE  fromNode='ScrTexCoordTo3D' fromField='B_ot' toNode='TrObjectDampered' toField='translation'/>
 73 
          <!-- ROUTE information for SwObjectFollowed node:  [from ScrBtnMgr.WcChaser to whichChoice ] -->
          <Switch DEF='SwObjectFollowedwhichChoice='0'>
 74 
               <!-- ROUTE information for TrObjectFollowed node:  [from ScrTexCoordTo3D.C_ot to translation ] [from translation to ScrTrailer.ChaserPos ] -->
               <Transform DEF='TrObjectFollowed'>
 75                      <Shape>
 76 
                         <!-- Appearance AppObjectFollowed is a DEF node that has 1 USE node: USE_1 -->
                         <Appearance DEF='AppObjectFollowed'>
 77                                <Material ambientIntensity='0.0333diffuseColor='0.24 0.53 0.02emissiveColor='0.12 0.27 0.01shininess='0.54specularColor='0.4 0.4 0.32'/>
 78                           </Appearance>
 79                           <Sphere USE='GeomObject'/>
 80                      </Shape>
 81                 </Transform>
 82            </Switch>
 83 
          <!-- ROUTE information for PositionChaser2DNode node:  [from PositionTouchSensor.hitTexCoord_changed to set_destination ] [from value_changed to ScrTexCoordTo3D.C_in ] -->
          <PositionChaser2D DEF='PositionChaser2DNodeduration='1.5containerField='children'/>
 84            < ROUTE  fromNode='PositionTouchSensor' fromField='hitTexCoord_changed' toNode='PositionChaser2DNode' toField='set_destination'/>
 85            < ROUTE  fromNode='PositionChaser2DNode' fromField='value_changed' toNode='ScrTexCoordTo3D' toField='C_in'/>
 86            < ROUTE  fromNode='ScrTexCoordTo3D' fromField='C_ot' toNode='TrObjectFollowed' toField='translation'/>
 87            <ProtoDeclare name='ToggleButton'>
 88                 <ProtoInterface>
 89                      <field name='HottColortype='SFColorvalue='0.8 0.8 0.3accessType='initializeOnly'/>
 90                      <field name='initiallyOntype='SFBoolvalue='falseaccessType='initializeOnly'/>
 91                      <field name='ColdColortype='SFColorvalue='0.2 0.2 0.0accessType='initializeOnly'/>
 92                      <field name='isOntype='SFBoolaccessType='outputOnly'/>
 93                 </ProtoInterface>
 94                 <ProtoBody>
 95                      <Transform scale='0.4 0.4 0.4'>
 96                           <TouchSensor DEF='Touchdescription='touch to activate'/>
 97                           <Shape DEF='ShRect'>
 98                                <Appearance>
 99                                     <Material DEF='MatambientIntensity='0.04diffuseColor='0.0 0.0 0.0shininess='0.11'/>
100                                </Appearance>
101                                <IndexedFaceSet coordIndex='0 1 2 3 -1'>
102                                     <Coordinate point='-1.0 -1.0 0.0 1.0 -1.0 0.0 1.0 1.0 0.0 -1.0 1.0 0.0'/>
103                                </IndexedFaceSet>
104                           </Shape>
105                      </Transform>
106 
                    <!-- ROUTE information for ScrToggleButton node:  [from Tau to ColorDamperNode.tau ] [from Color to ColorDamperNode.set_destination ] [from Tau to Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau.traceValue ] -->
                    <Script DEF='ScrToggleButton'>
107                           <field name='TS_Touchedtype='SFTimeaccessType='inputOnly'/>
108                           <field name='Colortype='SFColoraccessType='outputOnly'/>
109                           <field name='isOntype='SFBoolaccessType='outputOnly'/>
110                           <field name='ColdColortype='SFColoraccessType='initializeOnly'/>
111                           <field name='Tautype='SFTimeaccessType='outputOnly'/>
112                           <field name='initiallyOntype='SFBoolaccessType='initializeOnly'/>
113                           <field name='DamperSTheretype='SFBoolaccessType='inputOnly'/>
114                           <field name='HottColortype='SFColoraccessType='initializeOnly'/>
115                           <IS>
116                                <connect nodeField='isOnprotoField='isOn'/>
117                                <connect nodeField='ColdColorprotoField='ColdColor'/>
118                                <connect nodeField='initiallyOnprotoField='initiallyOn'/>
119                                <connect nodeField='HottColorprotoField='HottColor'/>
120                           </IS>
  <![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);
}

        
]]>
122                      </Script>
123 
                    <!-- ROUTE information for ColorDamperNode node:  [from ScrToggleButton.Tau to tau ] [from ScrToggleButton.Color to set_destination ] -->
                    <ColorDamper DEF='ColorDamperNodeorder='1containerField='children'/>
124                      < ROUTE  fromNode='ScrToggleButton' fromField='Tau' toNode='ColorDamperNode' toField='tau'/>
125                      < ROUTE  fromNode='ScrToggleButton' fromField='Color' toNode='ColorDamperNode' toField='set_destination'/>
126                      <Group>
127                           <!-- ======= ROUTE Trace ============================================== -->
128 
                         <!-- ROUTE information for Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau node:  [from ScrToggleButton.Tau to traceValue ] -->
                         <Script DEF='Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.taumustEvaluate='true'>
129                                <!-- Trace ROUTEd values on X3D browser console -->
130                                <field name='reportIntervaltype='SFTimevalue='1.0accessType='initializeOnly'
                               appinfo='Sampling frequency in seconds (0 means all values)'/>
131                                <field name='traceValuetype='SFTimeaccessType='inputOnly'/>
132                                <field name='timeStampPreviousReporttype='SFTimevalue='-1accessType='initializeOnly'/>
  <![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)';
    }

          
]]>
134                           </Script>
135                           < ROUTE  fromNode='ScrToggleButton' fromField='Tau' toNode='Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau' toField='traceValue'/>
136                           <!-- ======= ROUTE Trace block complete ===================================================== -->
137                      </Group>
138                 </ProtoBody>
139            </ProtoDeclare>
140            <Transform translation='-5.7 4.0 0.0'>
141 
               <!-- ROUTE information for BtnDamper node:  [from isOn to ScrBtnMgr.BtnDamperIsOn ] -->
               <ProtoInstance name='ToggleButtonDEF='BtnDamper'>
142                      <fieldValue name='HottColorvalue='0.8 0.03 0.36'/>
143                      <fieldValue name='initiallyOnvalue='true'/>
144                      <fieldValue name='ColdColorvalue='0.2 0.0080 0.09'/>
145                 </ProtoInstance>
146            </Transform>
147            <Transform translation='-8.0 3.9 0.0'>
148                 <Shape>
149 
                    <!-- Appearance AppLabels is a DEF node that has 1 USE node: USE_1 -->
                    <Appearance DEF='AppLabels'>
150                           <Material diffuseColor='0.0 0.0 0.0emissiveColor='0.8 0.8 0.8'/>
151                      </Appearance>
152                      <Text string='"Damper"'>
153 
                         <!-- FontStyle FntLabels is a DEF node that has 1 USE node: USE_1 -->
                         <FontStyle DEF='FntLabelsfamily='"Arial" "SANS"size='0.5'/>
154                      </Text>
155                 </Shape>
156            </Transform>
157            <Transform translation='-5.7 2.8 0.0'>
158 
               <!-- ROUTE information for BtnChaser node:  [from isOn to ScrBtnMgr.BtnChaserIsOn ] -->
               <ProtoInstance name='ToggleButtonDEF='BtnChaser'>
159                      <fieldValue name='HottColorvalue='0.36 0.8 0.03'/>
160                      <fieldValue name='initiallyOnvalue='true'/>
161                      <fieldValue name='ColdColorvalue='0.09 0.2 0.0080'/>
162                 </ProtoInstance>
163            </Transform>
164            <Transform translation='-8.0 2.7 0.0'>
165                 <Shape>
166                      <Appearance USE='AppLabels'/>
167                      <Text string='"Chaser"'>
168                           <FontStyle USE='FntLabels'/>
169                      </Text>
170                 </Shape>
171            </Transform>
172 
173                 <field name='BtnChaserIsOntype='SFBoolaccessType='inputOnly'/>
174                 <field name='WcDampertype='SFInt32accessType='outputOnly'/>
175                 <field name='WcChasertype='SFInt32accessType='outputOnly'/>
176                 <field name='BtnDamperIsOntype='SFBoolaccessType='inputOnly'/>
  <![CDATA[
      
ecmascript:

function BtnDamperIsOn(on)
{
    WcDamper= on? 0:-1;
}

function BtnChaserIsOn(on)
{
    WcChaser= on? 0:-1;
}

    
]]>
178            </Script>
179            < ROUTE  fromNode='BtnDamper' fromField='isOn' toNode='ScrBtnMgr' toField='BtnDamperIsOn'/>
180            < ROUTE  fromNode='BtnChaser' fromField='isOn' toNode='ScrBtnMgr' toField='BtnChaserIsOn'/>
181            < ROUTE  fromNode='ScrBtnMgr' fromField='WcDamper' toNode='SwObjectDampered' toField='whichChoice'/>
182            < ROUTE  fromNode='ScrBtnMgr' fromField='WcChaser' toNode='SwObjectFollowed' toField='whichChoice'/>
183 
          <!-- ROUTE information for SwDamperTrail node:  [from ScrBtnMgr.WcDamper to whichChoice ] -->
          <Switch DEF='SwDamperTrailwhichChoice='0'>
184 
               <!-- Group GrDamperTrail is a DEF node that has 1 USE node: USE_1 -->
               <Group DEF='GrDamperTrail'/>
185            </Switch>
186 
          <!-- ROUTE information for SwChaserTrail node:  [from ScrBtnMgr.WcChaser to whichChoice ] -->
          <Switch DEF='SwChaserTrailwhichChoice='0'>
187 
               <!-- Group GrChaserTrail is a DEF node that has 1 USE node: USE_1 -->
               <Group DEF='GrChaserTrail'/>
188            </Switch>
189 
          <!-- ROUTE information for TmrTrail node:  [from cycleTime to ScrTrailer.Tick ] -->
          <TimeSensor DEF='TmrTrailcycleInterval='0.020000000000000004loop='true'/>
190 
          <!-- ROUTE information for ScrTrailer node:  [from TmrTrail.cycleTime to Tick ] [from TrObjectDampered.translation to DamperPos ] [from TrObjectFollowed.translation to ChaserPos ] -->
          <Script DEF='ScrTrailerdirectOutput='true'>
191                 <field name='cShapeDamperTrailPointtype='SFNodeaccessType='initializeOnly'>
192                      <Shape>
193                           <Appearance USE='AppObjectDampered'/>
194 
                         <!-- Sphere GeomTrail is a DEF node that has 1 USE node: USE_1 -->
                         <Sphere DEF='GeomTrailradius='0.1'/>
195                      </Shape>
196                 </field>
197                 <field name='lastDamperPostype='SFVec3fvalue='0.0 0.0 0.0accessType='initializeOnly'/>
198                 <field name='ChaserTrailstype='MFNodeaccessType='initializeOnly'>
199                      <!-- no initialization nodes since this is a local field to hold content -->
200                 </field>
201                 <field name='cShapeChaserTrailPointtype='SFNodeaccessType='initializeOnly'>
202                      <Shape>
203                           <Appearance USE='AppObjectFollowed'/>
204                           <Sphere USE='GeomTrail'/>
205                      </Shape>
206                 </field>
207                 <field name='DamperTrailstype='MFNodeaccessType='initializeOnly'>
208                      <!-- no initialization nodes since this is a local field to hold content -->
209                 </field>
210                 <field name='GrChaserTrailtype='SFNodeaccessType='initializeOnly'>
211                      <Group USE='GrChaserTrail'/>
212                 </field>
213                 <field name='ChaserPostype='SFVec3faccessType='inputOnly'/>
214                 <field name='cNumTrailPointstype='SFInt32value='35accessType='initializeOnly'/>
215                 <field name='lastChaserPostype='SFVec3fvalue='0.0 0.0 0.0accessType='initializeOnly'/>
216                 <field name='Ticktype='SFTimeaccessType='inputOnly'/>
217                 <field name='DamperPostype='SFVec3faccessType='inputOnly'/>
218                 <field name='GrDamperTrailtype='SFNodeaccessType='initializeOnly'>
219                      <Group USE='GrDamperTrail'/>
220                 </field>
  <![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;
}

    
]]>
222            </Script>
223            < ROUTE  fromNode='TmrTrail' fromField='cycleTime' toNode='ScrTrailer' toField='Tick'/>
224            < ROUTE  fromNode='TrObjectDampered' fromField='translation' toNode='ScrTrailer' toField='DamperPos'/>
225            < ROUTE  fromNode='TrObjectFollowed' fromField='translation' toNode='ScrTrailer' toField='ChaserPos'/>
226            < ROUTE  fromNode='ScrBtnMgr' fromField='WcDamper' toNode='SwDamperTrail' toField='whichChoice'/>
227            < ROUTE  fromNode='ScrBtnMgr' fromField='WcChaser' toNode='SwChaserTrail' toField='whichChoice'/>
228       </Scene>
229  </X3D>
<!--

<!--
Event Graph ROUTE Table shows event connections.
-->

<!-- to top Index for DEF nodes: AppLabels, AppObjectDampered, AppObjectFollowed, BtnChaser, BtnDamper, ColorDamperNode, FntLabels, GeomObject, GeomTrail, GrChaserTrail, GrDamperTrail, Mat, PositionChaser2DNode, PositionDamper2DNode, PositionTouchSensor, ScrBtnMgr, ScrTexCoordTo3D, ScrToggleButton, ScrTrailer, ShRect, SwChaserTrail, SwDamperTrail, SwObjectDampered, SwObjectFollowed, TmrTrail, Touch, Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau, TrObjectDampered, TrObjectDirect, TrObjectFollowed

Index for Viewpoint node: Viewpoint_1

Index for ProtoDeclare definition: ToggleButton
-->
X3D Tooltips element index: Appearance, Box, ColorDamper, connect, Coordinate, field, fieldValue, FontStyle, Group, head, IndexedFaceSet, IS, Material, meta, NavigationInfo, PositionChaser2D, PositionDamper2D, ProtoBody, ProtoDeclare, ProtoInstance, ProtoInterface, ROUTE, Scene, Script, Shape, Sphere, Switch, Text, TimeSensor, TouchSensor, Transform, Viewpoint, WorldInfo, X3D, accessType and type, XML data types, field types

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.

PositionTouchSensor
TouchSensor
hitTexCoord_changed
SFVec2f

ROUTE
event to
(1)
ScrTexCoordTo3D
Script
A_in
SFVec2f
then
 
 
 
ScrTexCoordTo3D
Script
A_ot
SFVec3f

ROUTE
event to
(2)
TrObjectDirect
Transform
translation
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
B_ot
SFVec3f

ROUTE
event to
(2)
TrObjectDampered
Transform
translation
SFVec3f
then
 
 
 
TrObjectDampered
Transform
translation
SFVec3f

ROUTE
event to
(3)
ScrTrailer
Script
DamperPos
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
C_ot
SFVec3f

ROUTE
event to
(2)
TrObjectFollowed
Transform
translation
SFVec3f
then
 
 
 
TrObjectFollowed
Transform
translation
SFVec3f

ROUTE
event to
(3)
ScrTrailer
Script
ChaserPos
SFVec3f
PositionTouchSensor
TouchSensor
hitTexCoord_changed
SFVec2f

ROUTE
event to
(1)
PositionDamper2DNode
PositionDamper2D
set_destination
SFVec2f
then
 
 
 
PositionDamper2DNode
PositionDamper2D
value_changed
SFVec2f

ROUTE
event to
(2)
ScrTexCoordTo3D
Script
B_in
SFVec2f
then
 
 
 
ScrTexCoordTo3D
Script
A_ot
SFVec3f

ROUTE
event to
(3)
TrObjectDirect
Transform
translation
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
B_ot
SFVec3f

ROUTE
event to
(3)
TrObjectDampered
Transform
translation
SFVec3f
then
 
 
 
TrObjectDampered
Transform
translation
SFVec3f

ROUTE
event to
(4)
ScrTrailer
Script
DamperPos
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
C_ot
SFVec3f

ROUTE
event to
(3)
TrObjectFollowed
Transform
translation
SFVec3f
then
 
 
 
TrObjectFollowed
Transform
translation
SFVec3f

ROUTE
event to
(4)
ScrTrailer
Script
ChaserPos
SFVec3f
PositionTouchSensor
TouchSensor
hitTexCoord_changed
SFVec2f

ROUTE
event to
(1)
PositionChaser2DNode
PositionChaser2D
set_destination
SFVec2f
then
 
 
 
PositionChaser2DNode
PositionChaser2D
value_changed
SFVec2f

ROUTE
event to
(2)
ScrTexCoordTo3D
Script
C_in
SFVec2f
then
 
 
 
ScrTexCoordTo3D
Script
A_ot
SFVec3f

ROUTE
event to
(3)
TrObjectDirect
Transform
translation
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
B_ot
SFVec3f

ROUTE
event to
(3)
TrObjectDampered
Transform
translation
SFVec3f
then
 
 
 
TrObjectDampered
Transform
translation
SFVec3f

ROUTE
event to
(4)
ScrTrailer
Script
DamperPos
SFVec3f
  then
 
 
 
ScrTexCoordTo3D
Script
C_ot
SFVec3f

ROUTE
event to
(3)
TrObjectFollowed
Transform
translation
SFVec3f
then
 
 
 
TrObjectFollowed
Transform
translation
SFVec3f

ROUTE
event to
(4)
ScrTrailer
Script
ChaserPos
SFVec3f

Touch
TouchSensor
description='touch to activate' 
User-interaction hint for this node.(TouchSensor description is providing a tooltip)  

TmrTrail
TimeSensor
cycleTime
SFTime

ROUTE
event to
(1)
ScrTrailer
Script
Tick
SFTime

ScrToggleButton
Script
Tau
SFTime

ROUTE
event to
(1)
ColorDamperNode
ColorDamper
tau
SFTime
ScrToggleButton
Script
Color
SFColor

ROUTE
event to
(1)
ColorDamperNode
ColorDamper
set_destination
SFColor
ScrToggleButton
Script
Tau
SFTime

ROUTE
event to
(1)
Trace_ROUTE_ScrToggleButton.Tau_TO_Damp.tau
Script
traceValue
SFTime

      ScrTrailer
Script
No ROUTE connection found for output events from this node.
Contains SFNode fields with direct access to another node.
Contains MFNode fields with direct access to another node. 

BtnChaser
ProtoInstance
isOn
SFBool

ROUTE
event to
(1)
ScrBtnMgr
Script
BtnChaserIsOn
SFBool
then
 
 
 
ScrBtnMgr
Script
WcChaser
SFInt32

ROUTE
event to
(2)
SwObjectFollowed
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcChaser
SFInt32

ROUTE
event to
(2)
SwChaserTrail
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcDamper
SFInt32

ROUTE
event to
(2)
SwObjectDampered
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcDamper
SFInt32

ROUTE
event to
(2)
SwDamperTrail
Switch
whichChoice
SFInt32

BtnDamper
ProtoInstance
isOn
SFBool

ROUTE
event to
(1)
ScrBtnMgr
Script
BtnDamperIsOn
SFBool
then
 
 
 
ScrBtnMgr
Script
WcChaser
SFInt32

ROUTE
event to
(2)
SwObjectFollowed
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcChaser
SFInt32

ROUTE
event to
(2)
SwChaserTrail
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcDamper
SFInt32

ROUTE
event to
(2)
SwObjectDampered
Switch
whichChoice
SFInt32
  then
 
 
 
ScrBtnMgr
Script
WcDamper
SFInt32

ROUTE
event to
(2)
SwDamperTrail
Switch
whichChoice
SFInt32
Additional guidance on X3D animation can be found in the 10-Step Animation Design Process and Event Tracing hint sheets. Have fun with X3D! 😀

-->
<!-- 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> -->

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