Three.js: 编辑:未捕获的TypeError:normal.clone不是函数

创建于 2020-05-21  ·  3评论  ·  资料来源: mrdoob/three.js

问题描述

我将gltf文件导入three.js编辑器,导出时出现此错误

Uncaught TypeError: normal.clone is not a function
at createNormalizedNormalAttribute (GLTFExporter.js:297)
at processMesh (GLTFExporter.js:1240)
at processNode (GLTFExporter.js:1812)
at processNode (GLTFExporter.js:1860)
at processNode (GLTFExporter.js:1860)
at processScene (GLTFExporter.js:1921)
at processInput (GLTFExporter.js:1974)
at GLTFExporter.parse (GLTFExporter.js:2004)
at UIRow. (Menubar.File.js:272)
createNormalizedNormalAttribute @ GLTFExporter.js:297
processMesh @ GLTFExporter.js:1240
processNode @ GLTFExporter.js:1812
processNode @ GLTFExporter.js:1860
processNode @ GLTFExporter.js:1860
processScene @ GLTFExporter.js:1921
processInput @ GLTFExporter.js:1974
parse @ GLTFExporter.js:2004
(anonymous) @ Menubar.File.js:272 

这是文件
https://github.com/zypy333/test1/blob/HEAD/2cen.gltf

Three.js版本
  • [x]开发
  • [x] r116
浏览器
  • [x]全部
  • [ ] 铬合金
  • []火狐
  • [ ] IE浏览器
操作系统
  • [x] Windows
硬件要求(图形卡,VR设备等)

所有3条评论

如论坛上所讨论的,发生这种情况是因为InterleaevedBufferAttribute没有clone()方法。

https://discourse.threejs.org/t/editor-uncaught-typeerror-normal-clone-is-not-a-function-gltfexporter-js/15415/2?u=mugen87

由于缺少toJSON() ,因此在编辑器中发生了一个相关的运行时错误。 也许我们现在可以重新激活#18537并通过解交织来实现这两种方法(如
快速修复)。

由于toJSON()也丢失,因此在编辑器中发生了一个相关的运行时错误。 也许我们现在可以重新激活#18537并通过解交织来实现这两种方法(如
快速修复)。

听起来不错。 比崩溃更好……我们可能想添加一个console.log()想法,这样我们就不会忘记。

重新打开PR,对其进行更新,并添加两种方法console的控制台消息。

此页面是否有帮助?
0 / 5 - 0 等级

相关问题

boyravikumar picture boyravikumar  ·  3评论

yqrashawn picture yqrashawn  ·  3评论

donmccurdy picture donmccurdy  ·  3评论

jlaquinte picture jlaquinte  ·  3评论

seep picture seep  ·  3评论