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

    Class PropertyAnimator

    Stores keyframed animation tracks for clip properties and evaluates them over local clip time.

    Index

    Constructors

    Methods

    • Adds or replaces a keyframe on a property track.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds, where the keyframe should be placed.

      • value: PropertyValue

        Keyframe value to store.

      • OptionalhandleIn: BezierHandle

        Optional incoming Bezier handle.

      • OptionalhandleOut: BezierHandle

        Optional outgoing Bezier handle.

      • Optionalhold: boolean

        Whether this keyframe should hold its value until the next keyframe.

      Returns PropertyKeyframe

      The created or replaced keyframe.

    • Creates a keyframe track for a registered property if it does not already exist.

      Parameters

      • property: string

        Registered property key.

      • Optionaldefaults: TrackDefaults

        Optional default keyframe settings for newly inserted keyframes.

      Returns PropertyTrack

      The existing or created property track.

    • Applies evaluated values to all registered properties at the provided local clip time.

      Parameters

      • time: number

        Local clip time, in seconds.

      Returns void

      Nothing.

    • Indicates whether a compound property can be merged losslessly from its component tracks.

      Parameters

      • compound: string

        Compound property key to inspect.

      Returns boolean

      true if all populated component tracks share the same keyframe times; otherwise false.

    • Removes keyframe data from one property track or from all tracks.

      Parameters

      • Optionalproperty: string

        Optional property key to clear. When omitted, every track is cleared.

      Returns void

      Nothing.

    • Removes the stored base value for a property.

      Parameters

      • property: string

        Registered property key.

      Returns void

      Nothing.

    • Restores animator tracks and stored initial values from serialized data.

      Parameters

      • data: {
            initialValues?: [string, string | number | boolean | number[]][];
            tracks: {
                customData?: [string, unknown][];
                defaults?: {
                    handleIn?: { time: number; value: number };
                    handleOut?: { time: number; value: number };
                    hold?: boolean;
                };
                keyframes: {
                    handleIn: { time: number; value: number };
                    handleOut: { time: number; value: number };
                    hold?: boolean;
                    time: number;
                    value: (string | number | boolean | number[]) & (
                        undefined
                        | string
                        | number
                        | boolean
                        | number[]
                    );
                }[];
                property: string;
                type: PropertyDescriptionTypeEnum;
            }[];
        }

        Serialized property animator payload.

      Returns void

      Nothing.

    • Copies a keyframe from one time to another on the same property track.

      Parameters

      • property: string

        Registered property key.

      • sourceTime: number

        Existing keyframe time, in seconds.

      • targetTime: number

        Destination keyframe time, in seconds.

      Returns undefined | PropertyKeyframe

      The duplicated keyframe, or undefined if no source keyframe exists.

    • Evaluates every populated property track at the provided time.

      Parameters

      • time: number

        Local clip time, in seconds.

      Returns Map<string, PropertyValue>

      A map of evaluated property values by key.

    • Evaluates a single property track at the provided time.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns undefined | PropertyValue

      The evaluated property value, or undefined if the track has no keyframes.

    • Returns the set of all unique keyframe times across every property track.

      Returns Set<number>

      The unique keyframe times.

    • Returns the property keys that currently have at least one keyframe.

      Returns Set<string>

      The animated property keys.

    • Returns the owning clip ID associated with the animator.

      Returns undefined | string

      The owning clip ID, or undefined if none has been assigned.

    • Returns the stored base value for a property.

      Parameters

      • property: string

        Registered property key.

      Returns undefined | PropertyValue

      A cloned base value, or undefined if none is stored.

    • Returns all stored base property values.

      Returns ReadonlyMap<string, PropertyValue>

      A read-only map of base property values.

    • Returns the keyframe on a property track that matches the provided time.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns undefined | PropertyKeyframe

      The matching keyframe, or undefined if none exists at that time.

    • Returns all keyframes that exist at the provided time across every track.

      Parameters

      • time: number

        Local clip time, in seconds.

      Returns Map<string, PropertyKeyframe>

      A map of property keys to matching keyframes.

    • Returns keyframes on a property track that fall within an inclusive time range.

      Parameters

      • property: string

        Registered property key.

      • startTime: number

        Range start, in seconds.

      • endTime: number

        Range end, in seconds.

      Returns PropertyKeyframe[]

      The matching keyframes.

    • Returns the compound/component link definition associated with a property key.

      Parameters

      • property: string

        Compound or component property key.

      Returns undefined | PropertyLink

      The matching property link, or undefined if the property is not linked.

    • Returns the first keyframe after the provided time on a property track.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns undefined | PropertyKeyframe

      The next keyframe, or undefined if none exists after that time.

    • Returns the last keyframe before the provided time on a property track.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns undefined | PropertyKeyframe

      The previous keyframe, or undefined if none exists before that time.

    • Returns the registered animatable properties.

      Returns ReadonlyMap<string, PropertyRegistration>

      A read-only map of property registrations by key.

    • Returns a property track by key.

      Parameters

      • property: string

        Registered property key.

      Returns undefined | PropertyTrack

      The matching track, or undefined if no track exists.

    • Returns all property tracks.

      Returns ReadonlyMap<string, PropertyTrack>

      A read-only map of tracks by property key.

    • Indicates whether a property has a stored base value.

      Parameters

      • property: string

        Registered property key.

      Returns boolean

      true if a base value exists; otherwise false.

    • Indicates whether a property track has a keyframe at the provided time.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns boolean

      true if a keyframe exists at that time; otherwise false.

    • Indicates whether a property currently has a track.

      Parameters

      • property: string

        Registered property key.

      Returns boolean

      true if a track exists; otherwise false.

    • Indicates whether a compound property is currently represented by populated component tracks.

      Parameters

      • compound: string

        Compound property key to inspect.

      Returns boolean

      true if any component track exists with keyframes; otherwise false.

    • Registers a relationship between a compound property and its scalar component properties.

      Parameters

      Returns void

      Nothing.

    • Merges component tracks back into a compound property track.

      Parameters

      • compound: string

        Compound property key to rebuild.

      • force: boolean = false

        When true, fills missing component keyframes by evaluating track values at merge times.

      Returns void

      Nothing.

    • Moves a keyframe to a new time.

      Parameters

      • property: string

        Registered property key.

      • oldTime: number

        Current keyframe time, in seconds.

      • newTime: number

        Target keyframe time, in seconds.

      • clamped: boolean = false

        When true, keeps the keyframe between its neighbors instead of allowing reordering.

      Returns void

      Nothing.

    • Records the current live value of a registered property as a keyframe.

      Parameters

      • property: string

        Registered property key.

      • currentTime: number

        Local clip time, in seconds, where the keyframe should be stored.

      Returns void

      Nothing.

    • Registers a property that may be read, written, and keyframed by the animator.

      Parameters

      • registration: PropertyRegistration

        Property registration describing how to get and set the property.

      Returns void

      Nothing.

    • Removes a specific keyframe object from a property track.

      Parameters

      • property: string

        Registered property key.

      • keyframe: PropertyKeyframe

        Keyframe instance to remove.

      Returns void

      Nothing.

    • Removes all keyframes on a property track that match the provided time within keyframe tolerance.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds.

      Returns void

      Nothing.

    • Removes all keyframes at the provided time across every track.

      Parameters

      • time: number

        Local clip time, in seconds.

      Returns void

      Nothing.

    • Removes a property track and restores the initial property value when appropriate.

      Parameters

      • property: string

        Registered property key.

      Returns void

      Nothing.

    • Serializes the animator tracks and stored initial values.

      Returns {
          initialValues?: [string, string | number | boolean | number[]][];
          tracks: {
              customData?: [string, unknown][];
              defaults?: {
                  handleIn?: { time: number; value: number };
                  handleOut?: { time: number; value: number };
                  hold?: boolean;
              };
              keyframes: {
                  handleIn: { time: number; value: number };
                  handleOut: { time: number; value: number };
                  hold?: boolean;
                  time: number;
                  value: (string | number | boolean | number[]) & (
                      undefined
                      | string
                      | number
                      | boolean
                      | number[]
                  );
              }[];
              property: string;
              type: PropertyDescriptionTypeEnum;
          }[];
      }

      The serialized property animator payload.

    • Associates the animator with a clip ID used for undo records and emitted events.

      Parameters

      • clipId: string

        Owning clip ID.

      Returns void

      Nothing.

    • Stores the base value used to restore a property when its last keyframe is removed.

      Parameters

      • property: string

        Registered property key.

      • value: PropertyValue

        Base property value.

      Returns void

      Nothing.

    • Splits a compound property track into independent component tracks.

      Parameters

      • compound: string

        Compound property key to split.

      Returns void

      Nothing.

    • Unregisters a property and removes any track and initial value stored for it.

      Parameters

      • key: string

        Registered property key to remove.

      Returns void

      Nothing.

    • Updates the value or handles of the keyframe closest to the provided time.

      Parameters

      • property: string

        Registered property key.

      • time: number

        Local clip time, in seconds, used to locate the keyframe.

      • patch: Partial<Omit<PropertyKeyframe, "time">>

        Partial keyframe data to apply.

      Returns void

      Nothing.