Log inGet started
Package

shapes.module

Newest version

README.md

game/workpieces/shapes

The four workpieces as voxel bodies, built from the reference pictures.

build(def, seed) takes one entry of Config.workpieces.types and answers { nx, ny, nz, cells, tones, solid, kind, material }, where cells is a flat array indexed (x * ny + y) * nz + z + 1 holding a tone index and tones is the palette those indices name.

  • pine — a rough-sawn 40 cm block: straight grain up the sides, sawn end grain with a ring pattern on top, one knot on the front face, corners knocked off, a couple of pencil marks.
  • log — a bark-stripped trunk lying along X: round section that swells and knots, bark ribbons down the upper flank, sawn ends, a fresh notch on top.
  • ice — a 40 cm cold blue-green block: cloudy fractures, a refracted core, frosted top course, chipped arrises.
  • plank — an 80 × 8 × 14 cm sawn oak plank: lengthwise grain streaks, dark edges, pale sawn ends.

Every build is seeded, so the same seed gives the same piece.