Open kalwalt opened 4 years ago
@rajmayank I opened this issue , because i'd like to add this feature. What do you think?
Two problems I think, looking at the code:
maybe we do not care about 'id' of NFT marker, so it won't work at all with multiple NFT markers? - or am I wrong and you get to make it work?
in any case, I think we start a new Worker(...)
for ANY NFT marker. That kills performances. Will have to change it.
Can you confirm this? I have not tried, just guessing from looking at the code @kalwalt
Actually I have tried and for me it works!
I have added two NFT markers using a-frame on AR.js repository. It works ok! I think it's a matter of performances, maybe? For low-end devices it may be heavy. But technically, it works.
Super! I haven't tried in deep, can you share some code @nicolocarpignoli ?
you have to go on new AR.js repo, and try this:
<script src='https://cdn.jsdelivr.net/gh/aframevr/aframe@1c2407b26c61958baa93967b5412487cd94b290b/dist/aframe-master.min.js'></script>
<!-- rawgithack development URL -->
<script src='https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar-nft.min.js'></script>
<body style='margin : 0px; overflow: hidden;'>
<a-scene
vr-mode-ui='enabled: false;'
embedded arjs='trackingMethod: best; sourceType: webcam; debugUIEnabled: false;'>
<!-- use rawgithack to retrieve the correct url for nft marker (see 'pinball' below) -->
<a-nft
type='nft' url='https://raw.githack.com/AR-js-org/AR.js/master/data/dataNFT/pinball'
smooth='true' smoothCount='10' smoothTolerance='0.01' smoothThreshold='5'>
<a-entity
gltf-model='./Flamingo.glb'
position='75 150 0'
rotation='90 90 90'
scale='5 5 5'
>
</a-entity>
</a-nft>
<a-nft
type='nft' url='https://raw.githack.com/AR-js-org/AR.js/master/aframe/examples/image-tracking/nft/trex/trex-image/trex'
smooth='true' smoothCount='10' smoothTolerance='0.01' smoothThreshold='5'>
<a-entity
gltf-model='./trex/scene.gltf'
position='75 150 0'
rotation='90 90 90'
scale='30 30 30'
>
</a-entity>
</a-nft>
<a-entity camera></a-entity>
</a-scene>
</body>
Hello, I've tried to load 10 nft markers on the same scene and all works very slow and sometimes the application crashes. Is there is any tip to increase the performance of the nft markers?
Also mention that I'm using huge animations (18MB - 40MB)
It will be nice to add the Multi NFT markers feature. More infos will be added.