Geometry · function
solidRoundedBox
A box of full extents with every edge rounded to radius, segments steps per rounded band.
Explained in Hello world, Meshes and geometry.
function solidRoundedBox(x: number, y: number, z: number, radius: number, segments: number): Solidimport { solidRoundedBox } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
x | number | |
y | number | |
z | number | |
radius | number | |
segments | number |
In depth
Built as a Minkowski sum: each face is a grid whose points are pushed out from the inner box — the box shrunk by the radius — along the direction from their clamped inner point. Grid lines fall on the inner box's edges exactly, so the flat middle of each face is one quad and adjacent faces meet on identical seams.