gameforge - v0.1.27
    Preparing search index...

    Class Tween<T>

    A generic tweening class that animates numeric properties of an object over time using PixiJS's Ticker.

    Type Parameters

    • T
    Index

    Constructors

    Accessors

    • get isComplete(): boolean

      Indicates whether the tween has finished playing.

      Returns boolean

    Methods

    • Adds an animation for a specific numeric property of the target.

      Type Parameters

      • K extends string | number | symbol

      Parameters

      • property: K

        The property key to animate.

      • endValue: number

        The final value for the property.

      Returns this

    • Sets a callback of the tween.

      Parameters

      • onComplete: () => void

        A function to call when the tween finishes

      Returns this

      The current Tween instance for chaining.

    • Starts the tween animation.

      Type Parameters

      • K extends string | number | symbol

      Returns void

    • Sets the delay before the tween starts.

      Parameters

      • delay: number

        Delay in milliseconds.

      Returns this

      The current Tween instance for chaining.

    • Sets the total duration of the tween.

      Parameters

      • duration: number

        Duration in milliseconds.

      Returns this

      The current Tween instance for chaining.

    • Sets the target object to be animated by the tween.

      Parameters

      • target: T

        The object to animate.

      Returns this

      The current Tween instance for chaining.

    • Sets the easing/transition function of the tween.

      Parameters

      • transition: Transition

        The easing/transition function.

      Returns this

      The current Tween instance for chaining.

    • Stops the tween immediately, sets target properties to end values, and calls the completion callback.

      Type Parameters

      • K extends string | number | symbol

      Returns void