Geometry · function
solidSweep
A profile (x, y pairs in the plane across the path) swept along a polyline path (x, y, z
triples). At each point the frame is right = up × tangent, up' = tangent × right, so profile x
runs right and profile y runs up; up defaults to +Y. Sides are faceted; capEnds closes both
ends. Texture u runs around the profile and v along the path, both 0..1.
Explained in Hello world, Meshes and geometry.
function solidSweep(profile: ArrayLike<number>, path: ArrayLike<number>, capEnds: boolean, up?: Vec3): Solidimport { solidSweep } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
profile | ArrayLike<number> | |
path | ArrayLike<number> | |
capEnds | boolean | |
up? | Vec3 |
In depth
Corners are not mitred: a sharp turn pinches the section. A path that turns sharply wants more points.