Fudge Core
    Preparing search index...

    Class Animation

    Describes and controls and animation by yielding mutators according to the stored AnimationStructure and AnimationSequences Applied to a Node directly via script or ComponentAnimation.

    Lukas Scheuerle, HFU, 2019 | Jirka Dell'Oro-Friedl, HFU, 2021-2023 | Jonas Plotzky, HFU, 2025

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    Properties

    animationStructure: AnimationStructure
    idResource: string = undefined
    labels: AnimationLabel = {}
    name: string
    totalTime: number = 0
    iSubclass: number = ...
    subclasses: typeof FudgeCore.Animation[] = []

    Accessors

    Methods

    • Returns a list of the names of the events the ComponentAnimation 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.

    • 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

    • 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
      • Optional_selection: string[]
      • Optional_dispatchMutate: boolean

      Returns void | 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

    • Override the given base mutator with the given override mutator using linear interpolation between the values with the given weight. Set the intersect flag to only include properties in the result that exist in both of the given mutators.

      Parameters

      • _base: Mutator
      • _override: Mutator
      • _weight: number
      • _intersect: boolean = false

      Returns Mutator

    • Blend the two given mutators together, using the given weights to determine the influence of each. The resulting mutator will contain all properties of the base mutator, with the properties of the blend mutator blended in. Blend mutator properties that don't exist in the base mutator will be added to the result mutator. Set the intersect flag to only include properties in the result that exist in both of the given mutators.

      Parameters

      • _base: Mutator
      • _blend: Mutator
      • _weightBase: number
      • _weightBlend: number
      • _intersect: boolean = false

      Returns Mutator