Closed ghost closed 4 years ago
It could be a bug introduced with this change: https://github.com/jeromeetienne/AR.js/commit/788d27310cb89be906506a7abbdbfd593a9303ac#diff-18f0a7b3260cc3d69ec53e05b9227d6bL244
don't mind all the modifies, the snippet interested is at line 244
//////////////////////////////////////////////////////////////////////////////
// Code Separator
//////////////////////////////////////////////////////////////////////////////
// TODO this is crappy - code an exponential backoff - max 1 seconds
// KLUDGE: kludge to write a 'resize' event
var startedAt = Date.now()
var timerId = setInterval(function(){
if( Date.now() - startedAt > 10000*1000 ){
clearInterval(timerId)
return
}
// onResize()
window.dispatchEvent(new Event('resize'));
}, 1000/30)
},
I guess removing this cause an error. strange.
the bug for which we introduced that fix was: https://github.com/jeromeetienne/AR.js/issues/574
@cconnor12345 in the meantime you can use older version, they do not have this bug @kalwalt what do you think about that?
@nicolocarpignoli at the moment i have no idea. But could be interesting to see if this happens even on Smartphone devices.
on smartphones the only possible resize is changing landscape to portrait and back, have to test this
Tested this on two different devices, been driving me mad for the past hour.
1.7.7 works fine, 1.7.8 forces resize/orientation change etc. for the marker to get detected and display contents. Even the Codepen example is using 1.7.5 (aframe ar).
I have very poor time this days. I can switch back to version 1.7.7 on Master but the resize event bug will pop up again doing that. I don't know, in the meantime the most stable version is 1.7.5 and 1.7.7, I suggest using them for now
ok try again please. Now I reverted back modifies. YOu can use version 1.7.8 that now should be stable. It contains the performances problems tho. When I will have time I can look for it again. For now, it's important to have a stable version as latest version and on master branch
Describe the bug With the latest release, when you resize the window from responsive to anything else such as the iPhone x and refresh, the marker will no longer recognise. It will only recognise when you go back to responsive and expand the window.
To Reproduce
Desktop (please complete the following information):