Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get current tracked NFT in Multi NFT Example #281

Open
snmabaur opened this issue Jul 19, 2022 · 1 comment
Open

Get current tracked NFT in Multi NFT Example #281

snmabaur opened this issue Jul 19, 2022 · 1 comment

Comments

@snmabaur
Copy link

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

@kalwalt
Copy link
Member

kalwalt commented Jul 21, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants