Replies: 10 comments
-
This would be a bit tricky. Can you tell me what the use case would be? |
Beta Was this translation helpful? Give feedback.
-
to include a logo for example |
Beta Was this translation helpful? Give feedback.
-
At least within the model-viewer element, it'll still work since the child elements will still be shown over the poster, even if they are not part of the poster. Puppeteer can be used for automated screenshots of any website, so that might help. If you have an idea of how to implement what you're after, a contribution would be most welcome! |
Beta Was this translation helpful? Give feedback.
-
can you show me the example where within model-viewer elements can be captured natively? |
Beta Was this translation helpful? Give feedback.
-
Child elements of model-viewer are pulled into the default slot in the shadow-root by lit-element. We don't do anything special with them in our own code. I think you're really just looking for a generic way to screenshot a subset of a rendered page. |
Beta Was this translation helpful? Give feedback.
-
yes. it seems that it makes a snapshot of the canvas only when I use the code taken from interactive demo page: let posterUrl = ''; |
Beta Was this translation helpful? Give feedback.
-
Yes, exactly, that's why what you're asking for will be tricky. |
Beta Was this translation helpful? Give feedback.
-
so what would you recommend to use for screenshot? server is running on PHP and not NodeJS |
Beta Was this translation helpful? Give feedback.
-
As I said earlier, if you want a solution external to model-viewer I'd recommend puppeteer. That's what we use for fidelity testing. |
Beta Was this translation helpful? Give feedback.
-
Thanks. I will check |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to include in snapshot not only the canvas but also other child elements to ?
https://3dfascination.com/3d-fascination-web/viewer/test.php
Beta Was this translation helpful? Give feedback.
All reactions