An Animation loaded from a glTF-File.

Authors

Jonas Plotzky

Hierarchy

Constructors

Properties

animationStructure: AnimationStructure
idResource: string
labels: AnimationLabel = {}
name: string
status: RESOURCE_STATUS = RESOURCE_STATUS.PENDING
totalTime: number = 0
type: string
url: RequestInfo
iSubclass: number = ...
subclasses: typeof Animation[] = []

Accessors

Methods

  • Calculates and returns the direction the animation should currently be playing in.

    Parameters

    Returns number

    1 if forward, 0 if stop, -1 if backwards

  • (Re-)Calculate the total time of the Animation. Calculation-heavy, use only if actually needed.

    Returns void

  • Returns a list of the names of the events the ComponentAnimator needs to fire between _min and _max input values.

    Parameters

    • _min: number
    • _max: number
    • _quantization: ANIMATION_QUANTIZATION
    • _direction: number

      The direction the animation is supposed to run in. >0 == forward, 0 == stop, <0 == backwards

    Returns string[]

    a list of strings with the names of the custom events to fire.

  • Returns the time to use for animation sampling when applying a playmode

    Parameters

    Returns number

  • Collect applicable attributes of the instance and copies of their values in a Mutator-object. By default, a mutator cannot be extended, since extensions are not available in the object the mutator belongs to. A mutator may be reduced by the descendants of Mutable to contain only the properties needed.

    Parameters

    • _extendable: boolean = false

    Returns Mutator

  • Returns an associative array with the same attributes as the given mutator, but with the corresponding types as string-values. Does not recurse into objects! This will return the decorated meta-type instead of the runtime-type of the object, if available.

    Parameters

    Returns MutatorAttributeTypes

  • Collect the attributes of the instance and their values applicable for animation. Basic functionality is identical to getMutator, returned mutator should then be reduced by the subclassed instance

    Parameters

    • _extendable: boolean = false

    Returns MutatorForAnimation

  • Generates and returns a Mutator with the information to apply to the Node to animate in the state the animation is in at the given time, direction and quantization

    Parameters

    Returns Mutator

  • Updates the attribute values of the instance according to the state of the mutator. The mutation may be restricted to a subset of the mutator and the event dispatching suppressed. Uses mutateBase, but can be overwritten in subclasses

    Parameters

    • _mutator: Mutator
    • _selection: string[] = null
    • _dispatchMutate: boolean = true

    Returns Promise<void>

  • Removes the event with the given name from the list of events.

    Parameters

    • _name: string

      name of the event to remove.

    Returns void

  • Adds an Event to the List of events.

    Parameters

    • _name: string

      The name of the event (needs to be unique per Animation).

    • _time: number

      The timestamp of the event (in milliseconds).

    Returns void

  • Updates the values of the given mutator according to the current state of the instance

    Parameters

    Returns void