Skip to content

feat(landing): stat coupons float like the main model with in-canvas 3D text#120

Merged
BSalaeddin merged 1 commit into
devfrom
feat/hero-3d-stats-float
Jul 25, 2026
Merged

feat(landing): stat coupons float like the main model with in-canvas 3D text#120
BSalaeddin merged 1 commit into
devfrom
feat/hero-3d-stats-float

Conversation

@BSalaeddin

Copy link
Copy Markdown
Collaborator

Feedback round 3 on the hero: the stat coupons now float with the same energy as the main model, and their numbers/labels are real in-canvas 3D text instead of flat DOM billboards.

What changed

  • Float: stat coupons bumped to the main card's float params (speed 2, rotation 0.2, float 0.45), plus a mild pointer-parallax on the whole stat row (~half the main card's) so they answer the mouse like the main model.
  • Text: replaced the drei <Html> billboards (which stayed screen-fixed while the mesh moved — the 'fakey, not part of the 3D' feel) with drei <Text> SDF type that sits ON the coupon face and inherits every float/parallax transform, with a soft dark outline-blur reading as printed ink.
  • Font: self-hosted public/fonts/Poppins-Bold.ttf (152 KB) — troika needs ttf/otf/woff and its default font is a CDN fetch we deliberately avoid. Requested only when the scene mounts (desktop + idle); never touches first paint, phones, or CI (reduced-motion renders posters).

Verified (local, real browser)

  • Light + dark: type tilts/moves with each floating coupon, count-up runs, themes retint.
  • Gates green: tsc, prettier, oxlint, eslint, knip, three-lazy-boundary + repo-integrity tests, full unit suite (406).

Dev only — no prod changes.

🤖 Generated with Claude Code

@BSalaeddin
BSalaeddin merged commit 91e43ba into dev Jul 25, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant