Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
A route in a MappingObject used by the Controller API.
Create a route using MappingObject methods and apply this object's methods to process it, terminating with
RouteObject#to to apply it to a Standard
control, action, or script function. Note: Loops are not
permitted.
Some methods apply to routes with number data, some apply routes with Pose data, and some apply to both route types.
Methods
Name | Return Value | Summary |
---|---|---|
clamp
|
RouteObject |
Filters numeric route values to lie between two values; values outside this range are not passed on through the route. |
constrainToInteger
|
RouteObject |
Filters numeric route values such that they are rounded to |
constrainToPositiveInteger
|
RouteObject |
Filters numeric route values such that they are rounded to |
deadZone
|
RouteObject |
Filters numeric route values such that they're sent only when the input value is outside a dead-zone. When the input
passes the dead-zone value, output is sent starting at |
debug
|
RouteObject |
Enables or disables writing debug information for a route to the program log. |
exponentialSmoothing
|
RouteObject |
Filters Pose route values to be smoothed by an exponential decay filter. The filter's rotation and
translation values are calculated as: |
hysteresis
|
RouteObject |
Filters numeric route values such that they are rounded to |
invert
|
RouteObject |
Filters numeric and Pose route values to have the opposite sign, e.g., |
logicalNot
|
RouteObject |
Filters numeric route values such that a value of |
lowVelocity
|
RouteObject |
Filters Pose route values to be smoothed by a low velocity filter. The filter's rotation and translation
values are calculated as: |
peek
|
RouteObject |
Processes the route without marking the controller output as having been read, so that other routes from the same controller output can also process. |
postTransform
|
RouteObject |
Filters Pose route values to have a post-transform applied. |
pulse
|
RouteObject |
Filters numeric route values to send at a specified interval. |
rotate
|
RouteObject |
Filters Pose route values to have a pre-rotation applied. |
scale
|
RouteObject |
Filters numeric and Pose route values to be scaled by a constant amount. |
to
|
None |
Terminates the route with a standard control, an action, or a script function. The output value from the route is sent to the specified destination. |
toQml
|
None |
Terminates the route with a standard control, an action, or a script function. The output value from the route is sent to the specified destination. This is a QML-specific version of to: use this version in QML files. |
transform
|
RouteObject |
Filters Pose route values to have a pre-transform applied. |
translate
|
RouteObject |
Filters Pose route values to have a pre-translation applied. |
when
|
RouteObject |
Processes the route only if a condition is satisfied. The condition is evaluated before the route input is read, and
the input is read only if the condition is |
whenQml
|
RouteObject |
Processes the route only if a condition is satisfied. The condition is evaluated before the route input is read, and
the input is read only if the condition is This is a QML-specific version of when: use this version in QML files. |
Method Details
clamp( min, max ) → {RouteObject}
Returns: The route object with the clamp filter added. |
|||||||||
---|---|---|---|---|---|---|---|---|---|
Filters numeric route values to lie between two values; values outside this range are not passed on through the route. Parameters
Example
|
constrainToInteger( ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
---|
Filters numeric route values such that they are rounded to Example
|
constrainToPositiveInteger( ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
---|
Filters numeric route values such that they are rounded to Example
|
deadZone( min ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
||||||
---|---|---|---|---|---|---|
Filters numeric route values such that they're sent only when the input value is outside a dead-zone. When the input
passes the dead-zone value, output is sent starting at Parameters
Example
|
debug( enableopt ) → {RouteObject}
Returns: The RouteObject with debug output enabled or disabled.
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Enables or disables writing debug information for a route to the program log. Parameters
Example
|
exponentialSmoothing( rotationConstant, translationConstant ) → {RouteObject}
Returns: The RouteObject smoothed by an exponential filter.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Filters Pose route values to be smoothed by an exponential decay filter. The filter's rotation and
translation values are calculated as: Parameters
|
hysteresis( min, max ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Filters numeric route values such that they are rounded to Parameters
Example
|
invert( ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
---|
Filters numeric and Pose route values to have the opposite sign, e.g., Example
|
logicalNot( ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
---|
Filters numeric route values such that a value of Example
|
lowVelocity( rotationConstant, translationConstant ) → {RouteObject}
Returns: The RouteObject smoothed by low velocity filtering.
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Filters Pose route values to be smoothed by a low velocity filter. The filter's rotation and translation
values are calculated as: Parameters
|
peek( enableopt ) → {RouteObject}
Returns: The RouteObject with the peek feature enabled.
|
||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Processes the route without marking the controller output as having been read, so that other routes from the same controller output can also process. Parameters
|
postTransform( transform ) → {RouteObject}
Returns: The RouteObject with the post-transform applied.
|
||||||
---|---|---|---|---|---|---|
Filters Pose route values to have a post-transform applied. Parameters
|
pulse( interval ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
||||||
---|---|---|---|---|---|---|
Filters numeric route values to send at a specified interval. Parameters
Example
|
rotate( rotation ) → {RouteObject}
Returns: The RouteObject with the pre-rotation applied.
|
||||||
---|---|---|---|---|---|---|
Filters Pose route values to have a pre-rotation applied. Parameters
|
scale( multiplier ) → {RouteObject}
Returns: The RouteObject with the filter applied.
|
||||||
---|---|---|---|---|---|---|
Filters numeric and Pose route values to be scaled by a constant amount. Parameters
Example
|
to( destination ) | ||||||
---|---|---|---|---|---|---|
Terminates the route with a standard control, an action, or a script function. The output value from the route is sent to the specified destination. Parameters
Examples
|
toQml( destination ) | ||||||
---|---|---|---|---|---|---|
Terminates the route with a standard control, an action, or a script function. The output value from the route is sent to the specified destination. This is a QML-specific version of to: use this version in QML files. Parameters
|
transform( transform ) → {RouteObject}
Returns: The RouteObject with the pre-transform applied.
|
||||||
---|---|---|---|---|---|---|
Filters Pose route values to have a pre-transform applied. Parameters
|
translate( translate ) → {RouteObject}
Returns: The RouteObject with the pre-translation applied.
|
||||||
---|---|---|---|---|---|---|
Filters Pose route values to have a pre-translation applied. Parameters
|
when( expression ) → {RouteObject}
Returns: The RouteObject with the condition added.
|
||||||
---|---|---|---|---|---|---|
Processes the route only if a condition is satisfied. The condition is evaluated before the route input is read, and
the input is read only if the condition is Parameters
Example
|
whenQml( expression ) → {RouteObject}
Returns: The RouteObject with the condition added.
|
||||||
---|---|---|---|---|---|---|
Processes the route only if a condition is satisfied. The condition is evaluated before the route input is read, and
the input is read only if the condition is This is a QML-specific version of when: use this version in QML files. Parameters
|