onInstancedMeshDispose method

void onInstancedMeshDispose(
  1. dynamic event
)

Implementation

void onInstancedMeshDispose(event) {
  final instancedMesh = event.target;

  instancedMesh.removeEventListener('dispose', onInstancedMeshDispose);

  attributes.remove(instancedMesh.instanceMatrix);

  if (instancedMesh.instanceColor != null) {
    attributes.remove(instancedMesh.instanceColor);
  }
}