"Failed to execute 'texImage2D' on 'WebGLRenderingContext': tainted canvases may not be loded."

出现这错误是因为threejs内部没有处理图片跨域问题,设置图片TextureLoader为允许跨域就可以了

var loader=new THREE.TextureLoader();
loader.setCrossOrigin( "Anonymous" );

猜你喜欢

转载自blog.csdn.net/guoguicheng1314/article/details/79961102