Closed marcusx2 closed 1 year ago
Apparently this bug was already reported here. Will it be fixed? This is a pretty big deal...I can't use mindarjs in production like this.
@hiukim Any thoughts on this? Will it be fixed, or are there currently no plans to fix it?
Yes, currently it will break if device changes orientation. I agree it needs to be handled. I will look into it when I have some free time.
@hiukim Will this be fixed soon? ;_;
@marcusx2 sorry, unlikely. At least not these two weeks. Busy with work lately.
Is there any workaround while this isn't fixed?
@marcusx2 try this:
window.addEventListener('orientationchange', () => {
//stop mindar
mindar.stop()
//ur function to hide 3D object (optional)
//restart mindar after 1 second delay
setTimeout(()=>{
mindar.start()
}, 1000)
}, false)
Not the most elegant way, but as a temporary solution it may help.
P.S. I know, this is deprecated event, but it still work on iOS 16. So we can use that until @hiukim not fix this bug
@arslc Thanks this is a good enough workaround, it works just fine!
@marcusx2 Glad it helped :) @hiukim Probably should be closed issue?
@arslc I don't think it should be closed. I think we should be able to rotate the phone without having to stop and start the AR engine again. This is still just a workaround in my opinion.
fixed in v1.2.2
If I switch the orientation on the phone from portrait to landscape and vice versa, the augmented content disappears permanently.