X3D
type: NamedIndividual
has head: head
has scene: Scene
profile: Immersive
version: 3.2
no namespace schema location: https://www.web3d.org/specifications/x3d-3.2.xsd

meta 1 1
type: NamedIndividual
type: meta
has parent: head
content: FollowerPrototypeDeclarations.x3d
name: title

meta 1 2
type: NamedIndividual
type: meta
has parent: head
content: Original implementation pattern as prototype declarations for Follower (Chaser and Damper) nodes, useful for browser developers.
name: description

meta 1 3
type: NamedIndividual
type: meta
has parent: head
content: Herbert Stocker
name: creator

meta 1 4
type: NamedIndividual
type: meta
has parent: head
content: Don Brutzman
name: translator

meta 1 5
type: NamedIndividual
type: meta
has parent: head
content: 18 April 2006
name: created

meta 1 6
type: NamedIndividual
type: meta
has parent: head
content: 2 December 2011
name: translated

meta 1 7
type: NamedIndividual
type: meta
has parent: head
content: 2 January 2025
name: modified

meta 1 8
type: NamedIndividual
type: meta
has parent: head
content: This scene was used for X3D development and is no longer correct.
name: warning

meta 1 9
type: NamedIndividual
type: meta
has parent: head
content: X3D Architecture, clause 39 Followers component
name: specificationSection

meta 1 10
type: NamedIndividual
type: meta
has parent: head
content: https://www.web3d.org/specifications/X3Dv4/ISO-IEC19775-1v4-IS/Part01/components/followers.html
name: specificationUrl

meta 1 11
type: NamedIndividual
type: meta
has parent: head
content: FollowerExternalPrototypeDeclarations.x3d
name: reference

meta 1 12
type: NamedIndividual
type: meta
has parent: head
content: originals/Chasers.wrl
name: reference

meta 1 13
type: NamedIndividual
type: meta
has parent: head
content: originals/Dampers.wrl
name: reference

meta 1 14
type: NamedIndividual
type: meta
has parent: head
content: Stocker_06_Followers.pdf
name: reference

meta 1 15
type: NamedIndividual
type: meta
has parent: head
content: http://www.hersto.com/Publications/Followers
name: reference

meta 1 16
type: NamedIndividual
type: meta
has parent: head
content: X3D version 3.0, 3.1
name: requires

meta 1 17
type: NamedIndividual
type: meta
has parent: head
content: X3D Follower Chaser Damper
name: subject

meta 1 18
type: NamedIndividual
type: meta
has parent: head
content: https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html
name: reference

meta 1 19
type: NamedIndividual
type: meta
has parent: head
content: https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html
name: reference

meta 1 20
type: NamedIndividual
type: meta
has parent: head
content: https://www.web3d.org/x3d/content/examples/Basic/Followers/FollowerPrototypeDeclarations.x3d
name: identifier

meta 1 21
type: NamedIndividual
type: meta
has parent: head
content: Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html
name: generator

meta 1 22
type: NamedIndividual
type: meta
has parent: head
content: X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit
name: generator

meta 1 23
type: NamedIndividual
type: meta
has parent: head
content: ../../license.html
name: license

FollowerPrototypeDeclarations.x3d
description: Original implementation pattern as prototype declarations for Follower (Chaser and Damper) nodes, useful for browser developers.
creator: Herbert Stocker
translator: Don Brutzman
created: 18 April 2006
translated: 2 December 2011
modified: 2 January 2025
warning: This scene was used for X3D development and is no longer correct.
reference: FollowerExternalPrototypeDeclarations.x3d
reference: originals/Chasers.wrl
reference: originals/Dampers.wrl
reference: Stocker_06_Followers.pdf
reference: http://www.hersto.com/Publications/Followers
requires: X3D version 3.0, 3.1
subject: X3D Follower Chaser Damper
reference: https://www.web3d.org/x3d/specifications/ISO-IEC-19775-1.2-X3D-AbstractSpecification/Part01/components/followers.html
reference: https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html
generator: Vrml97ToX3dNist, http://ovrt.nist.gov/v2_x3d.html
generator: X3D-Edit 3.3, https://www.web3d.org/x3d/tools/X3D-Edit
license: ../../license.html

WorldInfo 2 1
type: NamedIndividual
type: WorldInfo
has parent: Scene
info: "The ExternProto nodes found in this file implement principles described in the paper" "Linear Filters - Animating Objects in a Flexible and Pleasing Way" "They have been proposed and added to the X3D standard in 2006." "Webpage: http://www.hersto.net/Followers" "" "Please use the code in this file in any content or application you like" "or modify it in any way." "" "The code here works, however things like detecting when a transition has ended" "and when the node can stop calculating and updating the output or secondary fields" "like set_value or initial_destination are not yet implemented." "Nevertheless, set_destination and value_changed do work."
title: Damper nodes

ProtoDeclare 2 2
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 2 1
has proto body: ProtoBody 2 2 2
name: PositionChaser

field 2 2 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
name: value_changed
type: SFVec3f

