Replies: 1 comment
-
I'm open to other solutions, as well, like layering two canvases, putting the background model in one, and the character model in the other. However, this issue is blocking me in my work, so I'd love to hear some suggestions! What do you think @drcmda? Thanks! |
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
-
Hi,
I'm using Next.js, Zustand, and React Three Fiber in my app. What I want to do is take 2 screenshots of the canvas: 1 of just the character, and 1 of just the background. There is a button that when clicked is supposed to take the screenshots. However, it isn't working. Here are the most relevant components:
So what I've been trying to do is something like this (in Character Stage):
The problem is getting the timing of the
toDataURL
calls to sync with the re-render so that the correct model has been hidden. With my current code, I get screenshots when both the character and background are hidden.What I want is to hide the background, take a screenshot; show the background and hide the character, then take a screenshot.
Can anyone help me figure out the best way to do this?
Beta Was this translation helpful? Give feedback.
All reactions