Documentation

Compose, walk, and edit procedural 3D worlds in React Three Fiber.

⌖ Explore the library in 3D →

intro

  • What is Runek? — A source registry of procedural 3D components for React Three Fiber — shadcn for 3D worlds.

guide

  • Getting started — Pull components into your project with the CLI and compose your first walkable world.
  • The World provider — <World> sets up the canvas, lighting, physics, and controls — every component lives inside it.
  • The component contract — Every Runek component is a pure, deterministic function of its props — here are the rules.
  • Seeded determinism — Same seed → same world, on every machine and every render. The seeded RNG and its helpers.
  • Units & colliders — One unit is one meter; colliders track gameplay surface, not visual detail.
  • Worlds as data — Because every component is a pure function of props, a whole world serializes to plain JSON.

component

  • Bookshelf — Procedurally generated bookshelf with seeded books and one cuboid collider.
  • Chair — Chair with seat, back, and legs.
  • Door — Door panel within a frame.
  • Floor — Flat floor slab with a fixed collider.
  • Grass — Instanced grass blades (seeded scatter).
  • House — Composed dwelling: walls with openings, floor, roof, door, and windows.
  • Lake — Procedural animated-shader water surface (no textures).
  • Lamp — Lamp that emits a point light.
  • LightRig — Sun + hemisphere/ground fill with shadow configuration.
  • Player — First/third-person character controller (ecctrl wrapper).
  • Rocks — Faceted rocks with convex-hull colliders (seeded scatter).
  • Roof — Flat or gable roof.
  • Room — Four walls + floor with a doorway and fixed colliders; optional roof.
  • Rug — Procedural striped rug (seeded stripes, no textures).
  • Shelf — Wall shelf with planks.
  • Shore — Sloped beach/shore strip to meet a Lake.
  • Sky — Procedural atmosphere (drei Sky).
  • Staircase — Stepped staircase with per-step colliders.
  • Table — Table with a top and four legs.
  • Terrain — Procedural fbm-displaced ground with a matching trimesh collider and a flat build-pad option.
  • Trees — L-system trees grown by a 3D turtle, deterministic from seed.
  • Wall — Wall segment with door/window openings and a fixed collider.
  • Window — Window with frame and translucent pane.

reference

  • CLI reference — runek init / add / list — pull editable component source into your project.