3D #4

Merged
oimwiodev merged 5 commits from 3D into main 2026-05-16 20:49:27 +01:00
Showing only changes of commit c6143d7d13 - Show all commits

View File

@@ -43,8 +43,11 @@ export default function GlassesModelSection({ t }: { t: Messages }) {
const resize = () => {
const { width, height } = wrap.getBoundingClientRect();
const pixelRatio = Math.min(window.devicePixelRatio || 1, 1.7);
const scale = width < 640 ? 0.5 : width < 1024 ? 0.68 : 0.9;
renderer.setPixelRatio(pixelRatio);
renderer.setSize(width, height, false);
group.scale.setScalar(scale);
group.position.y = width < 640 ? -0.44 : -0.34;
camera.aspect = width / Math.max(height, 1);
camera.updateProjectionMatrix();
};