Liking cljdoc? Tell your friends :D

baredom.components.x-liquid-fill.model


attr-disabledcljs

source

attr-layerscljs

source

attr-modecljs

source

attr-orientationcljs

source

attr-splash-intensitycljs

source

attr-targetcljs

source

attr-themecljs

source

attr-wave-intensitycljs

source

compute-scroll-progresscljs

(compute-scroll-progress scroll-top scroll-height client-height)

Compute scroll progress [0,1] for a scroll container.

Compute scroll progress [0,1] for a scroll container.
sourceraw docstring

compute-scroll-velocitycljs

(compute-scroll-velocity current-scroll last-scroll dt)

Compute normalised scroll velocity [0,1]. 0 = stationary, 1 = fast scrolling (~2000 px/s).

Compute normalised scroll velocity [0,1].
0 = stationary, 1 = fast scrolling (~2000 px/s).
sourceraw docstring

css-bar-heightcljs

source

css-bgcljs

source

css-bordercljs

source

css-color-1cljs

source

css-color-2cljs

source

css-color-3cljs

source

css-opacitycljs

source

css-radiuscljs

source

css-specularcljs

source

css-wave-speedcljs

source

event-progresscljs

source

event-schemacljs

source

horizontal-wave-path-dcljs

(horizontal-wave-path-d fill-x width height t amplitude phase)

Generate SVG path d-string for horizontal fill (fills left to right). fill-x = X coordinate of the liquid surface at rest. width, height = SVG viewport dimensions.

Generate SVG path d-string for horizontal fill (fills left to right).
fill-x = X coordinate of the liquid surface at rest.
width, height = SVG viewport dimensions.
sourceraw docstring

layer-paramscljs

(layer-params i n)

Compute per-layer rendering and physics parameters. i = layer index (0 = back, n-1 = front), n = total layers.

Compute per-layer rendering and physics parameters.
i = layer index (0 = back, n-1 = front), n = total layers.
sourceraw docstring

lerpcljs

(lerp current target speed)

Linear interpolation from current toward target at given speed (0-1).

Linear interpolation from current toward target at given speed (0-1).
sourceraw docstring

normalizecljs

(normalize {:keys [target-raw orientation-raw mode-raw theme-raw
                   wave-intensity-raw splash-intensity-raw layers-raw
                   disabled-attr]})

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

Input keys: :target-raw string | nil :orientation-raw string | nil :mode-raw string | nil :theme-raw string | nil :wave-intensity-raw string | nil :splash-intensity-raw string | nil :layers-raw string | nil :disabled-attr string | nil

Output keys: :target string | nil :orientation string :mode string :theme string :wave-intensity number :splash-intensity number :layers integer :disabled? boolean

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

Input keys:
  :target-raw           string | nil
  :orientation-raw      string | nil
  :mode-raw             string | nil
  :theme-raw            string | nil
  :wave-intensity-raw   string | nil
  :splash-intensity-raw string | nil
  :layers-raw           string | nil
  :disabled-attr        string | nil

Output keys:
  :target            string | nil
  :orientation       string
  :mode              string
  :theme             string
  :wave-intensity    number
  :splash-intensity  number
  :layers            integer
  :disabled?         boolean
sourceraw docstring

observed-attributescljs

source

parse-disabledcljs

(parse-disabled s)

Parse disabled attribute. Present (any value) → true, nil → false.

Parse disabled attribute. Present (any value) → true, nil → false.
sourceraw docstring

parse-layerscljs

(parse-layers s)

Parse layers attribute to integer 2-5, default 3.

Parse layers attribute to integer 2-5, default 3.
sourceraw docstring

parse-modecljs

(parse-mode s)

Normalise mode attribute. Unknown/nil → "fill".

Normalise mode attribute. Unknown/nil → "fill".
sourceraw docstring

parse-orientationcljs

(parse-orientation s)

Normalise orientation attribute. Unknown/nil → "vertical".

Normalise orientation attribute. Unknown/nil → "vertical".
sourceraw docstring

parse-splash-intensitycljs

(parse-splash-intensity s)
source

parse-themecljs

(parse-theme s)

Normalise theme attribute. Unknown/nil → "gold".

Normalise theme attribute. Unknown/nil → "gold".
sourceraw docstring

parse-wave-intensitycljs

(parse-wave-intensity s)
source

progress->fill-xcljs

(progress->fill-x progress width)

Convert progress [0,1] to fill-x for horizontal orientation. progress 0 = empty (fill-x = 0), progress 1 = full (fill-x = width).

Convert progress [0,1] to fill-x for horizontal orientation.
progress 0 = empty (fill-x = 0), progress 1 = full (fill-x = width).
sourceraw docstring

progress->fill-ycljs

(progress->fill-y progress height)

Convert progress [0,1] to fill-y (SVG Y coordinate for liquid surface). progress 0 = empty (fill-y = height), progress 1 = full (fill-y = 0).

Convert progress [0,1] to fill-y (SVG Y coordinate for liquid surface).
progress 0 = empty (fill-y = height), progress 1 = full (fill-y = 0).
sourceraw docstring

progress-detailcljs

(progress-detail progress velocity)

Build event detail map for x-liquid-fill-progress.

Build event detail map for x-liquid-fill-progress.
sourceraw docstring

property-apicljs

source

spring-stepcljs

(spring-step current target velocity dt stiffness damping)

Single step of damped spring physics (1D). Returns #js [new-position new-velocity].

Single step of damped spring physics (1D).
Returns #js [new-position new-velocity].
sourceraw docstring

tag-namecljs

source

theme-colorscljs

source

wave-path-dcljs

(wave-path-d fill-y width height t amplitude phase)

Generate an SVG path d-string for a single wave layer (vertical fill). fill-y = Y coordinate of the liquid surface at rest (0 = top, height = bottom). width, height = SVG viewport dimensions. t, amplitude, phase = wave animation parameters.

Generate an SVG path d-string for a single wave layer (vertical fill).
fill-y = Y coordinate of the liquid surface at rest (0 = top, height = bottom).
width, height = SVG viewport dimensions.
t, amplitude, phase = wave animation parameters.
sourceraw docstring

wave-ycljs

(wave-y x t amplitude phase)

Compute wave surface Y displacement at normalised position x [0,1]. Uses sum-of-sines with integer-cycle frequencies so the wave is balanced (same height at left and right edges). Amplitude in pixels. t = accumulated time, phase = layer phase offset.

Compute wave surface Y displacement at normalised position x [0,1].
Uses sum-of-sines with integer-cycle frequencies so the wave is balanced
(same height at left and right edges). Amplitude in pixels.
t = accumulated time, phase = layer phase offset.
sourceraw docstring

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