Option to reveal only when model-viewer element is visible on the page
See original GitHub issueIn some cases the model-viewer might not be visible on page load:
- Part of an image carousel (ex: it is on slide 4 of 5)
- Below the fold
It could be beneficial to have an option to only reveal the viewer if is actually visible on the page. So when you get to the viewer in the carousel, it reveals. Same with when you scroll down the page and see the viewer element.
If preload
is set, then the reveal is simply dismissing the poster. If preload
is not set, then the loading + revealing happens as soon as the viewer is visible.
Suggestion:
reveal="visible"
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
<model-viewer> Examples and Documentation
This property, pronounced model-is-visible, is read-only. It returns true if the element is visible on the page (assuming there is an IntersectionObserver) ...
Read more >The <model-viewer> web component
3D models ideally will be shown in a viewer that can work responsively on all browsers including smartphones, desktop, or even new head-mounted ......
Read more ><model-viewer> - GitHub Pages
Use it like any other HTML element --> <model-viewer src="shared-assets/models/Astronaut.glb" ... Only glTF/GLB models are supported, see Supported Formats.
Read more ><model-viewer> - Augmented Reality
Use it like any other HTML element --> <model-viewer src="examples/assets/Astronaut.glb" ... Only glTF/GLB models are supported, see Supported Formats.
Read more >Model Viewer II - User Guide
The second option 'Preview' will show the animation in the 'preview' window and display a dummy camera in the main view showing the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Need to double check if the intersection observer works for cases where you unhide an element that had
display: none
on it.I believe this is now the default behavior.