-
Notifications
You must be signed in to change notification settings - Fork 0
Animation
Shaye Garg edited this page Sep 29, 2021
·
1 revision
Animations are used to control GLTF animations.
You can create animations like:
animation <name: expr> {
length: <expr>,
lag: <expr>,
value: <expr>
}
/// Which would be:
animation "MyAnimation" {
length: 100,
lag: 400,
value: @{
@"L:IsAnimationMax, Bool" as num * 100
}
}
name
: The name of the animation as it appears in the GLTF file.
length
: The length of the animation. This is used to scale the output of value
to a number between 0 and 1.
Essentially, the output of value
is divided by length
, and the resulting value is used to define the target of animation interpolation,
with 0 being the first frame, and 1 being the last.
lag
: This determines how fast Microsoft Flight Simulator will interpolate to the target when the output of value
changes.
This signifies how much of the length
can be completed in one second. If lag
is set to 50
, and length
is set to 100
,
it will take 2 seconds for the animation to interpolate from 0 to 100.