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

Camera controls and requestAnimationFrame() #41

Open
marcoscaceres opened this issue Aug 4, 2022 · 3 comments
Open

Camera controls and requestAnimationFrame() #41

marcoscaceres opened this issue Aug 4, 2022 · 3 comments

Comments

@marcoscaceres
Copy link
Contributor

The proposal includes the ability to change the orientation/camera's view of the model. However, it's unclear how that will interact with requestAnimationFrame(). That is, do we leave it to developers to control how those changes are interpolated? or do we just leave it to the user agent to perform the change in position.

There are naturally pro's and cons to each approach. Like, controlling the speed of the translation/transition, and the smoothness curve of the animation. Or. what if the developer wants to just flip the object without any animation?

@cabanier
Copy link
Member

cabanier commented Aug 4, 2022

I think it should be up to the user agent.
Since the model will most likely be composited out of process or by the system, we can't rely on requestAnimationFrame

@marcoscaceres
Copy link
Contributor Author

Out of interest, how does this work with something like WebGL? Are camera positions updates done with raF()? I'm wondering because wouldn't those rendering contexts also be composited out of process?

@mrdoob
Copy link

mrdoob commented Aug 5, 2022

Are camera positions updates done with raF()?

Yes

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

3 participants