Replies: 1 comment
-
Hi, not sure if it answers your exact question, but if you want to take a "snapshot" of the screen rendering and use that as a new texture for a new sprite, you can use the Ex:
The above code is untested, so it may need some adjustment. It took me a little while to wrap my head around |
Beta Was this translation helpful? Give feedback.
-
Detail
I want to implement transitions in the video editor based on gl-transition and pixi js. Usually sprites have transforms and filters.
My solution is based on shader and mesh, create a new sprite, set the two sprite visible in the transition to false, and obtain a picture that is rendered separately on the stage (the same size as the stage, with the stage as the boundary, and the blank area is transparent black), passed to gl-transition as a texture
Solutions I've tried
1.
app.renderer.extract.image
api, but I found that it seems that the sprite cannot work correctly after it is hidden?2. Redraw the video using a canvas of the same size as the stage. Adding transform in the process can work normally, but if it is based on adding filters or sprite animation, the cost is a bit high. I am not sure what the correct solution is.
My English is not good. I am not sure whether I expressed my question correctly. Thank you for your help. I can expand on it if it is not clear.
Beta Was this translation helpful? Give feedback.
All reactions