▣
module · drop-in viewer
shapes
The geometry the moor is dressed with, written into one accumulator and handed back as a single merged mesh — so a hundred stones and bushes are one draw call and one material, with each object's colour riding in the vertex stream.
by·posted 1mo ago
What it does
shapes
The geometry the moor is dressed with, written into one accumulator and handed back as a single merged mesh — so a hundred stones and bushes are one draw call and one material, with each object's colour riding in the vertex stream.
Faces are emitted FLAT (a normal per triangle), which is what gives the low-poly read.
local S = require("game.world.shapes")
local acc = S.acc()
S.blob(acc, { at = { x, y, z }, radius = 1.2, seed = 7, color = { 0.1, 0.1, 0.13 } })
S.spike(acc, base, dir, len, width, col, tipCol)
S.disc(acc, at, radius, segments, col, rough, wobble)
S.quad(acc, at, halfW, halfD, yaw, col, rough)
local geo = S.finish(acc) -- { positions, normals, colors, uvs, indices }
S.rand(seed) is the deterministic generator everything places from, so the
same seed dresses the same hill on every machine.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.