GeometryResource constructor
GeometryResource(
- LocalId id, {
- LocalId? vertices,
- LocalId? indices,
- ProceduralGeometry? procedural,
- BoundsSpec? bounds,
- String topology = 'triangle',
Creates a geometry resource from payload chunks (a vertices buffer and
optional indices buffer) or a procedural descriptor.
Implementation
GeometryResource(
super.id, {
this.vertices,
this.indices,
this.procedural,
this.bounds,
this.topology = 'triangle',
}) : assert(
(vertices == null) != (procedural == null),
'A geometry has exactly one source: a vertex payload or a procedural '
'descriptor',
);