Replies: 6 comments 14 replies
-
have you seen the Html component from the drei library? |
Beta Was this translation helpful? Give feedback.
-
Yes, but that just overlays DOM elements on top of the canvas. The For example, you can only achieve this effect by using the |
Beta Was this translation helpful? Give feedback.
-
well you can use the regular css3drenderer, the problem ofc is that it's a dirty imperative setup where you create divs by hand. in theory theres even a real react renderer for it import { ... } from "react-three-fiber/css3d" but i havent used or tried it. i guess the easiest route forward is that you look at the Html source in drei and extend it, then send a PR. the lib grows as people use it and implement their requirements. |
Beta Was this translation helpful? Give feedback.
-
This is quite nice https://threejs.org/examples/#css3d_orthographic it renders two canvas one with div and one with webGL |
Beta Was this translation helpful? Give feedback.
-
The Html component is nice but I want it to be inside the 3d not on top of it fixed but static inside a 3d object |
Beta Was this translation helpful? Give feedback.
-
Hi! As Enijar does, I too desire some form of in-canvas HTML to be present, for aesthetic purposes of a tiny project. I'm quite new in both three.js and react.js, and in javascript really, so anything more techy might currently be beyond me. Anyway, for now I'm writing just to say that I think this feature, for which similar questions have been made by lots of people who use three.js, is--not necessarily should, but--could be added as part of the Drei HTML--which would then be the R3F equivalent of world space UIs. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently came across a need to put HTML intoa 3D scene and have it be occluded. I came across the below example, and am wondering how to use multiple renderers in the
Canvas
component?Example of multiple renderers in three: https://codepen.io/trusktr/pen/RjzKJx?editors=0010
Beta Was this translation helpful? Give feedback.
All reactions