Commit f2bf1cf
Restore hover-sprite behavior in super-keyboard key color plane
The supermedium-sync in 8456119 dropped two pieces that are required
for keyboards that ship a hover sprite (our `superkeyboard` model
does — `keyboard-hover.png`):
1. Setting `src: hoverImg` on the color plane material (normal
blending, sampled texture) instead of the additive-solid-color
glow.
2. UV manipulation so the per-key plane samples only that key's
region of the sprite. Since modern three.js replaced
`geometry.faceVertexUvs` with BufferGeometry, switch to
`texture.offset` + `texture.repeat` which gives the same result.
Without this, the hover plane was drawn as a flat white (or
`keyHoverColor`) rectangle on top of each key — an opaque white
square with the letter erased behind it.
The additive-glow path is preserved for keyboards without a hover
sprite, and setAttribute declares `blending: 'additive'` directly
instead of relying on a componentinitialized listener (which now
fires synchronously and was being attached too late).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 7069176 commit f2bf1cf
1 file changed
Lines changed: 23 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
267 | 268 | | |
268 | 269 | | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
278 | 286 | | |
279 | 287 | | |
280 | 288 | | |
| |||
307 | 315 | | |
308 | 316 | | |
309 | 317 | | |
310 | | - | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
311 | 327 | | |
312 | 328 | | |
313 | 329 | | |
| |||
0 commit comments