AdaRoseCannon / handy-work

Framework Agnostic Hand tracking for WebXR
https://aframe-xr-starterkit.glitch.me/
MIT License
94 stars 11 forks source link

How to load poses? #13

Closed edhyah closed 2 years ago

edhyah commented 2 years ago

Hello!

Newb question. Calling loadPose results in me getting a TypeError: Failed to construct 'URL': Invalid URL error. I've tried passing in absolute paths, relative paths and so forth - none of them seem to be working. I use webpack and have confirmed that the pose files have been copied over to the bundle.

What am I doing wrong? Thanks!

AdaRoseCannon commented 2 years ago

I’ve never actually tried it in a bundle before it is designed to work with es6 modules, and to load the model files themselves as normal files

edhyah commented 2 years ago

Ah I got it to work! Essentially just had to load them via a URL and not a path, ie. loadPose('relax', 'http://localhost:3000/' + relaxHandPose). Thanks for the quick response!

AdaRoseCannon commented 2 years ago

Precisely!