WebGL Three.js ColladaLoader 示例失败
我从 github 上的 Three.js 复制了确切的(工作)colladaLoader 代码,并将其放在磁盘上并对依赖项进行了排序。但不是 monster.dae, 我收到“未捕获的类型错误:无法设置未定义的属性‘convertUpAxis’” 不过,该示例可在 Three.js github 站点上运行。
网上根本没有任何线索。 这意味着什么?
I copied the exact (working) colladaLoader code from three.js on github, and put it on disk and sorted the dependancies. but instead of the monster.dae,
I get a "Uncaught TypeError: Cannot set property 'convertUpAxis' of undefined"
However the example works from the three.js github site.
No clues on the web at all.
What does that mean?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您可能需要向我们提供更多信息。
Collada 示例上唯一引用
convertUpAxis
是 第 33 行。因此,这对我来说意味着
THREE.ColladaLoader
实例要么无法创建实例,要么原型首先不可用。其中任何一个听起来都像是您缺少依赖项。只是我的随机猜测(我从来都不是 THREE.js 专家),但是您是否可能使用 src 文件夹中的 Three.js 文件而不是 build 文件夹? src 版本只是一个带有 requestAnimationFrame shim 的存根。然而,构建文件夹中的那个包含所有子模块,例如您需要的 COLLADA 加载程序。双重检查!
I think you might need to give us some more info.
On the Collada example The only code that references
convertUpAxis
is Line 33.As such, this suggests to me that the
THREE.ColladaLoader
instance either failed to create the instance or that the prototype isn't available in the first place. Either of these make it sound like you're missing a dependency.Just a random guess on my part (I've never been a THREE.js expert) but are you perhaps using the Three.js file from the src folder instead of the build folder? The src version is just a stub with a requestAnimationFrame shim in it. The one from the build folder, however, includes all of the submodules like the COLLADA loader that you need. Double check!