@@ -18,19 +18,20 @@ <h2>Convenience properties and *matrixAutoUpdate*</h2>
1818 There are two ways to update an object's transformation:
1919 < ol >
2020 < li >
21- Modify the object's *position*, *quaternion*, and *scale* properties, then ask Three.js to recompute the object's matrix from these properties:
21+ Modify the object's *position*, *quaternion*, and *scale* properties, and let Three.js recompute
22+ the object's matrix from these properties:
2223 < code >
23- object.position = start_position;
24- object.quaternion = quaternion;
25- object.updateMatrix();
24+ object.position.copy(start_position);
25+ object.quaternion.copy(quaternion);
2626 </ code >
27- Calling the *updateMatrix* method forces the object's matrix to be recomputed from *position*, *quaternion*, and *scale*. You can also set
27+ By default, the *matrixAutoUpdate* property is set true, and the matrix will be automatically recalculated.
28+ If the object is static, or you wish to manually control when recalculation occurs, better performance can be obtained by setting the property false:
2829 < code >
29- object.matrixAutoUpdate = true ;
30+ object.matrixAutoUpdate = false ;
3031 </ code >
31- in lieu of calling *updateMatrix*. This will force the matrix to be recomputed every frame; for static objects, you should therefore set
32+ And after changing any properties, manually update the matrix:
3233 < code >
33- object.matrixAutoUpdate = false ;
34+ object.updateMatrix() ;
3435 </ code >
3536 </ li >
3637 < li >
@@ -61,4 +62,4 @@ <h2>Rotation and Quaternion</h2>
6162 </ p >
6263
6364 </ body >
64- </ html >
65+ </ html >
0 commit comments