Skip to content

Conversation

@sciecode
Copy link
Contributor

Fixes #27280

Prevents OrthographicCamera from triggering change event every frame.

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
@Mugen87
Copy link
Collaborator

Mugen87 commented Dec 23, 2023

The PR indeed fixes the issue! Here is the code I have tested with: https://jsfiddle.net/13Ltqzye/

@Mugen87 Mugen87 added this to the r161 milestone Dec 23, 2023
Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
@Mugen87 Mugen87 merged commit a797aca into mrdoob:dev Dec 24, 2023
@sciecode sciecode deleted the dev-orbit-change branch December 24, 2023 18:53
@jedleslie
Copy link

You all rule. Thanks for all you do!

AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
* OrbitControls: fix Orthographic 'change' event

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>

* OrbitControls: only recalculate when zoom has changed

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>

* clean-up

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>

---------

Signed-off-by: Guilherme Avila <3927951+sciecode@users.noreply.github.com>
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.

OrbitControls update event always fired if using an Orthographic Camera

3 participants