I display it on safari on iPhone 12 pro (iOS15.5) and rotate it,
it seems that there is a margin in the iframe and div camera.
You can check the behavior with the following Editor and the actual iPhone 12 pro.
https://playcanvas.com/editor/scene/1538425
I tried adding a correction value to the innerHeight value of the resize function, but it didn’t seem to fix it well.
function onWindowResize(){
self._width = window.innerWidth;
self._height = window.innerHeight;
self._widthHalf = self._width / 2;
self._heightHalf = self._height / 2;
self._stageElement.style.width = self._width + 'px';
self._stageElement.style.height = self._height + 'px';
for(var i = 0;i < self._cameraElements.length;i++) {
self._cameraElements[i].style.width = self._width + 'px';
self._cameraElements[i].style.height = self._height + 'px';
}
}
onWindowResize();
window.addEventListener("resize", onWindowResize, false);
Any suggestions on how to fix this?