Skip to content

Commit

Permalink
Merge pull request #4676 from mozilla/FixThreeQuaternion
Browse files Browse the repository at this point in the history
Fix deprecated Three.js Quaternion API in three-utils.js
  • Loading branch information
takahirox authored Sep 27, 2021
2 parents d33023d + cf7faec commit 4f0b5dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/three-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export const interpolateAffine = (function() {
return function(startMat4, endMat4, progress, outMat4) {
start.quaternion.setFromRotationMatrix(mat4.extractRotation(startMat4));
end.quaternion.setFromRotationMatrix(mat4.extractRotation(endMat4));
THREE.Quaternion.slerp(start.quaternion, end.quaternion, interpolated.quaternion, progress);
interpolated.quaternion.slerpQuaternions(start.quaternion, end.quaternion, progress);
interpolated.position.lerpVectors(
start.position.setFromMatrixColumn(startMat4, 3),
end.position.setFromMatrixColumn(endMat4, 3),
Expand Down

0 comments on commit 4f0b5dc

Please sign in to comment.