ThreePresenter API Documentation - v0.1.2
    Preparing search index...

    Function calculateObjectStats

    • Calculate comprehensive statistics for a 3D object

      Traverses the object hierarchy and collects:

      • Triangle/face count
      • Vertex count
      • Bounding box dimensions
      • Texture information

      Parameters

      • obj: Object3D

        The Three.js object to analyze

      Returns GeometryStats

      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}`);