Force render update prior to toBlob Poster generation? #1917
Unanswered
milesgreen
asked this question in
Q&A
Replies: 2 comments
-
Yes, the natural way to achieve this in general on a browser is to call |
Beta Was this translation helpful? Give feedback.
0 replies
-
Amazing. Thanks. Like this? model-viewer/packages/modelviewer.dev/src/tester.ts Lines 97 to 108 in bb82a5b |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Description
Is it possible to force a render update prior to using toBlob Poster generation?
When updating certain properties (EG Camera orbit, or the size of Model Viewer itself) and immediately calling toBlob to generate a Poster image, the generated image is of the previous state, not the freshly updated state. Presumably, this is due to a frame update cycle delay? One workaround is to set a timeout to delay the image capture. But is there a more elegant and immediate way to force the renderer to update and redraw with the latest properties?
Beta Was this translation helpful? Give feedback.
All reactions