onMaterialDispose method
Implementation
void onMaterialDispose(Event event) {
final material = event.target;
material.removeEventListener('dispose', onMaterialDispose);
deallocateMaterial(material);
}
void onMaterialDispose(Event event) {
final material = event.target;
material.removeEventListener('dispose', onMaterialDispose);
deallocateMaterial(material);
}