Phaser API Documentation

  Version: 
addVertex(x, y, z, u, v, [color], [alpha])

Description:

Adds a new Vertex into the vertices array of this Mesh.

Just adding a vertex isn't enough to render it. You need to also make it part of a Face, with 3 Vertex instances per Face.

Parameters:

name type arguments Default description
x number

The x position of the vertex.

y number

The y position of the vertex.

z number

The z position of the vertex.

u number

The UV u coordinate of the vertex.

v number

The UV v coordinate of the vertex.

color number <optional> 0xffffff

The color value of the vertex.

alpha number <optional> 1

The alpha value of the vertex.

Returns:
Description:

This Mesh Game Object.

Since: 3.50.0