Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.7.3 breaks "event-driven" rotation & panning #555

Open
gbroques opened this issue Jan 1, 2025 · 0 comments
Open

2.7.3 breaks "event-driven" rotation & panning #555

gbroques opened this issue Jan 1, 2025 · 0 comments

Comments

@gbroques
Copy link

gbroques commented Jan 1, 2025

Describe the bug

Hi, I was using camera-controls without an animation loop, and relying on event-driven rendering instead.

By "event-driven rendering" I mean I would call "render" on the control and transitionstart events of camera-controls (see 94d7699).

It looks like #466 introduced in 2.7.3 to execute dragging once per-frame broke rotation and panning with the way I had camera-controls setup.

The reason I had it setup this way was for performance, and to avoid calling the render function unless the user interacts with it (i.e. with the mouse).

Do you have any advice on how to fix this, or thoughts on using camera-controls this way?

Should I switch to using an animation loop that calls my render function instead of rendering based on the control and transitionstart events?

To Reproduce

Steps to reproduce the behavior:

  1. Update the basic.html example to be "event-driven". See 94d7699.
  2. git checkout v2.7.2 - rotating and panning works
  3. git checkout v2.7.3 - rotating and panning breaks

Expected behavior

I expect rotating and panning to work when setup this way, or a major version bump since this patch version broke that behavior.

@gbroques gbroques changed the title 2.7.3 breaks event-driven rotation & panning 2.7.3 breaks "event-driven" rotation & panning Jan 1, 2025
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

No branches or pull requests

1 participant