Calculate comprehensive statistics for a 3D object
Traverses the object hierarchy and collects:
The Three.js object to analyze
Statistics object with geometry information
const stats = calculateObjectStats(model);console.log(`Model has ${stats.triangles} triangles and ${stats.vertices} vertices`);console.log(`Size: ${stats.bbox.x} x ${stats.bbox.y} x ${stats.bbox.z}`); Copy
const stats = calculateObjectStats(model);console.log(`Model has ${stats.triangles} triangles and ${stats.vertices} vertices`);console.log(`Size: ${stats.bbox.x} x ${stats.bbox.y} x ${stats.bbox.z}`);
Calculate comprehensive statistics for a 3D object
Traverses the object hierarchy and collects: