1
Fork 0
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:
RGBCube 2023-12-19 16:20:55 +03:00
parent 1dca244440
commit 87d9c0361d
No known key found for this signature in database

View file

@ -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);
};