MCPcopy
hub / github.com/aframevr/aframe / disposeMaterial

Function disposeMaterial

src/components/material.js:253–265  ·  view source on GitHub ↗

* Dispose of material from memory and unsubscribe material from scene updates like fog.

(material, system)

Source from the content-addressed store, hash-verified

251 * Dispose of material from memory and unsubscribe material from scene updates like fog.
252 */
253function disposeMaterial (material, system) {
254 material.dispose();
255 system.unregisterMaterial(material);
256
257 // Dispose textures on this material
258 Object.keys(material)
259 .filter(function (propName) {
260 return material[propName] && material[propName].isTexture;
261 })
262 .forEach(function (mapName) {
263 material[mapName].dispose();
264 });
265}

Callers 1

material.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected