Architecture · Lightsquare
How a move reaches the screen
Lightsquare: how a move reaches the screen
The app and the player's finger both change one state object; a reconciler writes only what changed into the board's layers, and the browser animates the moved pieces without any script running per frame. Optional modules join the same update.
CONFIG
EVENTS
SET
CHANGES
WRITES
TRANSFORMS
INTENTS
UPDATE
APP
Your app
any page, any framework
CORE
API
set · move · destroy
CORE
State
one plain object
CORE
Reconciler
writes only what changed
DOM
Layers
squares, pieces, shapes
CORE
Input
tap, drag, premove
OPT
Modules
arrows, promotion, a11y
GPU
Browser compositor
slides the pieces
no script runs per frame
LEGEND
where the design turns
every change
optional, or back to the app
handed to the browser
imported only if used