react-three-renderer
react-three-renderer copied to clipboard
CanvasRenderer fallback not working
If webGL is not available it should fallback to CanvasRenderer, but I get following error instead.
three.js:33665THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js
@rana3012 any idea what might be the cause? Since you recently made this PR for CanvasRender fallback.
Using latest Three from npm (0.77.1)
For this one I am considering to shim it through the files in three js npm library and find another solution if they decide to not include it, as a work around until then please include the canvas renderer in your project so that THREE.CanvasRenderer is properly defined
On Tue, 7 Jun 2016, 13:07 Jarda Kotěšovec, [email protected] wrote:
If webGL is not available it should fallback to CanvasRenderer, but I get following error instead.
three.js:33665THREE.CanvasRenderer has been moved to /examples/js/renderers/CanvasRenderer.js
@rana3012 https://github.com/rana3012 any idea what might be the cause? Since you recently made this PR for CanvasRender fallback.
Using latest Three from npm (0.77.1)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/toxicFork/react-three-renderer/issues/79, or mute the thread https://github.com/notifications/unsubscribe/AA0iLe-kBj48pmzwvQjNSPxPVZ06vuyIks5qJV7ygaJpZM4Iv2ZW .
@toxicFork Ok, thanks.
Current work around with webpack currently looks like:
require('imports?THREE=three!three/examples/js/renderers/Projector');
require('imports?THREE=three!three/examples/js/renderers/CanvasRenderer');
When trying the Usage example with the above webpack workaround, I am getting an error in IE10: SCRIPT5007: Unable to get property 'hasOwnProperty' of undefined or null reference
Anyone else getting this? The source is 108 of lib/ThreeElementDescriptor.js (0, _invariant2.default)(!this.propTypes.hasOwnProperty(name) || info.override, 'The property %s has already been defined', name);
Any progress on this? I am receiving this same error.
It seems that this would allow support for numerous older browser since WebGL support does not seem very old.
I had this issue appear out of nowhere and have been unable to resolve it.
I was experimenting with react-three-renderer-fiber and this may have interfered somehow. After removing it as a dependency (and running a fresh clone of my repo), it worked. Still a mystery as to why the issue came up.