(compute-bob-tilt influence dx-sign position bob-intensity)Compute icon bob (lift), tilt (rotation), and scale based on influence, cursor direction relative to the icon, dock position, and bob-intensity.
Returns {:lift :rotation :scale} where lift is pixels along dock-normal, rotation is degrees, scale is a multiplier.
Compute icon bob (lift), tilt (rotation), and scale based on influence,
cursor direction relative to the icon, dock position, and bob-intensity.
- dx-sign: -1 if cursor is left/above, +1 if right/below (for tilt direction)
- bob-intensity: 0 = icons don't move, 1 = normal, 2 = dramatic
Returns {:lift :rotation :scale} where lift is pixels along dock-normal,
rotation is degrees, scale is a multiplier.(compute-item-influence ix iy mx my magnet-radius magnet-strength active-scale)Given an item center (ix, iy) and mouse position (mx, my), compute the influence factor [0..1] based on distance and magnet-radius. Returns a map with :influence, :scale, :tx, :ty.
Given an item center (ix, iy) and mouse position (mx, my), compute the influence factor [0..1] based on distance and magnet-radius. Returns a map with :influence, :scale, :tx, :ty. - influence: 0 when dist >= magnet-radius, 1 at dist = 0 - scale: 1.0 + influence^2 * magnet-strength * active-scale-boost - tx/ty: directional offset toward the cursor
(compute-phantom-offset influence position)Compute phantom blob offset from rest position based on influence and dock position. The phantom rises away from the dock edge (up for bottom, down for top, etc.) and scales up to create the viscous neck effect.
Returns {:dx :dy :scale} where dx/dy are pixel offsets and scale is the phantom blob scale factor.
Compute phantom blob offset from rest position based on influence and dock
position. The phantom rises away from the dock edge (up for bottom, down for
top, etc.) and scales up to create the viscous neck effect.
Returns {:dx :dy :scale} where dx/dy are pixel offsets and scale is the
phantom blob scale factor.(lerp current target speed)Linear interpolation: moves current toward target by speed fraction.
Linear interpolation: moves current toward target by speed fraction.
(normalize {:keys [position-raw gap-raw blur-raw threshold-raw ripple-scale-raw
ripple-speed-raw color-raw magnet-radius-raw
magnet-strength-raw bob-intensity-raw disabled-attr]})Normalise raw attribute inputs into a stable view-model map.
Input keys: :position-raw string | nil :gap-raw string | nil :blur-raw string | nil :threshold-raw string | nil :ripple-scale-raw string | nil :ripple-speed-raw string | nil :color-raw string | nil :magnet-radius-raw string | nil :magnet-strength-raw string | nil :bob-intensity-raw string | nil :disabled-attr string | nil (presence-based boolean)
Output keys: :position string :gap number :blur number :threshold string :ripple-scale number :ripple-speed number :color string :magnet-radius number :magnet-strength number :bob-intensity number :disabled? boolean :vertical? boolean
Normalise raw attribute inputs into a stable view-model map. Input keys: :position-raw string | nil :gap-raw string | nil :blur-raw string | nil :threshold-raw string | nil :ripple-scale-raw string | nil :ripple-speed-raw string | nil :color-raw string | nil :magnet-radius-raw string | nil :magnet-strength-raw string | nil :bob-intensity-raw string | nil :disabled-attr string | nil (presence-based boolean) Output keys: :position string :gap number :blur number :threshold string :ripple-scale number :ripple-speed number :color string :magnet-radius number :magnet-strength number :bob-intensity number :disabled? boolean :vertical? boolean
(parse-bool-attr s)Boolean from attribute presence: nil → false, any string → true.
Boolean from attribute presence: nil → false, any string → true.
(parse-color s)Parse color attribute. Any non-empty string passes through.
Parse color attribute. Any non-empty string passes through.
(parse-float-clamped s default-val lo hi)Parse a string to a float clamped in [lo, hi]. Returns default-val on failure.
Parse a string to a float clamped in [lo, hi]. Returns default-val on failure.
(parse-position s)Parse position attribute to one of bottom/top/left/right. Default bottom.
Parse position attribute to one of bottom/top/left/right. Default bottom.
(parse-threshold s)Parse threshold to a color-matrix values string.
Parse threshold to a color-matrix values string.
(select-detail index item source)Build event detail map for x-liquid-dock-select.
Build event detail map for x-liquid-dock-select.
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 |