spine_animation_apply method

void spine_animation_apply(
  1. spine_animation self,
  2. spine_skeleton skeleton,
  3. double lastTime,
  4. double time,
  5. bool loop,
  6. spine_array_event events,
  7. double alpha,
  8. int from,
  9. bool add,
  10. bool out,
  11. bool appliedPose,
)

Applies the animation's timelines to the specified skeleton.

See Timeline::apply() and Applying Animations in the Spine Runtimes Guide.

@param skeleton The skeleton the animation is applied to. This provides access to the bones, slots, and other skeleton components the timelines may change. @param lastTime The last time in seconds this animation was applied. Some timelines trigger only at discrete times, in which case all keys are triggered between lastTime (exclusive) and time (inclusive). Pass -1 the first time an animation is applied to ensure frame 0 is triggered. @param time The time in seconds the skeleton is being posed for. Timelines find the frame before and after this time and interpolate between the frame values. @param loop True if time beyond the animation duration repeats the animation, else the last frame is used. @param events If any events are fired, they are added to this list. Can be NULL to ignore fired events or if no timelines fire events. @param alpha 0 applies setup or current values (depending on from), 1 uses timeline values, and intermediate values interpolate between them. Adjusting alpha over time can mix an animation in or out. @param from If true, alpha transitions between setup and timeline values, setup values are used before the first frame (current values are not used). If false, alpha transitions between current and timeline values, no change is made before the first frame. @param add If true, for timelines that support it, their values are added to the setup or current values (depending on from). @param out True when the animation is mixing out, else it is mixing in. Used by timelines that perform instant transitions. @param appliedPose True to modify getAppliedPose(), else the unconstrained pose is modified.

Implementation

void spine_animation_apply(
  spine_animation self,
  spine_skeleton skeleton,
  double lastTime,
  double time,
  bool loop,
  spine_array_event events,
  double alpha,
  int from,
  bool add,
  bool out,
  bool appliedPose,
) {
  return _spine_animation_apply(
    self,
    skeleton,
    lastTime,
    time,
    loop,
    events,
    alpha,
    from,
    add,
    out,
    appliedPose,
  );
}