(displace-satellite rest-x rest-y i t speed amplitude)Compute displaced position for satellite i at time t. Returns #js [x y].
Compute displaced position for satellite i at time t. Returns #js [x y].
(normalize {:keys [blobs-raw speed-raw amplitude-raw blur-raw goo-raw tint-raw
specular-attr specular-size-raw specular-intensity-raw
disabled-attr mode-raw frost-raw color-1-raw color-2-raw]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :blobs-raw string | nil :speed-raw string | nil :amplitude-raw string | nil :blur-raw string | nil :goo-raw string | nil :tint-raw string | nil :specular-attr string | nil (nil when absent) :specular-size-raw string | nil :specular-intensity-raw string | nil :disabled-attr string | nil (nil when absent)
Output keys: :blobs int :speed number :amplitude number :blur number :goo number :tint string | nil :specular? boolean :specular-size number :specular-intensity number :disabled? boolean
Normalise raw attribute inputs into a stable view-model map. Input keys: :blobs-raw string | nil :speed-raw string | nil :amplitude-raw string | nil :blur-raw string | nil :goo-raw string | nil :tint-raw string | nil :specular-attr string | nil (nil when absent) :specular-size-raw string | nil :specular-intensity-raw string | nil :disabled-attr string | nil (nil when absent) Output keys: :blobs int :speed number :amplitude number :blur number :goo number :tint string | nil :specular? boolean :specular-size number :specular-intensity number :disabled? boolean
(parse-bool s)Parse a boolean presence attribute. Present (any value) → true, nil → false.
Parse a boolean presence attribute. Present (any value) → true, nil → false.
(parse-color s)Parse a color attribute. Returns nil if absent or empty, otherwise the string.
Parse a color attribute. Returns nil if absent or empty, otherwise the string.
(parse-mode s)Parse mode attribute. Returns :surface or :submerged.
Parse mode attribute. Returns :surface or :submerged.
(parse-tint s)Parse tint attribute. Returns nil if absent or empty, otherwise the string.
Parse tint attribute. Returns nil if absent or empty, otherwise the string.
(pseudo-noise x y t)Organic-looking noise from sum of sines. Returns value in ~[-1, 1].
Organic-looking noise from sum of sines. Returns value in ~[-1, 1].
(satellite-rest-positions n cx cy rx ry)Compute rest positions for n satellite ellipses evenly distributed around a central ellipse. Returns #js [xs ys] where xs/ys are Float64Arrays.
cx, cy — center of the element rx, ry — semi-axes of the orbital path (where satellites sit)
Compute rest positions for n satellite ellipses evenly distributed around a central ellipse. Returns #js [xs ys] where xs/ys are Float64Arrays. cx, cy — center of the element rx, ry — semi-axes of the orbital path (where satellites sit)
CSS linear() spring easing function for physically natural motion.
CSS linear() spring easing function for physically natural motion.
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 |