Replies: 2 comments 4 replies
-
why do you think it didnt go through? what you do is correct, i dont see how it could not end up in webglrenderer if (canvasRef.current) {
const params = { antialias: true, alpha: true, ...props.gl }
const temp = new WebGLRenderer({
canvas: canvasRef.current,
context: props.gl2 ? (canvasRef.current.getContext('webgl2', params) as WebGLRenderingContext) : undefined,
...params, according to that bit of code, if props.gl contains preserveDrawingBuffer it must be accessible in the webglrenderer constructor. can you show me the plain threejs thing that you want to realize? |
Beta Was this translation helpful? Give feedback.
3 replies
-
You can use onCreated on the canvas, it's a callback that gives you the state model once the canvas is established, in there you can set props |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In a scene, I'd like to keep the previous frame under the new one with a lower opacity to simulate trail effects or so. For this, I generally just activate
preserveDrawingBuffer
and then add a Plane that reduces opacity.Using r3f, I'm unable to set the
preserveDrawingBuffer
using the following code according to documentation:Am I doing something wrong with the code, or is an alternative method preferred for this?
Beta Was this translation helpful? Give feedback.
All reactions