-
Notifications
You must be signed in to change notification settings - Fork 14
Support Custom Renderers #24
Comments
Would it make sense to enable this by defining new custom elements? Like |
I think so, but I like your suggestion of having modified elements for |
I'm tinkering with a few ideas for this. The one that feels best so far revolves around providing the various bits and pieces that are currently hardcoded into the monolithic For example, we'd have One of the downsides of this idea is the potential for namespace collisions. If we introduce a At the same time, we've been discussing (on Discord) to establish a separate "extras" package that, similar to react-drei for react-three-fiber, provides elements that implement specific functionality (using code from Three.js' |
I'm tackling this now. The goal is to allow the user to create instances of these renderers by using their corresponsing |
PR for the first pass on this: #43 |
I've merged #43, which allows customization of renderers that live in the THREE.* namespace. I'm deferring support for CSS/SVG renderers to 0.4. |
In the interest of pushing out a 0.4 release soon, I'm moving this to the next milestone. |
Currently,
<three-game>
provides a defaultWebGLRenderer
instance, but there are cases where users would opt to useSVGRenderer
,CSS2DRenderer
,CSS3DRenderer
, andWebGL1Renderer
.To support these renderers, we could pick up renderer elements as children of
<three-game>
and conditionally revert #21 for non-WebGL instances. For instance,react-three-fiber
tackles this by only usingrenderer.setAnimationLoop
when xr is enabled.The text was updated successfully, but these errors were encountered: