Skip to content

Instantly share code, notes, and snippets.

@RenaudRohlinger
Created March 28, 2020 09:40
Show Gist options
  • Save RenaudRohlinger/6b44e3832798c14209735db318571c99 to your computer and use it in GitHub Desktop.
Save RenaudRohlinger/6b44e3832798c14209735db318571c99 to your computer and use it in GitHub Desktop.
function resize () {
renderer.height = window.innerHeight;
renderer.width = window.innerWidth;
renderer.setSize(renderer.width, renderer.height);
camera.aspect = renderer.width / renderer.height;
camera.updateProjectionMatrix();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment