Creates a new instance of a PlanePrimitive.
Optionalresolution: number = 1The number of segments per side. A higher resolution results in more vertices and a denser mesh. Must be at least 1.
Protected_Protected_Protected_OptionalbitangentsThe array of bitangent vectors. *
The array of vertex indices. *
The array of vertex normals. *
OptionaltangentsThe array of tangent vectors. *
The array of texture coordinates. *
The array of vertex positions. *
The unique identifier for the mesh data.
Calculates smooth normals and generates indices for the mesh based on its vertices.
this.normals and this.indices.Calculates tangents and bitangents for the mesh and populates the instance's arrays.
ProtecteddeserializeDeserializes the mesh data from a JSON object. * *
The JSON object to deserialize from.
ProtectedgetInverts the direction of all normal vectors in the mesh.
ProtectedserializeSerializes the mesh data to a JSON object. * *
StaticgetCalculates the bounding box for this mesh using its internal vertices.
A BoundingBox object, or null if the mesh has no vertices.
StaticgetCalculates a bounding sphere for this mesh using its internal vertices. The sphere's center is the mesh's centroid.
A BoundingSphere object, or null if the mesh has no vertices.
StaticinstanciateCreates a new MeshData instance.
Optionalvertices: vec3[]The array of vertex positions. *
Optionalnormals: vec3[] = []The array of vertex normals. *
Optionaluvs: vec2[] = []The array of texture coordinates. *
Optionalindices: number[] = []The array of vertex indices. *
Represents a procedurally generated plane primitive composed of a grid of vertices. *