-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
Multi NFT feature #199
Multi NFT feature #199
Conversation
- kuva marker is tracked!
Most of the examples (80%) now works with the new code. I think i have to improve the getNFTData listener, not sure if it works correctly with the new code. |
I created the initWithEntities function to initialize ARnft with an object that help a little bit the user/dev. An Entity is composed by a unique name and the marker Url associated, see the interface in ARnft.ts: interface Entity {
name: string,
markerUrl: string
} if you want to access the name of the first Entity, you can get it with entity[0].name. I added also the getEntities method to retrieve the entities property object. I will add more function in a near future.
I will add It to the to do list. |
- return if the loader.parenElement is null!
i think that this is ready to be merged in the dev branch now, i will update the information on the top of PR. |
Multi NFT feature
This PR will add the multi NFT feature to ARnft. A simple example is provided see arNFT_multi_example.html. It load 3 NFT markers. But i think it can load much more. ARnft will create a separate WebWorker for every marker, each Worker will dispatch an event with the matrix information for every NFT marker detected and tracked. During initialization the user/dev must provide for every NFT marker, via the init() function or with entities with the initWithEntities() function see a44d437, a uniqe name for every NFT marker added.
Note: if you are using a previuos ARnft version, probably you must make some changes in your code and use the newest ARnftThreejs provided (not yet merged) in the examples.
In detail, related to ARnft-threejs there are changes in the add, addModel, addVideo, addImage functions. objVisibility is now an option of these methods, is not required to add an entry to the config.json file. more info about Arnft-threejs in the PR webarkit/ARnft-threejs#12
This is the to do list:
change dispose() and disposeNFT(): they should dispose all the NFTworkers and give also the option to dispose one single NFTWorker in the array.they works but i will improve in a separate PR.at NFTWorker.ts:167