Commit 978ccc6
claude:design: invert hero canvas — full-viewport field, brighter rune, gradient-faded edges
Reworks the HeroRuneCanvas from a small centered sprite into a
full-screen ASCII wave with the Stakecore mark embedded as a
brighter silhouette. Five linked changes:
1. Canvas geometry (hero.scss). The .hero-rune-canvas now spans
`position: absolute; top: 0; left: 0; width: 100%; height: 100vh`
instead of a 360-480px centered square. Still hidden below md
to spare mobile devices the work.
2. Inverted colouring (hero.tsx drawFrame). Previously the wave
only modulated cells INSIDE the rune silhouette; now every cell
participates and the silhouette flips the fillStyle: cells
outside the mark render in the original #6B6B6B gray, cells
inside switch to #FFFFFF, so the rune reads as a lighter ASCII
shape embedded in a dimmer field. Drawn as two passes per frame
to keep fillStyle constant within each pass.
3. Aspect-preserving rune sprite (hero.tsx rasterize). With the
canvas now full-viewport, blindly drawing the SVG into the full
`cols × rows` buffer would stretch the mark horizontally on
landscape (and squish it on portrait). Instead, rasterize into
a centred sprite sized at 55% of the shorter grid axis,
preserving the 340:380 SVG aspect ratio.
4. Top + bottom gradient fade. CSS mask-image
`linear-gradient(to bottom, transparent 0%, black 25%, black 75%,
transparent 100%)` keeps the middle 50% of the canvas (where the
rune sits) at full opacity and softly fades both the top and
bottom edges into the page background, so the wave doesn't cut
off hard at the hero's overflow boundary.
5. Wave-speed dial-down (hero.tsx tick). Per-frame phase increment
drops from `dt * 0.003` to `dt * 0.002` — wave advances ~33%
slower. Frame rate (12fps throttle) unchanged.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 75aeb19 commit 978ccc6
2 files changed
Lines changed: 67 additions & 47 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | 39 | | |
41 | 40 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
119 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
120 | 123 | | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
123 | 137 | | |
124 | | - | |
125 | | - | |
| 138 | + | |
| 139 | + | |
126 | 140 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
135 | 152 | | |
136 | 153 | | |
137 | 154 | | |
| |||
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
146 | | - | |
147 | 163 | | |
148 | 164 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
168 | 189 | | |
169 | 190 | | |
170 | 191 | | |
| |||
188 | 209 | | |
189 | 210 | | |
190 | 211 | | |
191 | | - | |
| 212 | + | |
192 | 213 | | |
193 | 214 | | |
194 | 215 | | |
| |||
0 commit comments