- Source: src/geom/mesh/typedefs/index.js (Line 7)
Type Definitions
-
GenerateGridConfig
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/GenerateGridConfig.js (Line 1)
Properties:
Name Type Argument Default Description texturestring | Phaser.Textures.Texture The texture to be used for this Grid. Must be a Texture instance. Can also be a string but only if the
meshproperty is set.framestring | number <optional>
The name or index of the frame within the Texture.
meshPhaser.GameObjects.Mesh <optional>
If specified, the vertices of the generated grid will be added to this Mesh Game Object.
widthnumber <optional>
1 The 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
isOrthoparameter.heightnumber <optional>
width The height of the grid in 3D units.
widthSegmentsnumber <optional>
1 The number of segments to split the grid horizontally in to.
heightSegmentsnumber <optional>
widthSegments The number of segments to split the grid vertically in to.
xnumber <optional>
0 Offset the grid x position by this amount.
ynumber <optional>
0 Offset the grid y position by this amount.
colorsnumber | Array.<number> <optional>
0xffffff An array of colors, one per vertex, or a single color value applied to all vertices.
alphasnumber | Array.<number> <optional>
1 An array of alpha values, one per vertex, or a single alpha value applied to all vertices.
tileboolean <optional>
false Should the texture tile (repeat) across the grid segments, or display as a single texture?
isOrthoboolean <optional>
false If set and using a texture with an ortho Mesh, the
widthandheightparameters will be calculated based on the frame size for you.flipYboolean <optional>
false If set and using a texture, vertically flipping render result.
-
GenerateGridVertsResult
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/GenerateGridVertsResult.js (Line 1)
Properties:
Name Type Argument Default Description vertsArray.<number> An array of vertex values in x, y pairs.
indicesArray.<number> An array of vertex indexes. This array will be empty if the
tileparameter wastrue.uvsArray.<number> An array of UV values, two per vertex.
colorsnumber | Array.<number> <optional>
0xffffff An array of colors, one per vertex, or a single color value applied to all vertices.
alphasnumber | Array.<number> <optional>
1 An array of alpha values, one per vertex, or a single alpha value applied to all vertices.
-
GenerateVertsResult
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/GenerateVertsResult.js (Line 1)
Properties:
Name Type Description facesArray.<Phaser.Geom.Mesh.Face> An array of Face objects generated from the OBJ Data.
vertsArray.<Phaser.Geom.Mesh.Vertex> An array of Vertex objects generated from the OBJ Data.
-
OBJData
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/OBJData.js (Line 1)
Properties:
Name Type Description materialLibrariesArray.<string> An array of material library filenames found in the OBJ file.
materialsobject If the obj was loaded with an mtl file, the parsed material names are stored in this object.
modelsArray.<Phaser.Types.Geom.Mesh.OBJModel> An array of parsed models extracted from the OBJ file.
-
OBJFace
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/OBJFace.js (Line 1)
Properties:
Name Type Description groupstring The name of the Group this Face is in.
materialstring The name of the material this Face uses.
verticesArray.<Phaser.Types.Geom.Mesh.OBJFaceVertice> An array of vertices in this Face.
-
OBJFaceVertice
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/OBJFaceVertice.js (Line 1)
Properties:
Name Type Description textureCoordsIndexnumber The index in the
textureCoordsarray that this vertex uses.vertexIndexnumber The index in the
verticesarray that this vertex uses.vertexNormalIndexnumber The index in the
vertexNormalsarray that this vertex uses. -
OBJModel
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/OBJModel.js (Line 1)
Properties:
Name Type Description facesArray.<Phaser.Types.Geom.Mesh.OBJFace> An array of Faces.
namestring The name of the model.
textureCoordsArray.<Phaser.Types.Geom.Mesh.UV> An array of texture coordinates.
vertexNormalsArray.<Phaser.Types.Math.Vector3Like> An array of vertex normals.
verticesArray.<Phaser.Types.Math.Vector3Like> An array of vertices in the model.
-
UV
-
Type:
- object
- Since: 3.50.0
- Source: src/geom/mesh/typedefs/UV.js (Line 1)
Properties:
Name Type Description unumber The u component.
vnumber The v component.
wnumber The w component.
