TriLib Exporter
Search Results for

    Show / Hide Table of Contents

    Class AnimationCurveExtensions

    Provides a series of extension methods for UnityEngine.AnimationCurve objects, enabling custom tangent calculations and modifications.

    Inheritance
    object
    AnimationCurveExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: TriLibExporter
    Assembly: Assembly-CSharp.dll
    Syntax
    public static class AnimationCurveExtensions

    Methods

    AutoClampedTangents(AnimationCurve)

    Automatically sets the tangents of an UnityEngine.AnimationCurve to be clamped or smoothed based on surrounding keyframes.

    Declaration
    public static void AutoClampedTangents(this AnimationCurve animationCurve)
    Parameters
    Type Name Description
    AnimationCurve animationCurve

    The animation curve to modify.

    GetInTangentLinear(Keyframe, Keyframe)

    Calculates the linear in-tangent for a keyframe.

    Declaration
    public static float GetInTangentLinear(Keyframe thisKey, Keyframe prevKey)
    Parameters
    Type Name Description
    Keyframe thisKey

    The current keyframe.

    Keyframe prevKey

    The previous keyframe.

    Returns
    Type Description
    float

    The calculated in-tangent.

    GetOutTangentLinear(Keyframe, Keyframe)

    Calculates the linear out-tangent for a keyframe.

    Declaration
    public static float GetOutTangentLinear(Keyframe nextKey, Keyframe thisKey)
    Parameters
    Type Name Description
    Keyframe nextKey

    The next keyframe.

    Keyframe thisKey

    The current keyframe.

    Returns
    Type Description
    float

    The calculated out-tangent.

    GetTangentAuto(Keyframe, Keyframe, Keyframe, int, int)

    Calculates the automatic tangent for a keyframe based on its surrounding keyframes.

    Declaration
    public static float GetTangentAuto(Keyframe nextKey, Keyframe prevKey, Keyframe thisKey, int index, int count)
    Parameters
    Type Name Description
    Keyframe nextKey

    The next keyframe.

    Keyframe prevKey

    The previous keyframe.

    Keyframe thisKey

    The current keyframe.

    int index

    The index of the current keyframe.

    int count

    The total number of keyframes in the curve.

    Returns
    Type Description
    float

    The calculated tangent value.

    SetTangents(AnimationCurve, TangentMode)

    Sets the tangents of an UnityEngine.AnimationCurve to the specified tangent mode.

    Declaration
    public static void SetTangents(this AnimationCurve animationCurve, TangentMode mode)
    Parameters
    Type Name Description
    AnimationCurve animationCurve

    The animation curve to modify.

    TangentMode mode

    The tangent mode to apply.

    In this article
    Back to top Generated by DocFX