|
@@ -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;
|
|
|
|
|