Problems mixing a regular WebGL renderer with a CSS3DRenderer #961
Unanswered
giusepperaso
asked this question in
Q&A
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I am trying to have "mixed" html and webgl like in this example https://codepen.io/trusktr/pen/RjzKJx
In order to achieve that, I am trying to get scene and camera from the webgl canvas and pass them to the CSS renderer; my guess is that I have to use useFrame and priority set to 1 to accomplish that
This is what I made so far (I know the code is very ugly, I will fix it later if I get this to work)
https://codesandbox.io/s/two-r3f-renderers-share-scene-and-camera-qq1zl?file=/src/App.js
What I get are two problems:
Thanks!
EDIT: I'm having some progress on the codepen, if I manage to get something decently working and usable I will do a PR on drei
Basically I can simply share only the camera without sharing the scene; besides I can increase the pixel size to avoid problems on Firefox
Beta Was this translation helpful? Give feedback.
All reactions