Glass class
Water on the glass: drops that rest and dry, heavy ones that slide down in fits and starts, leave a wet trail and beads, and swallow what they meet.
import { Glass } from '@dioramajs/particles/drops'. Deterministic for a seed; px, y down.
class GlassMembers
| Name | Type | Description |
|---|---|---|
constructor | | |
readonly drops | Drop[] | Default |
head | number | Next trail slot, and pieces written so far (capped at TRAILS). Default |
laid | number | Default |
readonly pool | number | Default |
time | number | Default |
readonly trails | Float32Array | Trail pieces: x0, y0, x1, y1, width, birth time. Default |
wet | number | Last trail piece written, s. Default |
readonly thawing | boolean | True while a thaw spreads. |
add | | A drop of radius |
radius | | A radius from the mix of a melt or a shower: mostly beads, some drops, a few heavy ones. |
shower | | A shower of |
step | | Advances by |
thaw | | Starts a thaw from |
Defined in packages/particles/src/drops.ts.