Ver código fonte

Helper lines are now updated correctly when doing undo/redo

Issue #12
Daniel 9 anos atrás
pai
commit
bfc2088027

+ 2 - 2
editor/js/CmdSetPosition.js

@@ -31,7 +31,7 @@ CmdSetPosition.prototype = {
 	execute: function () {
 
 		this.object.position.copy( this.newPosition );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},
@@ -39,7 +39,7 @@ CmdSetPosition.prototype = {
 	undo: function () {
 
 		this.object.position.copy( this.oldPosition );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},

+ 2 - 2
editor/js/CmdSetRotation.js

@@ -32,7 +32,7 @@ CmdSetRotation.prototype = {
 	execute: function () {
 
 		this.object.rotation.copy( this.newRotation );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},
@@ -40,7 +40,7 @@ CmdSetRotation.prototype = {
 	undo: function () {
 
 		this.object.rotation.copy( this.oldRotation );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},

+ 2 - 2
editor/js/CmdSetScale.js

@@ -31,7 +31,7 @@ CmdSetScale.prototype = {
 	execute: function () {
 
 		this.object.scale.copy( this.newScale );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},
@@ -39,7 +39,7 @@ CmdSetScale.prototype = {
 	undo: function () {
 
 		this.object.scale.copy( this.oldScale );
-		this.object.updateMatrix();
+		this.object.updateMatrixWorld( true );
 		this.editor.signals.objectChanged.dispatch( this.object );
 
 	},