-
Notifications
You must be signed in to change notification settings - Fork 237
加载有贴图的gltf文件会报错 #15
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
方便提供下模型文件看看吗 |
gltf-loader.js 文件的大概1966 行 loadTexture方法; |
所以,现在还有办法解决此问题不? |
看到你的仓库里有类似的解决方案,但不知道texture_loader.js如何用,求大神指点~ |
已支持小程序加载GLB polyfill https://github.com/deepkolos/three-platformize |
@sanyuered 可以尝试 https://github.com/deepkolos/three-platformize 已测试模块
Controls
|
https://github.com/deepkolos/three-platformize 为什么不能参考这个解决一下呢 |
https://github.com/deepkolos/three-platformize 为什么不能参考这个解决一下呢 (悲伤) |
模型用 blender 导出的时候选 gltf 分离,导出后就是一个 gltf文件,一个贴图,一个 bin 文件,于是就可以加载 gltf 文件了。 |
最后three用的threejs-miniprogram,gltf参考了https://github.com/deepkolos/three-platformize,搞的微信小程序AR |
噢噢,老哥你是参考 three-platformize 项目,重写了 gltfloader 是吗? |
是的,让threejs-miniprogram和three-platformize的gltfloader结合一起 |
e = TypeError: Cannot read property 'URL' of undefined at GLTFParser.loadTexture (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1723:24) at GLTFParser.getDependency (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1489:31) at GLTFParser.assignTexture (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1812:19) at GLTFParser.loadMaterial (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:2001:31) at GLTFParser.getDependency (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1485:31) at GLTFParser.loadMesh (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:2218:94) at GLTFParser.getDependency (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1469:31) at http://127.0.0.1:22948/appservice/libs/gltf-loader.js:2550:31 at GLTFParser.loadNode (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:2603:8) at GLTFParser.getDependency (http://127.0.0.1:22948/appservice/libs/gltf-loader.js:1465:31)
The text was updated successfully, but these errors were encountered: