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

CanvasRenderer fallback not working

Open jardakotesovec opened this issue 9 years ago • 6 comments
trafficstars

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)

jardakotesovec avatar Jun 07 '16 12:06 jardakotesovec

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 avatar Jun 07 '16 12:06 toxicFork

@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');

jardakotesovec avatar Jun 07 '16 12:06 jardakotesovec

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);

d3zza avatar Jun 21 '16 01:06 d3zza

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.

bryandbor avatar Jan 31 '17 19:01 bryandbor

I had this issue appear out of nowhere and have been unable to resolve it.

ekatzenstein avatar Feb 11 '19 00:02 ekatzenstein

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.

ekatzenstein avatar Feb 11 '19 01:02 ekatzenstein