Liking cljdoc? Tell your friends :D

baredom.components.x-kinetic-font.model


attr-font-familycljs

source

attr-frictioncljs

source

attr-intensitycljs

source

attr-masscljs

source

attr-modecljs

source

attr-per-charcljs

source

attr-radiuscljs

source

attr-tensioncljs

source

attr-textcljs

source

attr-triggercljs

source

build-variation-stringcljs

(build-variation-string axes)

Build a CSS font-variation-settings string from axis values. axes is #js [wght wdth slnt opsz].

Build a CSS font-variation-settings string from axis values.
axes is #js [wght wdth slnt opsz].
sourceraw docstring

compute-cursor-forcecljs

(compute-cursor-force distance radius)

Compute normalised force (0–1) from cursor distance with quadratic falloff. Returns 0.0 when distance >= radius.

Compute normalised force (0–1) from cursor distance with quadratic falloff.
Returns 0.0 when distance >= radius.
sourceraw docstring

compute-scroll-forcecljs

(compute-scroll-force scroll-delta)

Normalise scroll delta to a 0–1 force value.

Normalise scroll delta to a 0–1 force value.
sourceraw docstring

css-colorcljs

source

css-familycljs

source

css-opsz-maxcljs

source

css-opsz-mincljs

source

css-sizecljs

source

css-skew-maxcljs

source

css-slnt-maxcljs

source

css-slnt-mincljs

source

css-wdth-maxcljs

source

css-wdth-mincljs

source

css-wght-maxcljs

source

css-wght-mincljs

source

default-opsz-maxcljs

source

default-opsz-mincljs

source

default-skew-maxcljs

source

default-slnt-maxcljs

source

default-slnt-mincljs

source

default-wdth-maxcljs

source

default-wdth-mincljs

source

default-wght-maxcljs

source

default-wght-mincljs

source

derive-statecljs

(derive-state {:keys [text-raw trigger-raw mode-raw per-char-attr mass-raw
                      tension-raw friction-raw intensity-raw radius-raw
                      font-family-raw]})

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

Input keys: :text-raw string | nil :trigger-raw string | nil :mode-raw string | nil :per-char-attr string | nil (nil when absent) :mass-raw string | nil :tension-raw string | nil :friction-raw string | nil :intensity-raw string | nil :radius-raw string | nil :font-family-raw string | nil

Output keys: :text string :trigger string :modes #{string} :per-char? boolean :mass number :tension number :friction number :intensity number :radius number :font-family string | nil

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

Input keys:
  :text-raw         string | nil
  :trigger-raw      string | nil
  :mode-raw         string | nil
  :per-char-attr    string | nil  (nil when absent)
  :mass-raw         string | nil
  :tension-raw      string | nil
  :friction-raw     string | nil
  :intensity-raw    string | nil
  :radius-raw       string | nil
  :font-family-raw  string | nil

Output keys:
  :text         string
  :trigger      string
  :modes        #{string}
  :per-char?    boolean
  :mass         number
  :tension      number
  :friction     number
  :intensity    number
  :radius       number
  :font-family  string | nil
sourceraw docstring

event-schemacljs

source

event-spring-activatecljs

source

event-spring-settlecljs

source

map-force-to-axescljs

(map-force-to-axes force
                   modes
                   intensity
                   wght-min
                   wght-max
                   wdth-min
                   wdth-max
                   slnt-min
                   slnt-max
                   opsz-min
                   opsz-max)

Map a force value (0–1) to font variation axis values based on active modes. Returns #js [wght wdth slnt opsz].

Map a force value (0–1) to font variation axis values based on active modes.
Returns #js [wght wdth slnt opsz].
sourceraw docstring

normalize-font-familycljs

(normalize-font-family s)

Normalise font-family attribute. Returns trimmed string or nil.

Normalise font-family attribute. Returns trimmed string or nil.
sourceraw docstring

normalize-textcljs

(normalize-text s)

Normalise text attribute. Returns string (possibly empty).

Normalise text attribute. Returns string (possibly empty).
sourceraw docstring

observed-attributescljs

source

parse-frictioncljs

(parse-friction s)
source

parse-intensitycljs

(parse-intensity s)
source

parse-masscljs

(parse-mass s)
source

parse-modescljs

(parse-modes s)

Parse space-separated mode tokens. Returns a set of valid mode strings.

Parse space-separated mode tokens. Returns a set of valid mode strings.
sourceraw docstring

parse-per-charcljs

(parse-per-char s)

Parse per-char boolean attribute. Present (any value) → true, nil → false.

Parse per-char boolean attribute. Present (any value) → true, nil → false.
sourceraw docstring

parse-radiuscljs

(parse-radius s)
source

parse-tensioncljs

(parse-tension s)
source

parse-triggercljs

(parse-trigger s)

Parse trigger attribute. Returns "cursor", "scroll", or "both".

Parse trigger attribute. Returns "cursor", "scroll", or "both".
sourceraw docstring

property-apicljs

source

spring-settled?cljs

(spring-settled? displacement velocity)

Returns true when displacement and velocity are below threshold.

Returns true when displacement and velocity are below threshold.
sourceraw docstring

spring-stepcljs

(spring-step current target velocity dt mass tension friction)

Single step of damped spring physics (1D) with mass. Returns #js [new-displacement new-velocity]. Acceleration = (tension * (target - current) - friction * velocity) / mass

Single step of damped spring physics (1D) with mass.
Returns #js [new-displacement new-velocity].
Acceleration = (tension * (target - current) - friction * velocity) / mass
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