a-text to display text, or a-box to display a box, so it will be fun enough to just play with the pre-prepared ones.
This time, I downloaded a nice wolf model from Free3D, so I'll display it.
This is gltf format model, so I'll specify the id as follows.
<a-entity gltf-model="#wolf"></a-entity>
The model should be loaded in a-assets beforehand.
<a-assets>
<a-asset-item
id="wolf"
src="assets/Wolf-Blender-2.82a.glb"
></a-asset-item>
</a-assets>
Now I can display it. Very easy.
The whole code.
<body>
<a-scene
embedded
arjs="sourceType: webcam; debugUIEnabled: false; detectionMode: mono_and_matrix; matrixCodeType: 3x3;"
>
<a-assets>
<a-asset-item
id="wolf"
src="assets/Wolf-Blender-2.82a.glb"
></a-asset-item>
</a-assets>
<a-marker preset="custom" type="pattern" url="assets/pattern-marker.patt">
<a-entity
id="model"
gltf-model="#wolf"
position="0 0 1"
scale="1 1 1"
rotation="0 -90 60"
>
</a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
</body>
That's it!
Thanks for reading.
This is my first time to use AR, but it was really easy.
I will try more :D
ππππππ
Please send me a message if you need.
yuiko.dev@gmail.com
https://twitter.com/yui_active
ππππππ