mind-ar-js
mind-ar-js copied to clipboard
How to import custom 3d model
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?
what didn't work? can you post your code?
<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
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