Skip to main content
Version: Phaser v4.0.0-rc.6

NineSliceVertex

Vertex data for the NineSlice Game Object.

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

Constructor

new NineSliceVertex(x, y, u, v)

Parameters

nametypeoptionaldescription
xnumberNoThe x position of the vertex.
ynumberNoThe y position of the vertex.
unumberNoThe UV u coordinate of the vertex.
vnumberNoThe UV v coordinate of the vertex.

Scope: static

Extends

Phaser.Math.Vector2

Source: src/gameobjects/nineslice/NineSliceVertex.js#L10
Since: 4.0.0

Inherited Members

From Phaser.Math.Vector2:


Public Members

u

u: number

Description:

UV u coordinate of this vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L55
Since: 4.0.0


v

v: number

Description:

UV v coordinate of this vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L64
Since: 4.0.0


vx

vx: number

Description:

The projected x coordinate of this vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L37
Since: 4.0.0


vy

vy: number

Description:

The projected y coordinate of this vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L46
Since: 4.0.0


Inherited Methods

From Phaser.Math.Vector2:


Public Methods

resize

<instance> resize(x, y, width, height, originX, originY)

Description:

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:

nametypeoptionaldescription
xnumberNoThe x position of the vertex.
ynumberNoThe y position of the vertex.
widthnumberNoThe width of the parent object.
heightnumberNoThe height of the parent object.
originXnumberNoThe originX of the parent object.
originYnumberNoThe originY of the parent object.

Returns: Phaser.GameObjects.NineSliceVertex - This Vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L93
Since: 4.0.0


setUVs

<instance> setUVs(u, v)

Description:

Sets the U and V properties.

Parameters:

nametypeoptionaldescription
unumberNoThe UV u coordinate of the vertex.
vnumberNoThe UV v coordinate of the vertex.

Returns: Phaser.GameObjects.NineSliceVertex - This Vertex.

Source: src/gameobjects/nineslice/NineSliceVertex.js#L74
Since: 4.0.0