2.0.7 • Published 12 months ago

three-volume v2.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

Mesh volume calculator for Three or React Three.

It requires a mesh geometry (object.children0) 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.

1) Install: npm i three-volume 2) Import: import {ThreeVolume} from 'three-volume' // const {ThreeVolume} = require('three-volume');

3) Use: let volume = ThreeVolume({geometry:mesh.geometry,precision:true/false})

If you are trying to pass a geometry object without standard properties (such as position), you may invoke a new Mesh() object, and type-cast as such:

const mesh = new Mesh(file, new MeshBasicMaterial());

const volume = ThreeVolume(mesh as unknown as BufferGeometry);

Hecho con amor en argentina.

2.0.7

12 months ago

2.0.6

12 months ago

2.0.5

2 years ago

2.0.4

2 years ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.1

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago