0.0.3 • Published 2 years ago

@picode/fbx v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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

0.0.3

2 years ago

0.0.2

3 years ago

0.0.1

3 years ago