Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
jkcuk authored Mar 4, 2024
1 parent 21b0655 commit e002671
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,13 +489,13 @@ function updateTransformationMatrix() {

// rotate the lookalike sphere according to the device orientation
// see https://developer.mozilla.org/en-US/docs/Web/API/Device_orientation_events/Using_device_orientation_with_3D_transforms
transformationMatrix.multiply(m.makeRotationY(-boostGamma*Math.PI/180));
transformationMatrix.multiply(m.makeRotationX(-boostBeta*Math.PI/180));
transformationMatrix.multiply(m.makeRotationZ(-boostAlpha*Math.PI/180));
// transformationMatrix.multiply(m.makeRotationY(-boostGamma*Math.PI/180));
// transformationMatrix.multiply(m.makeRotationX(-boostBeta*Math.PI/180));
// transformationMatrix.multiply(m.makeRotationZ(-boostAlpha*Math.PI/180));

transformationMatrix.multiply(m.makeRotationY(-deviceGamma*Math.PI/180));
transformationMatrix.multiply(m.makeRotationX(-deviceBeta*Math.PI/180));
transformationMatrix.multiply(m.makeRotationZ(-deviceAlpha*Math.PI/180));
transformationMatrix.multiply(m.makeRotationY(-(deviceGamma-boostGamma)*Math.PI/180));
transformationMatrix.multiply(m.makeRotationX(-(deviceBeta-boostBeta)*Math.PI/180));
transformationMatrix.multiply(m.makeRotationZ(-(deviceAlpha-boostAlpha)*Math.PI/180));

// set the lookalike sphere's transformation matrix to the matrix we just calculated
lookalikeSphere.matrix.copy(transformationMatrix);
Expand Down

0 comments on commit e002671

Please sign in to comment.