Browse Source

Merge pull request #6496 from nakhleh/dev

Corrected Matrix-transformations.html tutorial
Ricardo Cabello 10 years ago
parent
commit
dc3f237110
1 changed files with 10 additions and 9 deletions
  1. 10 9
      docs/manual/introduction/Matrix-transformations.html

+ 10 - 9
docs/manual/introduction/Matrix-transformations.html

@@ -18,19 +18,20 @@
 		There are two ways to update an object's transformation:
 		There are two ways to update an object's transformation:
 		<ol>
 		<ol>
 			<li>
 			<li>
-				Modify the object's *position*, *quaternion*, and *scale* properties, then ask Three.js to recompute the object's matrix from these properties:
+				Modify the object's *position*, *quaternion*, and *scale* properties, and let Three.js recompute
+				the object's matrix from these properties:
 				<code>
 				<code>
-				object.position = start_position;
-				object.quaternion = quaternion;
-				object.updateMatrix();
+				object.position.copy(start_position);
+				object.quaternion.copy(quaternion);
 				</code>
 				</code>
-				Calling the *updateMatrix* method forces the object's matrix to be recomputed from *position*, *quaternion*, and *scale*. You can also set 
+				By default, the *matrixAutoUpdate* property is set true, and the matrix will be automatically recalculated.
+				If the object is static, or you wish to manually control when recalculation occurs, better performance can be obtained by setting the property false:
 				<code>
 				<code>
-				object.matrixAutoUpdate = true;
+				object.matrixAutoUpdate = false;
 				</code>
 				</code>
-				in lieu of calling *updateMatrix*. This will force the matrix to be recomputed every frame; for static objects, you should therefore set 
+				And after changing any properties, manually update the matrix:
 				<code>
 				<code>
-				object.matrixAutoUpdate = false;
+				object.updateMatrix();
 				</code>
 				</code>
 			</li>
 			</li>
 			<li>
 			<li>
@@ -61,4 +62,4 @@
 		</p>
 		</p>
 
 
 	</body>
 	</body>
-</html>
+</html>