Utility class for working with animations.

Constructors

Methods

  • Assigns animations from a GLTF file to the objects in the scene.
    This method will look for objects in the scene that have animations and assign them to the correct objects.

    Parameters

    • file: Object3D<Object3DEventMap> | Pick<Model, "animations" | "scene">

      The GLTF file to assign the animations from

    Returns null | IAnimationComponent[]

  • Tests if the root object of an AnimationAction can be animated. Objects where matrixAutoUpdate or matrixWorldAutoUpdate is set to false may not animate correctly.

    Parameters

    • action: AnimationAction

      The AnimationAction to test

    • OptionalallowLog: boolean

      Whether to allow logging warnings. Default is false, which only allows logging in development environments.

    Returns boolean

    True if the root object can be animated, false otherwise

  • Tries to get the animation actions from an animation mixer.

    Parameters

    Returns null | AnimationAction[]

    The actions or null if the mixer is invalid