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

How to import custom 3d model #522

Open
errwnd opened this issue Apr 24, 2024 · 3 comments
Open

How to import custom 3d model #522

errwnd opened this issue Apr 24, 2024 · 3 comments

Comments

@errwnd
Copy link

errwnd commented Apr 24, 2024

I'm wokring on a new project, and I want to import a new model to the project. Is that possible? I tried it by changing the src in a face tracking example. It didn't work. Is there such a feature?

@seantai
Copy link

seantai commented Apr 24, 2024

what didn't work? can you post your code?

@errwnd
Copy link
Author

errwnd commented Apr 25, 2024

      <a-asset-item id="earringModel" src="scene.gltf"></a-asset-item>

scene.gltf is a local 3d image, but that is not getting loaded to the scene

@seantai
Copy link

seantai commented Apr 25, 2024

that is simply loading the asset. additionally you need to "render" it to an anchor with something like this

 <a-entity mindar-face-target="anchorIndex: 127">
   <a-gltf-model rotation="-0.1 -0 0" position="0 -0.3 -0.3" scale="0.05 0.05 0.05" src="#earringModel" class="earring-entity" visible="false"></a-gltf-model>
</a-entity>

https://hiukim.github.io/mind-ar-js-doc/face-tracking-examples/tryon

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

No branches or pull requests

2 participants