Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

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.

View as Markdown
import { cornerRadius } from '@dioramajs/diorama/kit'

.

function cornerRadius(point: Node<'vec2'>, corners: Node<'vec4'>): Node<'float'>

Parameters

NameTypeDescription
pointNode<'vec2'>
cornersNode<'vec4'>

Also exported from @dioramajs/effects/kit.

Defined in packages/effects/src/kit.ts.