Geo
The mesh builders behind the masonry, the bell and the crane. Each returns raw geometry in the shape `renderer.mesh.create` takes — positions, normals, uvs, colors, indices — so a caller can cache it, merge it or upload it.
Geo
The mesh builders behind the masonry, the bell and the crane. Each returns raw
geometry in the shape renderer.mesh.create takes — positions, normals, uvs,
colors, indices — so a caller can cache it, merge it or upload it.
local Geo = require("game.blocks.Geo")
Geo.chamferedPrism(a, b, h, chamfer) -- a course of the tower
Geo.revolve(profile, segments) -- the bell, the clapper, the sheave, a shaft
Geo.box(sx, sy, sz, "x"|"y"|"z") -- a sawn timber, grain along the named axis
Geo.cylinder(radius, height, segs) -- a rope or a pin
Geo.mergeInto(dst, src, pos, euler) -- several pieces into one mesh
Two conventions the shaders in this folder read back:
- uv — for a face of a stone,
(signed metres along the face from its own centre, metres up from the bottom of the course)for a cap,(u, v)in the lozenge basis, in metres for a turned or sawn piece,(across the piece 0..1, along it in metres). - color —
rface kind (0 side, 0.5 chamfered arris, 1 cap),ga per-face random,bthe face's own length in metres divided by 8,a1.
BELL_PROFILE, CLAPPER_PROFILE and SHEAVE_PROFILE are the polylines the
revolve turns. A profile walked up the outside, over the crown and back down
the inside gives a hollow shell whose normals turn over with it, which is how
the bell gets a mouth you can see up into.
Scoped to this part · feeds back into the world's score.