(blob-colors palette color n)Returns a JS array of n color strings. When palette is non-nil, cycles palette colors across blobs. Otherwise all blobs get the single color.
Returns a JS array of n color strings. When palette is non-nil, cycles palette colors across blobs. Otherwise all blobs get the single color.
(blob-sizes base-size n)Returns a JS array of n sizes. Lead blob gets base-size, trailing blobs shrink.
Returns a JS array of n sizes. Lead blob gets base-size, trailing blobs shrink.
(blob-speeds n)Returns a JS array of n speed factors using exponential decay. Lead blob (index 0) follows at ~0.35, each successive blob is roughly half the speed of the previous one, down to a floor of 0.01. This creates wide separation so blobs stay visually distinct.
Returns a JS array of n speed factors using exponential decay. Lead blob (index 0) follows at ~0.35, each successive blob is roughly half the speed of the previous one, down to a floor of 0.01. This creates wide separation so blobs stay visually distinct.
(lerp current target speed)Linear interpolation: moves current toward target by speed fraction.
Linear interpolation: moves current toward target by speed fraction.
(normalize {:keys [blob-count-raw blob-size-raw color-raw noise-attr
noise-scale-raw noise-speed-raw noise-intensity-raw blur-raw
threshold-raw palette-raw]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :blob-count-raw string | nil :blob-size-raw string | nil :color-raw string | nil :noise-attr string | nil (presence-based boolean) :noise-scale-raw string | nil :noise-speed-raw string | nil :noise-intensity-raw string | nil :blur-raw string | nil :threshold-raw string | nil :palette-raw string | nil
Output keys: :blob-count int :blob-size number :color string :palette vector | nil :colors JS array of color strings (one per blob) :noise? boolean :noise-scale number :noise-speed number :noise-intensity number :blur number :threshold string
Normalise raw attribute inputs into a stable view-model map. Input keys: :blob-count-raw string | nil :blob-size-raw string | nil :color-raw string | nil :noise-attr string | nil (presence-based boolean) :noise-scale-raw string | nil :noise-speed-raw string | nil :noise-intensity-raw string | nil :blur-raw string | nil :threshold-raw string | nil :palette-raw string | nil Output keys: :blob-count int :blob-size number :color string :palette vector | nil :colors JS array of color strings (one per blob) :noise? boolean :noise-scale number :noise-speed number :noise-intensity number :blur number :threshold string
(parse-blob-count s)Parse blob-count to int in [2, 10], default 5.
Parse blob-count to int in [2, 10], default 5.
(parse-blob-size s)Parse blob-size to number in [10, 200], default 40.
Parse blob-size to number in [10, 200], default 40.
(parse-blur s)Parse blur to number in [4, 40], default 12.
Parse blur to number in [4, 40], default 12.
(parse-bool-attr s)Boolean from attribute presence: nil → false, any string → true.
Boolean from attribute presence: nil → false, any string → true.
(parse-color s)Parse color attribute. Any non-empty string passes through, default #6366f1.
Parse color attribute. Any non-empty string passes through, default #6366f1.
(parse-noise-intensity s)Parse noise-intensity to float in [1, 30], default 6.
Parse noise-intensity to float in [1, 30], default 6.
(parse-noise-scale s)Parse noise-scale to float in [0.5, 20], default 3.
Parse noise-scale to float in [0.5, 20], default 3.
(parse-noise-speed s)Parse noise-speed to float in [0.001, 0.1], default 0.02.
Parse noise-speed to float in [0.001, 0.1], default 0.02.
(parse-palette s)Parse palette attribute. Returns a vector of color strings, or nil. Accepts a named preset (case-insensitive) or comma-separated CSS colors.
Parse palette attribute. Returns a vector of color strings, or nil. Accepts a named preset (case-insensitive) or comma-separated CSS colors.
(parse-threshold s)Parse threshold to a color-matrix values string. Default metaball matrix.
Parse threshold to a color-matrix values string. Default metaball matrix.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |