1.3.0 • Published 11 months ago

aabb-calculator v1.3.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 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

11 months ago

1.2.7

11 months ago

1.2.6

12 months ago

1.2.5

12 months ago

1.2.4

12 months ago

1.2.3

12 months ago

1.2.2

1 year ago

1.2.1

1 year ago

1.2.0

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago