Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use custom hands model with the Hands component #62

Merged
merged 3 commits into from Jun 22, 2021
Merged

Conversation

AlaricBaraou
Copy link
Contributor

This PR should allow user to load their own models when using the <Hands /> component.

They can specify a model for the left or right hands individually like so :

<Hands
      modelLeft={"https://vazxmixjsiawhamofees.supabase.co/storage/v1/object/public/models/left-hand-black-webxr-tracking-ready/model.gltf"}
      modelRight={"https://vazxmixjsiawhamofees.supabase.co/storage/v1/object/public/models/right-hand-black-webxr-tracking-ready/model.gltf"}
/>

If no model are specified it will load the current model.

Let me know if you want me to code it differently / rename stuff etc.

Once it's merged, I'll try to make a simple demo of it and add it to the readme and getting started.

( Also, can we rename src\webxr\HandModel.js to something else ? Maybe I'm missing why it's called Oculus, because I don't see why it's specific to Oculus )

Thank you in advance !

@AlaricBaraou AlaricBaraou requested a review from sniok June 17, 2021 22:43
@AlaricBaraou AlaricBaraou changed the title Use custom hands model with <Hands /> Use custom hands model with the Hands component Jun 17, 2021
src/webxr/XRHandMeshModel.js Outdated Show resolved Hide resolved
src/Hands.tsx Outdated Show resolved Hide resolved
@sniok
Copy link
Member

sniok commented Jun 21, 2021

Nice! Also would be nice to add some documentation to readme or I can do it later

@sniok
Copy link
Member

sniok commented Jun 21, 2021

and yeah it can be renamed to just HandModel, there's nothing 'oculus' about it

@sniok
Copy link
Member

sniok commented Jun 21, 2021

once we merge this and #63 we can do a "Hand" release :D

@AlaricBaraou
Copy link
Contributor Author

I was thinking of a demo where you can change your hands dynamically but the way it's currently done it wouldn't work.

Would it be worth to make this dynamic ?

I can see some use cases but there is not a lot of them.

@sniok
Copy link
Member

sniok commented Jun 21, 2021

we can keep it simple for now and add dynamic loading later

@sniok sniok merged commit 80971fb into master Jun 22, 2021
@sniok sniok deleted the custom_hands branch June 22, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants