Forráskód Böngészése

Editor: Call dispose() on textures.

Mugen87 4 éve
szülő
commit
1cba5459ae
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      editor/js/commands/SetMaterialMapCommand.js

+ 2 - 0
editor/js/commands/SetMaterialMapCommand.js

@@ -31,6 +31,8 @@ SetMaterialMapCommand.prototype = {
 
 	execute: function () {
 
+		if ( this.oldMap !== null && this.oldMap !== undefined ) this.oldMap.dispose();
+
 		this.material[ this.mapName ] = this.newMap;
 		this.material.needsUpdate = true;