react-three-renderer icon indicating copy to clipboard operation
react-three-renderer copied to clipboard

Is it possible to implement a fallback to CanvasRenderer instead of WebGLRenderer

Open kodlyzer opened this issue 9 years ago • 4 comments

I see a onRendererUpdated handler but couldn't find a way to get it the way I want. What i'm looking for is this - http://threejs.org/docs/#Reference/Renderers/CanvasRenderer.

I need to have a fallback for webgl support disabled devices to render using the CanvasRenderer instead of WebGLRenderer.

kodlyzer avatar Mar 28 '16 07:03 kodlyzer

At the moment react-three-renderer supports only WebGLRenderer, but we should support CanvasRenderer for 1.0 :)

toxicFork avatar Mar 28 '16 17:03 toxicFork

Ohkay.. See if my PR fits in. It just includes a fallback for the WebGL with CanvasRenderer. An option for the user to specify would be useful.

kodlyzer avatar Mar 29 '16 13:03 kodlyzer

I get the error THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js THREE.CanvasRenderer when WebGL is disabled.

To use the CanvasRenderer, do I need to shim in the CanvasRenderer.js file for this to work?

ptsteadman avatar May 03 '16 18:05 ptsteadman

Aaah. Thanks for reporting! Hmm... I'll have a think. Shimming sounds good as a work around for the moment :)

On Tue, 3 May 2016 19:33 Patrick Steadman, [email protected] wrote:

I get the error "THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js THREE.CanvasRenderer" when WebGL is disabled.

To use the CanvasRenderer, do I need to shim in the CanvasRenderer.js file for this to work?

— You are receiving this because you commented. Reply to this email directly or view it on GitHub https://github.com/toxicFork/react-three-renderer/issues/52#issuecomment-216622910

toxicFork avatar May 03 '16 18:05 toxicFork