Liking cljdoc? Tell your friends :D

baredom.components.x-soft-body.model


attr-dampingcljs

source

attr-disabledcljs

source

attr-grab-radiuscljs

source

attr-intensitycljs

source

attr-radiuscljs

source

attr-stiffnesscljs

source

compute-pointer-offsetcljs

(compute-pointer-offset rest-x
                        rest-y
                        pointer-x
                        pointer-y
                        grab-radius
                        intensity
                        grabbed?)

Compute the displacement offset for a single control point based on pointer position. Returns #js [offset-x offset-y]. When the pointer is outside grab-radius, returns [0, 0].

Compute the displacement offset for a single control point based on
pointer position. Returns #js [offset-x offset-y].
When the pointer is outside grab-radius, returns [0, 0].
sourceraw docstring

css-bgcljs

source

css-bordercljs

source

css-border-widthcljs

source

css-paddingcljs

source

css-shadowcljs

source

derive-statecljs

(derive-state {:keys [stiffness-raw damping-raw radius-raw intensity-raw
                      grab-radius-raw disabled-attr]})

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

Input keys: :stiffness-raw string | nil :damping-raw string | nil :radius-raw string | nil :intensity-raw string | nil :grab-radius-raw string | nil :disabled-attr string | nil (nil when absent)

Output keys: :stiffness number :damping number :radius number :intensity number :grab-radius number :disabled? boolean

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

Input keys:
  :stiffness-raw   string | nil
  :damping-raw     string | nil
  :radius-raw      string | nil
  :intensity-raw   string | nil
  :grab-radius-raw string | nil
  :disabled-attr   string | nil  (nil when absent)

Output keys:
  :stiffness   number
  :damping     number
  :radius      number
  :intensity   number
  :grab-radius number
  :disabled?   boolean
sourceraw docstring

event-grabcljs

source

event-releasecljs

source

event-schemacljs

source

generate-rest-pointscljs

(generate-rest-points w h r)

Compute 20 rest-position control points around a rounded rect of size w×h with corner radius r. Returns two JS arrays [xs, ys] each of length 20.

Each side contributes 5 points: 3 along the straight edge, then 2 on the following quarter-circle corner arc (at 30° and 60° of the arc). The arc entry/exit points coincide with the first/last edge points of adjacent sides, so the corner is smoothly bridged.

Layout (clockwise from top-left arc exit): 0-2: top edge (left→right) 3-4: top-right arc (30° and 60°) 5-7: right edge (top→bottom) 8-9: bottom-right arc 10-12: bottom edge (right→left) 13-14: bottom-left arc 15-17: left edge (bottom→top) 18-19: top-left arc

Compute 20 rest-position control points around a rounded rect of size w×h
with corner radius r. Returns two JS arrays [xs, ys] each of length 20.

Each side contributes 5 points: 3 along the straight edge, then 2 on the
following quarter-circle corner arc (at 30° and 60° of the arc).
The arc entry/exit points coincide with the first/last edge points of
adjacent sides, so the corner is smoothly bridged.

Layout (clockwise from top-left arc exit):
  0-2:   top edge       (left→right)
  3-4:   top-right arc  (30° and 60°)
  5-7:   right edge     (top→bottom)
  8-9:   bottom-right arc
  10-12: bottom edge    (right→left)
  13-14: bottom-left arc
  15-17: left edge      (bottom→top)
  18-19: top-left arc
sourceraw docstring

observed-attributescljs

source

parse-dampingcljs

(parse-damping s)
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-grab-radiuscljs

(parse-grab-radius s)
source

parse-intensitycljs

(parse-intensity s)
source

parse-radiuscljs

(parse-radius s)
source

parse-stiffnesscljs

(parse-stiffness s)
source

point-countcljs

20 control points: per side 3 edge points + 2 corner arc points = 5 × 4.

20 control points: per side 3 edge points + 2 corner arc points = 5 × 4.
sourceraw docstring

points->path-dcljs

(points->path-d xs ys n)

Build a smooth closed SVG path through n control points using Catmull-Rom → cubic bezier conversion with handle-length clamping to prevent overshoot at corners. xs, ys are Float64Arrays of length n.

Build a smooth closed SVG path through n control points using
Catmull-Rom → cubic bezier conversion with handle-length clamping
to prevent overshoot at corners.
xs, ys are Float64Arrays of length n.
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

static-rounded-rect-dcljs

(static-rounded-rect-d w h r)

Return an SVG path d-string for a simple rounded rectangle.

Return an SVG path d-string for a simple rounded rectangle.
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