npm

@nandenjin/bvh-parser
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

bvh-parser

BVH Parser written in TypeScript

Version Coverage by Codecov License

This is a forked version maintained by @nandenjin. Originally written by @hitsujiwool.

🐙 GitHub | 📒 Docs | ⚒️ Playground

Usage

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
  }
})

License

See LICENSE.

Readme

Keywords

none

Package Sidebar

Install

npm i @nandenjin/bvh-parser

Weekly Downloads

91

Version

0.1.2

License

MIT

Unpacked Size

21.5 kB

Total Files

13

Last publish

Collaborators

  • nandenjin