https://github.com/zlatnaspirala/bvh-loader
Original python code project npybvh cloned from `https://github.com/dabeschte/npybvh` Objective of this project is rewriting to the js ecma6 JS.
https://github.com/zlatnaspirala/bvh-loader
Last synced: about 1 month ago
JSON representation
Original python code project npybvh cloned from `https://github.com/dabeschte/npybvh` Objective of this project is rewriting to the js ecma6 JS.
- Host: GitHub
- URL: https://github.com/zlatnaspirala/bvh-loader
- Owner: zlatnaspirala
- License: gpl-3.0
- Created: 2022-05-30T19:49:19.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-13T16:26:49.000Z (almost 3 years ago)
- Last Synced: 2025-03-15T11:48:11.127Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 102 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bvh-loader.js
### Objective 1 [100% DONE]
### bvh.py to bvh.js ☕### Npm package link:
https://www.npmjs.com/package/bvh-loader### Objective 2
Implement loader/draws intro matrix-engine. 🤞
Make pseudo (primitives) Skeletal Mesh and adapt it to the bvh loader output data.🤞## Project structure
├── javascript-bvh/ [Vanila JS]
| ├── bvh-loader.js
| ├── example.bvh
| ├── index.html [test page]
├── module/ [module JS - npm]
| ├── bvh-loader.js
├── index.js
├── test.js [test module]
├── module.html [test module]
├── package.json
├── LINCENCE
├── README.md### NPM Service
Navigate to module.html it is local test for npm package.
This link also use npm service via cdn.skypack.dev
- https://codepen.io/zlatnaspirala/pen/vYdVxQR#### Use great `cdn.skypack.dev` free service. No build , free hosting library.
Just put in test.js - `import MEBvh from "https://cdn.skypack.dev/[email protected]";````
import MEBvh from "https://cdn.skypack.dev/[email protected]";var anim = new MEBvh();
anim.parse_file("https://raw.githubusercontent.com/zlatnaspirala/Matrix-Engine-BVH-test/main/javascript-bvh/example.bvh").then(() => {
console.info("plot_hierarchy no function")
anim.plot_hierarchy();var r = anim.frame_pose(0);
console.log("FINAL P => ", r[0].length)
console.log("FINAL R => ", r[1].length)var KEYS = anim.joint_names();
for(var x = 0;x < r[0].length;x++) {
console.log("->" + KEYS[x] + "-> position: " + r[0][x] + " rotation: " + r[1][x]);
}var all = anim.all_frame_poses();
console.log("Final All -> ", all);});
```
#### Local test
```js
import MEBvh from "./index";var anim = new MEBvh();
anim.parse_file("https://raw.githubusercontent.com/zlatnaspirala/Matrix-Engine-BVH-test/main/javascript-bvh/example.bvh").then(() => {
console.info("plot_hierarchy no function")
anim.plot_hierarchy();var r = anim.frame_pose(0);
console.log("FINAL P => ", r[0].length)
console.log("FINAL R => ", r[1].length)var KEYS = anim.joint_names();
for(var x = 0;x < r[0].length;x++) {
console.log("->" + KEYS[x] + "-> position: " + r[0][x] + " rotation: " + r[1][x]);
}var all = anim.all_frame_poses();
console.log("Final All -> ", all);});
```
### Lincence
https://maximumroulette.com
GNU GENERAL PUBLIC LICENSE Version 3
### Credits
Original source: https://github.com/dabeschte/npybvh