유대선
프로젝트로
·기술 회고·5

PixiJS v8 WebGL effects (DR-17) and the additive-overlay lesson (DR-18)

A PixiJS v8 WebGL effect engine and /pixi-test harness wired into both PvP and vs-AI matches — plus the day's hard lesson: the first integration replaced the dynamic KiAuraArena and silently deleted its character motion, so it was reverted and re-done as an additive transparent overlay (DR-18: enhance = compose, not replace).

A single day (2026-06-07) that pushed the battle arena's effects ceiling onto the GPU — and then taught me the difference between adding a layer and replacing a working component the expensive way.

What

The DOM/CSS arena (KiAuraArena, framer-motion + a few dozen divs) had a hard visual ceiling: tens of animated elements, CSS blur glow that's expensive, and no path to thousands of additive particles or GPU filters (shockwave, bloom, RGB-split). DR-17 was the decision to render only the battle arena with PixiJS v8 (WebGL) while keeping React for all UI.

The same day produced DR-18: a retrospective on how the first integration went wrong. I read "add spectacular effects" as "rewrite the arena," replaced KiAuraArena with a static-PNG PixiBattleArena, and silently lost the character motion the old component owned. The fix was to make the WebGL effects an additive transparent overlay layered over the original KiAuraArena.

Changes

Why

DR-17's core argument is that two axes are independent and were being conflated: how you draw (DOM < Canvas < WebGL < native engine) versus how you ship (web < PWA < Capacitor < native). "Install / app store" is packaging and doesn't change the graphics ceiling; the ceiling is on the draw axis, and WebGL is the jump there.

A game engine (Unity/Godot) was rejected on two counts from the trade-off table: WKWebView has no WebGPU and the WASM bundle is a mobile-load liability (so it breaks the "one codebase → web + PWA + app stores" goal), and a turn-based 1v1 needs no physics/3D/scene-graph — its asset reuse would be 0%. PixiJS WebGL runs identically across web, PWA, and Capacitor and reuses all the existing React/TS + PNG assets. PixiJS is a renderer, not a game engine — that's exactly why it fits: take the lightest tool that clears the ceiling.

A readability decision rides along: action effects keep a unified shape (so players read "that was an attack" instantly in a fast RPS-style game) with identity coming from a per-character color tint; the bespoke spectacle lives in the match-end finisher — the fighting-game convention that normals read clean and only the super is bespoke.

Decisions

Notes