Extensible 3D (X3D)
Part 1: Architecture and base components

39 Followers component

--- X3D separator bar ---

cube39.1 Introduction

39.1.1 Name

The name of this component is "Followers". This name shall be used when referring to this component in the COMPONENT statement (see 7.2.5.4 Component statement).

39.1.2 Overview

This clause describes the Followers component of this document. Follower nodes support dynamic creation of smooth parameter transitions of chaser and follower nodes at run time. Table 39.1 provides links to the major topics in this clause.

Table 39.1 — Topics

cube39.2 Concepts

The group of Follower nodes supports the creation of transitions of parameters at runtime (dynamically) by receiving a destination value upon which they create an animation that transitions their output value from its current value towards the newly set destination value.

In case a transition triggered by reception of a previous destination value is not yet finished while the new destination is received, both the new and old transition are merged, so that a smooth animation is created where the previous movement degrades and gradually becomes a movement towards the new destination which is then eventually reached.

Follower nodes accomplish the transition by implementing finite impulse response (FIR) filters and infinite impulse response (IIR) filters from the field of system theory. Due to this filter distinction, the Follower nodes are divided into Chaser nodes (FIR) and Damper nodes (IIR).

Like TimeSensor nodes, Follower nodes often send output events at times when they have not received input events. Their behaviour is completely determined by the events they receive from the scene graph itself at earlier times.

Follower nodes are not affected by their position in the transformation hierarchy nor are they affected by the state of containing Switch nodes, LOD nodes and other nodes that affect the visibility of their children.

cube39.3 Abstract types

39.3.1 X3DChaserNode

X3DChaserNode : X3DFollowerNode {
  [S|M]F<type> [in]     set_destination
  [S|M]F<type> [in]     set_value
  SFNode       [in,out] metadata           NULL  [X3DMetadataObject]
  SFBool       [out]    isActive
  [S|M]F<type> [out]    value_changed
  SFTime       []       duration           1     [0,∞)
  [S|M]F<type> []       initialDestination 
  [S|M]F<type> []       initialValue
}

The X3DChaserNode abstract node type calculates the output on value_changed as a finite impulse response (FIR) based on the events received on set_destination in the following manner.

Each time an event is received on set_destination, a transition An from the previously received destination to the new destination is created according to Equation (1). The data types of all variables are floating point numbers, or integers in the case of indices, except for dn, dn-1, An(t) and O(t). These variables have the data type of the node ( e.g., SFVec3f or SFColor).

Equation (1)

where:

Tn is the point in time where the event has been received
D is the value of the duration field
dn is the new destination value received with the event
dn-1 is the value that was the destination before the event
R(x) is the core function of the filter:

Equation (2)

All the transitions created for every event on set_destination are added together to form the output on value_changed.

Equation (3)

where l is the number of events received so far on set_destination. If k is set to 0, d-1 is the value of the initialValue field and d0 is the value of initialDestination. This way the initial transition determined by these two fields is produced.

Theoretically the start index k might be always set to zero meaning that all set_destination events since initialization are to be stored. However, k can be increased without changing the result O(t) as long as the time stamp Tk-1 is more than D seconds before the current time stamp. This is due to the facts:

  1. after a period of D seconds (the duration field), the transitions An(t) are constantly dn- dn-1; and
  2. dk-1 is the sum of all differences dn- dn-1 so far.

This way the X3DChaserNode implementation remembers the values and time stamps of all set_destination events received in the last period of duration seconds plus the value received latest before that period. For calculating the current value of value_changed, the X3DChaserNode uses that latest received value as a starting point ( dk-1) and adds to it all transitions An(t) generated by the stored events.

A more optimal implementation might divide the time-line into equidistant time-slots and store only the latest set_destination event received for each time-slot. This way a fixed length array might be used for describing the input during the period of the last duration seconds. This however can create little jumps in the animation created at value_changed since a set_destination event may cause the beginning of a transition being produced and may then be replaced by a later event received in the same time-slot. To avoid this, events are associated with the end of the time-slot rather than with the time-stamp when they are received.

