Jelajahi Sumber

Helper lines are now updated correctly when doing undo/redo

Issue #12
Daniel 9 tahun lalu
induk
melakukan
bfc2088027
3 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 2 2
      editor/js/CmdSetPosition.js
  2. 2 2
      editor/js/CmdSetRotation.js
  3. 2 2
      editor/js/CmdSetScale.js

+ 2 - 2
editor/js/CmdSetPosition.js

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

+ 2 - 2
editor/js/CmdSetRotation.js

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

+ 2 - 2
editor/js/CmdSetScale.js

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