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 syntax error
  • Loading branch information
Forchapeatl authored Apr 6, 2025
commit fb8672c4559fa583dcc1467aa6ebd01ba2067446
7 changes: 3 additions & 4 deletions src/webgl/p5.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -1620,14 +1620,13 @@

// Rotate the up vector to keep the correct camera orientation
/* eslint-disable max-len */

const rotatedUpX = this.upX * rotation.mat4[0] + this.upY * rotation.mat4[4] + this.upZ * rotation.mat4[8],
const rotatedUpY = this.upX * rotation.mat4[1] + this.upY * rotation.mat4[5] + this.upZ * rotation.mat4[9],
const rotatedUpZ = this.upX * rotation.mat4[2] + this.upY * rotation.mat4[6] + this.upZ * rotation.mat4[10]
const rotatedUpX = this.upX * rotation.mat4[0] + this.upY * rotation.mat4[4] + this.upZ * rotation.mat4[8];
const rotatedUpY = this.upX * rotation.mat4[1] + this.upY * rotation.mat4[5] + this.upZ * rotation.mat4[9];
const rotatedUpZ = this.upX * rotation.mat4[2] + this.upY * rotation.mat4[6] + this.upZ * rotation.mat4[10];
/* eslint-enable max-len */

//Normalize the up vector
const normalizedUpX = rotatedUpX / upLength;

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Pan() with positive parameter sets correct matrix w/o changing eyeXYZ or upXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.pan src/webgl/p5.Camera.js:1789:10 ❯ test/unit/webgl/p5.Camera.js:93:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Pan() with negative parameter sets correct matrix w/o changing eyeXYZ or upXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.pan src/webgl/p5.Camera.js:1789:10 ❯ test/unit/webgl/p5.Camera.js:117:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Pan(0) sets correct matrix w/o changing eyeXYZ or upXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.pan src/webgl/p5.Camera.js:1789:10 ❯ test/unit/webgl/p5.Camera.js:138:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Tilt() with positive parameter sets correct Matrix w/o changing eyeXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.tilt src/webgl/p5.Camera.js:1854:10 ❯ test/unit/webgl/p5.Camera.js:162:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Tilt() with negative parameter sets correct matrix w/o changing eyeXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.tilt src/webgl/p5.Camera.js:1854:10 ❯ test/unit/webgl/p5.Camera.js:182:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation > Tilt(0) sets correct matrix w/o changing eyeXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.tilt src/webgl/p5.Camera.js:1854:10 ❯ test/unit/webgl/p5.Camera.js:200:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation with angleMode(DEGREES) > Pan() with positive parameter sets correct matrix w/o changing eyeXYZ or upXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.pan src/webgl/p5.Camera.js:1789:10 ❯ test/unit/webgl/p5.Camera.js:313:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > Rotation with angleMode(DEGREES) > Tilt() with positive parameter sets correct Matrix w/o changing eyeXYZ

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.tilt src/webgl/p5.Camera.js:1854:10 ❯ test/unit/webgl/p5.Camera.js:336:13

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > slerp() > Behavior of slerp() for camera moved by pan()

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.pan src/webgl/p5.Camera.js:1789:10 ❯ test/unit/webgl/p5.Camera.js:868:12

Check failure on line 1629 in src/webgl/p5.Camera.js

View workflow job for this annotation

GitHub Actions / test

test/unit/webgl/p5.Camera.js > p5.Camera > slerp() > Behavior of slerp() for camera moved by tilt()

ReferenceError: upLength is not defined ❯ Camera._rotateView src/webgl/p5.Camera.js:1629:40 ❯ Camera.tilt src/webgl/p5.Camera.js:1854:10 ❯ test/unit/webgl/p5.Camera.js:890:12
const normalizedUpY = rotatedUpY / upLength;
const normalizedUpZ = rotatedUpZ / upLength;

Expand Down