onTextureDispose method

dynamic onTextureDispose(
  1. dynamic event
)

Implementation

onTextureDispose(event) {
  var texture = event.target;
  texture.removeEventListener('dispose', onTextureDispose);

  var cubemapUV = cubeUVmaps.get(texture);

  if (cubemapUV != null) {
    cubemapUV.delete(texture);
    cubemapUV.dispose();
  }
}