Comments (8)
@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.
from artoolkit5-js.
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.
from artoolkit5-js.
@andypotato i created this gist as a starting point, if you have other resources let me know.
from artoolkit5-js.
@kalwalt @MikiDi I have updated the documentation to better describe the interface. Examples will follow!
from artoolkit5-js.
@andypotato great! Thank you very much!
from artoolkit5-js.
Thank you @andypotato i will try it! and can't wait for NFT .... 😄
from artoolkit5-js.
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:
andypotato/artoolkit5-js-demo#29 (comment)
from artoolkit5-js.
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.
Shouldn't artoolkit be able to natively handle all kinds of resolutions from 640x480 to 480x640 and beyond?
Thank you for all your sweat and thoughts that have flown into this.
from artoolkit5-js.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from artoolkit5-js.