interface TransformAPI {
    get isActive(): boolean;
    rotateX: number;
    rotateY: number;
    rotateZ: number;
    scale: number;
    translateX: number;
    translateY: number;
    translateZ: number;
    getCSS(data?: object): string;
    getCSSOrtho(data?: object): string;
    getData(position: TJSPositionData, output?: TransformData, validationData?: object): TransformData;
    getMat4(data?: object, output?: Mat4): Mat4;
    getMat4Ortho(data?: object, output?: Mat4): Mat4;
    hasTransform(data: object): boolean;
    reset(data: object): void;
}

Accessors

  • get isActive(): boolean
  • Returns boolean

    Whether there are active transforms in local data.

  • get rotateX(): number
  • Returns number

    Any local rotateX data.

  • set rotateX(value): void
  • Sets the local rotateX data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get rotateY(): number
  • Returns number

    Any local rotateY data.

  • set rotateY(value): void
  • Sets the local rotateY data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get rotateZ(): number
  • Returns number

    Any local rotateZ data.

  • set rotateZ(value): void
  • Sets the local rotateZ data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get scale(): number
  • Returns number

    Any local scale data.

  • set scale(value): void
  • Sets the local scale data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get translateX(): number
  • Returns number

    Any local translateX data.

  • set translateX(value): void
  • Sets the local translateX data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get translateY(): number
  • Returns number

    Any local translateY data.

  • set translateY(value): void
  • Sets the local translateY data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

  • get translateZ(): number
  • Returns number

    Any local translateZ data.

  • set translateZ(value): void
  • Sets the local translateZ data if the value is a finite number otherwise removes the local data.

    Parameters

    • value: number

      A value to set.

    Returns void

Methods

  • Returns the matrix3d CSS transform for the given position / transform data.

    Parameters

    • Optionaldata: object

      Optional position data otherwise use local stored transform data.

    Returns string

    The CSS matrix3d string.

  • Returns the matrix3d CSS transform for the given position / transform data.

    Parameters

    • Optionaldata: object

      Optional position data otherwise use local stored transform data.

    Returns string

    The CSS matrix3d string.

  • Collects all data including a bounding rect, transform matrix, and points array of the given TJSPositionData instance with the applied local transform data.

    Parameters

    • position: TJSPositionData

      The position data to process.

    • Optionaloutput: TransformData

      Optional TransformAPI.Data output instance.

    • OptionalvalidationData: object

      Optional validation data for adjustment parameters.

    Returns TransformData

    The output TransformAPI.Data instance.

  • Creates a transform matrix based on local data applied in order it was added.

    If no data object is provided then the source is the local transform data. If another data object is supplied then the stored local transform order is applied then all remaining transform keys are applied. This allows the construction of a transform matrix in advance of setting local data and is useful in collision detection.

    Parameters

    • Optionaldata: object

      TJSPositionData instance or local transform data.

    • Optionaloutput: Mat4

      The output mat4 instance.

    Returns Mat4

    Transform matrix.

  • Provides an orthographic enhancement to convert left / top positional data to a translate operation.

    This transform matrix takes into account that the remaining operations are , but adds any left / top attributes from passed in data to translate X / Y.

    If no data object is provided then the source is the local transform data. If another data object is supplied then the stored local transform order is applied then all remaining transform keys are applied. This allows the construction of a transform matrix in advance of setting local data and is useful in collision detection.

    Parameters

    • Optionaldata: object

      TJSPositionData instance or local transform data.

    • Optionaloutput: Mat4

      The output mat4 instance.

    Returns Mat4

    Transform matrix.

  • Tests an object if it contains transform keys and the values are finite numbers.

    Parameters

    • data: object

      An object to test for transform data.

    Returns boolean

    Whether the given TJSPositionData has transforms.

  • Resets internal data from the given object containing valid transform keys.

    Parameters

    • data: object

      An object with transform data.

    Returns void