@rendley/sdk - v1.15.5
    Preparing search index...

    Class AnimationClass

    Manages the built-in in, out, and loop animation controllers attached to a clip.

    Index

    Constructors

    • Creates an animation controller wrapper for a clip.

      Parameters

      • refClip: Clip

        Clip whose animatable properties are driven by this controller.

      Returns AnimationClass

    Methods

    • Restores animation controller state from serialized data.

      Parameters

      • payload: object

        Serialized animation controller payload.

      Returns void

      Nothing.

    • Returns the union of all properties animated by the configured in, out, and loop animations.

      Returns Set<string>

      The animated property keys.

    • Returns the configured timeline duration for an animation slot.

      Parameters

      Returns number

      The configured duration or loop count value for the slot.

    • Returns the configured loop repetition count.

      Returns number

      The number of loop repetitions.

    • Returns the current loop smoothing factor.

      Returns number

      The loop smoothing factor.

    • Loads animation data from a URL and assigns it to one of the clip animation slots.

      Parameters

      • type: AnimationTypeEnum

        Animation slot to replace.

      • url: string

        URL that resolves to animation data understood by the animation controller.

      • Optionalduration: number

        Optional timeline duration to use for the animation slot.

      Returns Promise<void>

      A promise that resolves after the animation has been loaded and applied.

    • Removes the animation assigned to the specified slot.

      Parameters

      Returns void

      Nothing.

    • Serializes the clip animation controller state.

      Returns {
          animationDataIn?: {
              amplification?: number;
              inOutOfRange: OutOfRangeEnum;
              name: string;
              offset?: number;
              outOutOfRange: OutOfRangeEnum;
              propertyAnimations: {
                  inOutOfRange: OutOfRangeEnum;
                  keyframes: {
                      easing: EasingEnum;
                      relativeProperty?: string;
                      space: AnimationSpaceEnum;
                      time: number;
                      value: string | number;
                  }[];
                  outOutOfRange: OutOfRangeEnum;
                  property: string;
              }[];
              speed?: number;
          };
          animationDataLoop?: {
              amplification?: number;
              inOutOfRange: OutOfRangeEnum;
              name: string;
              offset?: number;
              outOutOfRange: OutOfRangeEnum;
              propertyAnimations: {
                  inOutOfRange: OutOfRangeEnum;
                  keyframes: {
                      easing: EasingEnum;
                      relativeProperty?: string;
                      space: AnimationSpaceEnum;
                      time: number;
                      value: string
                      | number;
                  }[];
                  outOutOfRange: OutOfRangeEnum;
                  property: string;
              }[];
              speed?: number;
          };
          animationDataOut?: {
              amplification?: number;
              inOutOfRange: OutOfRangeEnum;
              name: string;
              offset?: number;
              outOutOfRange: OutOfRangeEnum;
              propertyAnimations: {
                  inOutOfRange: OutOfRangeEnum;
                  keyframes: {
                      easing: EasingEnum;
                      relativeProperty?: string;
                      space: AnimationSpaceEnum;
                      time: number;
                      value: string
                      | number;
                  }[];
                  outOutOfRange: OutOfRangeEnum;
                  property: string;
              }[];
              speed?: number;
          };
          animationInDuration: number;
          animationLoopCount: number;
          animationOutDuration: number;
          loopSmoothing: number;
      }

      The serialized animation controller payload.

    • Assigns animation data to one of the clip animation slots.

      Parameters

      • type: AnimationTypeEnum

        Animation slot to replace.

      • animationData: AnimationData

        Animation definition to load.

      • Optionalduration: number

        Optional timeline duration to use for the animation slot.

      Returns void

      Nothing.

    • Sets the timeline duration used by an animation slot.

      Parameters

      • type: AnimationTypeEnum

        Animation slot to update.

      • duration: number

        Duration in seconds for in/out, or loop span metadata for loop.

      Returns void

      Nothing.

    • Sets how many times the loop animation should repeat across the clip body.

      Parameters

      • count: number

        Loop repetition count.

      Returns void

      Nothing.

    • Sets fade-in and fade-out smoothing applied to loop animation playback.

      Parameters

      • smoothing: number

        Smoothing factor used near loop boundaries.

      Returns void

      Nothing.

    • Registers a callback invoked after the configured animation set changes.

      Parameters

      • callback: () => void

        Callback to invoke after animation definitions are added, removed, or replaced.

      Returns void

      Nothing.

    • Evaluates the active clip animations at the provided timeline time and applies their values to the clip.

      Parameters

      • currentTime: number

        Current timeline time in seconds.

      • forceUpdate: boolean = false

        When true, bypasses the last-time cache and reapplies animation values.

      Returns void

      Nothing.