field 2 2 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: inputOnly
name: set_value
type: SFVec3f

field 2 2 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
name: credits
type: MFString
value: "Initial idea and copyright by Herbert Stocker http://www.hersto.net"

field 2 2 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: outputOnly
name: isActive
type: SFBool

field 2 2 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: inputOnly
name: set_destination
type: SFVec3f

field 2 2 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
name: duration
type: SFTime
value: 1.0

field 2 2 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
name: initial_destination
type: SFVec3f
value: 0.0

field 2 2 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 2 1
access type: initializeOnly
name: initial_value
type: SFVec3f
value: 0.0

ScreenPositionDamper PositionChaser
type: NamedIndividual
type: Script
has parent: ProtoBody 2 2 2
has field: field 2 2 2 1 1
has field: field 2 2 2 1 2
has field: field 2 2 2 1 3
has field: field 2 2 2 1 4
has field: field 2 2 2 1 5
has field: field 2 2 2 1 6
has field: field 2 2 2 1 7
has field: field 2 2 2 1 8
has field: field 2 2 2 1 9
has field: field 2 2 2 1 10
has field: field 2 2 2 1 11
has field: field 2 2 2 1 12
has field: field 2 2 2 1 13
has field: field 2 2 2 1 14
has field: field 2 2 2 1 15
has IS: IS 2 2 2 1 16
DEF: ScreenPositionDamper_PositionChaser
source code: ecmascript: function initialize() { CheckInit(); } function CheckInit() { if(!bInitialized) { bInitialized= true; // Init() may call other functions that call CheckInit(). In that case it's better the flag is already set, otherwise an endless loop would occur. Init(); } } function Init() { destination= initial_destination; Buffer.length= cNumSupports; Buffer[0]= initial_destination; for(var C= 1; C<Buffer.length; C++ ) Buffer[C]= initial_value; previousValue= initial_value; cStepTime= duration / cNumSupports; } function set_destination(Dest, Now) { CheckInit(); destination= Dest; // Somehow we assign to Buffer[-1] and wait untill this gets shifted into the real buffer. // Would we assign to Buffer[0] instead, we'd have no delay, but this would create a jump in the // output because Buffer[0] is associated with a value in the past. UpdateBuffer(Now); } function Tick(Now) { CheckInit(); if(!BufferEndTime) { BufferEndTime= Now; // first event we received, so we are in the initialization phase. value_changed= initial_value; return; } var Frac= UpdateBuffer(Now); // Frac is a value in 0 <= Frac < 1. // Now we can calculate the output. // This means we calculate the delta between each entry in Buffer and its previous // entries, calculate the step response of each such step and add it to form the output. // The oldest vaule Buffer[Buffer.length - 1] needs some extra thought, because it has // no previous value. More exactly, we haven't stored a previous value anymore. // However, the step response of that missing previous value has already reached its // destination, so we can - would we have that previous value - use this as a start point // for adding the step responses. // Actually UpdateBuffer(.) maintains this value in var Output= previousValue; var DeltaIn= Buffer[Buffer.length - 1].subtract(previousValue); var DeltaOut= DeltaIn.multiply(StepResponse((Buffer.length - 1 + Frac) * cStepTime)); Output= Output.add(DeltaOut); for(var C= Buffer.length - 2; C>=0; C-- ) { v…

field 2 2 2 1 1
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: inputOnly
name: Tick
type: SFTime

field 2 2 2 1 2
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: inputOnly
name: set_value
type: SFVec3f

field 2 2 2 1 3
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: duration
type: SFTime

field 2 2 2 1 4
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: Buffer
type: MFVec3f

field 2 2 2 1 5
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: bInitialized
type: SFBool
value: false

field 2 2 2 1 6
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: BufferEndTime
type: SFTime
value: 0.0

field 2 2 2 1 7
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: cNumSupports
type: SFInt32
value: 10

field 2 2 2 1 8
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: inputOnly
name: set_destination
type: SFVec3f

field 2 2 2 1 9
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: outputOnly
name: value_changed
type: SFVec3f

field 2 2 2 1 10
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: cStepTime
type: SFTime
value: 0.0

field 2 2 2 1 11
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: previousValue
type: SFVec3f
value: 0.0

field 2 2 2 1 12
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: initial_destination
type: SFVec3f

field 2 2 2 1 13
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: destination
type: SFVec3f
value: 0.0

field 2 2 2 1 14
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: outputOnly
name: isActive
type: SFBool

field 2 2 2 1 15
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PositionChaser
access type: initializeOnly
name: initial_value
type: SFVec3f

connect 2 2 2 1 16 1
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: set_value
proto field: set_value

connect 2 2 2 1 16 2
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: duration
proto field: duration

connect 2 2 2 1 16 3
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: set_destination
proto field: set_destination

connect 2 2 2 1 16 4
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: value_changed
proto field: value_changed

connect 2 2 2 1 16 5
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: initial_destination
proto field: initial_destination

connect 2 2 2 1 16 6
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: isActive
proto field: isActive

connect 2 2 2 1 16 7
type: NamedIndividual
type: connect
has parent: IS 2 2 2 1 16
node field: initial_value
proto field: initial_value

Tmer PositionChaser
type: NamedIndividual
type: TimeSensor
has parent: ProtoBody 2 2 2
DEF: Tmer_PositionChaser
loop: true

ROUTE 2 2 2 3
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 2 2
from field: time
from node: Tmer_PositionChaser
to field: Tick
to node: ScreenPositionDamper_PositionChaser

ProtoDeclare 2 3
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 3 1
has proto body: ProtoBody 2 3 2
name: OrientationChaser

field 2 3 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
name: value_changed
type: SFRotation

field 2 3 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: inputOnly
name: set_value
type: SFRotation

field 2 3 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
name: credits
type: MFString
value: "Initial idea and copyright by Herbert Stocker http://www.hersto.net/"

field 2 3 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: outputOnly
name: isActive
type: SFBool

field 2 3 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: inputOnly
name: set_destination
type: SFRotation

field 2 3 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
name: duration
type: SFTime
value: 1.0

field 2 3 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
name: initial_destination
type: SFRotation
value: 0.0
value: 1.0

field 2 3 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 3 1
access type: initializeOnly
name: initial_value
type: SFRotation
value: 0.0
value: 1.0

ScreenPositionDamper OrientationChaser
type: NamedIndividual
type: Script
has parent: ProtoBody 2 3 2
has field: field 2 3 2 1 1
has field: field 2 3 2 1 2
has field: field 2 3 2 1 3
has field: field 2 3 2 1 4
has field: field 2 3 2 1 5
has field: field 2 3 2 1 6
has field: field 2 3 2 1 7
has field: field 2 3 2 1 8
has field: field 2 3 2 1 9
has field: field 2 3 2 1 10
has field: field 2 3 2 1 11
has field: field 2 3 2 1 12
has field: field 2 3 2 1 13
has field: field 2 3 2 1 14
has field: field 2 3 2 1 15
has IS: IS 2 3 2 1 16
DEF: ScreenPositionDamper_OrientationChaser
source code: ecmascript: function initialize() { CheckInit(); } function CheckInit() { if(!bInitialized) { bInitialized= true; // Init() may call other functions that call CheckInit(). In that case it's better the flag is already set, otherwise an endless loop would occur. Init(); } } function Init() { destination= initial_destination; Buffer.length= cNumSupports; Buffer[0]= initial_destination; for(var C= 1; C<Buffer.length; C++ ) Buffer[C]= initial_value; previousValue= initial_value; cStepTime= duration / cNumSupports; } function set_destination(Dest, Now) { CheckInit(); destination= Dest; // Somehow we assign to Buffer[-1] and wait untill this gets shifted into the real buffer. // Would we assign to Buffer[0] instead, we'd have no delay, but this would create a jump in the // output because Buffer[0] is associated with a value in the past. UpdateBuffer(Now); } function Tick(Now) { CheckInit(); if(!BufferEndTime) { BufferEndTime= Now; // first event we received, so we are in the initialization phase. value_changed= initial_value; return; } var Frac= UpdateBuffer(Now); // Frac is a value in 0 <= Frac < 1. // Now we can calculate the output. // This means we calculate the delta between each entry in Buffer and its previous // entries, calculate the step response of each such step and add it to form the output. // The oldest vaule Buffer[Buffer.length - 1] needs some extra thought, because it has // no previous value. More exactly, we haven't stored a previous value anymore. // However, the step response of that missing previous value has already reached its // destination, so we can - would we have that previous value - use this as a start point // for adding the step responses. // Actually UpdateBuffer(.) maintains this value in var Output= previousValue; var DeltaIn= previousValue.inverse().multiply(Buffer[Buffer.length - 1]); Output= Output.slerp(Output.multiply(DeltaIn), StepResponse((Buffer.length - 1 + Frac) * cStepTime)); for(var C= Buffer.length - 2; C>=0; C-- ) { var D…

field 2 3 2 1 1
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: inputOnly
name: Tick
type: SFTime

field 2 3 2 1 2
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: inputOnly
name: set_value
type: SFRotation

field 2 3 2 1 3
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: duration
type: SFTime

field 2 3 2 1 4
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: Buffer
type: MFRotation

field 2 3 2 1 5
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: bInitialized
type: SFBool
value: false

field 2 3 2 1 6
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: BufferEndTime
type: SFTime
value: 0.0

field 2 3 2 1 7
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: cNumSupports
type: SFInt32
value: 10

field 2 3 2 1 8
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: inputOnly
name: set_destination
type: SFRotation

field 2 3 2 1 9
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: outputOnly
name: value_changed
type: SFRotation

field 2 3 2 1 10
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: cStepTime
type: SFTime
value: 0.0

field 2 3 2 1 11
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: previousValue
type: SFRotation
value: 0.0
value: 1.0

field 2 3 2 1 12
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: initial_destination
type: SFRotation

field 2 3 2 1 13
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: destination
type: SFRotation
value: 0.0
value: 1.0

field 2 3 2 1 14
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: outputOnly
name: isActive
type: SFBool

field 2 3 2 1 15
type: NamedIndividual
type: field
has parent: ScreenPositionDamper OrientationChaser
access type: initializeOnly
name: initial_value
type: SFRotation

connect 2 3 2 1 16 1
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: set_value
proto field: set_value

connect 2 3 2 1 16 2
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: duration
proto field: duration

connect 2 3 2 1 16 3
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: set_destination
proto field: set_destination

connect 2 3 2 1 16 4
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: value_changed
proto field: value_changed

connect 2 3 2 1 16 5
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: initial_destination
proto field: initial_destination

connect 2 3 2 1 16 6
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: isActive
proto field: isActive

connect 2 3 2 1 16 7
type: NamedIndividual
type: connect
has parent: IS 2 3 2 1 16
node field: initial_value
proto field: initial_value

Tmer OrientationChaser
type: NamedIndividual
type: TimeSensor
has parent: ProtoBody 2 3 2
DEF: Tmer_OrientationChaser
loop: true

ROUTE 2 3 2 3
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 3 2
from field: time
from node: Tmer_OrientationChaser
to field: Tick
to node: ScreenPositionDamper_OrientationChaser

ProtoDeclare 2 4
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 4 1
has proto body: ProtoBody 2 4 2
name: Position2fChaser

field 2 4 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
name: value_changed
type: SFVec2f

field 2 4 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: inputOnly
name: set_value
type: SFVec2f

field 2 4 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
name: credits
type: MFString
value: "Initial idea and copyright by Herbert Stocker http://www.hersto.net/"

field 2 4 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: outputOnly
name: isActive
type: SFBool

field 2 4 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: inputOnly
name: set_destination
type: SFVec2f

field 2 4 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
name: duration
type: SFTime
value: 1.0

field 2 4 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
name: initial_destination
type: SFVec2f
value: 0.0

field 2 4 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 4 1
access type: initializeOnly
name: initial_value
type: SFVec2f
value: 0.0

ScreenPositionDamper Position2fChaser
type: NamedIndividual
type: Script
has parent: ProtoBody 2 4 2
has field: field 2 4 2 1 1
has field: field 2 4 2 1 2
has field: field 2 4 2 1 3
has field: field 2 4 2 1 4
has field: field 2 4 2 1 5
has field: field 2 4 2 1 6
has field: field 2 4 2 1 7
has field: field 2 4 2 1 8
has field: field 2 4 2 1 9
has field: field 2 4 2 1 10
has field: field 2 4 2 1 11
has field: field 2 4 2 1 12
has field: field 2 4 2 1 13
has field: field 2 4 2 1 14
has field: field 2 4 2 1 15
has IS: IS 2 4 2 1 16
DEF: ScreenPositionDamper_Position2fChaser
source code: ecmascript: function initialize() { CheckInit(); } function CheckInit() { if(!bInitialized) { bInitialized= true; // Init() may call other functions that call CheckInit(). In that case it's better the flag is already set, otherwise an endless loop would occur. Init(); } } function Init() { destination= initial_destination; Buffer.length= cNumSupports; Buffer[0]= initial_destination; for(var C= 1; C<Buffer.length; C++ ) Buffer[C]= initial_value; previousValue= initial_value; cStepTime= duration / cNumSupports; } function set_destination(Dest, Now) { CheckInit(); destination= Dest; // Somehow we assign to Buffer[-1] and wait untill this gets shifted into the real buffer. // Would we assign to Buffer[0] instead, we'd have no delay, but this would create a jump in the // output because Buffer[0] is associated with a value in the past. UpdateBuffer(Now); } function Tick(Now) { CheckInit(); if(!BufferEndTime) { BufferEndTime= Now; // first event we received, so we are in the initialization phase. value_changed= initial_value; return; } var Frac= UpdateBuffer(Now); // Frac is a value in 0 <= Frac < 1. // Now we can calculate the output. // This means we calculate the delta between each entry in Buffer and its previous // entries, calculate the step response of each such step and add it to form the output. // The oldest vaule Buffer[Buffer.length - 1] needs some extra thought, because it has // no previous value. More exactly, we haven't stored a previous value anymore. // However, the step response of that missing previous value has already reached its // destination, so we can - would we have that previous value - use this as a start point // for adding the step responses. // Actually UpdateBuffer(.) maintains this value in var Output= previousValue; var DeltaIn= Buffer[Buffer.length - 1].subtract(previousValue); var DeltaOut= DeltaIn.multiply(StepResponse((Buffer.length - 1 + Frac) * cStepTime)); Output= Output.add(DeltaOut); for(var C= Buffer.length - 2; C>=0; C-- ) { v…

field 2 4 2 1 1
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: inputOnly
name: Tick
type: SFTime

field 2 4 2 1 2
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: inputOnly
name: set_value
type: SFVec2f

field 2 4 2 1 3
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: duration
type: SFTime

field 2 4 2 1 4
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: Buffer
type: MFVec2f

field 2 4 2 1 5
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: bInitialized
type: SFBool
value: false

field 2 4 2 1 6
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: BufferEndTime
type: SFTime
value: 0.0

field 2 4 2 1 7
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: cNumSupports
type: SFInt32
value: 10

field 2 4 2 1 8
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: inputOnly
name: set_destination
type: SFVec2f

field 2 4 2 1 9
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: outputOnly
name: value_changed
type: SFVec2f

field 2 4 2 1 10
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: cStepTime
type: SFTime
value: 0.0

field 2 4 2 1 11
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: previousValue
type: SFVec2f
value: 0.0

field 2 4 2 1 12
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: initial_destination
type: SFVec2f

field 2 4 2 1 13
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: destination
type: SFVec2f
value: 0.0

field 2 4 2 1 14
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: outputOnly
name: isActive
type: SFBool

field 2 4 2 1 15
type: NamedIndividual
type: field
has parent: ScreenPositionDamper Position2fChaser
access type: initializeOnly
name: initial_value
type: SFVec2f

connect 2 4 2 1 16 1
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: set_value
proto field: set_value

connect 2 4 2 1 16 2
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: duration
proto field: duration

connect 2 4 2 1 16 3
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: set_destination
proto field: set_destination

connect 2 4 2 1 16 4
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: value_changed
proto field: value_changed

connect 2 4 2 1 16 5
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: initial_destination
proto field: initial_destination

connect 2 4 2 1 16 6
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: isActive
proto field: isActive

connect 2 4 2 1 16 7
type: NamedIndividual
type: connect
has parent: IS 2 4 2 1 16
node field: initial_value
proto field: initial_value

Tmer Position2fChaser
type: NamedIndividual
type: TimeSensor
has parent: ProtoBody 2 4 2
DEF: Tmer_Position2fChaser
loop: true

ROUTE 2 4 2 3
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 4 2
from field: time
from node: Tmer_Position2fChaser
to field: Tick
to node: ScreenPositionDamper_Position2fChaser

ProtoDeclare 2 5
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 5 1
has proto body: ProtoBody 2 5 2
name: PlacementChaser

field 2 5 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
name: isLoaded
type: SFBool

field 2 5 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: inputOnly
name: set_valuePos
type: SFVec3f

field 2 5 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: inputOnly
name: set_valueOri
type: SFRotation

field 2 5 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: inputOnly
name: set_destinationPos
type: SFVec3f

field 2 5 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: credits
type: MFString
value: "Initial idea and copyright by Herbert Stocker http://www.hersto.net/"

field 2 5 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: duration
type: SFTime
value: 1.0

field 2 5 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: inputOnly
name: set_destinationOri
type: SFRotation

field 2 5 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: initial_valuePos
type: SFVec3f
value: 0.0

field 2 5 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: initial_destinationPos
type: SFVec3f
value: 0.0

field 2 5 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
name: valuePos_changed
type: SFVec3f

field 2 5 1 11
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: initial_valueOri
type: SFRotation
value: 0.0
value: 1.0

field 2 5 1 12
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: initializeOnly
name: initial_destinationOri
type: SFRotation
value: 0.0
value: 1.0

field 2 5 1 13
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
name: valueOri_changed
type: SFRotation

field 2 5 1 14
type: NamedIndividual
type: field
has parent: ProtoInterface 2 5 1
access type: outputOnly
name: isActive
type: SFBool

ScreenPositionDamper PlacementChaser
type: NamedIndividual
type: Script
has parent: ProtoBody 2 5 2
has field: field 2 5 2 1 1
has field: field 2 5 2 1 2
has field: field 2 5 2 1 3
has field: field 2 5 2 1 4
has field: field 2 5 2 1 5
has field: field 2 5 2 1 6
has field: field 2 5 2 1 7
has field: field 2 5 2 1 8
has field: field 2 5 2 1 9
has field: field 2 5 2 1 10
has field: field 2 5 2 1 11
has field: field 2 5 2 1 12
has field: field 2 5 2 1 13
has field: field 2 5 2 1 14
has field: field 2 5 2 1 15
has field: field 2 5 2 1 16
has field: field 2 5 2 1 17
has field: field 2 5 2 1 18
has field: field 2 5 2 1 19
has field: field 2 5 2 1 20
has field: field 2 5 2 1 21
has field: field 2 5 2 1 22
has field: field 2 5 2 1 23
has IS: IS 2 5 2 1 24
DEF: ScreenPositionDamper_PlacementChaser
source code: ecmascript: function initialize() { CheckInit(); } function CheckInit() { if(!bInitialized) { bInitialized= true; // Init() may call other functions that call CheckInit(). In that case it's better the flag is already set, otherwise an endless loop would occur. Init(); } } function Init() { destinationPos= initial_destinationPos; destinationOri= initial_destinationOri; BufferPos.length= BufferOri.length= cNumSupports; BufferPos[0]= initial_destinationPos; BufferOri[0]= initial_destinationOri; for(var C= 1; C<BufferPos.length; C++ ) { BufferPos[C]= initial_valuePos; BufferOri[C]= initial_valueOri; } previousValuePos= initial_valuePos; previousValueOri= initial_valueOri; cStepTime= duration / cNumSupports; } function set_destinationPos(Dest, Now) { CheckInit(); destinationPos= Dest; // Somehow we assign to Buffer[-1] and wait untill this gets shifted into the real buffer. // Would we assign to Buffer[0] instead, we'd have no delay, but this would create a jump in the // output because Buffer[0] is associated with a value in the past. //UpdateBuffer(Now); } function set_destinationOri(Dest, Now) { CheckInit(); destinationOri= Dest; // Somehow we assign to Buffer[-1] and wait untill this gets shifted into the real buffer. // Would we assign to Buffer[0] instead, we'd have no delay, but this would create a jump in the // output because Buffer[0] is associated with a value in the past. //UpdateBuffer(Now); } function Tick(Now) { CheckInit(); if(!BufferEndTime) { BufferEndTime= Now; // first event we received, so we are in the initialization phase. valuePos_changed= initial_valuePos; valueOri_changed= initial_valueOri; return; } var Frac= UpdateBuffer(Now); // Frac is a value in 0 <= Frac < 1. // Now we can calculate the output. // This means we calculate the delta between each entry in Buffer and its previous // entries, calculate the step response of each such step and add it to form the output. // The oldest vaule Buffer[Buffer.length - 1] needs some extra thought, becau…

field 2 5 2 1 1
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: previousValueOri
type: SFRotation
value: 0.0
value: 1.0

field 2 5 2 1 2
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: inputOnly
name: Tick
type: SFTime

field 2 5 2 1 3
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: duration
type: SFTime

field 2 5 2 1 4
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: inputOnly
name: set_destinationOri
type: SFRotation

field 2 5 2 1 5
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: bInitialized
type: SFBool
value: false

field 2 5 2 1 6
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: inputOnly
name: set_valueOri
type: SFRotation

field 2 5 2 1 7
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: previousValuePos
type: SFVec3f
value: 0.0

field 2 5 2 1 8
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: destinationOri
type: SFRotation
value: 0.0
value: 1.0

field 2 5 2 1 9
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: initial_valueOri
type: SFRotation

field 2 5 2 1 10
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: inputOnly
name: set_destinationPos
type: SFVec3f

field 2 5 2 1 11
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: BufferEndTime
type: SFTime
value: 0.0

field 2 5 2 1 12
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: cNumSupports
type: SFInt32
value: 10

field 2 5 2 1 13
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: inputOnly
name: set_valuePos
type: SFVec3f

field 2 5 2 1 14
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: cStepTime
type: SFTime
value: 0.0

field 2 5 2 1 15
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: initial_destinationOri
type: SFRotation

field 2 5 2 1 16
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: BufferOri
type: MFRotation

field 2 5 2 1 17
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: destinationPos
type: SFVec3f
value: 0.0

field 2 5 2 1 18
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: initial_valuePos
type: SFVec3f

field 2 5 2 1 19
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: outputOnly
name: valuePos_changed
type: SFVec3f

field 2 5 2 1 20
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: outputOnly
name: isActive
type: SFBool

field 2 5 2 1 21
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: initial_destinationPos
type: SFVec3f

field 2 5 2 1 22
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: outputOnly
name: valueOri_changed
type: SFRotation

field 2 5 2 1 23
type: NamedIndividual
type: field
has parent: ScreenPositionDamper PlacementChaser
access type: initializeOnly
name: BufferPos
type: MFVec3f

connect 2 5 2 1 24 1
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: duration
proto field: duration

connect 2 5 2 1 24 2
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: set_destinationOri
proto field: set_destinationOri

connect 2 5 2 1 24 3
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: set_valueOri
proto field: set_valueOri

connect 2 5 2 1 24 4
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: initial_valueOri
proto field: initial_valueOri

connect 2 5 2 1 24 5
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: set_destinationPos
proto field: set_destinationPos

connect 2 5 2 1 24 6
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: set_valuePos
proto field: set_valuePos

connect 2 5 2 1 24 7
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: initial_destinationOri
proto field: initial_destinationOri

connect 2 5 2 1 24 8
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: initial_valuePos
proto field: initial_valuePos

connect 2 5 2 1 24 9
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: valuePos_changed
proto field: valuePos_changed

connect 2 5 2 1 24 10
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: isActive
proto field: isActive

connect 2 5 2 1 24 11
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: initial_destinationPos
proto field: initial_destinationPos

connect 2 5 2 1 24 12
type: NamedIndividual
type: connect
has parent: IS 2 5 2 1 24
node field: valueOri_changed
proto field: valueOri_changed

Tmer PlacementChaser
type: NamedIndividual
type: TimeSensor
has parent: ProtoBody 2 5 2
DEF: Tmer_PlacementChaser
loop: true

ROUTE 2 5 2 3
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 5 2
from field: time
from node: Tmer_PlacementChaser
to field: Tick
to node: ScreenPositionDamper_PlacementChaser

LastNode
type: NamedIndividual
type: Script
has parent: ProtoBody 2 5 2
has field: field 2 5 2 4 1
has IS: IS 2 5 2 4 2
DEF: LastNode
source code: ecmascript: function initialize() { isLoaded= true; }

field 2 5 2 4 1
type: NamedIndividual
type: field
has parent: LastNode
access type: outputOnly
name: isLoaded
type: SFBool

connect 2 5 2 4 2 1
type: NamedIndividual
type: connect
has parent: IS 2 5 2 4 2
node field: isLoaded
proto field: isLoaded

ProtoDeclare 2 6
type: NamedIndividual
type: ProtoDeclare
has parent: Scene
has proto interface: ProtoInterface 2 6 1
has proto body: ProtoBody 2 6 2
name: PositionDamper

field 2 6 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: outputOnly
name: isLoaded
type: SFBool

field 2 6 1 2
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: outputOnly
name: value_changed
type: SFVec3f

field 2 6 1 3
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: inputOnly
name: set_destination
type: SFVec3f

field 2 6 1 4
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: takeFirstInput
type: SFBool
value: true

field 2 6 1 5
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: initial_destination
type: SFVec3f
value: 0.0

field 2 6 1 6
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: order
type: SFInt32
value: 1

field 2 6 1 7
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: credits
type: MFString
value: "Initial idea and copyright by Herbert Stocker http://www.hersto.net/"

field 2 6 1 8
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: reachThreshold
type: SFFloat
value: 0.01

field 2 6 1 9
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: inputOutput
name: tau
type: SFFloat
value: 1.0

field 2 6 1 10
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: inputOnly
name: set_value
type: SFVec3f

field 2 6 1 11
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: outputOnly
name: reached
type: SFBool

field 2 6 1 12
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: initial_value
type: SFVec3f
value: 0.0

field 2 6 1 13
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: outputOnly
name: isActive
type: SFBool

field 2 6 1 14
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 1
access type: initializeOnly
name: eps
type: SFFloat
value: 0.0010

ProtoDeclare 2 6 2 1
type: NamedIndividual
type: ProtoDeclare
has parent: ProtoBody 2 6 2
has proto interface: ProtoInterface 2 6 2 1 1
has proto body: ProtoBody 2 6 2 1 2
name: EFFS

field 2 6 2 1 1 1
type: NamedIndividual
type: field
has parent: ProtoInterface 2 6 2 1 1
access type: inputOutput
name: tau
type: SFFloat
value: 1.0

EFFS
type: NamedIndividual
type: ProtoInstance
has parent: ProtoBody 2 6 2
has field value: fieldValue 2 6 2 2 1
DEF: EFFS
name: EFFS

fieldValue 2 6 2 2 1
type: NamedIndividual
type: fieldValue
has parent: EFFS
name: tau
value: 1.0

Worker
type: NamedIndividual
type: Script
has parent: ProtoBody 2 6 2
has field: field 2 6 2 3 1
has field: field 2 6 2 3 2
has field: field 2 6 2 3 3
has field: field 2 6 2 3 4
has field: field 2 6 2 3 5
has field: field 2 6 2 3 6
has field: field 2 6 2 3 7
has field: field 2 6 2 3 8
has field: field 2 6 2 3 9
has field: field 2 6 2 3 10
has field: field 2 6 2 3 11
has field: field 2 6 2 3 12
has field: field 2 6 2 3 13
has field: field 2 6 2 3 14
has field: field 2 6 2 3 15
has field: field 2 6 2 3 16
has field: field 2 6 2 3 17
has field: field 2 6 2 3 18
has field: field 2 6 2 3 19
has field: field 2 6 2 3 20
has field: field 2 6 2 3 21
has field: field 2 6 2 3 22
has field: field 2 6 2 3 23
has field: field 2 6 2 3 24
has IS: IS 2 6 2 3 25
DEF: Worker
source code: ecmascript: function StartTimer() { if(IsCortona) return; if(!needTimer) { lastTick= 0; needTimer= true; } } function StopTimer() { if(IsCortona) return; if(needTimer) { needTimer= false; } } function initialize() { CheckInit(); } function CheckInit() { if(!bInitialized) { bInitialized= true; Init(); } } function Init() { IsCortona= false && Browser.getName().indexOf('Cortona') != -1; bNeedToTakeFirstInput= takeFirstInput; tau= effs.tau; set_value(initial_value); if(IsCortona) needTimer= true; else needTimer= input.x != initial_value.x || input.y != initial_value.y || input.z != initial_value.z ; } function set_tau(t) { CheckInit(); tau= t; } function set_destination(i) { CheckInit(); if(bNeedToTakeFirstInput) { bNeedToTakeFirstInput= false; set_value(i); } if(i != input) { input= i; StartTimer(); } } function set_value(o) { CheckInit(); bNeedToTakeFirstInput= false; value1= value2= value3= value4= value5= o; value_changed= o; UpdateReached(); StartTimer(); } function tick(now) { CheckInit(); if(!lastTick) { lastTick= now; return; } var delta= now - lastTick; lastTick= now; var alpha= Math.exp(-delta / tau); if(bNeedToTakeFirstInput) // then don't do any processing. return; value1= order > 0 && tau ? input .add(value1.subtract(input ).multiply(alpha)) : input; value2= order > 1 && tau ? value1.add(value2.subtract(value1).multiply(alpha)) : value1; value3= order > 2 && tau ? value2.add(value3.subtract(value2).multiply(alpha)) : value2; value4= order > 3 && tau ? value3.add(value4.subtract(value3).multiply(alpha)) : value3; value5= order > 4 && tau ? value4.add(value5.subtract(value4).multiply(alpha)) : value4; var dist= GetDist(); if(dist < eps) { value1= value2= value3= value4= value5= input; value_changed= input; UpdateReached2(dist); StopTimer(); return; } value_changed= value5; UpdateReached2(dist); } function GetDist() { var dist= value1.subtract(input).length(); if(order > 1) { var dist2= value2.subtract(value1).length(); if( dist2 > dist) dist= dist2; } if(ord…

field 2 6 2 3 1
type: NamedIndividual
type: field
has parent: Worker
access type: inputOnly
name: set_value
type: SFVec3f

field 2 6 2 3 2
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: IsCortona
type: SFBool
value: false

field 2 6 2 3 3
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: bInitialized
type: SFBool
value: false

field 2 6 2 3 4
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: reachThreshold
type: SFFloat

field 2 6 2 3 5
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: lastTick
type: SFTime
value: 0.0

field 2 6 2 3 6
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: bNeedToTakeFirstInput
type: SFBool
value: true

field 2 6 2 3 7
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: value5
type: SFVec3f
value: 0.0

field 2 6 2 3 8
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: value4
type: SFVec3f
value: 0.0

field 2 6 2 3 9
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: value3
type: SFVec3f
value: 0.0

field 2 6 2 3 10
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: value2
type: SFVec3f
value: 0.0

field 2 6 2 3 11
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: input
type: SFVec3f

field 2 6 2 3 12
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: value1
type: SFVec3f
value: 0.0

field 2 6 2 3 13
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: eps
type: SFFloat

field 2 6 2 3 14
type: NamedIndividual
type: field
has parent: Worker
access type: inputOnly
name: set_destination
type: SFVec3f

field 2 6 2 3 15
type: NamedIndividual
type: field
has parent: Worker
access type: outputOnly
name: value_changed
type: SFVec3f

field 2 6 2 3 16
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: tau
type: SFFloat
value: 1.0

field 2 6 2 3 17
type: NamedIndividual
type: field
has parent: Worker
has children: EFFS-USE-1
access type: initializeOnly
name: effs
type: SFNode

field 2 6 2 3 18
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: order
type: SFInt32

field 2 6 2 3 19
type: NamedIndividual
type: field
has parent: Worker
access type: outputOnly
name: needTimer
type: SFBool

field 2 6 2 3 20
type: NamedIndividual
type: field
has parent: Worker
access type: inputOnly
name: tick
type: SFTime

field 2 6 2 3 21
type: NamedIndividual
type: field
has parent: Worker
access type: inputOnly
name: set_tau
type: SFFloat

field 2 6 2 3 22
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: initial_value
type: SFVec3f

field 2 6 2 3 23
type: NamedIndividual
type: field
has parent: Worker
access type: outputOnly
name: reached
type: SFBool

field 2 6 2 3 24
type: NamedIndividual
type: field
has parent: Worker
access type: initializeOnly
name: takeFirstInput
type: SFBool

connect 2 6 2 3 25 1
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: set_value
proto field: set_value

connect 2 6 2 3 25 2
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: reachThreshold
proto field: reachThreshold

connect 2 6 2 3 25 3
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: input
proto field: initial_destination

connect 2 6 2 3 25 4
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: eps
proto field: eps

connect 2 6 2 3 25 5
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: set_destination
proto field: set_destination

connect 2 6 2 3 25 6
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: value_changed
proto field: value_changed

connect 2 6 2 3 25 7
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: order
proto field: order

connect 2 6 2 3 25 8
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: needTimer
proto field: isActive

connect 2 6 2 3 25 9
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: initial_value
proto field: initial_value

connect 2 6 2 3 25 10
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: reached
proto field: reached

connect 2 6 2 3 25 11
type: NamedIndividual
type: connect
has parent: IS 2 6 2 3 25
node field: takeFirstInput
proto field: takeFirstInput

Timer PositionDamper
type: NamedIndividual
type: TimeSensor
has parent: ProtoBody 2 6 2
DEF: Timer_PositionDamper
loop: true

ROUTE 2 6 2 5
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 6 2
from field: needTimer
from node: Worker
to field: enabled
to node: Timer_PositionDamper

ROUTE 2 6 2 6
type: NamedIndividual
type: ROUTE
has parent: ProtoBody 2 6 2
from field: time
from node: Timer_PositionDamper
to field: tick
to node: Worker