Log inGet started
Package

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 carries creased (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; backFaces gives a two-sided sheet its back face on its own vertices
  • bake(name, opts, folder?) - writes mesh assets <name>_top/_rock/_roots/_<slot> and returns refs for placeBaked
  • placeBaked(parent, name, baked, position?, collider?) - spawns a baked island with colliders
  • surfaceY(opts, x, z) -> (y, edgeT) - walkable top height at island-local x, z; edgeT 0 centre, 1 rim, >1 off
  • radiusAt(opts, theta) - rim radius of the main part at an angle
  • scatter(opts, count, seed?, maxEdge?, spacing?) - walkable spots for props and spawn points
  • isOnTop(opts, x, z, margin?), parts(opts), material(name), look(name), lookNames(), shapes