Liking cljdoc? Tell your friends :D

baredom.components.x-organic-progress.model


attr-bloomcljs

source

attr-colorcljs

source

attr-densitycljs

source

attr-labelcljs

source

attr-progresscljs

source

attr-seedcljs

source

attr-variantcljs

source

css-bgcljs

source

css-bloom-colorcljs

source

css-branch-widthcljs

source

css-color-primarycljs

source

css-color-secondarycljs

source

css-glowcljs

source

css-opacitycljs

source

density->iterationscljs

source

derive-statecljs

(derive-state {:keys [progress-raw variant-raw color-raw bloom-attr density-raw
                      seed-raw label-raw]})

Normalise raw attribute inputs into a stable view-model map.

Input keys: :progress-raw string | nil :variant-raw string | nil :color-raw string | nil :bloom-attr string | nil (nil when attribute absent) :density-raw string | nil :seed-raw string | nil :label-raw string | nil

Output keys: :progress number | nil (nil = indeterminate) :percent number (0-100, 0 if indeterminate) :variant string :color string | nil :bloom? boolean :density string :seed int :label string | nil :indeterminate? boolean :complete? boolean :aria-valuetext string

Normalise raw attribute inputs into a stable view-model map.

Input keys:
  :progress-raw   string | nil
  :variant-raw    string | nil
  :color-raw      string | nil
  :bloom-attr     string | nil  (nil when attribute absent)
  :density-raw    string | nil
  :seed-raw       string | nil
  :label-raw      string | nil

Output keys:
  :progress       number | nil  (nil = indeterminate)
  :percent        number        (0-100, 0 if indeterminate)
  :variant        string
  :color          string | nil
  :bloom?         boolean
  :density        string
  :seed           int
  :label          string | nil
  :indeterminate? boolean
  :complete?      boolean
  :aria-valuetext string
sourceraw docstring

ease-out-cubiccljs

(ease-out-cubic t)

Ease-out cubic: 1 - (1-t)^3

Ease-out cubic: 1 - (1-t)^3
sourceraw docstring

event-bloom-endcljs

source

event-completecljs

source

event-schemacljs

source

honeycomb-lattice-segmentscljs

(honeycomb-lattice-segments seed density view-w view-h)

Generate a honeycomb hexagonal lattice. Growth expands from center outward with random cell reveal order. Returns #js [segments segment-count].

Generate a honeycomb hexagonal lattice. Growth expands from center outward
with random cell reveal order. Returns #js [segments segment-count].
sourceraw docstring

l-system->segmentscljs

(l-system->segments l-string
                    noise-fn
                    seed
                    base-angle
                    base-length
                    start-x
                    start-y)

Interpret an L-system string into a flat JS array of segment maps. Each segment is #js {x1 y1 x2 y2 depth index}. Returns #js [segments total-count].

Turtle starts at (start-x, start-y) heading rightward (angle 0). base-angle is the turn angle in radians. base-length is the initial segment length in SVG units.

Interpret an L-system string into a flat JS array of segment maps.
Each segment is #js {x1 y1 x2 y2 depth index}.
Returns #js [segments total-count].

Turtle starts at (start-x, start-y) heading rightward (angle 0).
base-angle is the turn angle in radians.
base-length is the initial segment length in SVG units.
sourceraw docstring

l-system-iteratecljs

(l-system-iterate axiom rules n)

Apply L-system rules n times to axiom string. Returns final string.

Apply L-system rules n times to axiom string. Returns final string.
sourceraw docstring

make-noise-fncljs

(make-noise-fn seed)

Returns a noise function offset by seed for distinct patterns per seed.

Returns a noise function offset by seed for distinct patterns per seed.
sourceraw docstring

make-rngcljs

(make-rng seed)

Create a seeded PRNG state. Returns a mutable JS array [state].

Create a seeded PRNG state. Returns a mutable JS array [state].
sourceraw docstring

observed-attributescljs

source

parse-bloomcljs

(parse-bloom s)

Parse bloom attribute. Absent (nil) → true, "false" → false.

Parse bloom attribute. Absent (nil) → true, "false" → false.
sourceraw docstring

parse-colorcljs

(parse-color s)

Parse a color attribute. Returns non-empty trimmed string or nil.

Parse a color attribute. Returns non-empty trimmed string or nil.
sourceraw docstring

parse-densitycljs

(parse-density s)

Parse density attribute. Returns "sparse", "normal", or "dense".

Parse density attribute. Returns "sparse", "normal", or "dense".
sourceraw docstring

parse-labelcljs

(parse-label s)

Parse label attribute. Returns trimmed non-empty string or nil.

Parse label attribute. Returns trimmed non-empty string or nil.
sourceraw docstring

parse-progresscljs

(parse-progress s)

Parse progress attribute. Returns nil for indeterminate, or float in [0,100].

Parse progress attribute. Returns nil for indeterminate, or float in [0,100].
sourceraw docstring

parse-seedcljs

(parse-seed s)

Parse seed attribute to a positive integer.

Parse seed attribute to a positive integer.
sourceraw docstring

parse-variantcljs

(parse-variant s)

Parse variant attribute. Returns "vine" or "honeycomb".

Parse variant attribute. Returns "vine" or "honeycomb".
sourceraw docstring

property-apicljs

source

rng-next!cljs

(rng-next! rng)

Advance the PRNG and return a float in [0, 1).

Advance the PRNG and return a float in [0, 1).
sourceraw docstring

simplex-noise-2dcljs

(simplex-noise-2d x y)

2D simplex noise. Returns value in approximately [-1, 1].

2D simplex noise. Returns value in approximately [-1, 1].
sourceraw docstring

spring-stepcljs

(spring-step current target velocity dt stiffness damping)

Single step of damped spring physics. Returns #js [new-position new-velocity]. stiffness ~120, damping ~12 for near-critical damping.

Single step of damped spring physics.
Returns #js [new-position new-velocity].
stiffness ~120, damping ~12 for near-critical damping.
sourceraw docstring

tag-namecljs

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close