clarify applet logic
This commit is contained in:
parent
87b4aca21f
commit
a4b3564b57
1 changed files with 7 additions and 8 deletions
15
island.ts
15
island.ts
|
@ -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",
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue