Fix usage of perspective() with no args by davepagurek · Pull Request #8564 · processing/p5.js

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@davepagurek