Lens Scripting API

    Class AnimationKeyFrame

    A keyframe with time and respective value. Could be added to Animation Curve.

    // Example of creating keyframe

    var keyFrame = AnimationCurve.createKeyFrame();
    // inTangent = outTangent = 0, inWeight = outWeight = 0.33(3)
    // weightedMode = None, leftTangentType = Free, rightTangentType = Free

    //Change weighted control points
    keyFrame.time = 0.0;
    keyFrame.value = 0.0;
    keyFrame.inWeightPoint.y = 5;
    keyFrame.inWeightPoint.x = 0.5;

    keyFrame.time = 1.0;
    keyFrame.value = 1.0;
    keyFrame.outWeightPoint.y = -10;
    keyFrame.outWeightPoint.x = 0.7;

    Hierarchy (View Summary, Expand)

    Index

    Constructors

    Properties

    inWeightPoint: vec2

    Incoming Control Point.

    leftTangentType: TangentType
    outWeightPoint: vec2

    Outgoing Control Point.

    rightTangentType: TangentType
    time: number

    Timestamp of the keyframe.

    value: number

    Value of the respective timestamp.

    weightedMode: WeightedMode

    Methods

    • Returns true if the object matches or derives from the passed in type.

      Parameters

      • type: string

      Returns boolean

    • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

      Parameters

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR