@picode/fbx
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

FBX Interface for JavaScript/TypeScript

npm npm bundle size GitHub Workflow Status

This parser will parse FBX text files and convert them into a JavaScript-Object structure.

This is work in progress, and functionality can be easily added to cover more FBX features.

Installation

npm install @picode/fbx

Usage

import { FBX, FBXAxes } from '@picode/fbx'
import * as FBXParser from 'fbx-parser'

const fbx = new FBX(FBXParser.parse(await fs.readFileSync(fbxFile)))
const upAxes = fbx.globalSettings.getUpAxes() ?? FBXAxes.Y

const model = fbx.getModel('MyModel')

const rotNode = model.getRotationNode()
const rotationX = rotNode.getX()

const rotKeyY = model.getRotationKey(upAxes)
const rotationsYTimes = rotKeyY?.getTime()
const rotationsYValues = rotKeyY?.getValue()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @picode/fbx

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

13.7 kB

Total Files

7

Last publish

Collaborators

  • picode