From a8a5ad829b800f50a5b69f61ef65e5c714e27edd Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 30 Aug 2026 22:14:11 -0700 Subject: Hat fitting, round two: the six whose art carries less bottom padding come down ten points (crown and wizard stay perched), and the whole rack rides five percent left of center — dead-center read as drifting off the head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01MrkLsNScXe9b6BviUSdmMr --- src/features/hats.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/features') diff --git a/src/features/hats.js b/src/features/hats.js index 57cd186..6d6b629 100644 --- a/src/features/hats.js +++ b/src/features/hats.js @@ -28,7 +28,7 @@ const ADMIN_PK = '98ae4da926c471c23fd12d1ebdd5839ba82917baa618e184e0c9916d93dcf4 const svg = (inner) => `${inner}`; const HATS = [ { - id: 'beanie', nameKey: 'hatBeanie', sat: 21, w: 92, b: 98, r: -8, + id: 'beanie', nameKey: 'hatBeanie', sat: 21, w: 92, b: 88, r: -8, art: svg(` @@ -36,7 +36,7 @@ const HATS = [ `), }, { - id: 'trucker', nameKey: 'hatTrucker', sat: 2100, w: 106, b: 88, r: -6, + id: 'trucker', nameKey: 'hatTrucker', sat: 2100, w: 106, b: 78, r: -6, art: svg(` ₿ @@ -45,7 +45,7 @@ const HATS = [ `), }, { - id: 'cowboy', nameKey: 'hatCowboy', sat: 21000, w: 122, b: 88, r: -7, + id: 'cowboy', nameKey: 'hatCowboy', sat: 21000, w: 122, b: 78, r: -7, art: svg(` @@ -53,21 +53,21 @@ const HATS = [ `), }, { - id: 'fedora', nameKey: 'hatFedora', sat: 21000, w: 118, b: 90, r: -8, + id: 'fedora', nameKey: 'hatFedora', sat: 21000, w: 118, b: 80, r: -8, art: svg(` `), }, { - id: 'bowler', nameKey: 'hatBowler', sat: 210000, w: 104, b: 90, r: -7, + id: 'bowler', nameKey: 'hatBowler', sat: 210000, w: 104, b: 80, r: -7, art: svg(` `), }, { - id: 'top', nameKey: 'hatTop', sat: 210000, w: 96, b: 92, r: -7, + id: 'top', nameKey: 'hatTop', sat: 210000, w: 96, b: 82, r: -7, art: svg(` `), @@ -89,7 +89,9 @@ const HATS = [ }, ]; const hatById = (id) => HATS.find((x) => x.id === id) || null; -const posStyle = (hat) => `width:${hat.w}%;bottom:${hat.b}%;transform:translateX(${-50 + (hat.dx || 0)}%) rotate(${hat.r}deg)`; +// -55, not -50: every hat rides a couple of pixels left of center — +// the art leans right and dead-center read as drifting off the head. +const posStyle = (hat) => `width:${hat.w}%;bottom:${hat.b}%;transform:translateX(${-55 + (hat.dx || 0)}%) rotate(${hat.r}deg)`; export function hatsFeature(ctx) { const { h, ui, render, wallet, hook, toast, brandHeader } = ctx; -- cgit v1.2.3