2
0
Эх сурвалжийг харах

Editor: Call dispose() on textures.

Mugen87 4 жил өмнө
parent
commit
1cba5459ae

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

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