onMaterialDispose method

void onMaterialDispose(
  1. Event event
)

Implementation

void onMaterialDispose(Event event) {
  var material = event.target;

  material.removeEventListener('dispose', onMaterialDispose);

  deallocateMaterial(material);
}