(entity-count anim-type density-multiplier width height)(entity-count anim-type density-multiplier width height matrix-font-size)Calculate the number of entities for a given type, density, and canvas size.
matrix-font-size is only used for the "matrix" type.
Calculate the number of entities for a given type, density, and canvas size. `matrix-font-size` is only used for the "matrix" type.
(normalize {:keys [type-raw variant-raw speed-raw density-raw fullscreen-attr
paused-attr]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :type-raw string | nil :variant-raw string | nil :speed-raw string | nil :density-raw string | nil :fullscreen-attr string | nil :paused-attr string | nil
Output keys: :type string :variant string | nil :speed number :density number :fullscreen? boolean :paused? boolean
Normalise raw attribute inputs into a stable view-model map. Input keys: :type-raw string | nil :variant-raw string | nil :speed-raw string | nil :density-raw string | nil :fullscreen-attr string | nil :paused-attr string | nil Output keys: :type string :variant string | nil :speed number :density number :fullscreen? boolean :paused? boolean
(parse-density s)Parse density attribute. Accepts named strings ("low"/"medium"/"high") or numeric multiplier. Returns float, default 1.0.
Parse density attribute. Accepts named strings ("low"/"medium"/"high") or
numeric multiplier. Returns float, default 1.0.(parse-speed s)Parse speed attribute. Accepts named strings ("slow"/"medium"/"fast") or numeric multiplier. Returns float, default 1.0.
Parse speed attribute. Accepts named strings ("slow"/"medium"/"fast") or
numeric multiplier. Returns float, default 1.0.(parse-type s)Normalise type attribute. Unknown/nil -> "starfield".
Normalise type attribute. Unknown/nil -> "starfield".
(parse-variant s anim-type)Normalise variant attribute. Type-aware: starfield accepts "motion"/"twinkle", other types return nil (no variant support yet).
Normalise variant attribute. Type-aware: starfield accepts "motion"/"twinkle", other types return nil (no variant support yet).
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 |