ARnft icon indicating copy to clipboard operation
ARnft copied to clipboard

Get current tracked NFT in Multi NFT Example

Open snmabaur opened this issue 3 years ago • 1 comments

I'm starting to develop an application with your library where I need to use multi nft markers... My problem is, that I don't get the name of the currently tracked nft even though I'm trying it out with your arNFT_multi_example.html and I see the event listeners there

document.addEventListener('getMatrixGL_RH-' + nft.uuid + '-pinball', function() { console.log('this is pinball!!'); })

This console log is not working... is there any other way to track with nft is currently scanned? When I scann the pinball image I see [info] Tracked page 20470720 (max 0). inside the console and [webarkit-info:]Tracking lost. -3 when I remove the pinball image so I guess the tracking is working and I also see the red cube over the pinball image... It's just not working with the EventListener

Thanks

snmabaur avatar Jul 19 '22 19:07 snmabaur

I'm starting to develop an application with your library where I need to use multi nft markers... My problem is, that I don't get the name of the currently tracked nft even though I'm trying it out with your arNFT_multi_example.html and I see the event listeners there

document.addEventListener('getMatrixGL_RH-' + nft.uuid + '-pinball', function() { console.log('this is pinball!!'); })

This console log is not working... is there any other way to track with nft is currently scanned? When I scann the pinball image I see [info] Tracked page 20470720 (max 0). inside the console and [webarkit-info:]Tracking lost. -3 when I remove the pinball image so I guess the tracking is working and I also see the red cube over the pinball image... It's just not working with the EventListener

Thanks

Sorry @snmabaur for this, i think i did some changes in the past that break the example. I need to check again it, but i have not so much time now. Consider that ARnft send events messages to ARnft-threejs and if it can track, as consequence messages are received. Maybe you can try to attach an addEventListener to window object instead of document, but i can not assure of this.

kalwalt avatar Jul 21 '22 15:07 kalwalt