Geometry constructor
Geometry(
- Float32List vertices,
- List<
int> indices, { - Float32List? normals,
- Float32List? uvs,
- PrimitiveType primitiveType = PrimitiveType.TRIANGLES,
Implementation
Geometry(
this.vertices,
List<int> indices, {
Float32List? normals,
Float32List? uvs,
this.primitiveType = PrimitiveType.TRIANGLES,
}) : indices = Uint16List.fromList(indices),
normals = normals ?? Float32List(0),
uvs = uvs ?? Float32List(0) {
assert(this.uvs.length == 0 || this.uvs.length == (vertices.length ~/ 3) * 2);
}