clarify applet logic

This commit is contained in:
Tangent Wantwight 2024-01-13 10:09:33 -05:00
parent 87b4aca21f
commit a4b3564b57
1 changed files with 7 additions and 8 deletions

View File

@ -195,6 +195,13 @@ function renderIslands(islands: IslandGrid, cx: CanvasRenderingContext2D) {
}
export function IslandApplet() {
// STATE
let timerId: number;
let islands = new IslandGrid(WIDTH, HEIGHT, DEFAULT_SEED);
// UI
const [canvas, cx] = canvas2d({
width: WIDTH * BLOWUP,
height: HEIGHT * BLOWUP,
@ -203,14 +210,6 @@ export function IslandApplet() {
const seedInput = h("input", { type: "number", valueAsNumber: DEFAULT_SEED });
const seedLabel = h("label", {}, "Seed:", seedInput);
// STATE
let timerId: number;
let islands = new IslandGrid(WIDTH, HEIGHT, DEFAULT_SEED);
// CONTROLS
const generateButton = h(
"button",
{