Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/parse-bvh
Parses BioVision Hierarchy files
https://github.com/mikolalysenko/parse-bvh
Last synced: 2 months ago
JSON representation
Parses BioVision Hierarchy files
- Host: GitHub
- URL: https://github.com/mikolalysenko/parse-bvh
- Owner: mikolalysenko
- Created: 2018-01-31T07:04:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-01T07:46:37.000Z (almost 7 years ago)
- Last Synced: 2024-10-11T11:01:46.648Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
parse-bvh
=========
Parses BioVision Hierarchy (BVH) motion capture files into a JavaScript friendly object representation.More info on BVH:
* https://research.cs.wisc.edu/graphics/Courses/cs-838-1999/Jeff/BVH.html
* https://en.wikipedia.org/wiki/Biovision_Hierarchy# example
```javascript
const fs = require('fs')
const parseBVH = require('parse-bvh')console.log(parseBVH(fs.readFileSync('example.bvh').toString()))
```# install
```
npm install bvh-parser
```# api
#### `require('parse-bvh')(bvhString)`
Takes a BVH file as a string as input* `bvhString` is the contents of a BVH file
**Returns** An object representing the data contained in the BVH file. It has the following properties:
* `joints` an array of all the joints in the file, sorted by order of occurrence in the biovision file. Each joint has the following properties:
* `name` the name of the joint
* `index` index of the joint in the `joints` array
* `offset` a 3D vector offset of the joint
* `channels` the parameters describing the joint
* `channelOffset` start of the channel offset in the joint
* `parent` reference to parent joint
* `children` an array of all child joints for a given joint
* `frameTime` the number of seconds/frame in an animation
* `frames` an array of frames. each frame is a flat array of all channel data for each joint# credits
(c) 2018 Mikola Lysenko. MIT License