hiukim / mind-ar-js

Web Augmented Reality. Image Tracking, Face Tracking. Tensorflow.js
MIT License
2.12k stars 391 forks source link

About the scale position such as canonical-face-model? #488

Open LiZhenzhuBlog opened 5 months ago

LiZhenzhuBlog commented 5 months ago

How can I adjust the size and position of the model? I have added the reference model to the scene and anchored it to the tip of the nose. How can I make adjustments? Alternatively, can I align the global and facial features without setting an anchor? Thank you.

<a-assets>    
      <a-asset-item id="headModel" src="canonical-face-model.glb" ></a-asset-item>
      </a-assets>
      <a-camera active="false" position="0 0 0"></a-camera>
      <a-entity mindar-face-target="anchorIndex: 1">
        <a-gltf-model  rotation="0 0 0" position="0 0 0" scale="1 1 1" " src="#headModel"></a-gltf-model>
        </a-entity>

the model appears too large and its position is incorrect.....

hiukim commented 5 months ago

update rotation="0 0 0" position="0 0 0" scale="1 1 1"

LiZhenzhuBlog commented 5 months ago

update rotation="0 0 0" position="0 0 0" scale="1 1 1"

I have already set the position,

<a-gltf-model rotation="0 0 0" position="0 0 0" scale="1 1 1" " src="#headModel"></a-gltf-model> do you mean I need to create a script to update the model's position?

hiukim commented 5 months ago

adjust the values if you want to move/rescale.