Skip to content
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed failed tests
  • Loading branch information
Forchapeatl authored Apr 6, 2025
commit 517946ddcfb6f529b01654d84f0090f93e623984
6 changes: 6 additions & 0 deletions src/webgl/p5.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -1626,6 +1626,12 @@ class Camera {
/* eslint-enable max-len */

//Normalize the up vector
const upLength = Math.sqrt(
rotatedUpX * rotatedUpX +
rotatedUpY * rotatedUpY +
rotatedUpZ * rotatedUpZ
);

const normalizedUpX = rotatedUpX / upLength;
const normalizedUpY = rotatedUpY / upLength;
const normalizedUpZ = rotatedUpZ / upLength;
Expand Down