923 B
923 B
js/render/ — agents.md
Module map: MODULES.md; runtime model: architecture.md.
Self-contained module. Exports ISLE_RENDERER = { Renderer, VIEW_W, VIEW_H }.
new Renderer(canvas, { onEvent })— pure draw:draw(ctx, state)renders whatever the physics state contains (blocks, enemies, birds, sling, HUD-ish scenery, popups). It never mutatesstate.- VIEW_W/VIEW_H (1280x720) mirror physics constants VIEW — keep them in sync; the camera lives in state (set by physics/camera), render only applies it.
- S-3/S-5 (RC-375D84, landed):
drawBlockrotates about the block COM whenbl.angis set (no-op atang=0, so un-tipped blocks draw identically to the pre-S-3 output), anddrawBirdrenderslandedbirds as live bodies alongside thespentcorpses. The DOM-stub test only checks that drawing does not throw and that the sling band stops tracking a launched bird (bug #14 arm).