-
Notifications
You must be signed in to change notification settings - Fork 11
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
examples code #2
Comments
@andypotato i created this gist as a starting point, if you have other resources let me know. |
@andypotato great! Thank you very much! |
@kalwalt @MikiDi I pushed a very detailed example on how to use this library with Three.js here: https://github.com/andypotato/artoolkit5-js-demo/ Also I have a bit of time now so I will implement the remaining NFT features and add a couple of demos. |
Thank you @andypotato i will try it! and can't wait for NFT .... 😄 |
Now that NFT markers are available more example code should be created. I'll add some examples to the demo repository but other contributions are welcome. |
I just had a look at the demo repository because I have troubles with getting the transformation matrices right in portrait orientation. The demo project unfortunately suffers from the same problem: |
I found a workaround which looks like this // on every resize
if(screenRatio < 1) {
arController.orientation = 'portrait'
mat4.mul(projectionMatrix, correction, cameraMatrix)
} else {
arController.orientation = 'landscape'
mat4.copy(projectionMatrix, cameraMatrix)
} where the correction appied in case of portrait orientation is a 90 degree rotation around Z let correction = mat4.create()
mat4.fromZRotation(correction, Math.PI / 2) I think that compensates the rotation made when copying into the heap here: artoolkit5-js/src/ARController.js Lines 1332 to 1336 in 01cbc81
But yea, it adds to the complexity of this already quite complex topic of ar. Thank you for all your sweat and thoughts that have flown into this. |
Hi Andreas, i was testing your repo and i'm wondering if you have some example code to share, It will be very appreciated! 🙂
The text was updated successfully, but these errors were encountered: