1.3.0 • Published 10 months ago

aabb-calculator v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

AABB calculator for JavaScript/TypeScript

This library helps to get the aaabb (boundingbox) from a FBX or OBJ file. It works on NodeJs without need of Three.js

Installation

npm install aabb-calculator

Usage

import {calculateObjAabb, calculateFbxAabb} as FBXParser from 'aabb-calculator'

// With an OBJ file
import * as fs from 'fs'
const objFile = 'file.obj'
aabb = calculateObjAabb(fs.readFileSync(file))

// With an FBX file
import * as fs from 'fs'
const fbxFile = 'file.fbx'
aabb = calculateFbxAabb(fs.readFileSync(file))

The Boundigbox has the form

{ 
    min: { x: -1, y: -1.000001, z: -1 }, 
    max: { x: 1, y: 1, z: 1 } 
}

License

ISC

1.3.0

10 months ago

1.2.7

10 months ago

1.2.6

11 months ago

1.2.5

11 months ago

1.2.4

11 months ago

1.2.3

11 months ago

1.2.2

12 months ago

1.2.1

12 months ago

1.2.0

12 months ago

1.1.0

12 months ago

1.0.0

12 months ago