tiramisu/object3d
Types
Declarative animation state - describes what animation should be playing
pub type Animation {
Animation(
clip: AnimationClip,
loop: LoopMode,
speed: Float,
weight: Float,
)
}
Constructors
-
Animation( clip: AnimationClip, loop: LoopMode, speed: Float, weight: Float, )
Opaque type for Three.js AnimationClip
pub type AnimationClip
Animation loop mode
pub type LoopMode {
LoopOnce
LoopRepeat
}
Constructors
-
LoopOnce -
LoopRepeat
Values
pub fn clip_duration(clip: AnimationClip) -> Float
Get the duration of an animation clip (in seconds)
pub fn new_animation(clip: AnimationClip) -> Animation
Create an animation from a clip with default settings (loop repeat, normal speed, full weight)
pub fn set_speed(anim: Animation, speed: Float) -> Animation
Set the animation speed (1.0 = normal, 2.0 = double speed, 0.5 = half speed)