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
| name | type | optional | description |
|---|---|---|---|
| x | number | No | The x position of the vertex. |
| y | number | No | The y position of the vertex. |
| u | number | No | The UV u coordinate of the vertex. |
| v | number | No | The UV v coordinate of the vertex. |
Scope: static
Extends
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:
- add
- angle
- ceil
- clone
- copy
- cross
- distance
- distanceSq
- divide
- dot
- equals
- floor
- fuzzyEquals
- invert
- length
- lengthSq
- lerp
- limit
- mirror
- multiply
- negate
- normalize
- normalizeLeftHand
- normalizeRightHand
- project
- projectUnit
- reflect
- reset
- rotate
- scale
- set
- setAngle
- setFromObject
- setLength
- setTo
- setToPolar
- subtract
- transformMat3
- transformMat4
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:
| name | type | optional | description |
|---|---|---|---|
| x | number | No | The x position of the vertex. |
| y | number | No | The y position of the vertex. |
| width | number | No | The width of the parent object. |
| height | number | No | The height of the parent object. |
| originX | number | No | The originX of the parent object. |
| originY | number | No | The 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:
| name | type | optional | description |
|---|---|---|---|
| u | number | No | The UV u coordinate of the vertex. |
| v | number | No | The UV v coordinate of the vertex. |
Returns: Phaser.GameObjects.NineSliceVertex - This Vertex.
Source: src/gameobjects/nineslice/NineSliceVertex.js#L74
Since: 4.0.0