Log inGet started
World

Red Dot Rising

Branchmain
Branchesmain
Commit3b5552605d

README.md

theme

The look of every screen in RED DOT RISING, in one place: the palette, the type scale, the motion helpers, and metrics().

metrics() reads ui.screenSize() afresh on every call and hands back the numbers a tree sizes itself from — a scale k taken from the SHORT axis of the live screen, a pad, a gap, a card width, and fs(n) / px(n) to put a design number through k. Nothing in the game is a pixel position chosen for one frame; that is what lets the same trees lay out at 810x1080, at 1920x1080 and on a phone held either way.

The palette is derived from Core.C so the HUD and the room agree on what red is. M.entrance(t, order, dy) and M.enter(style, ...) drive a card's entrance from Luau a frame at a time, because a one-shot CSS animation plays once per element ID and does not replay on a re-push of the same tree — and a card's tree is rebuilt every time the lit row moves. M.pulse stays declarative, because an infinite animation is the case that repeats.

local T = require("game.ui.theme")
local m = T.metrics()
{ type = "label", props = { text = "DAWN" }, style = T.kicker(m, T.CYAN, 11) }