MeshDataCopyElementGroup
- class MeshDataCopyElementGroup()
Provides access to all data of a particular type (faces, lines or points) within a [[MeshDataCopy]].
This object additionally supports the ECMAScript 2015 iterable protocol and therefore can be iterated over using a
for..of
loop.
Properties
Properties
- MeshDataCopyElementGroup.elementCount
- Type
number
The number of elements in this group.
- MeshDataCopyElementGroup.hasNormals
- Type
boolean
Whether the vertices in this element group have normals.
- MeshDataCopyElementGroup.hasRGBAs
- Type
boolean
Whether the vertices in this element group have colors.
- MeshDataCopyElementGroup.hasUVs
- Type
boolean
Whether the vertices in this element group have texture coordinates.
- MeshDataCopyElementGroup.vertexCount
- Type
number
The total number of vertices in all elements in this group.
Methods
element
- MeshDataCopyElementGroup.element(index)
- Arguments
index (
number()
) – the element’s index
Provides access to mesh data of a single element. Throws
RangeError
ifindex
is invalid.- Return type
MeshDataCopyElement
iterate
- MeshDataCopyElementGroup.iterate()
- Returns
An iterator over all the vertices in all the elements in this group.
- Return type
MeshDataCopyIterator