Skip to content

Fix usage of perspective() with no args#8564

Merged
davepagurek merged 1 commit intodev-2.0from
fix/perspective
Feb 24, 2026
Merged

Fix usage of perspective() with no args#8564
davepagurek merged 1 commit intodev-2.0from
fix/perspective

Conversation

@davepagurek
Copy link
Contributor

Resolves #8563

Changes:

  • Makes sure all camera properties are cloned when we call .clone(). Basically, perspective() clones the existing camera before applying changes to it, but since not all camera property defaults were copied over, it was using undefined in math and putting NaNs in its matrices.

Screenshots of the change:

image

Live: https://editor.p5js.org/davepagurek/sketches/CVVyKhUnH

PR Checklist

@davepagurek davepagurek merged commit 2ef7704 into dev-2.0 Feb 24, 2026
5 checks passed
@davepagurek davepagurek deleted the fix/perspective branch February 24, 2026 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant