Skip to content

Commit 8e58343

Browse files
committed
aspect fix
1 parent d499bc8 commit 8e58343

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/components/hero/index.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ void main() {
113113
const updateSize = () => {
114114
const height = isMobile() ? MOBILE_HEIGHT : DESKTOP_HEIGHT;
115115
renderer.setSize(window.innerWidth - 32, window.innerHeight - height);
116-
camera.perspective({ aspect: gl.canvas.width / gl.canvas.height });
116+
camera.perspective({
117+
aspect: (gl.canvas.width + 32) / gl.canvas.height
118+
});
117119
};
118120

119121
window.addEventListener("resize", updateSize);

0 commit comments

Comments
 (0)