Thus, the output reaches the value received at set_destination up to the length of a time-slot later than is dictated by the duration field. To compensate, an implementation shall subtract the length of a time-slot from duration and use the result for D.

It is suggested that the implementation uses (about) 10 time-slots per duration duration as depicted in Figure 39.1.

CalculatingOutput

Figure 39.1 — Calculating the output of an X3DFollowerNode

The above diagram illustrates how an implementation calculates the output at an arbitrary point in time. Figure 39.1 depicts only four time-slots per duration D. The period goes from the current time-stamp Now back by D seconds, not necessarily matching the grid of the time slots. The events d1 and d2 have happened before this period and are therefore summarized by the value of d2. The event d3 however falls into the period of D seconds. It is moved towards the end of the time-slot it falls into and generates the transition A3(t) with the amplitude d3- d2. The event d4 gets ignored because it is followed by d5 in the same time-slot. Therefore only d5 generates a transition, which is A5(t). The amplitude of A5(t) is d5- d3 because d4 got ignored. The output O(t) is thus calculated as specified in Equation (4):

Equation (4)

When the current time-stamp has advanced until after the end of curve A3(t), which is when the time-slot containing event d3 is no longer part of the last D seconds, the start value for the addition d2 is replaced with d3 and the curve A3(t) is removed from the addition, so that O(t) = d3 + A5(t).

The above diagram uses four time-slots per duration D. With the above recommendations of making D one time-slot shorter than the duration field specifies, this means that a time-slot is a fifth of what is specified by duration.

39.3.2 X3DDamperNode

X3DDamperNode : X3DFollowerNode {
  [S|M]F<type> [in]     set_destination
  [S|M]F<type> [in]     set_value
  SFNode       [in,out] metadata           NULL   [X3DMetadataObject]
  SFTime       [in,out] tau                0.3    [0,∞)
  SFFloat      [in,out] tolerance          -1     -1 or [0,∞)
  SFBool       [out]    isActive
  [S|M]F<type> [out]    value_changed
  [S|M]F<type> []       initialDestination
  [S|M]F<type> []       initialValue
  SFInt32      []       order              3     [0..5]
}

The X3DDamperNode abstract node type creates an IIR response that approaches the destination value according to the shape of the e-function only asymptotically but very quickly.

An X3DDamperNode node is parameterized by the tau, order and tolerance fields. Internally, it consists of a set of linear first-order filters each of which processes the output of the previous filter as shown in Figure 39.2. The input of the first filter is fed by the values received on set_destination and the output of the last filter goes to the value_changed field.

Concept of an X3DDamperNode

Figure 39.2 — Concept of an X3DDamperNode

The calculations of the output for the current time-stamp Tn for each filter are based on the output of that filter from the previous time-stamp Tn-1 and the current input using the Equation (5):

Equation(5)

The field order specifies the number of such internal filters. Specifying zero for order means that no filter is used. In this case the events received on set_destination are forwarded directly to output_changed. The larger the value for order, the smoother the output on value_changed becomes, but more computational delay can be introduced. Since values larger than five do not introduce any more smoothing, the allowed range for order values is limited to a maximum of five.

The field tau specifies the time-constant of the internal filters and thus the speed that the output of an X3DDamperNode responds to the input. Its value is assigned to the variable tau in the above equation. A value of zero for tau means immediate response and the events received on set_destination are forwarded directly to output_changed. The field tau specifies how long it takes the output of an internal filter to reach the value of its input by 63% ( 1 - 1/e). The remainder after that period is reduced by 63% during another period of tau seconds provided that the input of the filter does not change. This behavior can be exposed if order is set to one.

Since the output of an X3DDamperNode approaches the input value only asymptotically, there shall be a means to determine when the destination value can be assumed to be reached and the node can stop emitting values and set isActive to FALSE. This is governed by the tolerance field. if tolerance is set to its default value -1, the X3D browser implementation is allowed to find a good way for detecting the end of a transition. X3D browsers that do not have an elaborate algorithm can just use 0.001 as the tolerance value instead. If a value larger than zero is specified for tolerance, the X3D browser shall calculate the difference between output and input for each internal filter being used and stop the animation only when all filters fall below that limit or are equal to it. If zero is specified for tolerance, a transition should be stopped only if input and output match exactly for all internal filters. This can happen if set_value receives an event.

