(init-orb-phases n)Returns a JS array of n random phase offsets in [0, 2*PI].
Returns a JS array of n random phase offsets in [0, 2*PI].
(init-orb-positions n)Returns a JS array of n [x, y] pairs with random values in [0, 1].
Returns a JS array of n [x, y] pairs with random values in [0, 1].
(lerp current target speed)Linear interpolation: moves current toward target by speed fraction.
Linear interpolation: moves current toward target by speed fraction.
(normalize {:keys [orb-count-raw color-primary-raw color-secondary-raw
color-background-raw pulse-speed-raw rest-rate-raw
connection-distance-raw orb-size-raw opacity-raw
interactive-raw]})Normalise raw attribute inputs into a stable view-model map.
Normalise raw attribute inputs into a stable view-model map.
(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 default)Parse a CSS color string. Any non-empty string passes through.
Parse a CSS color string. Any non-empty string passes through.
(parse-connection-distance s)Parse connection-distance to float in [0.05, 0.5], default 0.15.
Parse connection-distance to float in [0.05, 0.5], default 0.15.
(parse-interactive raw)Interactive defaults to true (present when absent).
Interactive defaults to true (present when absent).
(parse-opacity s)Parse opacity to float in [0.0, 1.0], default 0.8.
Parse opacity to float in [0.0, 1.0], default 0.8.
(parse-orb-count s)Parse orb-count to int in [3, 50], default 15.
Parse orb-count to int in [3, 50], default 15.
(parse-orb-size s)Parse orb-size to float in [10, 200], default 40.
Parse orb-size to float in [10, 200], default 40.
(parse-pulse-speed s)Parse pulse-speed to float in [0.1, 5.0], default 1.0.
Parse pulse-speed to float in [0.1, 5.0], default 1.0.
(parse-rest-rate s)Parse rest-rate to float in [1.0, 10.0], default 4.0.
Parse rest-rate to float in [1.0, 10.0], default 4.0.
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 |