cornerRadius function
The radius of the corner `point` is nearest to, for `point` from the box centre with y up and `corners` the four radii of `radii` (top left, top right, bottom right, bottom left), for a `roundedBox` with corners that differ.
import { cornerRadius } from '@dioramajs/diorama/kit'.
function cornerRadius(point: Node<'vec2'>, corners: Node<'vec4'>): Node<'float'>Parameters
| Name | Type | Description |
|---|---|---|
point | Node<'vec2'> | |
corners | Node<'vec4'> |
Also exported from @dioramajs/effects/kit.
Defined in packages/effects/src/kit.ts.