Skip to content

Commit ca5f12b

Browse files
authored
Merge pull request #17082 from WestLangley/dev-examples_quaternion
Examples: set the quaternion instead of the rotation
2 parents e6fee59 + 49bb5d1 commit ca5f12b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/css3d_molecules.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@
425425

426426
var objMatrix = new THREE.Matrix4().makeRotationAxis( axis.normalize(), radians );
427427
object.matrix = objMatrix;
428-
object.rotation.setFromRotationMatrix( object.matrix, object.rotation.order );
428+
object.quaternion.setFromRotationMatrix( object.matrix );
429429

430430
object.matrixAutoUpdate = false;
431431
object.updateMatrix();
@@ -445,7 +445,7 @@
445445
joint.position.lerp( end, 0.5 );
446446

447447
joint.matrix.copy( objMatrix );
448-
joint.rotation.setFromRotationMatrix( joint.matrix, joint.rotation.order );
448+
joint.quaternion.setFromRotationMatrix( joint.matrix );
449449

450450
joint.matrixAutoUpdate = false;
451451
joint.updateMatrix();

examples/webgl_geometry_extrude_splines.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323

324324
if ( ! params.lookAhead ) lookAt.copy( pos ).add( dir );
325325
splineCamera.matrix.lookAt( splineCamera.position, lookAt, normal );
326-
splineCamera.rotation.setFromRotationMatrix( splineCamera.matrix, splineCamera.rotation.order );
326+
splineCamera.quaternion.setFromRotationMatrix( splineCamera.matrix );
327327

328328
cameraHelper.update();
329329

0 commit comments

Comments
 (0)