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

around function

A spot around a box `width` x `height` centred at 0,0 (y up): a point of its outline picked evenly along it, pushed out along the side's normal by up to `spread`, or a little inside.

View as Markdown
import { around } from '@dioramajs/particles/sparkles'

.

function around(
  random: () => number,
  width: number,
  height: number,
  spread: number,
  size: number,
): Point

Parameters

NameTypeDescription
random() => number
widthnumber
heightnumber
spreadnumber
sizenumber

Defined in packages/particles/src/sparkles.ts.