mirror of
https://github.com/RGBCube/rgbcube.github.io
synced 2025-05-14 05:54:58 +00:00
Uninline rotation
This commit is contained in:
parent
1dca244440
commit
87d9c0361d
1 changed files with 3 additions and 1 deletions
4
cube.js
4
cube.js
|
@ -162,7 +162,9 @@ const orientation = {
|
|||
angularMomentum.z = 0;
|
||||
}
|
||||
|
||||
if (!mouse.down) orientation.set(Quat.mul(Quat.fromAngleAxis(theta, axis), orientation.get()));
|
||||
const rotation = Quat.fromAngleAxis(theta, axis);
|
||||
|
||||
if (!mouse.down) orientation.set(Quat.mul(rotation, orientation.get()));
|
||||
|
||||
requestAnimationFrame(updateFrame);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue