- 主要是计算attribute position/index
let faceCount=0;
for (let index = 0; index < d4.componentGroup.children.length; index++) {
const element = d4.componentGroup.children[index];
const attirbute = element.geometry
if (attirbute.index) {
faceCount += attirbute.index.array.length/3;
}
else{
faceCount += attirbute.attirbutes.position.array.length/9;
}
}
console.log(faceCount);