Builtin Library
README.md
strip
Surfaces laid along curves. geometry.ribbon lays a flat ribbon of a width
along every curve of a geometry, lying square to up. It is what a crack
glowing in the ground, a trail, a beam, a tyre mark or a road is drawn with.
Each edge of a ribbon carries every attribute of the curve point it was laid
from, so a field or a material reads generation, heat or anything the curve
carries across the ribbon. The mesh's uv is laid for a shader:
uv.xruns 0 to 1 along each curve, by distance;uv.yruns 0 to 1 across it, so a hot core down the middle and a soft edge come fromuv.yalone.
Width can change along a ribbon:
tapernarrows each ribbon toward its end, the way a crack thins to its tip;widthBynames a Float point attribute that scales the width where the points carry it — for example a branch's width from itsgenerationthrough a ramp, or a trail thinning with age.
lift raises the ribbon off its curve along up, so one laid on a surface
draws above it.
procgen.searchNodes("", { pack = "strip" }) lists the family and procgen.describeNode("op.<id>")
describes any one of them.
local line = g.op.curve.line({ start = { x = -1, y = 0, z = 0 }, finish = { x = 1, y = 0, z = 0 }, segments = 8 })
local cracks = g.op.curve.branch({ curve = line, generations = 3, branches = 2, normal = { x = 0, y = 1, z = 0 } })
return { glow = g.op.geometry.ribbon({ curve = cracks, width = 0.05, taper = 0.9, lift = 0.004 }) }