Load an image for WebGL texture but failed because of CORS

后端 未结 1 1684
你的背包
你的背包 2021-01-25 02:51

I\'m reading a tutorial on WebGL (link). In this tutorial, we load a texture locally. However, because of cross-origin issue for WebGL texture, we must add img.crossOrigin

相关标签:
1条回答
  • 2021-01-25 03:26

    To load images locally you need to run a server and NOT set image.crossOrigin

    I recommend you start with this one or one of the many here

    0 讨论(0)
提交回复
热议问题