Search code examples
three.jscross-domainwebglaframesame-origin-policy

Aframe / Three.js Tainted canvases may not be loaded


Im building an app with Aframe that requires fetching images saved onto AWS.

I was getting consistent cors rejection, and after resolving that, my images are passing cors but SOMETIMES they are not, I then utilized asset caching to render the images and the error has changed from mentioning cors to Tainted canvases

enter image description here

Im thinking that cors is effected by the clients internet speed or location?

Im also using aframe react and im wondering if react-rerenders on startup are causing the issue.


Solution

  • Make sure to have <img crossorigin="anonymous"> set, and try without the React layer (which I don't recommend using anymore for perf and scalability reasons for VR, and seeing it mishandled most of the time).