Implement better heuristic to enable user interactions than basic focus
See original GitHub issueAs of #288 , we began blocking user interaction unless a <model-viewer>
has focus. This enables users to interact with the page in more natural ways (such as scrolling while passing over <model-viewer>
) at the cost of requiring explicit interaction to focus <model-viewer>
before the controls would work.
@mrdoob immediately pointed out that this was not very intuitive when interacting, especially on mobile. @yuinchien also pointed out the same, and has prototyped some potential alternative heuristics to decide if <model-viewer>
should be interactive.
This issue covers discussion and work necessary to enable improved detection of explicit user interactions with <model-viewer>
so that it feels intuitive without disrupting other activities such as scrolling the page.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I played with horizontal gesture detection on <model-viewer>, as @cdata pointed out, most of the mobile page scroll is vertical, allowing auto-focus to happen when detecting user interaction feels a lot more accessible.
One possible solution would be to route touch events to the model regardless of focus, but to reroute those events back to the page when the model limits are hit (high/low elevation, near/far zoom) so that the page can still be scrolled and pinched. The downside is that it would have a bit of sudden mode shift, but it seems fairly consistent with the way scrolling works on pages with scrollable sub-elements. What does our resident expert think @yuinchien?