-
Notifications
You must be signed in to change notification settings - Fork 88
贴图加载失败情况 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
imageloader里面最后调用的是小程序的 canvas.createImage() 我用下面代码创建图片
你的图片在真机上会走到onerror , threejs官网和其他的图片都是onload. 可能是图片或者域名或者小程序的canvas.createImage()的问题 |
我连仓库里的例子都显示不出来,。自己的图,缩小图片尺寸也不行,😔 |
手机什么系统? 微信版本是多少? 你可以把 on error 的内容打印出来看下是什么~ |
我的也是 在真机测试下 textureLoader.load走的是onload回调,而且能打印出texture是一个对象,但是将它赋值给材质map属性后就出错了 |
我犯了一个错,我图片尺寸不是2的次方,导致真机显示不出来,改成512*512后可以显示了 |
let texture = new THREE.TextureLoader().load(...)
texture.wrapS = 512*512
texture.wrapT = 512*512 |
不是额 是贴图的尺寸(像素) |
感谢 可以了 |
试过jpg、png,贴图均未成功
The text was updated successfully, but these errors were encountered: