InstancedMesh constructor

InstancedMesh(
  1. BufferGeometry? geometry,
  2. Material? material,
  3. int count
)

geometry - an instance of BufferGeometry.

material - an instance of Material. Default is a MeshBasicMaterial.

count - the number of instances.

Implementation

InstancedMesh(super.geometry, super.material, int count){
  type = "InstancedMesh";

  final dl = Float32Array(count * 16);
  instanceMatrix = InstancedBufferAttribute(dl, 16, false);
  instanceColor = null;

  this.count = count;

  frustumCulled = false;
}