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

Dynamically Added Models not working with NFT #91

Open
digitallysavvy opened this issue Apr 22, 2020 · 3 comments
Open

Dynamically Added Models not working with NFT #91

digitallysavvy opened this issue Apr 22, 2020 · 3 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@digitallysavvy
Copy link

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I recently started porting my project from #ARjs v2.2 to v3.0.2 and everything works great when using the #marker library, but I noticed when I change over to #imageTracking, when I dynamically add a or none of the properties are getting set.

If the current behavior is a bug, please provide the steps to reproduce.
My example uses Agora.io's live streaming (WebRTC), where one user is broadcasting their video from a desktop, while another user is viewing the stream in AR. When the broadcaster joins the channel, <video /> and <a-gltf /> elements are dynamically added to the scene.

When using the traditional barcode marker tracking (<a-marker />) everything works as expected. but upon testing the new image marker tracking (<a-nft />) I am seeing the <a-gltf /> element is added to the scene, but none of the properties (gltf, scale, position, rotation) are populating, the element appears with the properties set to empty values. I tried switching the <a-gltf /> to <a-entity /> but experienced the same behavior.

I have tried hardcoding the <a-gltf />and the model and properties appear without issue.

I have pushed my code to this repo: https://github.com/digitallysavvy/AgoraARjs

  • The index.html implements the traditional <a-marker />
  • The index-nft.html implements the image tracking <a-nft />
  • Each one uses almost identical versions of the audience.js, the main difference being switching from selecting the <a-marker /> to <a-nft /> and a few commented out customization attempts in case it was an issue with string params, but using objects didn't make a difference.

I have included steps to run the project.
To enable the broadcaster role please use: https://agora-group-video-chat.herokuapp.com/

Please message me via twitter @hermes_f if you need me to provide an Agora AppID or you can register for a free one from https://console.agora.io <- this is not a solicitation, just offering. I am happy to provide one of my own IDs if you would prefer.

Please mention other relevant information such as the browser version, Operating System and Device Name
iPhone XS Max

What is the expected behavior?
The same behavior for both barcode and image trackers to display the 3D model with properties dynamically populated.

If this is a feature request, what is motivation or use case for changing the behavior?

@kalwalt kalwalt added bug Something isn't working enhancement New feature or request labels Apr 23, 2020
@kalwalt
Copy link
Member

kalwalt commented Apr 23, 2020

@digitallysavvy I'm not sure, but probably this is caused by the WebWorker used internally by the <a-nft>, I haven't tested your code, but this could be a source of the issue you are experimenting. But i can not be sure of this...

@digitallysavvy
Copy link
Author

I'm planning to push a major update to the repo above which adds a bunch of code that is not relevant to the bug so wanted to provide a branch with the less code that shows the issue https://github.com/digitallysavvy/AgoraARjs/tree/nft-marker-issue

@digitallysavvy
Copy link
Author

@kalwalt is there any way for me to test this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants