-
Notifications
You must be signed in to change notification settings - Fork 952
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
Removing nft version in the build libs #407
Conversation
version |
worker can't load and continue loading resources with this commit 814435d So someting wrong when adding the event listener or initializig the arContext. |
if i remove this code from arjs-session.js: window.addEventListener('arjs-video-loaded', function () {
arContext.init(() => {
arContext.arController.orientation = getSourceOrientation();
arContext.arController.options.orientation = getSourceOrientation();
})
})
function getSourceOrientation() {
console.log(_this);
if (!_this) {
return null;
}
console.log(
'actual source dimensions',
arSource.domElement.clientWidth,
arSource.domElement.clientHeight
);
if (arSource.domElement.clientWidth > arSource.domElement.clientHeight) {
console.log('source orientation', 'landscape');
return 'landscape';
} else {
console.log('source orientation', 'portrait');
return 'portrait';
}
} The worker start to load all the resources, |
- new arjs-session-nft.js - double build libs for aframe
github actions fails, i think an issue with npm? or i missed something? |
from twitter: https://twitter.com/githubstatus/status/1504526048591073293?s=20 seems some problems with github action |
Now the action script run successfully the test script! |
a66a967
to
4c73595
Compare
The README file need to be updated about which lib files to use for the different namespaces and nft or if location based or not. Will do this as well. |
@nickw1 i will merge this as it will fix some important bugs and add prettier to format the code. When it will be merged we need to test if formatting works when every commit is created. We need also to format code after this PR. Prettier will format the code only .js files for now. We can include also other types (.css html md) but we can do in another step. Probably we can change the prettier configuration, to format the code in a better way, if you have some suggestions let me know. |
@kalwalt ok looks good. No suggestions just yet but will see what results the code formatting produces. |
I think we need to update also the AR-js-docs because are not updated with the latest changes. |
What kind of change does this PR introduce?
This PR will remove the double build libs (with or without nft extension). Because an issue with aframe image tracking this will be done only for threex and ar.js namespace.
Can it be referenced to an Issue? If so what is the issue # ?
see #402
How can we test it?
This still a WIP.
Summary
Does this PR introduce a breaking change?
For threex code if you want to use nft markers, you will import the
ar-threex.js
build lib instead ofar-threex-nft.js
. That's all.Please TEST your PR before proposing it. Specify here what device you have used for tests, version of OS and version of Browser
Tested on desktop Ubuntu 20.04.
Other information
This PR also add prettier to format the code and a simple github action script to test linting. Husy with lint-staged to format the code when a new commit is created to enforce code styling.