google / model-viewer

Easily display interactive 3D models on the web and in AR!
https://modelviewer.dev
Apache License 2.0
6.88k stars 816 forks source link

screenshot using webxr #1481

Open lucasmatheustesta opened 4 years ago

lucasmatheustesta commented 4 years ago

Description

I know that using scene-viewer it already come with the screenshot button. I'd like to know if there is anyway to implement screenshot feature using webxr. Thank you

Version

Browser Affected

OS

elalish commented 4 years ago

I would love to implement this; the webXR team is discussing how best to expose this functionality in a web API.

Podden commented 3 years ago

Any update on this yet?

iiLearner commented 1 year ago

Were there any updates on this?

gabrielgaldinomagalhaes commented 1 year ago

This would be awesome!

vincentfretin commented 1 year ago

From my understanding, this needs webxr raw camera access that is now available since Chrome 107. https://github.com/immersive-web/raw-camera-access/blob/main/explainer.md The doc there doesn't help much... I found an experiment with this api via the following YouTube video https://www.youtube.com/watch?v=CbETxtioNlY Here is the live demo https://graemeniedermayer.github.io/ArExperiments/html/cameraAccessWithoutDepth.html The source code is here https://github.com/graemeniedermayer/ArExperiments/blob/main/javascript/cameraAccessWithoutDepth.js

This is a bit too low level gl stuff for me currently, but if anyone want to look at it, please go ahead.