addBatch method

void addBatch(
  1. GpuPrimitive primitive,
  2. GpuMaterial material,
  3. List<Matrix4> locals, {
  4. double maxDistance = double.infinity,
  5. bool castShadows = true,
})

Draws primitive in material once at each of locals (entity from copy), in one call: grass, posts, tiles. Not drawn beyond maxDistance metres from the camera.

Implementation

void addBatch(
  GpuPrimitive primitive,
  GpuMaterial material,
  List<Matrix4> locals, {
  double maxDistance = double.infinity,
  bool castShadows = true,
}) => _batches.add((primitive, material, locals, maxDistance, castShadows));