Skip to main content
Version: Phaser v3.88.2

Types.Geom.Mesh

GenerateGridConfig

<static> GenerateGridConfig

nametypeoptionaldefaultdescription
texturestring | Phaser.Textures.TextureNoThe texture to be used for this Grid. Must be a Texture instance. Can also be a string but only if the mesh property is set.
framestring | numberYesThe name or index of the frame within the Texture.
meshPhaser.GameObjects.MeshYesIf specified, the vertices of the generated grid will be added to this Mesh Game Object.
widthnumberYes1The width of the grid in 3D units. If you wish to get a pixel accurate grid based on a texture, you can use an Ortho Mesh or the isOrtho parameter.
heightnumberYes"width"The height of the grid in 3D units.
widthSegmentsnumberYes1The number of segments to split the grid horizontally in to.
heightSegmentsnumberYes"widthSegments"The number of segments to split the grid vertically in to.
xnumberYes0Offset the grid x position by this amount.
ynumberYes0Offset the grid y position by this amount.
colorsnumber | Array.<number>Yes"0xffffff"An array of colors, one per vertex, or a single color value applied to all vertices.
alphasnumber | Array.<number>Yes1An array of alpha values, one per vertex, or a single alpha value applied to all vertices.
tilebooleanYesfalseShould the texture tile (repeat) across the grid segments, or display as a single texture?
isOrthobooleanYesfalseIf set and using a texture with an ortho Mesh, the width and height parameters will be calculated based on the frame size for you.
flipYbooleanYesfalseIf set and using a texture, vertically flipping render result.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/GenerateGridConfig.js#L1
Since: 3.50.0


GenerateGridVertsResult

<static> GenerateGridVertsResult

nametypeoptionaldefaultdescription
vertsArray.<number>NoAn array of vertex values in x, y pairs.
indicesArray.<number>NoAn array of vertex indexes. This array will be empty if the tile parameter was true.
uvsArray.<number>NoAn array of UV values, two per vertex.
colorsnumber | Array.<number>Yes"0xffffff"An array of colors, one per vertex, or a single color value applied to all vertices.
alphasnumber | Array.<number>Yes1An array of alpha values, one per vertex, or a single alpha value applied to all vertices.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/GenerateGridVertsResult.js#L1
Since: 3.50.0


GenerateVertsResult

<static> GenerateVertsResult

nametypeoptionaldescription
facesArray.<Phaser.Geom.Mesh.Face>NoAn array of Face objects generated from the OBJ Data.
verticesArray.<Phaser.Geom.Mesh.Vertex>NoAn array of Vertex objects generated from the OBJ Data.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/GenerateVertsResult.js#L1
Since: 3.50.0


OBJData

<static> OBJData

nametypeoptionaldescription
materialLibrariesArray.<string>NoAn array of material library filenames found in the OBJ file.
materialsobjectNoIf the obj was loaded with an mtl file, the parsed material names are stored in this object.
modelsArray.<Phaser.Types.Geom.Mesh.OBJModel>NoAn array of parsed models extracted from the OBJ file.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/OBJData.js#L1
Since: 3.50.0


OBJFace

<static> OBJFace

nametypeoptionaldescription
groupstringNoThe name of the Group this Face is in.
materialstringNoThe name of the material this Face uses.
verticesArray.<Phaser.Types.Geom.Mesh.OBJFaceVertice>NoAn array of vertices in this Face.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/OBJFace.js#L1
Since: 3.50.0


OBJFaceVertice

<static> OBJFaceVertice

nametypeoptionaldescription
textureCoordsIndexnumberNoThe index in the textureCoords array that this vertex uses.
vertexIndexnumberNoThe index in the vertices array that this vertex uses.
vertexNormalIndexnumberNoThe index in the vertexNormals array that this vertex uses.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/OBJFaceVertice.js#L1
Since: 3.50.0


OBJModel

<static> OBJModel

nametypeoptionaldescription
facesArray.<Phaser.Types.Geom.Mesh.OBJFace>NoAn array of Faces.
namestringNoThe name of the model.
textureCoordsArray.<Phaser.Types.Geom.Mesh.UV>NoAn array of texture coordinates.
vertexNormalsArray.<Phaser.Types.Math.Vector3Like>NoAn array of vertex normals.
verticesArray.<Phaser.Types.Math.Vector3Like>NoAn array of vertices in the model.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/OBJModel.js#L1
Since: 3.50.0


UV

<static> UV

nametypeoptionaldescription
unumberNoThe u component.
vnumberNoThe v component.
wnumberNoThe w component.

Type: object

Member of: Phaser.Types.Geom.Mesh

Source: src/geom/mesh/typedefs/UV.js#L1
Since: 3.50.0