Builtin Library
README.md
shape (nodebox)
The shape generators of the quickGeometry package: g.shape.box, cylinder, sphere, torus, circle, plane, ring, capsule, torusKnot, polyhedron, lathe, extrude, tube, flatShape and buffer. Each is one self-contained node whose body is a call into a module in its own folder, and each answers one geometry output that the rest of procgen takes: geometry.bevel, geometry.subdivide, geometry.boolean, geometry.loft and every other node that reads a Geometry.
A new shape is a new node here: a folder <name>.procNode holding init.luau (the inputs and one g.io.luau call), a <name>.module with the CPU function that builds the arrays, and a README. Name the node for the shape, give each input the name and default the three.js constructor has, and add the constructor to the quickGeometry nouns so a scene can call it.
local proc = require("@builtin::systems.procgen.proc")
return proc.define(function(g)
local post = g.shape.cylinder({ radiusTop = 0.1, radiusBottom = 0.1, height = 1.2, radialSegments = 16 })
local base = g.shape.box({ width = 1, height = 0.1, depth = 1 })
g.io.output({ value = g.part.merge({ parts = { post = post, base = base } }) })
end)