jit.anim.drive
Description
Animates relative transforms over time with easing. The jit.anim.drive object works in conjunction with jit.anim.node and OpenGL objects to perform this function. Double clicking the object will open a ui mapping dictionary, allowing certain user interface actions to be mapped to animation messages.
Examples

Discussion
UI mapping of key and mouse input is facilitated by editing the ui-map dictionary. Key input is mapped alpha-numeric keys and arrow keys (using up, down, left and right instead of the key symbol). Mouse mapping looks for the following dictionary entries:
Horizontal: mouse_horizontal, mouse_h, mouse_x
Horizontal with button down: mouse_down_horizontal, mouse_down_h, mouse_down_x
Vertical: mouse_vertical, mouse_v, mouse_y
Vertical with button down: mouse_down_vertical, mouse_down_v, mouse_down_y
UI input can be mapped to , and messages.
Attributes
active [int]
Indicates if the object is currently animating.
automatic [int]
Enables automatic update messages (default = 1). Requires the targetname object to belong to a valid OpenGL context.
drawto [symbol]
Assign to the named drawing context, allowing for updates to be received automatically.
ease [float]
Set both easein and easeout attributes (default = 1.).
easefunc [symbol]
Determines how the easing is applied (default = linear).
Possible values:
'linear'
'quadratic'
'cubic'
easein [float]
Determines how long it will take (in seconds) for a specific animation message to go from it's current value to the new value (default = 1.). This attribute only affects the
, and animations.easeout [float]
Determines how long it will take (in seconds) for a specific animation message to go from it's current value to 0 (default = 1.). This attribute only affects the
, and animations.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 for the
, , and messages, in that order.name [symbol]
Specifies the name of the instance (default = UID).
position [3 floats]
The current stored position in 3D space. This attribute is used for the
and messages (default = 0 0 0).quat [4 floats]
The current orientation in 3D space, stored as a quaternion value. This attribute is used for the
message (default = 0 0 0 1).scale [3 floats]
The current stored scale in 3D space. This attribute is used for the
message (default = 1 1 1).speed [float]
The speed of animations in units per second. (default = 30.)
spring_damp [float]
The dampening amount applied to the spring equation used in the
message (default = 0.1).spring_mass [float]
The mass amount applied to the spring equation used in the
message (default = 1.).spring_stiff [float]
The stiffness amount applied to the spring equation used in the
message (default = 0.2).spring_thresh [float]
The threshold value to determine when the spring simulation is no longer active. Used in the
message (default = 0.0001).ui_dict_layout [symbol]
Sets the keyboard layout for the default ui mapping dict when ui_listen is enabled. The value is stored in the application preferences and will affect all future instantiations of jit.anim.drive. To override the default ui mapping see the ui_map and ui_map_clone attributes.
Possible values:
'azerty'
'qwerty'
'qwertz'
'qzerty'
'azerty_v2'
( Includes a keyboard turn around the Z axis )
'qwerty_v2'
( Includes a keyboard turn around the Z axis )
targetname [symbol]
The name of the target object that should be either an OpenGL object, or a jit.anim.node object.
ui_listen [int]
Cause UI mouse and keyboard messages to be received from context window (default = 0). Requires the targetname object to belong to a valid OpenGL context.
ui_map [symbol]
Name associated with the ui mapping dictionary (default = UID). If an existing dictionary is registered to that name, this dictionary will reference the registered dictionary. See the anim.drive.ui.dict example patch for a demonstration.
ui_map_clone [symbol]
The name of a registered dictionary to clone as the UI mapping dictionary. See the anim.drive.ui.dict example patch for a demonstration.
ui_priority [int]
UI priority value (default = 900). When multiple UI objects are listening to the same window, ui_priority determines the order objects receive input. Lower values test first.
Common Box Attributes
Messages
bang
anim_reset
(mouse)
dictionary
Arguments
grow
Arguments
y [float]
z [float]
move
Arguments
y [float]
z [float]
moveto
Arguments
y [float]
z [float]
duration [float]
rotateto
Arguments
y [float]
z [float]
w [float]
duration [float]
scaleto
Arguments
y [float]
z [float]
duration [float]
springto
Arguments
y [float]
z [float]
turn
Arguments
y [float]
z [float]
ui_dict
ui_key
Arguments
ui_keyup
Arguments
ui_mouse
Arguments
screen-y [int]
mouse-down [int]
update_drive
See Also
Name | Description |
---|---|
jit.anim.node | |
jit.anim.path | |
jit.gl.camera |