jit.anim.path
Evaluate a path of 3D transform points
Description
Takes a series of 3D transform points and interpolates between them. See the jit.path object for more information on this interpolation. Each point stores 11 values: a time value, 3 position values, 3 scale values and 4 quaternion rotation values.
Attributes
autohandles[int]
Enable the calculation of handle values every time the path is edited (default = 1).
automatic[int]
Enable automatic animation notifications from the attached render context (default = 1).
closed[int]
read-only
Indicates the path is closed (first and last points are equal).
drawpath[symbol]
Name of a jit.gl.path object used to draw this path.
drawto[symbol]
Assign to the named drawing context, allowing for updates to be received automatically.
duration[float]
read-only
Path duration in seconds (default = 0.)
endreport[int]
Enable animation end reporting (default = 0). The symbol loop = 0.
is sent out the dumpout when the animation ends. Only valid if
evalquat[int]
Output evaluated quaternion values (default = 0). Adding orientation values to the path enables.
evalreport[int]
Enable/disable the evaluation parameter reporting out the dumpout (default = 0). The report is a 3 element list where each element represents the current evaluation parameters as 0 to 1, 0 to duration, and 0 to length, in that order.
evalscale[int]
Output evaluated scale values (default = 0). Adding scale values to the path enables.
fixed_delta[float]
Fixed Delta Time
interpmode[symbol]
Path interpolation method (default = linear).
Possible values:
'linear'
(
Linear interpolation
)
Linear interpolation
'spline'
(
Hermite interpolation
)
Linear interpolation
length[float]
read-only
Path length (default = 0.)
loop[int]
Path animation loop method (default = 1).
Possible values:
0 = 'off'
1 = 'on'
2 = 'palindrome'
loopreport[int]
Enable animation loop reporting (default = 0). The symbol loop is not 0.
is sent out the dumpout when the animation loops. Only valid if
name[symbol]
Specifies the name of the instance (default = UID).
play[int]
Enable path animation (default = 0).
pointcount[int]
read-only
Number of path points (default = 0).
position[3 floats]
read-only
Current path position (default = 0. 0. 0.).
quat[4 floats]
read-only
Current path quaternion orientation (default = 0. 0. 0. 1.)
rate[float]
Animation rate value (default = 1.)
scale[3 floats]
read-only
Current path scale value (default = 1. 1. 1.).
shortestrot[int]
Use the shortest path between rotations (default = 1).
targetname[symbol]
The name of the target object that should be either an OpenGL object, or a jit.anim.node object.
time[float]
Current path time value (default = 0.)
timemode[symbol]
Determine how time values added to the path (default = relative).
Possible values:
'absolute'
(
Time value is set to argument
)
'relative'
(
Time value is set to argument plus previous time value
)
Common Box Attributes
annotation[symbol]
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background[int]: 0
Adds or removes the object from the patcher's background layer.
adds the object to the background layer, removes it. Objects in the background layer are shown behind all objects in the default foreground layer.
color[4 floats]
Sets the color for the object box outline.
fontface[int]
Sets the type style used by the object. The options are:
plain
bold
italic
bold italic
Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
fontname[symbol]
Sets the object's font.
fontsize[float]
Sets the object's font size (in points).
Possible values:
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'
hint[symbol]
Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.
ignoreclick[int]: 0
Toggles whether an object ignores mouse clicks in a locked patcher.
jspainterfile[symbol]
JS Painter File
patching_rect[4 floats]: 0. 0. 100. 0.
Sets the position and size of the object in the patcher window.
position[2 floats]
write-only
Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.
presentation[int]: 0
Sets whether an object belongs to the patcher's presentation.
presentation_rect[4 floats]: 0. 0. 0. 0.
Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.
rect[4 floats]
write-only
Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).
size[2 floats]
write-only
Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.
textcolor[4 floats]
Sets the color for the object's text in RGBA format.
textjustification[int]
Sets the justification for the object's text.
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
varname[symbol]
Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.
Messages
bang
Cause the animation to update, if currently active, and the transform messages to output.
addquat
Add quaternion orientation values to the last point in the path.
- x
[float]
- y
[float]
- z
[float]
- w
[float]
addrotate
Add angle-axis orientation values to the last point in the path. The values are converted to a quaternion before adding.
- angle
[float]
- x
[float]
- y
[float]
- z
[float]
addrotatexyz
Add euler orientation values to the last point in the path. The values are converted to a quaternion before adding.
- x
[float]
- y
[float]
- z
[float]
addscale
Add scale values to the last point in the path.
- x
[float]
- y
[float]
- z
[float]
append
Append point values to the end of the path. If necessary, the path will be resorted based on the time value prior to evaluation.
- time
[float]
- x
[float]
- y
[float]
- z
[float]
- scale-x
[float]
- scale-y
[float]
- scale-z
[float]
- quat-x
[float]
- quat-y
[float]
- quat-z
[float]
- quat-w
[float]
calchandles
Calculate the path handles of each point in the path using the Catmull-Rom method. This will overwrite any previously stored handles.
clear
Remove all points from the path
closepath
Close the path by adding a point to the end equal to the first point.
delete
Delete the point at index .
- index
[int]
edit
Edit the point at index
- index
[int]
- time
[float]
- x
[float]
- y
[float]
- z
[float]
- scale-x
[float]
- scale-y
[float]
- scale-z
[float]
- quat-x
[float]
- quat-y
[float]
- quat-z
[float]
- quat-w
[float]
edithandle
Edit the point handle at index .
- index
[int]
- time
[float]
- x
[float]
- y
[float]
- z
[float]
- scale-x
[float]
- scale-y
[float]
- scale-z
[float]
- quat-x
[float]
- quat-y
[float]
- quat-z
[float]
- quat-w
[float]
eval
Evaluate the path using parameter , (between 0. and 1.) and output the interpolated values.
- parameter
[float]
evallength
Evaluate the path using the length-parameter (between 0 and pathlength) and output the interpolated values.
- length-parameter
[float]
evaltime
Evaluate the path using time (between 0 and duration) and output the interpolated values.
- time
[float]
gethandle
Get handle values at index and output through the right (dumpout) outlet.
- index
[int]
getpoint
Get point values at index and output through the right (dumpout) outlet.
- index
[int]
insert
Insert a new point at index
- index
[int]
- time
[float]
- x
[float]
- y
[float]
- z
[float]
- scale-x
[float]
- scale-y
[float]
- scale-z
[float]
- quat-x
[float]
- quat-y
[float]
- quat-z
[float]
- quat-w
[float]
next
Advance the path animation to the next point.
prev
Rewind the path animation to the previous point
setquat
Set quaternion orientation values at index
- index
[int]
- x
[float]
- y
[float]
- z
[float]
- w
[float]
setrotate
Set angle-axis orientation orientation values at index
- index
[int]
- angle
[float]
- x
[float]
- y
[float]
- z
[float]
setrotatexyz
Set euler orientation orientation values at index
- index
[int]
- x
[float]
- y
[float]
- z
[float]
setscale
Set scale values at index
- index
[int]
- x
[float]
- y
[float]
- z
[float]
settime
Set time at index . If necessary, the path will be resorted prior to evaluation.
- index
[int]
sorttime
Sort path based on time values
start
Start path animation
stop
Stop path animation
See Also
Name | Description |
---|---|
jit.anim.drive | Animate a 3D transform |
jit.anim.path | Evaluate a path of 3D transform points |
jit.path | Evaluates a series of N-dim points as a path |
jit.gl.path | Generate and render a path in OpenGL |