feat: refine responsive hero and preference dropdowns

This commit is contained in:
2026-08-15 18:53:54 +08:00
parent af296d674f
commit 073a739f10
3 changed files with 156 additions and 66 deletions
+6 -1
View File
@@ -783,7 +783,12 @@ if (root && canvas) {
const aspect = width / height;
worldCamera.aspect = aspect;
worldCamera.fov = aspect < 0.75 ? 38 : 33;
// Keep the prism's authored scale on ultrawide displays. The
// background can fill the full canvas, but the 3D composition
// should not become disproportionately small as the viewport
// gets wider than the original desktop frame.
const compositionAspect = Math.min(aspect, 2.25);
worldCamera.fov = aspect < 0.75 ? 38 : (aspect > 1.8 ? 33 * 1.8 / compositionAspect : 33);
worldCamera.updateProjectionMatrix();
if (aspect > 1.1) {
worldRoot.position.set(Math.min(1.92, aspect * 1.15), -0.02, 0);