Interface Filter

An object that contains functions that are called at key points in a tween's lifecycle. Shifty can only process Numbers internally, but filters can expand support for any type of data. This is the mechanism that powers String Interpolation.

Hierarchy

  • Filter

Properties

afterTween?: ((tweenable: Tweenable) => void)

Type declaration

    • (tweenable: Tweenable): void
    • This is called right after a tween is processed in a tick.

      Parameters

      Returns void

afterTweenEnd?: ((tweenable: Tweenable) => void)

Type declaration

    • (tweenable: Tweenable): void
    • This is called right after a tween is completed.

      Parameters

      Returns void

beforeTween?: ((tweenable: Tweenable) => void)

Type declaration

    • (tweenable: Tweenable): void
    • This is called right before a tween is processed in a tick.

      Parameters

      Returns void

doesApply: ((tweenable: Tweenable) => boolean)

Type declaration

    • (tweenable: Tweenable): boolean
    • This is called when a tween is created to determine if a filter is needed. Filters are only added to a tween when it is created so that they are not unnecessarily processed if they don't apply during a subsequent update tick.

      Parameters

      Returns boolean

tweenCreated?: ((tweenable: Tweenable) => void)

Type declaration

    • (tweenable: Tweenable): void
    • This is called when a tween is created. This should perform any setup needed by subsequent per-tick calls to beforeTween and afterTween.

      Parameters

      Returns void

Generated using TypeDoc