提交 9cc10f5e 编写于 作者: M Mr.doob 提交者: GitHub

Merge pull request #10657 from gelibolue/geometryFix

Geometry toJSON fix
...@@ -1142,13 +1142,11 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, { ...@@ -1142,13 +1142,11 @@ Object.assign( Geometry.prototype, EventDispatcher.prototype, {
} }
data.data = {}; data.vertices = vertices;
data.normals = normals;
data.data.vertices = vertices; if ( colors.length > 0 ) data.colors = colors;
data.data.normals = normals; if ( uvs.length > 0 ) data.uvs = [ uvs ]; // temporal backward compatibility
if ( colors.length > 0 ) data.data.colors = colors; data.faces = faces;
if ( uvs.length > 0 ) data.data.uvs = [ uvs ]; // temporal backward compatibility
data.data.faces = faces;
return data; return data;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册