Created
June 9, 2015 13:18
-
-
Save gidili/57b14da1d47c410209e6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// Resize canvas when the user manually resizes window | |
window.addEventListener('resize', function () { | |
var width = $container.width(); | |
var height = $container.height(); | |
camera.aspect = (width) / (height); | |
camera.updateProjectionMatrix(); | |
renderer.setSize(width, height); | |
render(); | |
}, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment