islands.module
This package holds more than this page lists. See all of its files in its world.
README.md
islands
The floating-island generator behind Floating Island Forge: turns options (look, shape, radius, depth, seed, stretch, bumps, hanging, roots, crags, debris, dressing) into mesh geometry, deterministic per seed. Called by the FloatingIsland component at runtime and by game code at build time.
geometry(opts)-{ top, rock, roots, extras = { [slot] = geometry }, materials, pivots, look, shape }; every triangle is wound to agree with its vertex normals, and each geometry carriescreased(rock triangles given their own face-normal vertices at a crag fold)newBuf(),vtx,tri,quad,backFaces(buf),finish(buf, flat?)- the mesh-buffer helpers the dressing builds with;backFacesgives a two-sided sheet its back face on its own verticesbake(name, opts, folder?)- writes mesh assets<name>_top/_rock/_roots/_<slot>and returns refs forplaceBakedplaceBaked(parent, name, baked, position?, collider?)- spawns a baked island with colliderssurfaceY(opts, x, z)->(y, edgeT)- walkable top height at island-local x, z; edgeT 0 centre, 1 rim, >1 offradiusAt(opts, theta)- rim radius of the main part at an anglescatter(opts, count, seed?, maxEdge?, spacing?)- walkable spots for props and spawn pointsisOnTop(opts, x, z, margin?),parts(opts),material(name),look(name),lookNames(),shapes