Skip to content

Commit

Permalink
replacing with the client sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
kalwalt committed Feb 9, 2022
1 parent 814435d commit 2522fdc
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 49 deletions.
16 changes: 6 additions & 10 deletions aframe/build/aframe-ar-nft.js

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions aframe/build/aframe-ar.js

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions three.js/build/ar-nft.js

Large diffs are not rendered by default.

16 changes: 6 additions & 10 deletions three.js/build/ar.js

Large diffs are not rendered by default.

14 changes: 5 additions & 9 deletions three.js/src/new-api/arjs-session.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,8 @@ const Session = function(parameters){
window.addEventListener('arjs-video-loaded', function () {
arContext.init(() => {

arContext.arController.orientation = getSourceOrientation();
arContext.arController.options.orientation = getSourceOrientation();
//arContext.arController.orientation = 'landscape';
//arContext.arController.options.orientation = 'landscape';
//arContext.arController.orientation = 'portrait';
//arContext.arController.options.orientation = 'portrait';
arContext.arController.orientation = getSourceOrientation();
arContext.arController.options.orientation = getSourceOrientation();

})
})
Expand All @@ -109,11 +105,11 @@ const Session = function(parameters){

console.log(
'actual source dimensions',
arSource.domElement.videoWidth,
arSource.domElement.videoHeight
arSource.domElement.clientWidth,
arSource.domElement.clientHeight
);

if (arSource.domElement.videoWidth > arSource.domElement.videoHeight) {
if (arSource.domElement.clientWidth > arSource.domElement.clientHeight) {
console.log('source orientation', 'landscape');
return 'landscape';
} else {
Expand Down

0 comments on commit 2522fdc

Please sign in to comment.