Replies: 2 comments 2 replies
-
|
We have a dedicated screenshot method: https://modelviewer.dev/docs/index.html#entrydocs-loading-methods-toBlob - is there any reason that won't work? |
Beta Was this translation helpful? Give feedback.
-
|
@elalish It won't work for exact reasons that i've described. With the content located like that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It looks like there's a race condition or rather unexpected behavior with the
displayCanvasand invisible(not in the viewport) multiple models.Lets take example of 2 models side by side. If those models are out of the viewport
multipleScenesVisiblewould be set tofalsesince none of the models are in the view port. Because of thatdisplayCanvaswould always usethis.canvas3Dmeaning that if you want get access to the canvas that's off the screen you'd get last rendered and not the canvas for that specific scene.The reason
displayCanvasis to take screenshot, meaning if there's no models in the viewport it's impossible to take a screenshot of it even if it's rendered.What's the easiest and most convenient way to get proper canvas each time?
countVisibleScenesscene.element[$canvas]directly - not sure how to do that and what might be an implications of it sincecountVisibleScenesis used in other places for render as well.Non of the above solutions seems to be proper one for the situation described.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions