Creates an instance of MeshData. *
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.
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. *
Base class for geometric mesh data. It stores vertex positions, normals, and UV coordinates, along with optional tangent and bitangent vectors for normal mapping. *