An implementation shall test for end of transition before it calculates the new output value. Then, the implementation shall either assign the destination value to the output value, if the difference falls below the tolerance limit, or calculate an updated output value.

39.3.3 X3DFollowerNode

X3DFollowerNode : X3DChildNode {
  [S|M]F<type> [in]     set_destination
  [S|M]F<type> [in]     set_value
  SFNode       [in,out] metadata           NULL [X3DMetadataObject]
  SFBool       [out]    isActive
  [S|M]F<type> [out]    value_changed
  [S|M]F<type> []       initialDestination
  [S|M]F<type> []       initialValue
}

The abstract node X3DFollowerNode forms the basis for all nodes specified in this clause. The data type place holder [S|M]F<type> evaluates to the same data type for all fields of a specialization of the abstract node class X3DFollowerNode.

An X3DFollowerNode maintains an internal state that consists of a current value and a destination value. Both values are of the same data type into which the term [S|M]F<type> evaluates for a given specialization. It is the 'data type of the node'. In certain cases of usage, the terms input and output fit better for destination value and current value, respectively.

Whenever the current value differs from the destination value, the current value gradually changes until it reaches the destination value producing a smooth transition. It generally moves towards the destination value but, if a transition triggered by a previous destination value is still in progress, it may take a short while until the movement becomes a movement towards the new destination value. Figure 39.3 depicts this action.

ModeOfOperation

Figure 39.3 — Mode of operation of an X3DFollowerNode

The value_changed outputOnly field outputs the current value of the internal state.

The set_destination inputOnly field receives new destination values, resulting in the value_changed field sending output values in most cases.

The initializeOnly fields, initialDestination and initialValue, initialize the internal state of the X3DFollowerNode. The current value receives the value of initialValue and the destination value receives the value of initialDestination. If both fields have the same values, the X3DFollowerNode sends that value through the value_changed field in a single event upon initialization. If both fields have different values, the X3DFollowerNode creates an animation from the value of initialValue towards the value of initialDestination. The shape of that transition is the same as if the current value internal state had always been at the value of initialValue and the node had just received the destination value.

With the set_value inputOnly field, one can immediately force the current value towards a certain value. When the X3DFollowerNode receives a value on set_value, any current transition is stopped and the current value assumes that value. The value_changed field outputs that value and then moves towards the value currently set for the destination value. This animation has the same shape as if the current value had already been at the newly received value for a long time and the node had just received an event on set_destination carrying the value of the currently set destination value.

One can achieve various results by sending certain values to set_value, set_destination or both at the same time:

The isActive outputOnly field identifies the beginning and end of a transition. It sends TRUE before set_value begins animating and it sends FALSE after set_value has reached the destination or has been stopped by another means. When set_value receives an event while isActive is TRUE, isActive sends FALSE after value_changed has output the received value. If isActive is FALSE at that moment, isActive generates no event.

cube39.4 Node reference

39.4.1 ColorChaser

ColorChaser : X3DChaserNode {
  SFColor [in]     set_destination
  SFColor [in]     set_value
  SFNode  [in,out] metadata           NULL        [X3DMetadataObject]
  SFBool  [out]    isActive
  SFColor [out]    value_changed
  SFTime  []       duration           1           [0,∞)
  SFColor []       initialDestination 0.8 0.8 0.8 [0,1]
  SFColor []       initialValue       0.8 0.8 0.8 [0,1]
}

The ColorChaser animates transitions for single colour values. Whenever the set_destination field receives a floating point number, the value_changed creates a transition from its current value to the newly set number. It creates a smooth transition that ends duration seconds after the last number has been received.

When set_value receives a colour value, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump. The field initialValue can be used to set the initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain value is to be created right after the scene is loaded or right after the ColorChaser node is created dynamically.

39.4.2 ColorDamper

