Represents transform data for screen-aligned 2D sprites. Use on SceneObjects with a SpriteVisual Component. See also: SpriteVisual.

// Set the size of the Sprite Aligner
//@input Component.SpriteAligner spriteAlign

script.spriteAlign.size = new vec2(2.0,2.0);
interface SpriteAligner {
    bindingPoint: vec2;
    enabled: boolean;
    sceneObject: SceneObject;
    size: vec2;
    uniqueIdentifier: string;
    destroy(): void;
    getSceneObject(): SceneObject;
    getTransform(): Transform;
    getTypeName(): string;
    isOfType(type: string): boolean;
    isSame(other: ScriptObject): boolean;
}

Hierarchy (view full)

Properties

bindingPoint: vec2

The location of the point this sprite is bound to.

enabled: boolean

If disabled, the Component will stop enacting its behavior.

sceneObject: SceneObject
size: vec2

The width and height of the SpriteVisual.

uniqueIdentifier: string

Methods

  • Destroys the component.

    Returns void

  • Returns the name of this object's type.

    Returns string

  • Returns true if the object matches or derives from the passed in type.

    Parameters

    • type: string

    Returns boolean

  • Returns true if this object is the same as other. Useful for checking if two references point to the same thing.

    Parameters

    Returns boolean