From 812b4640e202e827fd9bcff7040792fcba2e3d35 Mon Sep 17 00:00:00 2001 From: hypercross Date: Mon, 10 Aug 2026 12:24:43 +0800 Subject: [PATCH] feat(web): clamp tabletop camera to the horizon Add a maxPolarAngle prop to Scene and use it in the tabletop view so the camera can't dip below the table and peek under face-down cards. --- apps/web/src/components/tabletop/TabletopScene.tsx | 3 +++ apps/web/src/components/viewers/Scene.tsx | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/web/src/components/tabletop/TabletopScene.tsx b/apps/web/src/components/tabletop/TabletopScene.tsx index b89c534..4e6703a 100644 --- a/apps/web/src/components/tabletop/TabletopScene.tsx +++ b/apps/web/src/components/tabletop/TabletopScene.tsx @@ -56,6 +56,9 @@ export default function TabletopScene({ enablePan fullscreen shadowScale={shadowScale} + // Keep the camera above the table so face-down cards can't be peeked + // from below. π/2 clamps the polar angle at the horizon. + maxPolarAngle={Math.PI / 2} overlay={