Mesh volume calculator for Three or React Three.
It requires a mesh geometry (object.children[0]) and returns volume in original units. You may use 'precision' arg (optional) to avoid division by 1000 and calculate with greater precision, useful for smaller geometry.
-
Install: npm i three-volume
-
Import: import {ThreeVolume} from 'three-volume' // const {ThreeVolume} = require('three-volume');
-
Use: let volume = ThreeVolume({geometry:mesh.geometry,precision:true/false})
Hecho con amor en argentina.