AR.js
AR.js copied to clipboard
Multiple images
Is it possible to make the code recognize multiple images? For example: if I want to create a book, how can the "app" recognize different images on different pages?
Yes you can. Just put more than one a-nft in the code with different image.
<a-nft
type="nft"
url="<path-to-your-image-descriptors number one>"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5"
>
<!-- as a child of the a-nft entity, you can define the content to show. here's a GLTF model entity -->
<a-entity
gltf-model="<path-to-your-model>"
scale="5 5 5"
position="50 150 0"
>
</a-entity>
</a-nft>
<a-nft
type="nft"
url="<path-to-your-image-descriptors number two>"
smooth="true"
smoothCount="10"
smoothTolerance=".01"
smoothThreshold="5"
>
<!-- as a child of the a-nft entity, you can define the content to show. here's a GLTF model entity -->
<a-entity
gltf-model="<path-to-your-model>"
scale="5 5 5"
position="50 150 0"
>
</a-entity>
</a-nft>