BVH Parser written in TypeScript
This is a forked version maintained by @nandenjin
. Originally written by @hitsujiwool
.
🐙 GitHub | 📒 Docs | ⚒️ Playground
import { read as readBVH } from '@nandenjin/bvh'
readBVH(urlForBVHFile, function (motion) {
// basic infomation about motion data
motion.frameTime
motion.numFrames
// get lists of nodes
motion.nodeList
// get a node by id
var node = motion.of('Head')
// change node's internal state to n-th frame
node.at(4)
// you can exchange the order of method "at" and "of"
var state = motion.at(4)
node = state.of('Head')
// node properties
node.offsetX
node.offsetY
node.offsetZ
node.rotationX
node.rotationY
node.rotationZ
// node adjacent to "End Site" has properties about endOffset
if (node.hasEnd) {
node.endOffsetX
node.endOffsetY
node.endOffsetZ
}
})
See LICENSE
.