phaser - v4.0.0-rc.4
    Preparing search index...

    Vertex data for the NineSlice Game Object.

    This class consists of all the information required for a single vertex.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    u: number

    UV u coordinate of this vertex.

    v: number

    UV v coordinate of this vertex.

    vx: number

    The projected x coordinate of this vertex.

    vy: number

    The projected y coordinate of this vertex.

    x: number

    The x component of this Vector.

    y: number

    The y component of this Vector.

    A static down Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    A static left Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    A static one Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    RIGHT: Math.Vector2

    A static right Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    A static up Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    A static zero Vector2 for use by reference.

    This constant is meant for comparison operations and should not be modified directly.

    Methods

    • Check whether this Vector is equal to a given Vector.

      Performs a strict equality check against each Vector's components.

      Parameters

      Returns boolean

    • Check whether this Vector is approximately equal to a given Vector.

      Parameters

      • v: Vector2Like

        The vector to compare with this Vector.

      • Optionalepsilon: number

        The tolerance value. Default 0.0001.

      Returns boolean

    • Resizes this Vertex by setting the x and y coordinates, then transforms this vertex by an identity matrix and dimensions, storing the results in vx and vy.

      Parameters

      • x: number

        The x position of the vertex.

      • y: number

        The y position of the vertex.

      • width: number

        The width of the parent object.

      • height: number

        The height of the parent object.

      • originX: number

        The originX of the parent object.

      • originY: number

        The originY of the parent object.

      Returns this

    • Set the x and y components of the this Vector to the given x and y values.

      Parameters

      • x: number

        The x value to set for this Vector.

      • Optionaly: number

        The y value to set for this Vector. Default x.

      Returns Math.Vector2

    • Sets the x and y components of this Vector from the given angle and length.

      Parameters

      • angle: number

        The angle from the positive x-axis, in radians.

      • Optionallength: number

        The distance from the origin. Default 1.

      Returns Math.Vector2

    • Sets the U and V properties.

      Parameters

      • u: number

        The UV u coordinate of the vertex.

      • v: number

        The UV v coordinate of the vertex.

      Returns this