More Barcode types and nftMarker struct to get NFT data #469
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Add more support for Barcode markers 5x5 and 6x6 types and will also let loading important NFT marker informations/data.
Can it be referenced to an Issue? If so what is the issue # ?
See issues #37 and #4 and PR AR-js-org/artoolkit5-js#17 and for what concern nftData see old PR #114
How can we test it?
In the
minimal_ES6.html
example change the type to marker 5x5, generate a 5x5 barcode n. 0 with https://au.gmented.com/app/marker/marker.php point your device and a cube will appear.Test the threejs/examples/nft.html example for the automatic repositioning. You will find in the example code the new eventListener
arjs-nft-init-data
.Summary
AR.js is based on ARToolkit5 code ported to WebAssembly, but some barcode types weren't added as constants to artoolkit5-js. These new constants now are added and we can import into AR.js. Probably we can add other types, (and maybe i will add them), but i can't say about their characteristics or say if they perform better in comparison to other yet implemented.
EDIT: These are the Barcode types implemented with this PR:
About the nft Data: it is possible to obtain the NFT's basic informations reading from the set of
.iset .fset .fset3
files, data likedpi
width
andheight
. These can be useful for an automatic reposition of the model onto the image target.Does this PR introduce a breaking change?
It shouldn't but i will make some test.
Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
For now only tested on a desktop PC running OpenSuse.
Other information