ColorDamper : X3DDamperNode {
  SFColor [in]     set_destination
  SFColor [in]     set_value
  SFNode  [in,out] metadata           NULL        [X3DMetadataObject]
  SFTime  [in,out] tau                0.3         [0,∞)
  SFFloat [in,out] tolerance          -1          -1 or [0,∞)
  SFBool  [out]    isActive
  SFColor [out]    value_changed
  SFColor []       initialDestination 0.8 0.8 0.8 [0,1]
  SFColor []       initialValue       0.8 0.8 0.8 [0,1]
  SFInt32 []       order              3           [0..5]
}

The ColorDamper animates colour values. Whenever the set_destination field receives a colour, the ColorDamper node creates a transition from the current colour to the newly set colour. The transition created approaches the newly set position asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. The order field specifies the smoothness of the transition.

When set_value receives a colour, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump to the new colour. The field initialValue can be used to set the initial colour. The field initialDestination should be set to the same value unless a transition to a certain colour is to be created right after the scene is loaded or right after the ColorDamper node is created dynamically.

39.4.3 CoordinateChaser

CoordinateChaser : X3DChaserNode {
  MFVec3f [in]     set_destination
  MFVec3f [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFBool  [out]    isActive
  MFVec3f [out]    value_changed
  SFTime  []       duration           1     [0,∞)
  MFVec3f []       initialDestination 0 0 0
  MFVec3f []       initialValue       0 0 0
}

The CoordinateChaser animates transitions for array of 3D vectors ( e.g., the coordinates of a mesh). Whenever the set_destination field receives an array of 3D vectors, the value_changed creates a transition from its current value to the newly set number. It creates a smooth transition that ends duration seconds after the last number has been received.

When set_value receives an array of 3D vectors, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump. The field initialValue can be used to set the initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain value is to be created right after the scene is loaded or right after the CoordinateChaser node is created dynamically.

39.4.4 CoordinateDamper

CoordinateDamper : X3DDamperNode {
  MFVec3f [in]     set_destination
  MFVec3f [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFTime  [in,out] tau                0.3   [0,∞)
  SFFloat [in,out] tolerance          -1    -1 or [0,∞)
  SFBool  [out]    isActive
  MFVec3f [out]    value_changed
  MFVec3f []       initialDestination 0 0 0
  MFVec3f []       initialValue       0 0 0
  SFInt32 []       order              3     [0..5]
}

The CoordinateDamper animates transitions for an array of 3D vectors ( e.g., the coordinates of a mesh). Whenever the set_destination field receives an array of 3D vectors, value_changed begins sending an array of the same length, where each element moves from its current value towards the value at the same position in the array received. Each element approaches its destination value asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. The order field specifies the smoothness of the transition. The transition ends when all elements have reached their destination.

When set_value receives an event, any transition currently in process is stopped and value_changed sends this array immediately, creating a jump. The field initialValue can be used to set the initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain 3D vector value is to be created right after the scene is loaded or right after the CoordinateDamper node is created dynamically.

The MFVec3f arrays that are sent to the set_destination or set_value field shall have the same length (number of elements). The length of the arrays shall not change over time. Values assigned to initialDestination or initialValue shall either be an empty array or an array with the same number of elements as is sent to the set_destination or set_value fields. In any other case, the behavior is not defined.

39.4.5 OrientationChaser

OrientationChaser : X3DChaserNode {
  SFRotation [in]     set_destination
  SFRotation [in]     set_value
  SFNode     [in,out] metadata           NULL    [X3DMetadataObject]
  SFBool     [out]    isActive
  SFRotation [out]    value_changed
  SFTime     []       duration           1       [0,∞)
  SFRotation []       initialDestination 0 1 0 0
  SFRotation []       initialValue       0 1 0 0
}

The OrientationChaser animates transitions for orientations. If the value_changed field is routed to a rotation field of a Transform node that contains an object, whenever the set_destination field receives an orientation, the OrientationChaser node rotates the object from its current orientation to the newly set orientation. It creates a smooth transition that ends duration seconds after the last orientation has been received.

When set_value receives an orientation, any transition currently in process is stopped and the object jumps directly to the given orientation. The field initialValue can be used to set the initial orientation of the object. The field initialDestination should be set to the same value unless a transition to a certain orientation is to be created right after the scene is loaded or right after the OrientationChaser node is created dynamically.

The OrientationChaser node can be implemented by combining Equations (1), (2), and (3) to form Equation (6):

Equation (6)

This leads to the following loop expressed in pseudo code:

    var Result= dk-1;
    for (var n from k to l) {
        var Delta = dn- dn-1;
        Result = Result + Delta × R(...);
    }
    O(t) = Result;

Since dk-1, dn, dn-1 and thus Result contain rotation values (SFRotation), the above code shall be converted to use operations available for rotations. This can be achieved using the slerp operation. For the following, let slerp(A, B, t) be a function that calculates the linear spherical interpolation from A to B by the amount t. Let also Core(.) be a function that calculates R(...) and let Buffer be an array so that Buffer[i] evaluates to di. Then, the above loop can be implemented as:

    var Result= Buffer[k-1];
    for(var n from k to l) {
        var Delta = Buffer[n-1].inverse().multiply(Buffer[n]);
        Result = slerp(Result, Result.multiply(Delta), Core(...));
    }
    O(t) = Result;

39.4.6 OrientationDamper

OrientationDamper : X3DDamperNode {
  SFRotation [in]     set_destination
  SFRotation [in]     set_value
  SFNode     [in,out] metadata           NULL    [X3DMetadataObject]
  SFTime     [in,out] tau                0.3     [0,∞)
  SFFloat    [in,out] tolerance          -1      -1 or [0,∞)
  SFBool     [out]    isActive
  SFRotation [out]    value_changed
  SFRotation []       initialDestination 0 1 0 0
  SFRotation []       initialValue       0 1 0 0
  SFInt32    []       order              3       [0..5]
}

The OrientationDamper animates transitions of orientations. If the value_changed field is routed to a rotation field of a Transform node that contains an object, then, whenever the set_destination field receives an orientation, the OrientationDamper node rotates the object from its current orientation to the newly set orientation. It creates a transition that approaches the newly set orientation asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. Through this asymptotic approach of the destination orientation, a very smooth transition is created. The order field specifies the smoothness of the transition.

When set_value receives an orientation, any transition currently in process is stopped and the object jumps directly to the given orientation. The field initialValue can be used to set the initial orientation of the object. The field initialDestination should be set to the same value unless a transition to a certain orientation is to be created right after the scene is loaded or right after the OrientationDamper node is created dynamically.

The OrientationDamper node is implemented by calculating Equation (5) for each internal filter. For SFRotation values, the equation is equivalent to the following term:

    output = input.slerp(output, alpha);

where:

    output: on or on-1, respectively
    input:  dn
    alpha:  e-ΔT/τ

39.4.7 PositionChaser

PositionChaser : X3DChaserNode {
  SFVec3f [in]     set_destination
  SFVec3f [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFBool  [out]    isActive
  SFVec3f [out]    value_changed
  SFTime  []       duration           1     [0,∞)
  SFVec3f []       initialDestination 0 0 0
  SFVec3f []       initialValue       0 0 0
}

The PositionChaser animates transitions for 3D vectors. If the value_changed field is routed to a translation field of a Transform node that contains an object, then, whenever the set_destination field receives a 3D position, the PositionChaser node moves the object from its current position to the newly set position. It creates a smooth transition that ends duration seconds after the last position has been received.

When set_value receives a position, any transition currently in process is stopped and the object jumps directly to the given position. The field initialValue can be used to set the initial position of the object. The field initialDestination should be set to the same value unless a transition to a certain position is to be created right after the scene is loaded or right after the PositionChaser node is created dynamically.

39.4.8 PositionChaser2D

PositionChaser2D : X3DChaserNode {
  SFVec2f [in]     set_destination
  SFVec2f [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFBool  [out]    isActive
  SFVec2f [out]    value_changed
  SFTime  []       duration           1     [0,∞)
  SFVec2f []       initialDestination 0 0
  SFVec2f []       initialValue       0 0
}

The PositionChaser2D animates transitions for 2D vectors. Whenever the set_destination field receives a 2D vector the value_changed creates a transition from its current 2D vector value to the newly set value. It creates a smooth transition that ends duration seconds after the last 2D vector has been received.

When set_value receives a 2D vector, any transition currently in process is stopped and value_changed sends this value immediately. The field initialValue can be used to set the initial initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain 2D vector value is to be created right after the scene is loaded or right after the PositionChaser2D node is created dynamically.

39.4.9 PositionDamper

PositionDamper : X3DDamperNode {
  SFVec3f [in]     set_destination
  SFVec3f [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFTime  [in,out] tau                0.3   [0,∞)
  SFFloat [in,out] tolerance          -1    -1 or [0,∞)
  SFBool  [out]    isActive
  SFVec3f [out]    value_changed
  SFVec3f []       initialDestination 0 0 0
  SFVec3f []       initialValue       0 0 0
  SFInt32 []       order              3     [0..5]
}

The PositionDamper animates transitions for 3D vectors. If the value_changed field is routed to a translation field of a Transform node that contains an object, then, whenever the set_destination field receives a 3D position, the PositionDamper node moves the object from its current position to the newly set position. It creates a transition that approaches the newly set position asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. Through this asymptotic approach of the destination value, a smooth transition is created. The order field specifies the smoothness of the transition.

When set_value receives a position, any transition currently in process is stopped and the object jumps directly to the given position. The field initialValue can be used to set the initial position of the object. The field initialDestination should be set to the same value unless a transition to a certain position is to be created right after the scene is loaded or right after the PositionDamper node is created dynamically.

39.4.10 PositionDamper2D

PositionDamper2D : X3DDamperNode {
  SFVec2f [in]     set_destination
  SFVec2f [in]     set_value
  SFNode  [in,out] metadata           NULL [X3DMetadataObject]
  SFTime  [in,out] tau                0.3  [0,∞)
  SFFloat [in,out] tolerance          -1   -1 or [0,∞)
  SFBool  [out]    isActive
  SFVec2f [out]    value_changed
  SFVec2f []       initialDestination 0 0
  SFVec2f []       initialValue       0 0
  SFInt32 []       order              3    [0..5]
}

The PositionDamper2D animates transitions for 2D vectors. Whenever the set_destination field receives a 2D vector, the value_changed creates a transition from its current 2D vector value to the newly set value. It creates a transition that approaches the newly set 2D vector asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. The order field specifies the smoothness of the transition.

When set_value receives a 2D vector, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump. The field initialValue can be used to set the initial initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain 2D vector value is to be created right after the scene is loaded or right after the PositionChaser2D node is created dynamically.

39.4.11 ScalarChaser

ScalarChaser : X3DChaserNode {
  SFFloat [in]     set_destination
  SFFloat [in]     set_value
  SFNode  [in,out] metadata           NULL [X3DMetadataObject]
  SFBool  [out]    isActive
  SFFloat [out]    value_changed
  SFTime  []       duration           1    [0,∞)
  SFFloat []       initialDestination 0
  SFFloat []       initialValue       0
}

The ScalarChaser animates transitions for single float values. Whenever the set_destination field receives a floating point number, the value_changed creates a transition from its current value to the newly set number. It creates a smooth transition that ends duration seconds after the last number has been received.

When set_value receives a floating point number, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump. The field initialValue can be used to set the initial initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain value is to be created right after the scene is loaded or right after the ScalarChaser node is created dynamically.

39.4.12 ScalarDamper

ScalarDamper : X3DDamperNode {
  SFFloat [in]     set_destination
  SFFloat [in]     set_value
  SFNode  [in,out] metadata           NULL  [X3DMetadataObject]
  SFTime  [in,out] tau                0.3   [0,∞)
  SFFloat [in,out] tolerance          -1    -1 or [0,∞)
  SFBool  [out]    isActive
  SFFloat [out]    value_changed
  SFFloat []       initialDestination 0
  SFFloat []       initialValue       0
  SFInt32 []       order              3     [0..5]
}

The ScalarDamper animates transitions for single float values. If the value_changed field is routed to a transparency field of a Material node, then, whenever the set_destination field receives a single float value, the ScalarDamper node creates a transition from its current value to the newly set value. It creates a transition that approaches the newly set value asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. Through this asymptotic approach of the destination value, a smooth transition is created. The order field specifies the smoothness of the transition.

When set_value receives a value, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump to the new value. The field initialValue can be used to set the initial value of the node. The field initialDestination should be set to the same value unless a transition to a certain value is to be created right after the scene is loaded or right after the ScalarDamper node is created dynamically.

39.4.13 TexCoordChaser2D

TexCoordChaser2D : X3DChaserNode {
  MFVec2f [in]     set_destination
  MFVec2f [in]     set_value
  SFNode  [in,out] metadata           NULL [X3DMetadataObject]
  SFBool  [out]    isActive
  MFVec2f [out]    value_changed
  SFTime  []       duration           1    [0,∞)
  MFVec2f []       initialDestination []
  MFVec2f []       initialValue       []
}

The TexCoordChaser2D animates transitions for an array of 2D vectors ( e.g., the texture coordinates of a mesh). Whenever the set_destination field receives an array of 2D vectors, the value_changed creates a transition from its current value to the newly set number. It creates a smooth transition that ends duration seconds after the last number has been received.

When set_value receives an array of 2D vectors, any transition currently in process is stopped and value_changed sends this value immediately, creating a jump. The field initialValue can be used to set the initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain value is to be created right after the scene is loaded or right after the TexCoordChaser2D node is created dynamically.

39.4.14 TexCoordDamper2D

TexCoordDamper2D : X3DDamperNode {
  MFVec2f [in]     set_destination
  MFVec2f [in]     set_value
  SFNode  [in,out] metadata           NULL [X3DMetadataObject]
  SFTime  [in,out] tau                0.3  [0,∞)
  SFFloat [in,out] tolerance          -1   -1 or [0,∞)
  SFBool  [out]    isActive
  MFVec2f [out]    value_changed
  MFVec2f []       initialDestination []
  MFVec2f []       initialValue       []
  SFInt32 []       order              3    [0..5]
}

The TexCoordDamper2D node animates transitions for an array of 2D vectors ( e.g., the texture coordinates of a mesh). Whenever the set_destination field receives an array of 2D vectors, value_changed begins sending an array of the same length, where each element moves from its current value towards the value at the same position in the array received. Each element approaches its destination value asymptotically during a time period of approximately three to four times the value of the field tau depending on the desired accuracy and the value of order. The order field specifies the smoothness of the transition. The transition ends when all elements have reached their destination.

When set_value receives an event, any transition currently in process is stopped and value_changed sends this array immediately, creating a jump. The field initialValue can be used to set the initial value of value_changed. The field initialDestination should be set to the same value unless a transition to a certain 2D vector value is to be created right after the scene is loaded or right after the CoordinateDamper node is created dynamically.

The MFVec2f arrays that are sent to the set_destination or set_value field shall have the same length (number of elements). The length of the arrays shall not change over time. Values assigned to initialDestination or initialValue shall either be an empty array or an array with the same number of elements as is sent to the set_destination or set_value fields. In any other case, the behavior is not defined.

cube 39.5 Support levels

The Followers component provides one level of support as specified in Table 39.2.

Table 39.2 — Followers component support levels

Level Prerequisites Nodes/Features Support
1 Core 1
Grouping 1
Shape 1
Rendering 1
   
    X3DChaserNode n/a
    X3DDamperNode n/a
    X3DFollowerNode n/a
    ColorChaser All fields fully supported.
    ColorDamper All fields fully supported.
    CoordinateChaser All fields fully supported.
    CoordinateDamper All fields fully supported.
    OrientationChaser All fields fully supported.
    OrientationDamper All fields fully supported.
    PositionChaser All fields fully supported.
    PositionChaser2D All fields fully supported.
    PositionDamper All fields fully supported.
    PositionDamper2D All fields fully supported.
    ScalarChaser All fields fully supported.
    ScalarDamper All fields fully supported.
    TexCoordChaser All fields fully supported.
    TexCoordDamper All fields fully supported.

--- X3D separator bar ---