@dioramajs/text/melt
Exports of @dioramajs/text/melt.
On this page
import { default, edges, linesOf } from '@dioramajs/text/melt'Functions
edges | The undersides of the glyphs that liquid can run off: per line and column the lowest edge of the ink, kept where it reaches down to the baseline or below (feet of stems, bottoms of bowls, descenders), in runs without jumps. `field` is the signed distance in texels (negative inside), `scale` texels per px over `frame`. |
linesOf | The lines of a raster top down, each owning the box down to halfway to the next one. |
place | Up to `count` drips spread along the edges, about evenly with a seeded jitter: the stream fits its edge, two never touch. |
Constants
default | Letters melt like hot wax, paint or liquid metal: the shape of the glyphs sags, rounds off and runs down in glossy drips that stretch, neck and let their drops fall, lit as a 3D liquid with sharp highlights, studio reflections and a soft shadow on the page. The text stays in the DOM. |
MAX_DRIPS | Drips the shader holds at most. |
Interfaces
Drip | One drip: where it hangs from and how it runs. Lengths in box px unless said otherwise. |
Edge | A stretch of the underside of the letters near a baseline, where liquid runs off. |
Line | One line of text: its baseline, font size, the band of the box it owns and its ends, box px. |
Look | How a style melts and shines. Lengths in em of the font size. |