-
Notifications
You must be signed in to change notification settings - Fork 6
Home
API
def add(type, object, startval, endval, ease, duration, **options)
Add/initialize an animation
Parameters:
type
str
type of animation: "position", "size", "opacity"
object
str
name of window/item which should receive the animation
startval
float, list [int,int]
starting value(s) for animation, item will be set to those when animation starts, float for opacity only
endval
float, list [int,int]
end value(s) for animation, float for opacity only
ease
list[float,float,float,float]
parameters for bezier curve, see https://cubic-bezier.com/
duration
int
animation duration in frames, 60 frames is one second
options: name
kwarg, str
name of animation
options: timeoffset
kwarg, float
delay of animation in seconds
options: loop
kwarg, str
type of loop: "ping-pong", "cycle", "continue"
options: callback
kwarg, callable
callback function executed after animation
options: callback_data
kwarg, any
data for callback function
options: early_callback
kwarg, callable
callback function executed before animation
options: early_callback_data
kwarg, any
data for early callback function
def run()
Animation handler, set as render callback
Parameters:
none
def play(animation_name)
Start/continues a paused animation
Parameters:
animation_name
str
name of animation to played
def pause(animation_name)
Pauses an animation
Parameters:
animation_name
str
name of animation to pause
def remove(animation_name)
Terminates/stops an animation
Parameters:
animation_name
str
name of animation to terminate
def get(*args)
Returns current animation values as list
Parameters:
"name"
names of animation
"type"
animation types
"object"
animated items and windows
"startval"
start values
"endval"
end values
"ease"
bezier values
"duration"
animation durations
"starttime"
animation starttimes
"framecounter"
passed frames since animation start
"loop"
animation loops
"loopcounter"
iteration of animation loops
"callback"
callbacks of animation
"callback_data"
data for animation callbacks
"early_callback"
early callbacks of animation
"early_callback_data"
data for animation early callbacks
"isplaying"
True when animation is currently running
"ispaused"
True when animation is currently paused