Devlog
Working notes on Phaser 4, TypeScript and Vite. Written when there is something worth writing down, not on a schedule.
Astro scoped CSS silently skips child components
Astro adds a scope id to every compound selector, so .foot__links a misses an anchor rendered by a child component. Ours fell from a 44px tap target to 16px.
Your clip-path is eating your drop-shadow
CSS applies filter before clip-path, so a drop-shadow on a clipped element is generated and then clipped away. In Chrome it renders identically to no filter.
A Phaser loading screen can't cover its own bundle
A Phaser loading screen ships inside the bundle it would cover, so it can't paint until that bundle has. Measured — 72ms to an inline splash, 601ms to handover.
Two Vite defaults that break only after upload
Vite emits root-absolute asset paths, which 404 from a portal subpath, and copies public/ wholesale, so 1.89 MB of flag-disabled audio ships anyway.
A target-size fix that WCAG didn't require
A 15px breadcrumb link looks like a WCAG 2.2 SC 2.5.8 failure at 24x24. Measured, its exceptions rescue it — and the AAA criterion is the stricter test.
Phaser 4 sizes the canvas mid-rotation
Phaser 4.1.0 measures the viewport inside its orientationchange handler, mid-rotation, then caches the correct rect — which blocks its own recovery path.
Phaser drops pointerup if you release off-canvas
Phaser routes an up event to pointerup only when pointer.upElement is the canvas. Miss pointerupoutside and a drag that leaves the canvas freezes, silently.
Phaser's Scale.RESIZE can't use device pixels
In Phaser 4.1.0, Scale.RESIZE overwrites gameSize with the parent's CSS-pixel size on every refresh, so the canvas can never track the device pixel ratio.
Phaser 4 reuses the scene across restart()
Phaser reuses the scene instance across restart(), so TypeScript field initializers run once while create() runs many times. Stale state accumulates.
Phaser's setFont() splits the family on spaces
Phaser 4.1.0's setFont() parses a font string with split(' ') and keeps three tokens, so setFont('bold 24px Cook Line Font') sets the family to "Cook".
Phaser 4's volume setter isn't broken
In Phaser 4.1.0 the WebAudioSound volume setter looks dead because the write doesn't read back. Skip it and your music returns 3.13x too loud on resume.