Class AnimationUtility

Helper class for dealing with animations, animation clips and curves.

Hierarchy

  • FrameworkObject
    • AnimationUtility

Constructors

  • Parameters

    • OptionalisInternalConstructor: boolean

    Returns AnimationUtility

Methods

  • Converts a curve in euler angles (in degrees) into a curve using quaternions by sampling the euler curve in order to mimic the euler tangents.

    Parameters

    • eulerCurve: CompoundVector3Curve

      The curve to be converted.

    • Optionalfactor: number

      A quality factor in the range of (1, inf) (technically, it can get to infinity, but in practice smaller values up to 5 are the norm) where 1 means perfect curve matching (although it is not a valid number, it must be higher than 1) but many keyframes will be generated, while increasing this value will reduce the quality for a reduction in keyframe counts. The good general range is between [1.25 - 1.75].

    • Optionalorder: EnumValue<EulerAngleOrder, number>

      The order in which the euler angles are provided.

    Returns CompoundQuaternionCurve

    The converted quaternion curve with the extra intermediary keyframes added.

  • Converts a curve in euler angles (in degrees) into a curve using quaternions by sampling the euler curve in order to mimic the euler tangents.

    Parameters

    • eulerCurve: Vector3Curve

      The curve to be converted.

    • Optionalfactor: number

      A quality factor in the range of (1, inf) (technically, it can get to infinity, but in practice smaller values up to 5 are the norm) where 1 means perfect curve matching (although it is not a valid number, it must be higher than 1) but many keyframes will be generated, while increasing this value will reduce the quality for a reduction in keyframe counts. The good general range is between [1.25 - 1.75].

    • Optionalorder: EnumValue<EulerAngleOrder, number>

      The order in which the euler angles are provided.

    Returns QuaternionCurve

    The converted quaternion curve with the extra intermediary keyframes added.

  • Given a 3D transform, it will decompose it and modifies the transform curves (translation, rotation, scale) appropriately to include the transform.

    Parameters

    Returns boolean

    True if the operation was performed, else false (one of the curves is invalid).

  • Given a 3D transform, it will decompose it and modifies the transform curves (translation, rotation, scale) appropriately to include the transform. The default parameters are used by the function to default one of the transform components in case that component is missing (i.e. if the scale Y component is missing, the transform function will use the defaultScale.Y in that channel instead).

    Parameters

    Returns boolean

    True if the operation was performed, else false (one of the curves is invalid).