更新选择框对BufferGeometry的支持,使用索引而不是判断点个数为3的倍数

pull/97/MERGE
ChenX 6 years ago
parent 67c2ac7bb6
commit b19d69bd92

@ -115,9 +115,9 @@ export class SelectSetBase
else if (geo instanceof BufferGeometry)
{
//由于threejs对buffGeometry转换错误.
let pos = geo.getAttribute("position");
if (pos.count % 3 !== 0)
if (!geo.index)// && pos.count % 3 !== 0
{
let pos = geo.getAttribute("position");
for (let i = 0; i < pos.count * 3; i += 3)
{
let p = new Vector3(pos.array[i], pos.array[i + 1], pos.array[i + 2]);

Loading…
Cancel
Save