immersive-web/model-element

Camera controls and requestAnimationFrame()

marcoscaceres opened this issue · 3 comments

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?

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

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?

Are camera positions updates done with raF()?

Yes