Created
September 18, 2014 02:07
-
-
Save mrdoob/f2ccd368ff773752634e to your computer and use it in GitHub Desktop.
Workaround for Safari/iOS8 oversized innerWidth/innerHeight on threejs.org/examples/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( /(iPad|iPhone|iPod)/g.test( navigator.userAgent ) ) { | |
viewer.addEventListener( 'load', function ( event ) { | |
viewer.contentWindow.innerWidth -= 10; | |
viewer.contentWindow.innerHeight -= 2; | |
} ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment