@mkbabb/glass-ui 3.9.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MetricBadge-lTc002u2.js → MetricBadge-BZVWIxNy.js} +6 -4
- package/dist/{Notification-BxK8LZMw.js → Notification-DLMhblXR.js} +2 -2
- package/dist/{Switch-LDKLmmgx.js → Switch-Ch-k3Rv-.js} +1 -1
- package/dist/animated-digit.js +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api.js +1 -1
- package/dist/aurora.js +236 -545
- package/dist/{badge-BvwvT50i.js → badge-CaoFJzRb.js} +1 -1
- package/dist/badge.js +1 -1
- package/dist/color.js +1 -1
- package/dist/{compile-DAjIoEy2.js → compile-BOXjLUxu.js} +23 -23
- package/dist/components/custom/aurora/composables/atoms.d.ts +21 -4
- package/dist/components/custom/aurora/composables/runtime.d.ts +0 -9
- package/dist/components/custom/aurora/composables/uniformBridge.d.ts +0 -11
- package/dist/components/custom/aurora/constants/renderMode.d.ts +0 -32
- package/dist/components/custom/aurora/constants/shaders/brush.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/constants/shaders/mediums.glsl.d.ts +2 -2
- package/dist/components/custom/aurora/constants/shaders/tonemap.glsl.d.ts +1 -1
- package/dist/components/custom/aurora/index.d.ts +1 -1
- package/dist/components/custom/constellation/Constellation.vue.d.ts +73 -1
- package/dist/components/custom/constellation/constellationField.d.ts +255 -3
- package/dist/components/custom/constellation/index.d.ts +2 -2
- package/dist/components/custom/dock/DockTabButton.vue.d.ts +4 -3
- package/dist/components/custom/expandable-container/ExpandableContainer.vue.d.ts +29 -0
- package/dist/components/custom/fourier-field/FourierField.vue.d.ts +6 -0
- package/dist/components/custom/fourier-field/index.d.ts +25 -1
- package/dist/components/custom/fourier-field/math.d.ts +3 -8
- package/dist/components/custom/goo-blob/GooBlob.vue.d.ts +8 -10
- package/dist/components/custom/goo-blob/composables/useMetaballRenderer.d.ts +6 -14
- package/dist/components/custom/goo-blob/index.d.ts +1 -1
- package/dist/components/custom/goo-blob/types.d.ts +59 -25
- package/dist/components/custom/handmark/HandMark.vue.d.ts +29 -0
- package/dist/components/custom/handmark/brush.d.ts +219 -0
- package/dist/components/custom/handmark/freehand.d.ts +69 -0
- package/dist/components/custom/handmark/geometry.d.ts +32 -0
- package/dist/components/custom/handmark/index.d.ts +21 -0
- package/dist/components/custom/handmark/ink.d.ts +11 -0
- package/dist/components/custom/handmark/texture.d.ts +39 -0
- package/dist/components/custom/handmark/types.d.ts +53 -0
- package/dist/components/custom/handmark/useHandMark.d.ts +66 -0
- package/dist/components/custom/metric-badge/MetricBadge.vue.d.ts +8 -0
- package/dist/components/ui/slider/index.d.ts +20 -16
- package/dist/composables/color/index.d.ts +12 -7
- package/dist/composables/glass/webgl/shaders/procedural-color.glsl.d.ts +1 -6
- package/dist/composables/motion/core/index.d.ts +1 -0
- package/dist/composables/motion/useRouteTransition.d.ts +42 -0
- package/dist/constellation.js +212 -72
- package/dist/controls.js +1 -1
- package/dist/dark.js +1 -1
- package/dist/dock.js +1 -0
- package/dist/expandable-container.js +61 -38
- package/dist/forms.js +2 -2
- package/dist/fourier-field.js +89 -97
- package/dist/fourier-math.d.ts +1 -0
- package/dist/fourier-math.js +2 -0
- package/dist/glass-panel.js +1 -1
- package/dist/glass-ui.css +1 -1
- package/dist/glass-ui.js +81 -80
- package/dist/goo-blob.js +299 -284
- package/dist/handmark.d.ts +1 -0
- package/dist/handmark.js +609 -0
- package/dist/icon-tooltip.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/keyboard.js +1 -1
- package/dist/labeled-field.js +4 -4
- package/dist/math-DTpRVC0e.js +27 -0
- package/dist/metric-badge.js +1 -1
- package/dist/metric-stack.js +1 -1
- package/dist/motion-core.js +70 -69
- package/dist/motion.js +2 -2
- package/dist/notification.js +1 -1
- package/dist/search.js +2 -2
- package/dist/{slider-DC2mwuoe.js → slider-CyzcxBoh.js} +6 -6
- package/dist/slider.js +1 -1
- package/dist/styles/animations.css +74 -18
- package/dist/styles/cards.css +2 -2
- package/dist/styles/components.css +1 -1
- package/dist/styles/dock/layer-group.css +16 -4
- package/dist/styles/dock-controls.css +39 -23
- package/dist/styles/drawer.css +12 -4
- package/dist/styles/glass.css +145 -9
- package/dist/styles/paper.css +68 -2
- package/dist/styles/theme.css +7 -0
- package/dist/styles/tokens.css +101 -15
- package/dist/styles/transitions.css +20 -2
- package/dist/styles/utilities.css +130 -40
- package/dist/styles/view-transition.css +51 -0
- package/dist/switch.js +1 -1
- package/dist/{useAnimatedNumber-C5I3wWd8.js → useAnimatedNumber-Bcpy5Etf.js} +1 -1
- package/dist/{useGlassRenderer-5I0YkI4t.js → useGlassRenderer-D7YGOYiM.js} +1 -1
- package/dist/useViewTransition-DaN5Zrox.js +21 -0
- package/dist/vReveal-zUIQk-rJ.js +53 -0
- package/dist/watercolor-dot.js +1 -1
- package/package.json +51 -9
- package/src/styles/animations.css +74 -18
- package/src/styles/cards.css +2 -2
- package/src/styles/dock/layer-group.css +16 -4
- package/src/styles/dock-controls.css +39 -23
- package/src/styles/drawer.css +12 -4
- package/src/styles/glass.css +145 -9
- package/src/styles/paper.css +68 -2
- package/src/styles/theme.css +7 -0
- package/src/styles/tokens.css +101 -15
- package/src/styles/transitions.css +20 -2
- package/src/styles/utilities.css +130 -40
- package/src/styles/view-transition.css +51 -0
- package/dist/components/custom/aurora/composables/gpuRuntime.d.ts +0 -16
- package/dist/components/custom/aurora/constants/shaders/aurora.wgsl.d.ts +0 -7
- package/dist/composables/glass/createGPUCanvas.d.ts +0 -40
- package/dist/vReveal-CqaCz_mC.js +0 -44
- /package/dist/{IconTooltip-yefK7cJc.js → IconTooltip-Cus0fvK0.js} +0 -0
- /package/dist/{Input-DWQQIOC4.js → Input-xuDwALQR.js} +0 -0
- /package/dist/{color-8jBjWiJ6.js → color-C5ls_QF7.js} +0 -0
- /package/dist/{constants-CS75AWHG.js → constants-yKeKnE84.js} +0 -0
- /package/dist/{presets-BKVyQfbt.js → presets-Dkdv55Gt.js} +0 -0
- /package/dist/{prng-wHuHlNHE.js → prng-D27-B3tK.js} +0 -0
- /package/dist/{useGlobalDark-yhL4Wp-s.js → useGlobalDark-d6waty-X.js} +0 -0
- /package/dist/{useIntersectionPause-Cc-H9ees.js → useIntersectionPause-Cck5Uxk8.js} +0 -0
- /package/dist/{useKeyboardShortcuts-Be3w_Rwk.js → useKeyboardShortcuts-CyIYrndH.js} +0 -0
- /package/dist/{useScrollProgress-CAH8Ofwt.js → useScrollProgress-CffFGLa5.js} +0 -0
- /package/dist/{useTextHighlight-DON84L8w.js → useTextHighlight-CWEi25hf.js} +0 -0
|
@@ -47,19 +47,81 @@ type __VLS_Props = {
|
|
|
47
47
|
* method (via `defineExpose`) is the seam this prop sugars.
|
|
48
48
|
*/
|
|
49
49
|
warpOnClick?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Auto-DRIFT (AY.W-CON1). A periodic auto-pick re-points the focal node to a
|
|
52
|
+
* RANDOM node on a jittered cadence — the wander source on the SAME warp
|
|
53
|
+
* spring (the 2nd half of the AX.W17 "drift + warp are ONE mechanic" thesis;
|
|
54
|
+
* no second rAF, no second mechanic). `true` uses the default cadence
|
|
55
|
+
* (8–16s, the slides rhythm); `{ minIdle?, jitter? }` tunes it (ms). Default
|
|
56
|
+
* OFF — `wander` absent leaves `field.wander` undefined, byte-identical to
|
|
57
|
+
* HEAD. PRM-gated by the WARP precedent: the cadence lives inside the
|
|
58
|
+
* `!reducedMotion` step block, so under reduced-motion it never advances and
|
|
59
|
+
* the focal mark stays at its seed (NOT fire-but-freeze).
|
|
60
|
+
*/
|
|
61
|
+
wander?: boolean | {
|
|
62
|
+
minIdle?: number;
|
|
63
|
+
jitter?: number;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* Pointer-held GRAVITY-WELL (AY.W-CON2). Hold the pointer over the lattice and
|
|
67
|
+
* the nodes within reach are PULLED toward it (an inverse-square force on the
|
|
68
|
+
* SAME engine, no second rAF); release and the field cools back to `speed`.
|
|
69
|
+
* INDEPENDENT of `warpOnClick` and `pointerReactive` (a consumer can
|
|
70
|
+
* hold-to-pull on a non-ripple, non-warp lattice). `true` uses the tokenised
|
|
71
|
+
* `--constellation-well-*` defaults; an object overrides the gains. Default
|
|
72
|
+
* OFF — `gravityWell` absent leaves `field.well` undefined (byte-identical to
|
|
73
|
+
* HEAD; `stepField` skips the force pass). PRM-gated by the WARP precedent: the
|
|
74
|
+
* held-timer block lives inside `!reducedMotion`, so under reduced-motion the
|
|
75
|
+
* well never arms; AND the well STATE resets to neutral on the PRM-true edge
|
|
76
|
+
* (no half-ramped force frozen on).
|
|
77
|
+
*/
|
|
78
|
+
gravityWell?: boolean | {
|
|
79
|
+
holdMs?: number;
|
|
80
|
+
gain?: number;
|
|
81
|
+
reach?: number;
|
|
82
|
+
ramp?: number;
|
|
83
|
+
maxSpeed?: number;
|
|
84
|
+
soften?: number;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Deterministic-capture freeze (AY.W-CON3). When `true`, the lattice lays
|
|
88
|
+
* out ONE reproducible STATIC frame and does NOT advance — seeded layout
|
|
89
|
+
* (set `seed` for a stable field ACROSS runs; an unseeded freeze still
|
|
90
|
+
* freezes but lays out a one-shot `Math.random` frame), no `stepField`, no
|
|
91
|
+
* ripple / warp / wander / well advance, and a FROZEN `now` handed to
|
|
92
|
+
* `drawOverlay` so a phase-driven skin (`(now % T) / T`) resolves to a fixed
|
|
93
|
+
* value (the pulse-ring radius is identical frame-over-frame). Omit to
|
|
94
|
+
* AUTO-DERIVE from `location.search` matching `export | print | freeze` (the
|
|
95
|
+
* deploy-pipeline contract — a consumer's pptx / print / screenshot capture
|
|
96
|
+
* gets a stable frame with zero per-consumer wiring). An explicit
|
|
97
|
+
* `:freeze="false"` forces live even under a capture URL. Unifies with the
|
|
98
|
+
* reduced-motion one-static-frame path — `freeze || reducedMotion` is the
|
|
99
|
+
* single static-frame predicate; the capture takes no input (the pointer /
|
|
100
|
+
* warp / well listeners are NOT registered under freeze).
|
|
101
|
+
*/
|
|
102
|
+
freeze?: boolean;
|
|
50
103
|
class?: HTMLAttributes["class"];
|
|
51
104
|
/**
|
|
52
105
|
* The skin seam. Runs after the neutral passes with the live field, so a
|
|
53
106
|
* consumer paints its own focal mark pinned to a real node — read
|
|
54
107
|
* `field.warp.{x,y}` for the spring-eased focal position when `warpOnClick`
|
|
55
108
|
* is on. The branded content (a domain accent, a callout label) lives HERE,
|
|
56
|
-
* in the consumer.
|
|
109
|
+
* in the consumer. Under `freeze` it receives a FROZEN `now`, so a phase-
|
|
110
|
+
* driven mark resolves to a fixed value.
|
|
57
111
|
*/
|
|
58
112
|
drawOverlay?: (ctx: CanvasRenderingContext2D, field: ConstellationField, now: number) => void;
|
|
59
113
|
};
|
|
60
114
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
61
115
|
/** The live field (the low-level imperative seam — for a custom overlay). */
|
|
62
116
|
field: ConstellationField;
|
|
117
|
+
/**
|
|
118
|
+
* The resolved deterministic-capture predicate (AY.W-CON3) — `true` when the
|
|
119
|
+
* lattice is laying out a frozen static frame (`freeze` prop OR a
|
|
120
|
+
* `?export|print|freeze` URL OR reduced-motion via the substrate). A read-only
|
|
121
|
+
* test/debug seam (the π freeze-live spec reads it to confirm the auto-derive
|
|
122
|
+
* fired without inferring from drift).
|
|
123
|
+
*/
|
|
124
|
+
isFrozen: import("vue").ComputedRef<boolean>;
|
|
63
125
|
/**
|
|
64
126
|
* Imperative warp (AX.W17). Two call shapes:
|
|
65
127
|
* `warpTo(localPoint)` — `{x, y}` already in canvas-local px
|
|
@@ -75,6 +137,16 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
|
75
137
|
x: number;
|
|
76
138
|
y: number;
|
|
77
139
|
} | number, b?: number): number;
|
|
140
|
+
/**
|
|
141
|
+
* Imperatively ARM the gravity-well at a canvas-LOCAL point (AY.W-CON2) — the
|
|
142
|
+
* π-lane test seam that drives the well WITHOUT racing a real held-pointer
|
|
143
|
+
* gesture + the held-timer. Sets the well position + `target = 1` directly (the
|
|
144
|
+
* timer is bypassed; the ramp still eases `strength` over the next frames). No-op
|
|
145
|
+
* when `gravityWell` is off (no `field.well`). Returns true when the well armed.
|
|
146
|
+
*/
|
|
147
|
+
holdWellAt(x: number, y: number): boolean;
|
|
148
|
+
/** Imperatively RELEASE the well (AY.W-CON2) — `target → 0`, the field cools. */
|
|
149
|
+
releaseWell(): void;
|
|
78
150
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
79
151
|
declare const _default: typeof __VLS_export;
|
|
80
152
|
export default _default;
|
|
@@ -51,6 +51,98 @@ export interface ConstellationWarp {
|
|
|
51
51
|
/** The chased node's INDEX (live target), or -1 when inactive. */
|
|
52
52
|
targetIdx: number;
|
|
53
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* The auto-DRIFT target-source (AY.W-CON1 — the 2nd half of the AX.W17 "drift +
|
|
56
|
+
* warp are ONE mechanic" thesis). The warp re-points its focal node to a
|
|
57
|
+
* periodically-chosen RANDOM node on a jittered cadence: the SAME warp spring,
|
|
58
|
+
* a different target-PICKER (a click for warp, this cadence for drift). No new
|
|
59
|
+
* rAF, no second mechanic — `stepField` steps this cadence inline, re-pointing
|
|
60
|
+
* `setWarpTarget` to a picked node only when the spring has SETTLED (so a
|
|
61
|
+
* click-warp in flight always pre-empts the cadence). PRM is enforced by the
|
|
62
|
+
* CALLER (the component does not advance the cadence under reduced-motion — the
|
|
63
|
+
* `stepField` call lives inside the `!reducedMotion` block — so the focal mark
|
|
64
|
+
* stays at its seed: the WARP precedent, NOT fire-but-freeze).
|
|
65
|
+
*/
|
|
66
|
+
export interface ConstellationWander {
|
|
67
|
+
/** ms timestamp of the next auto re-target; -1 until armed on the first stepped frame. */
|
|
68
|
+
nextAt: number;
|
|
69
|
+
/** the minimum idle (ms) between auto re-targets. */
|
|
70
|
+
minIdle: number;
|
|
71
|
+
/** the random extra idle (ms) added per cadence (so the rhythm is not metronomic). */
|
|
72
|
+
jitter: number;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Auto-DRIFT cadence DEFAULTS (AY.W-CON1 source; tokenised in AY.W-CON2). The
|
|
76
|
+
* `--constellation-wander-idle`/`-wander-jitter` tokens override these on mount via
|
|
77
|
+
* `readInteractionConfig` (the SAME numeric `--constellation-*` cohort as the warp
|
|
78
|
+
* spring + the well gains); a prop `{ minIdle, jitter }` still wins over the token.
|
|
79
|
+
* The 8s/8s default rhythm re-targets the focal mark every 8–16s (the slides cadence).
|
|
80
|
+
*/
|
|
81
|
+
export declare const DEFAULT_WANDER_IDLE = 8000;
|
|
82
|
+
export declare const DEFAULT_WANDER_JITTER = 8000;
|
|
83
|
+
/**
|
|
84
|
+
* The warp-spring tuning the integrator reads (AY.W-CON2). Tokenised numeric (the
|
|
85
|
+
* `--constellation-warp-*` cohort) so a consumer retunes the warp WITHOUT editing
|
|
86
|
+
* src — read ONCE on mount via `parseFloat`, threaded onto the field.
|
|
87
|
+
*
|
|
88
|
+
* `response` is the keyframes.js `(response, dampingFraction)` model's ANGULAR
|
|
89
|
+
* PERIOD (the SwiftUI `.spring(response:)` axis): `ω₀ = 2π/response`. It is NOT a
|
|
90
|
+
* settle-duration — at ζ=1 the 2%-settle lands at `t₂ ≈ 5.83/ω₀ ≈ 0.93·response`
|
|
91
|
+
* (the `(1 + ω₀t)e^(−ω₀t)` critically-damped envelope). Documented here + in the
|
|
92
|
+
* `--constellation-warp-response` token comment so the token semantics are honest
|
|
93
|
+
* at ANY ζ (the AY.W-CON2 ω-reconcile; the engine keeps the keyframes.js convention,
|
|
94
|
+
* mints NO second ω formula).
|
|
95
|
+
*/
|
|
96
|
+
export interface ConstellationWarpConfig {
|
|
97
|
+
/** keyframes.js angular period (s) — `ω₀ = 2π/response`, NOT a settle-duration. */
|
|
98
|
+
response: number;
|
|
99
|
+
/** damping ratio ζ — 1 critically damped (a focal mark must NOT ring). */
|
|
100
|
+
zeta: number;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* The gravity-well tuning (AY.W-CON2). The held-pointer pull is an inverse-square
|
|
104
|
+
* force composed into `stepField` (no new rAF). Tokenised numeric (the
|
|
105
|
+
* `--constellation-well-*` cohort) so a consumer retunes the well WITHOUT editing
|
|
106
|
+
* src. All distances are base-width px (`k`-scaled at step time).
|
|
107
|
+
*/
|
|
108
|
+
export interface ConstellationWellConfig {
|
|
109
|
+
/** the inverse-square pull gain (the force scale at unit distance). */
|
|
110
|
+
gain: number;
|
|
111
|
+
/** the reach (base-width px) — nodes beyond it are untouched (the O(within-reach) cost floor). */
|
|
112
|
+
reach: number;
|
|
113
|
+
/**
|
|
114
|
+
* the ARM ramp rate (1/s) — `strength` eases toward `target = 1` at this rate
|
|
115
|
+
* while HELD (the gentle bloom the token tunes). The RELEASE is NOT this rate:
|
|
116
|
+
* it is the fixed brisk {@link WELL_RELEASE_RAMP} (the field-cools invariant —
|
|
117
|
+
* not consumer-tunable, F8.2). A consumer slowing this token slows the ARM
|
|
118
|
+
* bloom only; the release stays brisk so the cool gate holds.
|
|
119
|
+
*/
|
|
120
|
+
ramp: number;
|
|
121
|
+
/** the per-node speed cap (base-width px/frame) — the no-slingshot clamp. */
|
|
122
|
+
maxSpeed: number;
|
|
123
|
+
/** the singularity floor (px) — a node AT the cursor gets a bounded pull, never `∞`. */
|
|
124
|
+
soften: number;
|
|
125
|
+
/** ms the pointer is held before the well arms. */
|
|
126
|
+
holdMs: number;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* The gravity-well live STATE (AY.W-CON2). `(x, y)` is the held pointer in
|
|
130
|
+
* canvas-local px (`-1` = inactive); `strength` is the eased pull 0→1 (ramps to
|
|
131
|
+
* `target` at `cfg.ramp`/s); `target` is the strength the ramp eases toward (1
|
|
132
|
+
* while held, 0 on release). A transient force — the field renormalises back to
|
|
133
|
+
* `speed` after release (the field-cools invariant).
|
|
134
|
+
*/
|
|
135
|
+
export interface ConstellationWell {
|
|
136
|
+
/** canvas-local px of the held pointer; `-1` = inactive. */
|
|
137
|
+
x: number;
|
|
138
|
+
y: number;
|
|
139
|
+
/** the eased pull strength 0→1 (ramps to `target` at `cfg.ramp`/s). */
|
|
140
|
+
strength: number;
|
|
141
|
+
/** the strength the ramp is easing toward: 1 while held, 0 on release. */
|
|
142
|
+
target: number;
|
|
143
|
+
/** the well tuning (gain/reach/ramp/maxSpeed/soften). */
|
|
144
|
+
cfg: ConstellationWellConfig;
|
|
145
|
+
}
|
|
54
146
|
/**
|
|
55
147
|
* The field state the component exposes to its `drawOverlay` consumer so a
|
|
56
148
|
* skin can pin itself to a real field node. `k` is the `width / BASE_WIDTH`
|
|
@@ -79,6 +171,28 @@ export interface ConstellationField {
|
|
|
79
171
|
focalIndex: number;
|
|
80
172
|
/** The per-axis warp spring the engine steps inside `stepField` (AX.W17). */
|
|
81
173
|
warp: ConstellationWarp;
|
|
174
|
+
/**
|
|
175
|
+
* The warp-spring tuning `warpStep` reads (AY.W-CON2). Optional — absent
|
|
176
|
+
* falls back to the shipped `{ response: 0.55, zeta: 1.0 }` defaults (the
|
|
177
|
+
* byte-identical HEAD spring). A tokenised override (read on mount) reaches
|
|
178
|
+
* the integrator through this member.
|
|
179
|
+
*/
|
|
180
|
+
warpCfg?: ConstellationWarpConfig;
|
|
181
|
+
/**
|
|
182
|
+
* The optional auto-DRIFT cadence (AY.W-CON1). When set, `stepField`
|
|
183
|
+
* periodically re-points the warp to a random node (the wander source on the
|
|
184
|
+
* SAME spring). Absent (`undefined`) leaves the field BYTE-IDENTICAL to the
|
|
185
|
+
* pre-wander HEAD — `stepField` skips the cadence block entirely.
|
|
186
|
+
*/
|
|
187
|
+
wander?: ConstellationWander;
|
|
188
|
+
/**
|
|
189
|
+
* The optional gravity-well (AY.W-CON2). When set, `stepField` composes a
|
|
190
|
+
* held-pointer inverse-square pull force (no new rAF) — `well.target → 1`
|
|
191
|
+
* while held, `→ 0` on release, the field renormalising back to `speed` once
|
|
192
|
+
* the well cools. Absent (`undefined`) leaves the field BYTE-IDENTICAL to the
|
|
193
|
+
* pre-well HEAD — `stepField` skips the force pass entirely.
|
|
194
|
+
*/
|
|
195
|
+
well?: ConstellationWell;
|
|
82
196
|
}
|
|
83
197
|
/**
|
|
84
198
|
* The `<Constellation>` consumer prop surface (the public type a consumer types
|
|
@@ -103,6 +217,46 @@ export interface ConstellationProps {
|
|
|
103
217
|
* reduced-motion (the focal mark stays put — the stated PRM policy).
|
|
104
218
|
*/
|
|
105
219
|
warpOnClick?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Auto-DRIFT (AY.W-CON1): a periodic auto-pick re-points the focal node to a
|
|
222
|
+
* random node on a jittered cadence — the wander source on the SAME warp
|
|
223
|
+
* spring (no second mechanic). `true` uses the default cadence (8–16s, the
|
|
224
|
+
* slides rhythm); `{ minIdle, jitter }` tunes it. Default OFF (absent →
|
|
225
|
+
* byte-identical to HEAD). PRM-gated by the WARP precedent (the cadence never
|
|
226
|
+
* advances under reduced-motion — the focal stays at its seed).
|
|
227
|
+
*/
|
|
228
|
+
wander?: boolean | {
|
|
229
|
+
minIdle?: number;
|
|
230
|
+
jitter?: number;
|
|
231
|
+
};
|
|
232
|
+
/**
|
|
233
|
+
* Pointer-held GRAVITY-WELL (AY.W-CON2): hold the pointer and the lattice is
|
|
234
|
+
* pulled toward it (an inverse-square force on the same engine, no new rAF);
|
|
235
|
+
* release and the field cools back to `speed`. INDEPENDENT of `warpOnClick`
|
|
236
|
+
* and `pointerReactive` (a consumer can hold-to-pull on a non-ripple,
|
|
237
|
+
* non-warp lattice). `true` uses the tokenised defaults; an object tunes the
|
|
238
|
+
* gains. Default OFF (absent → byte-identical to HEAD). PRM-gated by the WARP
|
|
239
|
+
* precedent (the held-timer is not registered under reduced-motion).
|
|
240
|
+
*/
|
|
241
|
+
gravityWell?: boolean | {
|
|
242
|
+
holdMs?: number;
|
|
243
|
+
gain?: number;
|
|
244
|
+
reach?: number;
|
|
245
|
+
ramp?: number;
|
|
246
|
+
maxSpeed?: number;
|
|
247
|
+
soften?: number;
|
|
248
|
+
};
|
|
249
|
+
/**
|
|
250
|
+
* Deterministic-capture freeze (AY.W-CON3): when `true`, lays out ONE
|
|
251
|
+
* reproducible STATIC frame (no `stepField`, no ripple / warp / wander / well
|
|
252
|
+
* advance) and hands `drawOverlay` a FROZEN `now` so a phase-driven skin
|
|
253
|
+
* resolves to a fixed value. Omit to AUTO-DERIVE from `location.search`
|
|
254
|
+
* matching `export | print | freeze` (the deploy-pipeline contract); an
|
|
255
|
+
* explicit `false` forces live even under a capture URL. Set `seed` for a
|
|
256
|
+
* field stable ACROSS runs. Unifies with the reduced-motion one-static-frame
|
|
257
|
+
* path (`freeze || reducedMotion` is the single static-frame predicate).
|
|
258
|
+
*/
|
|
259
|
+
freeze?: boolean;
|
|
106
260
|
class?: string;
|
|
107
261
|
/** The skin seam — paints the consumer's focal mark on the live field. */
|
|
108
262
|
drawOverlay?: (ctx: CanvasRenderingContext2D, field: ConstellationField, now: number) => void;
|
|
@@ -115,6 +269,23 @@ export declare const DEFAULT_PALETTE: ConstellationPalette;
|
|
|
115
269
|
* `:root`/`.dark` color arms AND the per-mode alpha defaults in one read.
|
|
116
270
|
*/
|
|
117
271
|
export declare function readPalette(canvas: HTMLCanvasElement): ConstellationPalette;
|
|
272
|
+
/**
|
|
273
|
+
* Read the NUMERIC interaction-tuning tokens (the warp spring + the gravity-well
|
|
274
|
+
* gains) off a canvas's resolved custom properties — ONCE on mount (AY.W-CON2),
|
|
275
|
+
* via `parseFloat`, NOT per-frame `getComputedStyle` (the hot loop stays clean).
|
|
276
|
+
* Returns `{ warp, well }` configs the field carries; every member falls back to
|
|
277
|
+
* the shipped default when the token is absent (an SSR / no-token mount reads the
|
|
278
|
+
* byte-identical spring). The tokens are PLAIN numbers (`0.55`, `12000`), immune
|
|
279
|
+
* to the W30 `light-dark()`-into-Canvas2D leak (they never reach a `fillStyle`).
|
|
280
|
+
*/
|
|
281
|
+
export declare function readInteractionConfig(canvas: HTMLCanvasElement): {
|
|
282
|
+
warp: ConstellationWarpConfig;
|
|
283
|
+
well: ConstellationWellConfig;
|
|
284
|
+
wander: {
|
|
285
|
+
minIdle: number;
|
|
286
|
+
jitter: number;
|
|
287
|
+
};
|
|
288
|
+
};
|
|
118
289
|
/**
|
|
119
290
|
* Seed `count` drifting nodes inside `w × h`. `rng` is a `() => number` in
|
|
120
291
|
* `[0, 1)` (the glass-ui `mulberry32`/`Math.random`); a seeded `rng` lays out a
|
|
@@ -124,6 +295,19 @@ export declare function readPalette(canvas: HTMLCanvasElement): ConstellationPal
|
|
|
124
295
|
* adds one, so node count is conserved).
|
|
125
296
|
*/
|
|
126
297
|
export declare function seedField(rng: () => number, count: number, w: number, h: number, speed: number): ConstellationNode[];
|
|
298
|
+
/**
|
|
299
|
+
* Re-fit the existing lattice to a NEW canvas size, proportionally, ON the
|
|
300
|
+
* size-change frame (AY.W-CON1). Without it a field seeded at a transitional
|
|
301
|
+
* size (the canvas measures mid responsive-scale — the deck slide-enter case)
|
|
302
|
+
* keeps its small-canvas positions and DRIFTS out to fill the larger box at
|
|
303
|
+
* `speed` px/frame — the visible "takes a while to expand out" lag the slides
|
|
304
|
+
* bespoke copy fixed. Scales node + warp positions by the per-axis dimension
|
|
305
|
+
* ratio; velocities are UNTOUCHED (they are base-width direction vectors
|
|
306
|
+
* `k`-scaled at step time — scaling them would HEAT the field, breaking the
|
|
307
|
+
* cool-down invariant). No-op on first layout (`prev ≤ 0`; the seed path owns
|
|
308
|
+
* it) or unchanged dims.
|
|
309
|
+
*/
|
|
310
|
+
export declare function refitField(field: ConstellationField, prevW: number, prevH: number): void;
|
|
127
311
|
/**
|
|
128
312
|
* Advance the field one step: drift + wall-bounce every node, then (if the
|
|
129
313
|
* pointer is live) lean nodes within reach toward the cursor WITHOUT changing
|
|
@@ -133,8 +317,53 @@ export declare function seedField(rng: () => number, count: number, w: number, h
|
|
|
133
317
|
* via `warpStep` INSIDE this single per-frame call (AX.W17) — NO second rAF,
|
|
134
318
|
* NO `useSpring`. The warp rides the substrate's ONE parked rAF; a `dt` of `0`
|
|
135
319
|
* (omitted / first frame) leaves the spring untouched.
|
|
320
|
+
*
|
|
321
|
+
* `now` (ms; default `0` — every existing caller stays green) + `rng` (default
|
|
322
|
+
* `Math.random`) drive the optional auto-DRIFT cadence (AY.W-CON1): AFTER the
|
|
323
|
+
* warp step, if `field.wander` is set and `now > 0`, the cadence re-points
|
|
324
|
+
* `setWarpTarget` to a random node when it elapses AND the spring has settled
|
|
325
|
+
* (a click-warp in flight pre-empts the cadence — `warpSettled` reports false).
|
|
136
326
|
*/
|
|
137
|
-
export declare function stepField(field: ConstellationField, k: number, speed: number, pointer: ConstellationPointer | null, dt?: number): void;
|
|
327
|
+
export declare function stepField(field: ConstellationField, k: number, speed: number, pointer: ConstellationPointer | null, dt?: number, now?: number, rng?: () => number): void;
|
|
328
|
+
/**
|
|
329
|
+
* Advance the gravity-well one `dt` (AY.W-CON2). A transient held-pointer force
|
|
330
|
+
* composed inside `stepField` (NO new rAF): ease `well.strength` toward
|
|
331
|
+
* `well.target` (1 held / 0 released) at `cfg.ramp`/s; while active, add an
|
|
332
|
+
* inverse-square pull toward the held point onto each node within `cfg.reach`
|
|
333
|
+
* (the `max(d, soften)` no-singularity floor + the `cfg.maxSpeed` no-slingshot
|
|
334
|
+
* clamp); ALWAYS ease every node's |v| back toward `speed` (the field-cools
|
|
335
|
+
* invariant — so a released well re-settles). No-ops (entirely skipped) when
|
|
336
|
+
* `field.well` is undefined → the default render is byte-identical to HEAD.
|
|
337
|
+
*
|
|
338
|
+
* `dt` is clamped to {@link WARP_DT_CLAMP} (the same park-resume guard the warp
|
|
339
|
+
* uses) so a tab-throttle gap cannot slingshot the field in one giant step.
|
|
340
|
+
*/
|
|
341
|
+
export declare function stepWell(field: ConstellationField, k: number, speed: number, dt: number): void;
|
|
342
|
+
/**
|
|
343
|
+
* Warp spring tuning DEFAULTS — gentle critically-damped (no overshoot on a focal
|
|
344
|
+
* mark). The `--constellation-warp-response`/`-zeta` tokens override these on mount
|
|
345
|
+
* via `field.warpCfg` (AY.W-CON2); these stay the byte-identical fallback.
|
|
346
|
+
*
|
|
347
|
+
* `WARP_RESPONSE` is the keyframes.js `(response, dampingFraction)` model's ANGULAR
|
|
348
|
+
* PERIOD (the SwiftUI `.spring(response:)` axis), `ω₀ = 2π/response` — NOT a
|
|
349
|
+
* settle-duration. At ζ=1 the 2%-settle lands at `t₂ ≈ 5.83/ω₀ ≈ 0.93·response`
|
|
350
|
+
* (the `(1 + ω₀t)e^(−ω₀t)` critically-damped envelope); the shipped 0.55 settles
|
|
351
|
+
* at ≈0.51s. This is the AY.W-CON2 ω-reconcile: the engine keeps the keyframes.js
|
|
352
|
+
* `ω₀ = 2π/response` convention (the shared house model — `regen-spring-tokens.mjs`,
|
|
353
|
+
* `keyframes.d.ts:860-882`) and mints NO second ω formula; the SEMANTIC honesty
|
|
354
|
+
* (period, not settle) lives in this doc + the token comment + the settle-time unit
|
|
355
|
+
* assertion, so a consumer setting the token gets the documented behaviour at ANY ζ.
|
|
356
|
+
*/
|
|
357
|
+
export declare const WARP_RESPONSE = 0.55;
|
|
358
|
+
export declare const WARP_ZETA = 1;
|
|
359
|
+
/**
|
|
360
|
+
* Gravity-well tuning DEFAULTS (AY.W-CON2). The `--constellation-well-*` tokens
|
|
361
|
+
* override these on mount via `field.well.cfg`; these stay the fallback. SET by the
|
|
362
|
+
* §6 egg-live π readback (the field-perturbs-then-cools capture is the binding
|
|
363
|
+
* truth) — a moderate gain over a generous reach, a brisk ramp, a tight no-slingshot
|
|
364
|
+
* speed cap, and the singularity-soften floor.
|
|
365
|
+
*/
|
|
366
|
+
export declare const DEFAULT_WELL_CONFIG: ConstellationWellConfig;
|
|
138
367
|
/**
|
|
139
368
|
* The nearest DRIFTING node to `(px, py)` in canvas-local px — a linear O(count)
|
|
140
369
|
* min-d² scan (count 64 default — negligible; matches the O(count²) edge pass).
|
|
@@ -154,8 +383,12 @@ export declare function nearestNode(field: ConstellationField, px: number, py: n
|
|
|
154
383
|
*
|
|
155
384
|
* x += v·dt ; v += (−2ζω·v − ω²·(x − target))·dt
|
|
156
385
|
*
|
|
157
|
-
*
|
|
158
|
-
*
|
|
386
|
+
* Reads `(response, ζ)` from `field.warpCfg` (the tokenised override — AY.W-CON2),
|
|
387
|
+
* falling back to the shipped `WARP_RESPONSE`/`WARP_ZETA` defaults. `ω = 2π/response`
|
|
388
|
+
* is the keyframes.js `(response, dampingFraction)` convention (the SHARED house
|
|
389
|
+
* model — `ω₀` is the angular frequency, `response` its ANGULAR PERIOD, NOT a
|
|
390
|
+
* settle-duration; at ζ=1 the 2%-settle is `t₂ ≈ 5.83/ω₀ ≈ 0.93·response`). NO
|
|
391
|
+
* second ω formula is minted (the ω-reconcile). NOT its rAF — the FORBID-useSpring
|
|
159
392
|
* contract (a second rAF would defeat the parked-substrate one-path freeze).
|
|
160
393
|
*/
|
|
161
394
|
export declare function warpStep(field: ConstellationField, dt: number): void;
|
|
@@ -180,6 +413,25 @@ export declare function setWarpTarget(field: ConstellationField, idx: number): v
|
|
|
180
413
|
* `warpTo(clientX, clientY)` sugar maps client→local px via `toLocal` first.
|
|
181
414
|
*/
|
|
182
415
|
export declare function warpTo(field: ConstellationField, px: number, py: number): number;
|
|
416
|
+
/**
|
|
417
|
+
* Is the warp spring ARRIVED on its target (AY.W-CON1)? True when there is no
|
|
418
|
+
* active target (`targetIdx < 0`) OR the focal's gap to its LIVE target node is
|
|
419
|
+
* within {@link WARP_SETTLE_BAND}. A click-warp in flight (hundreds of px out)
|
|
420
|
+
* reports NOT arrived, so a user click always PRE-EMPTS the auto-drift cadence
|
|
421
|
+
* (the wander only re-targets a spring that has reached its current node). The
|
|
422
|
+
* gate is POSITION-only by design — a critically-damped spring tracking a drifting
|
|
423
|
+
* node carries a non-zero steady-state velocity forever, so a velocity term would
|
|
424
|
+
* never clear on a live field.
|
|
425
|
+
*/
|
|
426
|
+
export declare function warpSettled(field: ConstellationField): boolean;
|
|
427
|
+
/**
|
|
428
|
+
* Pick a random eligible node index for the auto-drift re-target (AY.W-CON1) —
|
|
429
|
+
* any node EXCEPT the current `focalIndex` (so the focal actually MOVES). `rng`
|
|
430
|
+
* is the seeded `() => number` in `[0, 1)`. A degenerate field (≤1 node, or only
|
|
431
|
+
* the current focal) returns the current focal, which `setWarpTarget` no-ops
|
|
432
|
+
* cleanly (no crash, no jump).
|
|
433
|
+
*/
|
|
434
|
+
export declare function pickWanderTarget(field: ConstellationField, rng: () => number): number;
|
|
183
435
|
/** Pass 1 — hairline edges between any two nodes within `link` px (alpha falls off with distance). */
|
|
184
436
|
export declare function drawEdges(ctx: CanvasRenderingContext2D, field: ConstellationField, link: number, palette: ConstellationPalette): void;
|
|
185
437
|
/** Pass 2 — ambient node dots. */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as Constellation } from "./Constellation.vue";
|
|
2
|
-
export { seedField, stepField, readPalette, drawEdges, drawNodes, drawPointerWeb, drawRipples, nearestNode, warpStep, warpTo, setWarpTarget, BASE_WIDTH, DEFAULT_PALETTE, } from "./constellationField";
|
|
3
|
-
export type { ConstellationNode, ConstellationRipple, ConstellationPointer, ConstellationPalette, ConstellationField, ConstellationWarp, ConstellationProps, } from "./constellationField";
|
|
2
|
+
export { seedField, stepField, stepWell, refitField, readPalette, drawEdges, drawNodes, drawPointerWeb, drawRipples, nearestNode, readInteractionConfig, warpStep, warpTo, setWarpTarget, warpSettled, pickWanderTarget, BASE_WIDTH, DEFAULT_PALETTE, DEFAULT_WELL_CONFIG, DEFAULT_WANDER_IDLE, DEFAULT_WANDER_JITTER, WARP_RESPONSE, WARP_ZETA, } from "./constellationField";
|
|
3
|
+
export type { ConstellationNode, ConstellationRipple, ConstellationPointer, ConstellationPalette, ConstellationField, ConstellationWarp, ConstellationWarpConfig, ConstellationWander, ConstellationWell, ConstellationWellConfig, ConstellationProps, } from "./constellationField";
|
|
@@ -12,9 +12,10 @@ import { type HTMLAttributes } from "vue";
|
|
|
12
12
|
*
|
|
13
13
|
* K.W6 Lane B — when the consumer attaches `data-tier="primary"`, the
|
|
14
14
|
* button composes the canonical `btn-audacious` utility (the lifted
|
|
15
|
-
* disco-grain +
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* disco-grain + specular-highlight recipe at `utilities.css`; the
|
|
16
|
+
* sparkle-sweep star was excised at D6 — the gold identity now rides the
|
|
17
|
+
* `--gold-rim` gilt edge). `dock.css` retains the dock-local
|
|
18
|
+
* phase-tinting + structural shell on top of the canonical recipe.
|
|
18
19
|
*/
|
|
19
20
|
type __VLS_Props = {
|
|
20
21
|
as?: string;
|
|
@@ -6,6 +6,20 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
6
6
|
expandLabel?: string;
|
|
7
7
|
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
8
8
|
collapseLabel?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Opt into the `gl-expand` plate → fullscreen MORPH (D6.c M7). When set,
|
|
11
|
+
* the inline plate and the teleported fullscreen surface share ONE
|
|
12
|
+
* `view-transition-name` (this prop, suffixed by an app-unique `useId()`
|
|
13
|
+
* so two ExpandableContainers on a page never collide their groups — the
|
|
14
|
+
* proof:vt-names mandate), and the open/close toggle is wrapped in
|
|
15
|
+
* `startViewTransition` so the plate's rect MORPHS to the fullscreen rect
|
|
16
|
+
* (and back) instead of jump-cutting. A passed string namespaces the pair
|
|
17
|
+
* (e.g. `"chart"`); pass an empty string for a bare `useId()` name.
|
|
18
|
+
* Omitted (default) ⇒ NO view-transition-name, the legacy instant toggle —
|
|
19
|
+
* byte-identical to the pre-M7 behaviour. PRM + unsupported engines take
|
|
20
|
+
* `startViewTransition`'s instant fallback (the open/close still runs).
|
|
21
|
+
*/
|
|
22
|
+
viewTransitionName?: string;
|
|
9
23
|
} & {
|
|
10
24
|
/**
|
|
11
25
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -21,6 +35,20 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
21
35
|
expandLabel?: string;
|
|
22
36
|
/** Accessible name for the collapse (exit fullscreen) button. */
|
|
23
37
|
collapseLabel?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Opt into the `gl-expand` plate → fullscreen MORPH (D6.c M7). When set,
|
|
40
|
+
* the inline plate and the teleported fullscreen surface share ONE
|
|
41
|
+
* `view-transition-name` (this prop, suffixed by an app-unique `useId()`
|
|
42
|
+
* so two ExpandableContainers on a page never collide their groups — the
|
|
43
|
+
* proof:vt-names mandate), and the open/close toggle is wrapped in
|
|
44
|
+
* `startViewTransition` so the plate's rect MORPHS to the fullscreen rect
|
|
45
|
+
* (and back) instead of jump-cutting. A passed string namespaces the pair
|
|
46
|
+
* (e.g. `"chart"`); pass an empty string for a bare `useId()` name.
|
|
47
|
+
* Omitted (default) ⇒ NO view-transition-name, the legacy instant toggle —
|
|
48
|
+
* byte-identical to the pre-M7 behaviour. PRM + unsupported engines take
|
|
49
|
+
* `startViewTransition`'s instant fallback (the open/close still runs).
|
|
50
|
+
*/
|
|
51
|
+
viewTransitionName?: string;
|
|
24
52
|
} & {
|
|
25
53
|
/**
|
|
26
54
|
* Two-way `open` model so consumers can drive fullscreen externally
|
|
@@ -31,6 +59,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
31
59
|
}> & Readonly<{
|
|
32
60
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
33
61
|
}>, {
|
|
62
|
+
viewTransitionName: string;
|
|
34
63
|
buttonPosition: "left" | "right";
|
|
35
64
|
expandLabel: string;
|
|
36
65
|
collapseLabel: string;
|
|
@@ -32,6 +32,12 @@ type __VLS_Props = {
|
|
|
32
32
|
seed?: string;
|
|
33
33
|
/** When true, paint ONE static deterministic best-frame and never animate (the capture/export lever). Default false. */
|
|
34
34
|
freeze?: boolean;
|
|
35
|
+
/** Outer loudness envelope (the Aurora `opacityCeiling` shape). Scales the
|
|
36
|
+
* resolved `peakAlpha`/`headGlowAlpha` at the PAINT layer (a per-LAYER
|
|
37
|
+
* multiply, not a uniform CSS opacity). Default 1 (the bundle's resting
|
|
38
|
+
* loudness); clamped [0, 2] — the field's ~2 upper bound lets a hero push
|
|
39
|
+
* brighter than the recessed default without runaway. */
|
|
40
|
+
intensity?: number;
|
|
35
41
|
};
|
|
36
42
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
37
43
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,2 +1,26 @@
|
|
|
1
|
+
import type { ColorResolver } from "../../../composables/color";
|
|
1
2
|
export { default as FourierField } from "./FourierField.vue";
|
|
2
|
-
export { comp,
|
|
3
|
+
export { comp, positionsAt, makeEllipticSpectrum, type BasisComponent, type EllipticSpectrumOptions, } from "./math";
|
|
4
|
+
/** The configuration-BUNDLE axis — `hero` (epicycles on, fewer harmonics) vs
|
|
5
|
+
* `final` (epicycles off, denser). Not a recolour of one curve; one engine,
|
|
6
|
+
* two presets. */
|
|
7
|
+
export type FourierFieldVariant = "hero" | "final";
|
|
8
|
+
/** The props a consumer forwards when wrapping `<FourierField>` (the seeded
|
|
9
|
+
* inverse-DFT epicycle background; ships via `/fourier-field`). Mirrors the
|
|
10
|
+
* component's inline `defineProps` shape (an SFC cannot export its inline
|
|
11
|
+
* props type). */
|
|
12
|
+
export interface FourierFieldProps {
|
|
13
|
+
/** Configuration bundle. Default `hero`. */
|
|
14
|
+
variant?: FourierFieldVariant;
|
|
15
|
+
/** Base CSS color (a `var()`/`light-dark()` token resolves against the host). */
|
|
16
|
+
color: string;
|
|
17
|
+
/** REQUIRED color seam — resolves a concrete color to a gamma-sRGB [r,g,b] triple in [0,1]. */
|
|
18
|
+
colorResolver: ColorResolver;
|
|
19
|
+
/** Extra seed mixed into the spectrum PRNG for a unique-but-reproducible curve. Default "". */
|
|
20
|
+
seed?: string;
|
|
21
|
+
/** Paint ONE static deterministic best-frame and never animate (the capture lever). Default false. */
|
|
22
|
+
freeze?: boolean;
|
|
23
|
+
/** Outer loudness envelope (the Aurora `opacityCeiling` shape). Scales the
|
|
24
|
+
* resolved `peakAlpha`/`headGlowAlpha` at the paint layer. Default 1; clamped [0, 2]. */
|
|
25
|
+
intensity?: number;
|
|
26
|
+
}
|
|
@@ -15,17 +15,12 @@ export interface BasisComponent {
|
|
|
15
15
|
* coefficient `(re, im)`, deriving the polar `amplitude`/`phase`.
|
|
16
16
|
*/
|
|
17
17
|
export declare function comp(index: number, re: number, im: number): BasisComponent;
|
|
18
|
-
/**
|
|
19
|
-
* Sum `c_k * exp(2*pi*i*k*t)` — the curve point at parameter `t`. `maxTerms`
|
|
20
|
-
* truncates the series (the partial-sum read). Returns the complex value as
|
|
21
|
-
* `[re, im]` (the curve's `[x, y]` before view-fit).
|
|
22
|
-
*/
|
|
23
|
-
export declare function evalFourier(components: BasisComponent[], t: number, maxTerms?: number): [number, number];
|
|
24
18
|
/**
|
|
25
19
|
* The epicycle chain at parameter `t`: the running tip of each phasor stacked on
|
|
26
20
|
* the last, starting at the origin. `positions[0]` is `[0, 0]`; the final entry
|
|
27
|
-
* is the curve point
|
|
28
|
-
* truncates the chain (draw fewer arms than the spectrum
|
|
21
|
+
* is the curve point — the inverse-DFT sum `Σ c_k * exp(2*pi*i*k*t)` at the same
|
|
22
|
+
* `t`. `maxCircles` truncates the chain (draw fewer arms than the spectrum
|
|
23
|
+
* carries).
|
|
29
24
|
*/
|
|
30
25
|
export declare function positionsAt(components: BasisComponent[], t: number, maxCircles?: number): [number, number][];
|
|
31
26
|
/** Tuning for {@link makeEllipticSpectrum}. */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { ColorResolver } from "../../../composables/color";
|
|
2
1
|
import type { BlobMood, BlobConfig } from "./types";
|
|
3
2
|
/**
|
|
4
3
|
* GooBlob — a gooey metaball creature on a WebGL2 canvas.
|
|
@@ -8,23 +7,22 @@ import type { BlobMood, BlobConfig } from "./types";
|
|
|
8
7
|
* satellite system drive the motion. The renderer composes the `useWebGLCanvas`
|
|
9
8
|
* substrate — it never bootstraps its own context.
|
|
10
9
|
*
|
|
11
|
-
* Color is resolved through
|
|
12
|
-
* paints the GAMMA-sRGB triple
|
|
13
|
-
* `
|
|
14
|
-
*
|
|
15
|
-
*
|
|
10
|
+
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
11
|
+
* oklchToGammaRgb`): the blob paints the GAMMA-sRGB triple of the `color` prop. A
|
|
12
|
+
* `lab()`/`oklch()`/`hsl()`/hex string resolves correctly; a `var(--token)` is
|
|
13
|
+
* un-wrapped to a concrete string by the SFC's `resolveTokenColor` leaf BEFORE the
|
|
14
|
+
* renderer sees it (the DOM-free renderer contract).
|
|
16
15
|
*
|
|
17
|
-
* Config is resolved with
|
|
16
|
+
* Config is resolved with a loud discipline: either
|
|
18
17
|
* `provide(BLOB_CONFIG_KEY, cfg)` from an ancestor OR pass an explicit `config`
|
|
19
18
|
* prop. A mount with NEITHER throws — there is no silent reactive-defaults
|
|
20
19
|
* synthesis. A consumer that genuinely wants the stock tuning passes
|
|
21
20
|
* `BLOB_CONFIG_DEFAULTS` explicitly.
|
|
22
21
|
*/
|
|
23
22
|
type __VLS_Props = {
|
|
24
|
-
/** Base CSS color string (
|
|
23
|
+
/** Base CSS color string (a `var()`/`oklch()`/`lab()`/`hsl()`/hex form; resolved
|
|
24
|
+
* internally through the `/color` leaf to a gamma-sRGB triple). */
|
|
25
25
|
color: string;
|
|
26
|
-
/** REQUIRED color seam — resolves `color` to a gamma-sRGB [r,g,b] triple in [0,1]. */
|
|
27
|
-
colorResolver: ColorResolver;
|
|
28
26
|
/**
|
|
29
27
|
* REQUIRED unless an ancestor `provide(BLOB_CONFIG_KEY, …)` supplies it.
|
|
30
28
|
* The metaball tuning. Pass `BLOB_CONFIG_DEFAULTS` for the stock look.
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type Ref } from "vue";
|
|
2
|
-
import type { ColorResolver } from "../../../../composables/color";
|
|
3
2
|
import type { BlobConfig } from "../types";
|
|
4
3
|
import type { BlobMoodSystem } from "./useBlobMood";
|
|
5
4
|
import type { BlobPointer } from "./useBlobPointer";
|
|
@@ -24,23 +23,13 @@ export interface UseMetaballRendererOptions {
|
|
|
24
23
|
pointer: BlobPointer;
|
|
25
24
|
satellites: BlobSatelliteSystem;
|
|
26
25
|
config: BlobConfig;
|
|
27
|
-
/**
|
|
28
|
-
* The injected color seam (DEC-AT-2). Resolves a CONCRETE CSS color string to a
|
|
29
|
-
* GAMMA-sRGB triple in [0,1] fed straight into the shader's base-color uniform —
|
|
30
|
-
* the faithful AU.W7 lift paints gamma. REQUIRED: a no-resolver mount throws (the
|
|
31
|
-
* loud failure, not a silent gray) instructing the consumer to pass
|
|
32
|
-
* `defaultBlobColorResolver` from `@mkbabb/glass-ui/color` (or their own). The
|
|
33
|
-
* renderer is DOM-FREE: it never un-wraps a `var(--token)` — the SFC's
|
|
34
|
-
* `resolveTokenColor` leaf does that BEFORE handing strings here (inv-K-3 seam).
|
|
35
|
-
*/
|
|
36
|
-
colorResolver: ColorResolver;
|
|
37
26
|
}
|
|
38
27
|
/**
|
|
39
28
|
* The GooBlob WebGL renderer — composes the `useWebGLCanvas` substrate (AU.W6).
|
|
40
29
|
*
|
|
41
30
|
* This module owns ONLY the metaball-specific concerns: compiling the shader,
|
|
42
31
|
* building the quad + uniform cache, and uploading the per-frame uniforms derived
|
|
43
|
-
* from the mood / pointer / satellite systems and the
|
|
32
|
+
* from the mood / pointer / satellite systems and the resolved base color. The
|
|
44
33
|
* generic WebGL2 lifecycle — context creation, the suspend/resume model, the
|
|
45
34
|
* demand-driven rAF loop, the tab-visibility owner, the ResizeObserver, and the
|
|
46
35
|
* webglcontextlost/restored robustness — lives in the substrate; this renderer
|
|
@@ -48,8 +37,11 @@ export interface UseMetaballRendererOptions {
|
|
|
48
37
|
* `setup`/`frame`/`shouldContinue`/`resize`/`teardown` callbacks. It does NOT call
|
|
49
38
|
* `getContext("webgl2")` itself (the single-bootstrap contract).
|
|
50
39
|
*
|
|
51
|
-
*
|
|
52
|
-
* `
|
|
40
|
+
* Color is resolved INTERNALLY through the `/color` leaf (`cssToOklch →
|
|
41
|
+
* oklchToGammaRgb`) — the GAMMA-sRGB triple fed straight into the base-color uniform
|
|
42
|
+
* (the faithful AU.W7 lift paints gamma). The renderer is DOM-FREE: it never un-wraps
|
|
43
|
+
* a `var(--token)` — the SFC's `resolveTokenColor` leaf does that BEFORE handing
|
|
44
|
+
* concrete strings here (inv-K-3 seam); the value.js 1×1-canvas DOM probe is gone.
|
|
53
45
|
*/
|
|
54
46
|
export declare function useMetaballRenderer(options: UseMetaballRendererOptions): {
|
|
55
47
|
pause: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { default as GooBlob } from "./GooBlob.vue";
|
|
2
|
-
export type { BlobMood, BlobMerge, BlobQuality, MoodParams, MetaballSource, BlobConfig, SatellitePhase, SatelliteInternal, } from "./types";
|
|
2
|
+
export type { BlobMood, BlobMerge, BlobQuality, MoodParams, MetaballSource, BlobConfig, BlobGeometry, BlobSatelliteTiming, BlobMembrane, BlobColor, BlobSurface, BlobInteraction, SatellitePhase, SatelliteInternal, } from "./types";
|
|
3
3
|
export { BLOB_CONFIG_DEFAULTS, BLOB_CONFIG_KEY } from "./types";
|
|
4
4
|
export { useBlobMood, type BlobMoodSystem } from "./composables/useBlobMood";
|
|
5
5
|
export { useBlobPointer, type BlobPointer } from "./composables/useBlobPointer";
|