Skip to content

Commit c9b77fc

Browse files
author
Avaer Kazmer
committed
Update aspect ratio on resize in avatars demo
1 parent e06c564 commit c9b77fc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

vrarmik.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,6 +1259,11 @@ <h3>Multiplayer</h3>
12591259
url: modelUrl,
12601260
}));
12611261
})();
1262+
1263+
window.addEventListener('resize', e => {
1264+
camera.aspect = window.innerWidth / window.innerHeight;
1265+
camera.updateProjectionMatrix();
1266+
});
12621267
</script>
12631268
</body>
12641269
</html>

0 commit comments

Comments
 (0)