Builtin Library
README.md
geometry.transform
Move, turn and resize a whole geometry. Positions go through scale, then rotate, then translate; normals (N on the point class, the vertex class or both) go through the rotation and the inverse scale and are made unit length again, so they stay square to the surface. Every other attribute and the material carry to the result unchanged.
Inputs
geometry(Geometry). What is moved. Its attributes and material carry to the result, and the wired value is left as it was.translate(Vec3, default (0, 0, 0)). How far the geometry is moved, applied last, after the scale and the rotation.rotate(Vec3, default (0, 0, 0)). Degrees about X, Y and Z, applied in that order (R = Rz * Ry * Rx,geometry.rotate) after the scale and before the translation, so the shape spins about the origin. Normals turn with it.scale(Vec3, default (1, 1, 1)). Per-axis size multiplier, applied first and about the origin, so a shape sitting away from the origin moves outward as it grows.
Outputs
geometry(Geometry). The moved geometry.
local tilted = g.geometry.transform({ geometry = g.mesh.box({}), translate = vector.create(0, 1, 0), rotate = vector.create(0, 45, 0), scale = vector.create(2, 1, 1) })