InstancedFlow constructor

InstancedFlow(
  1. dynamic count,
  2. dynamic curveCount,
  3. dynamic geometry,
  4. dynamic material,
)
    • @param {number} count The number of instanced elements
      • @param {number} curveCount The number of curves to preallocate for
      • @param {Geometry} geometry The geometry to use for the instanced mesh
      • @param {Material} material The material to use for the instanced mesh

Implementation

factory InstancedFlow(count, curveCount, geometry, material) {
  var mesh = new InstancedMesh(geometry, material, count);
  mesh.instanceMatrix!.setUsage(DynamicDrawUsage);
  var instancedFlow = InstancedFlow.create(mesh, curveCount);

  instancedFlow.offsets = new List.filled(count, 0);
  instancedFlow.whichCurve = new List.filled(count, 0);

  return instancedFlow;
}