MeshData constructor
MeshData({
- required Float32List positions,
- required int vertexCount,
- Float32List? normals,
- Float32List? texCoords,
- Float32List? colors,
- List<
int> ? indices, - PrimitiveType primitiveType = gpu.PrimitiveType.triangle,
- Map<
String, MeshAttributeData> customAttributes = const {},
Wraps already-prepared vertex arrays without generating anything.
Prefer MeshData.build, which fills in normals. Use this only when
every attribute is already in hand. vertexCount must equal
positions.length ~/ 3.
Implementation
MeshData({
required this.positions,
required this.vertexCount,
this.normals,
this.texCoords,
this.colors,
this.indices,
this.primitiveType = gpu.PrimitiveType.triangle,
this.customAttributes = const {},
});