GeometryResource constructor

GeometryResource(
  1. LocalId id, {
  2. LocalId? vertices,
  3. LocalId? indices,
  4. ProceduralGeometry? procedural,
  5. BoundsSpec? bounds,
  6. 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',
     );