@vib3code/sdk 2.0.1 → 2.0.3-canary.75a3290

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.
Files changed (136) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/DOCS/AGENT_HARNESS_ARCHITECTURE.md +243 -0
  3. package/DOCS/CLI_ONBOARDING.md +1 -1
  4. package/DOCS/CROSS_SITE_DESIGN_PATTERNS.md +117 -0
  5. package/DOCS/EPIC_SCROLL_EVENTS.md +773 -0
  6. package/DOCS/HANDOFF_LANDING_PAGE.md +154 -0
  7. package/DOCS/HANDOFF_SDK_DEVELOPMENT.md +493 -0
  8. package/DOCS/MULTIVIZ_CHOREOGRAPHY_PATTERNS.md +937 -0
  9. package/DOCS/PRODUCT_STRATEGY.md +63 -0
  10. package/DOCS/README.md +103 -0
  11. package/DOCS/REFERENCE_SCROLL_ANALYSIS.md +97 -0
  12. package/DOCS/ROADMAP.md +111 -0
  13. package/DOCS/SCROLL_TIMELINE_v3.md +269 -0
  14. package/DOCS/SITE_REFACTOR_PLAN.md +100 -0
  15. package/DOCS/STATUS.md +24 -0
  16. package/DOCS/SYSTEM_INVENTORY.md +33 -30
  17. package/DOCS/VISUAL_ANALYSIS_CLICKERSS.md +85 -0
  18. package/DOCS/VISUAL_ANALYSIS_FACETAD.md +133 -0
  19. package/DOCS/VISUAL_ANALYSIS_SIMONE.md +95 -0
  20. package/DOCS/VISUAL_ANALYSIS_TABLESIDE.md +86 -0
  21. package/DOCS/{BLUEPRINT_EXECUTION_PLAN_2026-01-07.md → archive/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md} +1 -1
  22. package/DOCS/{DEV_TRACK_ANALYSIS.md → archive/DEV_TRACK_ANALYSIS.md} +3 -0
  23. package/DOCS/{SYSTEM_AUDIT_2026-01-30.md → archive/SYSTEM_AUDIT_2026-01-30.md} +3 -0
  24. package/DOCS/{DEV_TRACK_SESSION_2026-01-31.md → dev-tracks/DEV_TRACK_SESSION_2026-01-31.md} +1 -1
  25. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-06.md +231 -0
  26. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-13.md +127 -0
  27. package/DOCS/dev-tracks/DEV_TRACK_SESSION_2026-02-15.md +142 -0
  28. package/DOCS/dev-tracks/README.md +10 -0
  29. package/README.md +26 -13
  30. package/cpp/CMakeLists.txt +236 -0
  31. package/cpp/bindings/embind.cpp +269 -0
  32. package/cpp/build.sh +129 -0
  33. package/cpp/geometry/Crystal.cpp +103 -0
  34. package/cpp/geometry/Fractal.cpp +136 -0
  35. package/cpp/geometry/GeometryGenerator.cpp +262 -0
  36. package/cpp/geometry/KleinBottle.cpp +71 -0
  37. package/cpp/geometry/Sphere.cpp +134 -0
  38. package/cpp/geometry/Tesseract.cpp +94 -0
  39. package/cpp/geometry/Tetrahedron.cpp +83 -0
  40. package/cpp/geometry/Torus.cpp +65 -0
  41. package/cpp/geometry/WarpFunctions.cpp +238 -0
  42. package/cpp/geometry/Wave.cpp +85 -0
  43. package/cpp/include/vib3_ffi.h +238 -0
  44. package/cpp/math/Mat4x4.cpp +409 -0
  45. package/cpp/math/Mat4x4.hpp +209 -0
  46. package/cpp/math/Projection.cpp +142 -0
  47. package/cpp/math/Projection.hpp +148 -0
  48. package/cpp/math/Rotor4D.cpp +322 -0
  49. package/cpp/math/Rotor4D.hpp +204 -0
  50. package/cpp/math/Vec4.cpp +303 -0
  51. package/cpp/math/Vec4.hpp +225 -0
  52. package/cpp/src/vib3_ffi.cpp +607 -0
  53. package/cpp/tests/Geometry_test.cpp +213 -0
  54. package/cpp/tests/Mat4x4_test.cpp +494 -0
  55. package/cpp/tests/Projection_test.cpp +298 -0
  56. package/cpp/tests/Rotor4D_test.cpp +423 -0
  57. package/cpp/tests/Vec4_test.cpp +489 -0
  58. package/package.json +40 -27
  59. package/src/agent/index.js +1 -3
  60. package/src/agent/mcp/MCPServer.js +918 -0
  61. package/src/agent/mcp/index.js +1 -1
  62. package/src/agent/mcp/stdio-server.js +264 -0
  63. package/src/agent/mcp/tools.js +454 -0
  64. package/src/cli/index.js +374 -44
  65. package/src/core/CanvasManager.js +97 -204
  66. package/src/core/ErrorReporter.js +1 -1
  67. package/src/core/Parameters.js +1 -1
  68. package/src/core/VIB3Engine.js +93 -4
  69. package/src/core/VitalitySystem.js +53 -0
  70. package/src/core/index.js +18 -0
  71. package/src/core/renderers/FacetedRendererAdapter.js +10 -9
  72. package/src/core/renderers/HolographicRendererAdapter.js +13 -9
  73. package/src/core/renderers/QuantumRendererAdapter.js +11 -7
  74. package/src/creative/AestheticMapper.js +628 -0
  75. package/src/creative/ChoreographyPlayer.js +481 -0
  76. package/src/creative/index.js +11 -0
  77. package/src/export/TradingCardManager.js +3 -4
  78. package/src/export/index.js +11 -1
  79. package/src/faceted/FacetedSystem.js +241 -388
  80. package/src/holograms/HolographicVisualizer.js +29 -12
  81. package/src/holograms/RealHolographicSystem.js +194 -43
  82. package/src/math/index.js +7 -7
  83. package/src/polychora/PolychoraSystem.js +77 -0
  84. package/src/quantum/QuantumEngine.js +103 -66
  85. package/src/quantum/QuantumVisualizer.js +7 -2
  86. package/src/reactivity/index.js +3 -5
  87. package/src/render/LayerPresetManager.js +372 -0
  88. package/src/render/LayerReactivityBridge.js +344 -0
  89. package/src/render/LayerRelationshipGraph.js +610 -0
  90. package/src/render/MultiCanvasBridge.js +148 -25
  91. package/src/render/UnifiedRenderBridge.js +3 -0
  92. package/src/render/index.js +27 -2
  93. package/src/scene/index.js +4 -4
  94. package/src/shaders/faceted/faceted.frag.glsl +220 -80
  95. package/src/shaders/faceted/faceted.frag.wgsl +138 -97
  96. package/src/shaders/holographic/holographic.frag.glsl +28 -9
  97. package/src/shaders/holographic/holographic.frag.wgsl +107 -38
  98. package/src/shaders/quantum/quantum.frag.glsl +1 -0
  99. package/src/shaders/quantum/quantum.frag.wgsl +1 -1
  100. package/src/testing/ParallelTestFramework.js +2 -2
  101. package/src/viewer/GalleryUI.js +17 -0
  102. package/src/viewer/ViewerPortal.js +2 -2
  103. package/src/viewer/index.js +1 -1
  104. package/tools/headless-renderer.js +258 -0
  105. package/tools/shader-sync-verify.js +8 -4
  106. package/tools/site-analysis/all-reports.json +32 -0
  107. package/tools/site-analysis/combined-analysis.md +50 -0
  108. package/tools/site-analyzer.mjs +779 -0
  109. package/tools/visual-catalog/capture.js +276 -0
  110. package/tools/visual-catalog/composite.js +138 -0
  111. package/types/adaptive-sdk.d.ts +204 -5
  112. package/types/agent/cli.d.ts +78 -0
  113. package/types/agent/index.d.ts +18 -0
  114. package/types/agent/mcp.d.ts +87 -0
  115. package/types/agent/telemetry.d.ts +190 -0
  116. package/types/core/VIB3Engine.d.ts +26 -0
  117. package/types/core/index.d.ts +261 -0
  118. package/types/creative/AestheticMapper.d.ts +72 -0
  119. package/types/creative/ChoreographyPlayer.d.ts +96 -0
  120. package/types/creative/index.d.ts +17 -0
  121. package/types/export/index.d.ts +243 -0
  122. package/types/geometry/index.d.ts +164 -0
  123. package/types/math/index.d.ts +214 -0
  124. package/types/render/LayerPresetManager.d.ts +78 -0
  125. package/types/render/LayerReactivityBridge.d.ts +85 -0
  126. package/types/render/LayerRelationshipGraph.d.ts +174 -0
  127. package/types/render/index.d.ts +3 -0
  128. package/types/scene/index.d.ts +204 -0
  129. package/types/systems/index.d.ts +244 -0
  130. package/types/variations/index.d.ts +62 -0
  131. package/types/viewer/index.d.ts +225 -0
  132. /package/DOCS/{DEV_TRACK_PLAN_2026-01-07.md → archive/DEV_TRACK_PLAN_2026-01-07.md} +0 -0
  133. /package/DOCS/{SESSION_014_PLAN.md → archive/SESSION_014_PLAN.md} +0 -0
  134. /package/DOCS/{SESSION_LOG_2026-01-07.md → archive/SESSION_LOG_2026-01-07.md} +0 -0
  135. /package/DOCS/{STRATEGIC_BLUEPRINT_2026-01-07.md → archive/STRATEGIC_BLUEPRINT_2026-01-07.md} +0 -0
  136. /package/src/viewer/{ReactivityManager.js → ViewerInputHandler.js} +0 -0
@@ -0,0 +1,937 @@
1
+ # VIB3+ Multi-Visualizer Choreography Patterns
2
+
3
+ **Generated: 2026-02-09**
4
+ **Companion to**: DOCS/REFERENCE_SCROLL_ANALYSIS.md
5
+ **Purpose**: Translate reference site scroll patterns into VIB3+ multi-visualizer coordinated events using Quantum, Holographic, and Faceted systems with density-based depth illusions, mathematical intertwining, layered overlaps, and multi-parameter coordination.
6
+
7
+ ---
8
+
9
+ ## Table of Contents
10
+
11
+ 1. [Depth Illusion Engine](#1-depth-illusion-engine)
12
+ 2. [Multi-Visualizer Coordination Modes](#2-multi-visualizer-coordination-modes)
13
+ 3. [Section-by-Section Choreography Upgrades](#3-section-by-section-choreography-upgrades)
14
+ 4. [Accent & Texture Effects Library](#4-accent--texture-effects-library)
15
+ 5. [Mathematical Intertwining Functions](#5-mathematical-intertwining-functions)
16
+ 6. [Implementation Priority Map](#6-implementation-priority-map)
17
+
18
+ ---
19
+
20
+ ## 1. Depth Illusion Engine
21
+
22
+ *Inspired by: clickerss (scale+shadow), simone (card overlap), facetad (multi-layer blend), tableside (blur-to-sharp)*
23
+
24
+ ### 1A. Density-as-Distance
25
+
26
+ **Core concept**: `gridDensity` directly correlates with perceived distance. High density = far away (many small elements), low density = close up (few large elements). Combined with CSS scale + shadow, this creates a powerful **faux-3D depth tunnel**.
27
+
28
+ ```javascript
29
+ // Density-Distance Function
30
+ // As an element "approaches" the viewer:
31
+ // gridDensity: 60 → 8 (far → close)
32
+ // CSS scale: 0.6 → 1.3 (small → large)
33
+ // shadow: 2px → 40px (flat → floating)
34
+ // blur: 4px → 0px (out-of-focus → sharp)
35
+ // intensity: 0.3 → 0.9 (dim → bright)
36
+
37
+ function depthApproach(progress, adapter, container) {
38
+ const p = smoothstep(progress);
39
+
40
+ // Visualizer params: density drops as element "approaches"
41
+ adapter.setParams({
42
+ gridDensity: lerp(60, 8, p),
43
+ intensity: lerp(0.3, 0.9, p),
44
+ speed: lerp(0.2, 1.2, p),
45
+ dimension: lerp(4.2, 3.0, p), // projection distance narrows
46
+ });
47
+
48
+ // CSS depth illusion on container
49
+ const scale = lerp(0.6, 1.3, p);
50
+ const shadow = lerp(2, 40, p);
51
+ const blur = lerp(4, 0, p);
52
+ container.style.transform = `scale(${scale})`;
53
+ container.style.boxShadow = `0 ${shadow}px ${shadow * 2}px rgba(0,0,0,${0.1 + p * 0.4})`;
54
+ container.style.filter = `blur(${blur}px)`;
55
+ }
56
+ ```
57
+
58
+ ### 1B. Density-as-Distance RETREAT (Inverse)
59
+
60
+ ```javascript
61
+ // Element receding: the opposite trajectory
62
+ // Creates the "sinking away" depth effect
63
+ function depthRetreat(progress, adapter, container) {
64
+ const p = smoothstep(progress);
65
+ adapter.setParams({
66
+ gridDensity: lerp(8, 60, p), // close → far
67
+ intensity: lerp(0.9, 0.2, p), // bright → dim
68
+ speed: lerp(1.2, 0.1, p), // fast → frozen
69
+ dimension: lerp(3.0, 4.5, p), // tight → distant
70
+ chaos: lerp(0.4, 0.02, p), // alive → crystallized
71
+ });
72
+
73
+ const scale = lerp(1.3, 0.4, p);
74
+ const shadow = lerp(40, 0, p);
75
+ const blur = lerp(0, 8, p);
76
+ container.style.transform = `scale(${scale})`;
77
+ container.style.boxShadow = `0 ${shadow}px ${shadow * 2}px rgba(0,0,0,${0.5 - p * 0.4})`;
78
+ container.style.filter = `blur(${blur}px)`;
79
+ }
80
+ ```
81
+
82
+ ### 1C. Push-Pull Depth Oscillation
83
+
84
+ *Inspired by: facetad's lerp:0.1 momentum, clickerss's video zoom*
85
+
86
+ Two visualizers on the same screen, one approaching while the other retreats. Creates a continuous depth "breathing" effect.
87
+
88
+ ```javascript
89
+ // Two-system push-pull: when A approaches, B retreats
90
+ function pushPullDepth(progress, adapterA, adapterB, containerA, containerB) {
91
+ const p = progress;
92
+ const oscillation = Math.sin(p * Math.PI * 2);
93
+ const push = (oscillation + 1) / 2; // 0→1→0→1
94
+ const pull = 1 - push;
95
+
96
+ depthApproach(push, adapterA, containerA);
97
+ depthRetreat(push, adapterB, containerB);
98
+
99
+ // Counter-rotation amplifies the depth separation
100
+ adapterA.setParam('rot4dXW', p * Math.PI * 2);
101
+ adapterB.setParam('rot4dXW', -p * Math.PI * 2);
102
+ }
103
+ ```
104
+
105
+ ### 1D. Faux-Shadow System
106
+
107
+ **CSS shadow technique**: A dedicated shadow element below each visualizer canvas that responds to the visualizer's depth state.
108
+
109
+ ```css
110
+ .viz-depth-shadow {
111
+ position: absolute;
112
+ bottom: -20px;
113
+ left: 10%;
114
+ width: 80%;
115
+ height: 30px;
116
+ background: radial-gradient(ellipse, rgba(0,0,0,0.4) 0%, transparent 70%);
117
+ transform: scaleX(var(--shadow-width, 1)) scaleY(var(--shadow-height, 1));
118
+ filter: blur(var(--shadow-blur, 8px));
119
+ opacity: var(--shadow-opacity, 0.5);
120
+ transition: all 0.3s ease-out;
121
+ }
122
+ ```
123
+
124
+ ```javascript
125
+ // Shadow responds to density (depth proxy)
126
+ function updateDepthShadow(shadowEl, adapter) {
127
+ const density = adapter.params.gridDensity || 20;
128
+ const intensity = adapter.params.intensity || 0.5;
129
+
130
+ // High density (far) = wide, faint shadow
131
+ // Low density (close) = narrow, strong shadow
132
+ const depthFactor = 1 - (density - 4) / 56; // 0 (far) to 1 (close)
133
+ shadowEl.style.setProperty('--shadow-width', lerp(1.5, 0.7, depthFactor));
134
+ shadowEl.style.setProperty('--shadow-height', lerp(0.3, 1.2, depthFactor));
135
+ shadowEl.style.setProperty('--shadow-blur', lerp(20, 4, depthFactor) + 'px');
136
+ shadowEl.style.setProperty('--shadow-opacity', lerp(0.2, 0.6, depthFactor));
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ ## 2. Multi-Visualizer Coordination Modes
143
+
144
+ ### 2A. OPPOSITION MODE (Dueling Systems)
145
+
146
+ *Inspired by: clickerss's entry/exit easing complementarity, CTA section's current approach*
147
+
148
+ Two visualizers with mathematically opposed parameters. Everything one does, the other inverts.
149
+
150
+ ```javascript
151
+ const oppositionRules = {
152
+ hue: (base) => (base + 180) % 360,
153
+ rot4dXW: (val) => -val,
154
+ rot4dYW: (val) => -val * 0.7,
155
+ gridDensity: (val) => 64 - val, // inverse density
156
+ intensity: (val) => 1.0 - val, // inverse brightness
157
+ speed: (val) => 2.0 - val, // inverse speed
158
+ chaos: (val) => 0.7 - val, // inverse chaos
159
+ morphFactor: (val) => 2.0 - val, // inverse morph
160
+ };
161
+
162
+ function applyOpposition(primaryAdapter, secondaryAdapter, primaryParams) {
163
+ primaryAdapter.setParams(primaryParams);
164
+ const oppParams = {};
165
+ for (const [key, fn] of Object.entries(oppositionRules)) {
166
+ if (primaryParams[key] !== undefined) {
167
+ oppParams[key] = fn(primaryParams[key]);
168
+ }
169
+ }
170
+ secondaryAdapter.setParams(oppParams);
171
+ }
172
+ ```
173
+
174
+ **Container behavior**: Split-screen with a divider line that pulses with the opposition intensity. When systems are maximally opposed, the divider glows brightest.
175
+
176
+ ### 2B. CONVERGENCE MODE (Unity Pull)
177
+
178
+ *Inspired by: simone's dark/light mode threshold, wix-studio's entry/exit complementarity*
179
+
180
+ Two or three visualizers that start in different states and are pulled toward identical parameters over a scroll range.
181
+
182
+ ```javascript
183
+ function convergenceMode(progress, adapters, targetParams) {
184
+ const conv = smoothstep(progress);
185
+
186
+ adapters.forEach((adapter, i) => {
187
+ const currentParams = adapter.params;
188
+ const merged = {};
189
+
190
+ for (const [key, targetVal] of Object.entries(targetParams)) {
191
+ const currentVal = currentParams[key] || 0;
192
+ // Each system converges at its own rate (stagger)
193
+ const systemConv = smoothstep(clamp01((conv - i * 0.1) / (1 - i * 0.1)));
194
+ merged[key] = lerp(currentVal, targetVal, systemConv);
195
+ }
196
+
197
+ adapter.setParams(merged);
198
+ });
199
+ }
200
+ ```
201
+
202
+ **Depth effect during convergence**: As systems converge, density equalizes → all elements appear at the same depth plane → visual "flattening" that then SNAPS to a unified deep field (density drops together). The convergence-then-snap creates a "gravity well" illusion.
203
+
204
+ ### 2C. CALL-AND-RESPONSE MODE (Chain Reaction)
205
+
206
+ *Inspired by: tableside's hamburger stagger, simone's SplitType character cascade*
207
+
208
+ System A's chaos drives System B's speed, which drives System C's morphFactor. A parameter cascade with temporal delay.
209
+
210
+ ```javascript
211
+ function callAndResponse(progress, adapters, delayMs = 200) {
212
+ const [A, B, C] = adapters;
213
+ const p = progress;
214
+
215
+ // A leads: chaos ramps with scroll
216
+ const aChaos = 0.1 + p * 0.6;
217
+ A.setParams({ chaos: aChaos, speed: 0.5 + p * 1.0 });
218
+
219
+ // B responds to A's chaos (with delay via temporal smoothing)
220
+ // In practice, use a lerped "delayed" value
221
+ const bSpeed = 0.3 + aChaos * 1.5;
222
+ B.setParams({ speed: bSpeed, intensity: 0.4 + aChaos * 0.4 });
223
+
224
+ // C responds to B's speed
225
+ const cMorph = 0.2 + bSpeed * 0.5;
226
+ C.setParams({ morphFactor: cMorph, gridDensity: 10 + bSpeed * 20 });
227
+
228
+ // The chain creates a cascading wave: A acts, B reacts, C resolves
229
+ }
230
+ ```
231
+
232
+ ### 2D. HEARTBEAT MODE (Synchronized Pulse)
233
+
234
+ *Inspired by: clickerss's marquee rhythm, current triptych implementation*
235
+
236
+ All systems share a sinusoidal pulse. Parameters oscillate around their base values in phase-locked harmony.
237
+
238
+ ```javascript
239
+ function heartbeatPulse(time, adapters, baseParams, amplitude = 0.3) {
240
+ const beat = Math.sin(time * Math.PI * 2 / 3000); // 3-second cycle
241
+ const subBeat = Math.sin(time * Math.PI * 4 / 3000) * 0.5; // harmonic
242
+
243
+ adapters.forEach((adapter, i) => {
244
+ const phase = (i * Math.PI * 2) / adapters.length; // phase offset per system
245
+ const localBeat = Math.sin(time * Math.PI * 2 / 3000 + phase);
246
+
247
+ adapter.setParams({
248
+ intensity: baseParams[i].intensity + localBeat * amplitude * 0.4,
249
+ speed: baseParams[i].speed + localBeat * amplitude * 0.6,
250
+ gridDensity: baseParams[i].gridDensity + localBeat * amplitude * 15,
251
+ rot4dXW: baseParams[i].rot4dXW + time / 1000 + phase,
252
+ });
253
+ });
254
+ }
255
+ ```
256
+
257
+ ### 2E. ENERGY TRANSFER MODE (Conservation)
258
+
259
+ *Inspired by: facetad's multi-layer compositing, current energy section*
260
+
261
+ Total energy across all systems remains constant. When one system gains intensity, others lose proportionally.
262
+
263
+ ```javascript
264
+ const TOTAL_ENERGY = 2.0; // Total intensity budget
265
+
266
+ function energyConservation(adapters, energyDistribution) {
267
+ // energyDistribution: array of weights that sum to 1.0
268
+ // e.g., [0.6, 0.25, 0.15] → system A gets 60% of energy
269
+
270
+ const sum = energyDistribution.reduce((a, b) => a + b, 0);
271
+ const normalized = energyDistribution.map(e => e / sum);
272
+
273
+ adapters.forEach((adapter, i) => {
274
+ const energy = TOTAL_ENERGY * normalized[i];
275
+ adapter.setParams({
276
+ intensity: Math.min(0.95, energy),
277
+ speed: 0.2 + energy * 0.8,
278
+ chaos: 0.05 + energy * 0.3,
279
+ gridDensity: lerp(50, 8, energy / TOTAL_ENERGY), // energy → density inverse
280
+ });
281
+ });
282
+ }
283
+ ```
284
+
285
+ ### 2F. DIMENSIONAL CROSSFADE (System Morph)
286
+
287
+ *Inspired by: simone's dark/light threshold, wix-studio's OutIn transition*
288
+
289
+ One visualizer system fades out (density → max, intensity → 0, blur → max) while another fades in from behind it.
290
+
291
+ ```javascript
292
+ function dimensionalCrossfade(progress, outAdapter, inAdapter, outContainer, inContainer) {
293
+ const p = smoothstep(progress);
294
+
295
+ // OUTGOING: crystallize → freeze → fade
296
+ outAdapter.setParams({
297
+ gridDensity: lerp(20, 60, p),
298
+ speed: lerp(0.8, 0.0, p),
299
+ chaos: lerp(0.3, 0.0, p),
300
+ intensity: lerp(0.8, 0.0, p),
301
+ });
302
+ outContainer.style.opacity = 1 - p;
303
+ outContainer.style.filter = `blur(${p * 12}px)`;
304
+ outContainer.style.transform = `scale(${1 - p * 0.15})`;
305
+
306
+ // INCOMING: emerge → accelerate → bloom
307
+ inAdapter.setParams({
308
+ gridDensity: lerp(60, 20, p),
309
+ speed: lerp(0.0, 0.8, p),
310
+ chaos: lerp(0.0, 0.2, p),
311
+ intensity: lerp(0.0, 0.8, p),
312
+ });
313
+ inContainer.style.opacity = p;
314
+ inContainer.style.filter = `blur(${(1 - p) * 12}px)`;
315
+ inContainer.style.transform = `scale(${0.85 + p * 0.15})`;
316
+ }
317
+ ```
318
+
319
+ ---
320
+
321
+ ## 3. Section-by-Section Choreography Upgrades
322
+
323
+ ### 3A. OPENING — Depth Tunnel Reveal
324
+
325
+ *Pattern source: simone (SplitType text rise), tableside (blur-to-sharp)*
326
+
327
+ **Current**: Canvas parameter evolution + text cascade + lattice layers
328
+ **Upgrade**: Add **density-driven depth tunnel** where the viewer appears to fly through the visualization.
329
+
330
+ ```
331
+ Phase 1 (0-15%): BLACK → DISTANT
332
+ - gridDensity: 60 → 45 (far field emerges from darkness)
333
+ - intensity: 0 → 0.3
334
+ - CSS: background-color transitions from #000 to transparent
335
+ - Shadow: none (too far away)
336
+ - Text: invisible
337
+
338
+ Phase 2 (15-35%): DISTANT → APPROACHING
339
+ - gridDensity: 45 → 20 (structures become visible)
340
+ - intensity: 0.3 → 0.6
341
+ - scale(0.7) → scale(0.95) on canvas container
342
+ - Shadow appears beneath canvas
343
+ - Text chars begin y:100% rise (SplitType pattern)
344
+
345
+ Phase 3 (35-55%): TEXT MASK DEPTH INTERPLAY
346
+ - Canvas BEHIND text mask: gridDensity oscillates 18-30
347
+ - When density LOW (close): text appears to float ABOVE the visualization
348
+ - When density HIGH (far): text sinks INTO the visualization
349
+ - This oscillation creates a breathing depth effect
350
+
351
+ Phase 4 (55-75%): LATTICE PARALLAX + DENSITY LAYERS
352
+ - 3 lattice decorations at DIFFERENT densities:
353
+ - Lattice 1: density 40 (background, slow parallax, low intensity)
354
+ - Lattice 2: density 22 (midground, medium parallax)
355
+ - Lattice 3: density 10 (foreground, fast parallax, high intensity)
356
+ - Each lattice layer is a visual placeholder, not a separate GPU —
357
+ the MAIN canvas density oscillates to create the illusion
358
+
359
+ Phase 5 (75-95%): RETREAT TO PORTAL
360
+ - depthRetreat() — density ramps 20 → 55
361
+ - scale shrinks, shadow widens and fades
362
+ - blur increases
363
+ - Text fades via opacity AND blur (rack-focus exit)
364
+
365
+ Phase 6 (95-100%): PORTAL SNAP
366
+ - Instant density spike to 60 (maximum distance)
367
+ - intensity → 0
368
+ - CSS: clip-path circle(0%) at center — closes like an iris
369
+ ```
370
+
371
+ ### 3B. TRIPTYCH — Clip-Path Territory War with Depth Layers
372
+
373
+ *Pattern source: simone (card overlap), facetad (z-index depth)*
374
+
375
+ **Current**: 3-system split-screen with clip-path, heartbeat, convergence
376
+ **Upgrade**: Each system at a DIFFERENT perceived depth, with depth shifting during scroll.
377
+
378
+ ```
379
+ Depth Assignment (scroll-driven):
380
+
381
+ Phase 1 (0-30%): Quantum FOREGROUND, Holographic MID, Faceted BACK
382
+ Quantum: density 10, scale 1.15, sharp, bright, narrow clip (30%)
383
+ Holographic: density 25, scale 1.0, slight blur, medium, wide clip (40%)
384
+ Faceted: density 45, scale 0.85, blurred, dim, widest clip (30%)
385
+
386
+ Shadow: Quantum casts shadow ONTO Holographic
387
+ Overlap: 5% overlap zones where clip-paths intersect
388
+ In overlap zones: mix-blend-mode: screen creates glowing seams
389
+
390
+ Phase 2 (30-50%): DEPTH ROTATION — systems swap depth planes
391
+ Quantum retreats: density 10→35, scale shrinks, blur increases
392
+ Faceted advances: density 45→15, scale grows, sharpens
393
+ Holographic holds as anchor
394
+
395
+ THE SWAP creates a dramatic "things passing through each other" moment
396
+ During swap: all 3 clip-paths converge to 33.3% (equal space)
397
+ Chaos spikes on all 3 systems during the crossover point
398
+
399
+ Phase 3 (50-70%): Faceted FOREGROUND, Holographic MID, Quantum BACK
400
+ Mirror of Phase 1 but with different systems in different positions
401
+ Now Faceted casts shadow onto Holographic
402
+
403
+ Phase 4 (70-85%): CONVERGENCE COLLAPSE
404
+ All 3 systems converge to SAME depth:
405
+ - density all → 28
406
+ - scale all → 1.0
407
+ - blur all → 0
408
+ - Shadow disappears (all on same plane)
409
+ - Clip-paths equalize perfectly
410
+
411
+ Phase 5 (85-100%): CRYSTALLIZATION
412
+ From unified depth, all systems simultaneously:
413
+ - density: 28 → 55 (retreat together into distance)
414
+ - speed → 0 (freeze)
415
+ - chaos → 0 (perfect order)
416
+ - intensity → 0.9 (bright but still)
417
+ - This is the "frozen crystal" moment before cascade transition
418
+ ```
419
+
420
+ ### 3C. CASCADE — Horizontal Depth Carousel
421
+
422
+ *Pattern source: clickerss (video scale zoom), simone (alternating card offset)*
423
+
424
+ **Current**: Dual GPU background + Canvas2D cards with ripple
425
+ **Upgrade**: Cards exist at different depth planes. Active card APPROACHES viewer.
426
+
427
+ ```
428
+ Card Depth Carousel:
429
+
430
+ ACTIVE CARD:
431
+ - depthApproach(pulse) on the Canvas2D renderer
432
+ - CSS: scale 1.25, shadow 40px, no blur
433
+ - Canvas density: 8 (close, large structures)
434
+ - Shadow element below card: narrow, intense
435
+
436
+ ADJACENT CARDS (±1):
437
+ - Partial approach: density 20, scale 1.05
438
+ - Slight shadow, no blur
439
+ - Ripple: active card's chaos echoes here (dampened 60%)
440
+
441
+ FAR CARDS (±2+):
442
+ - depthRetreat: density 40, scale 0.85
443
+ - blur(2px), dim shadow
444
+ - Minimal parameter activity
445
+
446
+ GPU BACKGROUND DEPTH RESPONSE:
447
+ When active card has LOW density (close):
448
+ - GPU backgrounds go HIGH density (far) — backgrounds recede
449
+ - Background blur increases
450
+ - Background intensity dims
451
+ When card transitions (between active states):
452
+ - Brief moment where card and background are at SAME density
453
+ - Split-line PULSES (border glow) during this depth-match moment
454
+
455
+ PARALLAX SPEED DIFFERENTIATION:
456
+ - Cards scroll at 1.0x normal speed
457
+ - GPU left background: 0.7x (parallax lag, creates depth)
458
+ - GPU right background: 1.3x (parallax lead, creates foreground feel)
459
+ - This speed difference + density difference = strong depth tunnel
460
+ ```
461
+
462
+ ### 3D. ENERGY — Push-Pull Depth Dance
463
+
464
+ *Pattern source: facetad (momentum), tableside (blur-to-sharp)*
465
+
466
+ **Current**: Quantum bg + Faceted card with energy exchange
467
+ **Upgrade**: Full push-pull depth oscillation where systems trade depth positions.
468
+
469
+ ```
470
+ 7-Phase Depth Dance:
471
+
472
+ Phase 1 — EMERGENCE (0-15%):
473
+ Card enters from MAXIMUM DEPTH:
474
+ density 60, scale 0.4, blur 12px, intensity 0.1
475
+ Background at MINIMUM DEPTH:
476
+ density 10, scale 1.0, sharp, intensity 0.7
477
+ Result: card appears to emerge from deep within the background
478
+
479
+ Phase 2 — APPROACH (15-30%):
480
+ Card: depthApproach() — density drops, scale grows, sharpens
481
+ Background: depthRetreat() — density rises, scale holds, dims slightly
482
+ Cross-point at ~22%: both momentarily at same density (22)
483
+ At cross-point: flash + chaos spike on both systems
484
+
485
+ Phase 3 — HOLD + TILT DEPTH (30-50%):
486
+ Both at moderate depth, but TILT INTERACTION creates micro-depth:
487
+ - Mouse left: card density DROPS (closer), bg density RISES (further)
488
+ - Mouse right: inverse
489
+ - This creates a see-saw depth effect driven by mouse position
490
+ - Shadow beneath card: shape tracks mouse position
491
+
492
+ Phase 4 — DRAIN (50-60%):
493
+ Card RETREATS while background ADVANCES:
494
+ - Card: density 15→45, scale 1.0→0.8, blur increases
495
+ - Background: density 30→8, intensity surges, shadow intensifies
496
+ - Energy bar drains visually
497
+ - Card's shadow LENGTHENS (element receding = longer shadow)
498
+
499
+ Phase 5 — GEOMETRY SWAP (60-75%):
500
+ While at different depths, geometries swap:
501
+ - Card gets background's geometry (at card's current high density → looks alien)
502
+ - Background gets card's geometry (at bg's current low density → looks intimate)
503
+ - rot4dXW = PI on both (dramatic rotation during swap)
504
+
505
+ Phase 6 — RETURN (75-88%):
506
+ Inverse of drain — card approaches, background retreats
507
+ - Card: density 45→12, scale 0.8→1.1 (OVERSHOOT), sharpens
508
+ - Background: density 8→35, dims, blurs
509
+ - Energy bar refills
510
+
511
+ Phase 7 — EXIT SPIN (88-100%):
512
+ Card spins and retreats to infinity:
513
+ - density: 12→60 (spinning into distance)
514
+ - rot4dXW: 0→PI*4 (rapid rotation)
515
+ - scale: 1.1→0.3
516
+ - blur: 0→16px
517
+ - Shadow: collapses to point beneath spinning card
518
+ ```
519
+
520
+ ### 3E. CTA — Opposition→Unity Depth Convergence
521
+
522
+ *Pattern source: simone (dark/light threshold), wix-studio (entry/exit complementarity)*
523
+
524
+ **Current**: Dual GPU with diagonal split, opposition→convergence→unity
525
+ **Upgrade**: Systems start at opposite depth extremes, converge to single unified depth.
526
+
527
+ ```
528
+ 3-Act Depth Story:
529
+
530
+ ACT I — MAXIMUM SEPARATION (0-40%):
531
+ Quantum (left): FOREGROUND
532
+ density 8, scale 1.2, shadow intense, sharp, warm hues
533
+ Faceted (right): BACKGROUND
534
+ density 50, scale 0.7, shadow faint, blurred, cool hues
535
+
536
+ The diagonal split line has a DEPTH GRADIENT:
537
+ Left side of line: dark shadow (Quantum casting)
538
+ Right side of line: subtle glow (Faceted glowing from behind)
539
+
540
+ Split line itself: 3px gradient border that shifts from
541
+ warm (Quantum's hue) to cool (Faceted's hue)
542
+
543
+ ACT II — DEPTH CROSSOVER (40-70%):
544
+ Systems swap depth positions through each other:
545
+ - Quantum: density 8→50, scale 1.2→0.7, blur increases
546
+ - Faceted: density 50→8, scale 0.7→1.2, sharpens
547
+
548
+ THE CROSSOVER MOMENT (at ~55%):
549
+ - Both at density 28, scale 1.0 — same depth plane
550
+ - Diagonal split dissolves momentarily (clip-path → full overlap)
551
+ - Both systems visible at 50% opacity — BLEND MOMENT
552
+ - mix-blend-mode: screen on the overlap creates a unified glow
553
+ - Chaos spikes to 0.6 on both — maximum visual energy
554
+
555
+ After crossover:
556
+ - Faceted now in foreground, Quantum in background
557
+ - Split reforms but from the opposite direction
558
+
559
+ ACT III — UNITY (70-100%):
560
+ Both systems converge to SAME parameters AND same depth:
561
+ - density both → 20 (comfortable middle distance)
562
+ - scale both → 1.0
563
+ - blur both → 0
564
+ - hue both → unified hue (220)
565
+ - rot4dXW both → identical rotation
566
+ - chaos both → 0.1 (calm)
567
+ - intensity both → 0.7
568
+
569
+ Split line: fades to invisible (clip-path dissolves)
570
+ Both canvases: opacity → 0.5 each, creating a unified composite
571
+
572
+ Final state: two systems are mathematically indistinguishable
573
+ CTA text sits at the unified depth — perfectly clear, perfectly stable
574
+ Shadow beneath CTA content matches the unified depth
575
+ ```
576
+
577
+ ---
578
+
579
+ ## 4. Accent & Texture Effects Library
580
+
581
+ ### 4A. Solid Color Divider Bars
582
+
583
+ *Inspired by: simone (mode switching), all sites (section transitions)*
584
+
585
+ Colored bars that split a single visualizer canvas into multiple visual zones.
586
+
587
+ ```css
588
+ .viz-divider-bar {
589
+ position: absolute;
590
+ width: 100%;
591
+ height: 3px;
592
+ background: linear-gradient(
593
+ 90deg,
594
+ transparent 0%,
595
+ hsla(var(--bar-hue), 70%, 55%, 0.8) 20%,
596
+ hsla(var(--bar-hue), 70%, 55%, 1.0) 50%,
597
+ hsla(var(--bar-hue), 70%, 55%, 0.8) 80%,
598
+ transparent 100%
599
+ );
600
+ box-shadow: 0 0 12px hsla(var(--bar-hue), 60%, 50%, 0.4);
601
+ transform: translateY(var(--bar-y));
602
+ transition: transform 0.6s ease-out;
603
+ }
604
+ ```
605
+
606
+ ```javascript
607
+ // Bars move with scroll, creating scan-line depth effect
608
+ // Multiple bars at different y-positions create a "holographic grid" over the visualizer
609
+ function animateDividerBars(scrollProgress, bars) {
610
+ bars.forEach((bar, i) => {
611
+ const offset = i / bars.length;
612
+ const y = ((scrollProgress + offset) % 1) * 100;
613
+ bar.style.setProperty('--bar-y', `${y}%`);
614
+ bar.style.setProperty('--bar-hue', 200 + scrollProgress * 160);
615
+ });
616
+ }
617
+ ```
618
+
619
+ ### 4B. Vignette Depth Frame
620
+
621
+ CSS vignette overlay that intensifies depth perception by darkening edges.
622
+
623
+ ```css
624
+ .viz-vignette {
625
+ position: absolute;
626
+ inset: 0;
627
+ pointer-events: none;
628
+ background: radial-gradient(
629
+ ellipse at center,
630
+ transparent 40%,
631
+ rgba(0, 0, 0, var(--vignette-strength, 0.3)) 100%
632
+ );
633
+ z-index: 2;
634
+ }
635
+ ```
636
+
637
+ ```javascript
638
+ // Vignette tightens as element approaches (density drops)
639
+ function updateVignette(vignetteEl, density) {
640
+ const depthFactor = 1 - (density - 4) / 56;
641
+ vignetteEl.style.setProperty('--vignette-strength', lerp(0.1, 0.5, depthFactor));
642
+ }
643
+ ```
644
+
645
+ ### 4C. Chromatic Aberration Border
646
+
647
+ Split-color borders on visualizer containers that shift with 4D rotation.
648
+
649
+ ```css
650
+ .viz-chromatic-border {
651
+ position: relative;
652
+ }
653
+ .viz-chromatic-border::before,
654
+ .viz-chromatic-border::after {
655
+ content: '';
656
+ position: absolute;
657
+ inset: -2px;
658
+ border: 2px solid transparent;
659
+ border-radius: inherit;
660
+ pointer-events: none;
661
+ }
662
+ .viz-chromatic-border::before {
663
+ border-color: hsla(var(--chroma-hue-a), 80%, 60%, 0.4);
664
+ transform: translate(var(--chroma-offset, 1px), calc(var(--chroma-offset, 1px) * -1));
665
+ }
666
+ .viz-chromatic-border::after {
667
+ border-color: hsla(var(--chroma-hue-b), 80%, 60%, 0.4);
668
+ transform: translate(calc(var(--chroma-offset, 1px) * -1), var(--chroma-offset, 1px));
669
+ }
670
+ ```
671
+
672
+ ```javascript
673
+ // Chromatic offset driven by 4D rotation speed
674
+ function updateChromaticBorder(container, adapter) {
675
+ const rotSpeed = Math.abs(adapter.params.rot4dXW || 0) +
676
+ Math.abs(adapter.params.rot4dYW || 0);
677
+ const offset = Math.min(4, rotSpeed * 0.5);
678
+ const hue = adapter.params.hue || 200;
679
+ container.style.setProperty('--chroma-offset', offset + 'px');
680
+ container.style.setProperty('--chroma-hue-a', hue - 30);
681
+ container.style.setProperty('--chroma-hue-b', hue + 30);
682
+ }
683
+ ```
684
+
685
+ ### 4D. Particle Trail Overlay (CSS-only)
686
+
687
+ ```css
688
+ @keyframes particle-drift {
689
+ 0% { transform: translate(0, 0) scale(1); opacity: 0.6; }
690
+ 100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
691
+ }
692
+ .particle-overlay {
693
+ position: absolute;
694
+ inset: 0;
695
+ pointer-events: none;
696
+ overflow: hidden;
697
+ }
698
+ .particle-overlay span {
699
+ position: absolute;
700
+ width: 3px; height: 3px;
701
+ border-radius: 50%;
702
+ background: hsla(var(--particle-hue, 200), 70%, 70%, 0.8);
703
+ animation: particle-drift var(--particle-duration, 3s) linear infinite;
704
+ animation-delay: var(--particle-delay, 0s);
705
+ }
706
+ ```
707
+
708
+ ### 4E. Glow Seam (Between Visualizers)
709
+
710
+ When two visualizers share a border, the seam itself glows based on their combined energy.
711
+
712
+ ```css
713
+ .viz-seam {
714
+ position: absolute;
715
+ width: 4px;
716
+ height: 100%;
717
+ left: 50%;
718
+ transform: translateX(-50%);
719
+ background: linear-gradient(
720
+ 180deg,
721
+ transparent 0%,
722
+ hsla(var(--seam-hue), 80%, 60%, var(--seam-intensity)) 30%,
723
+ hsla(var(--seam-hue), 80%, 70%, var(--seam-intensity)) 50%,
724
+ hsla(var(--seam-hue), 80%, 60%, var(--seam-intensity)) 70%,
725
+ transparent 100%
726
+ );
727
+ filter: blur(var(--seam-blur, 4px));
728
+ z-index: 10;
729
+ }
730
+ ```
731
+
732
+ ```javascript
733
+ // Seam intensity = product of both systems' chaos
734
+ function updateGlowSeam(seamEl, adapterA, adapterB) {
735
+ const combinedChaos = (adapterA.params.chaos || 0) * (adapterB.params.chaos || 0);
736
+ const intensity = Math.min(1, combinedChaos * 10);
737
+ const hue = ((adapterA.params.hue || 200) + (adapterB.params.hue || 200)) / 2;
738
+ seamEl.style.setProperty('--seam-intensity', intensity.toFixed(2));
739
+ seamEl.style.setProperty('--seam-hue', Math.round(hue));
740
+ seamEl.style.setProperty('--seam-blur', lerp(8, 2, intensity) + 'px');
741
+ }
742
+ ```
743
+
744
+ ---
745
+
746
+ ## 5. Mathematical Intertwining Functions
747
+
748
+ ### 5A. Golden Ratio Density Cascade
749
+
750
+ Systems' densities follow golden ratio relationships.
751
+
752
+ ```javascript
753
+ const PHI = 1.618033988749;
754
+
755
+ function goldenDensityCascade(baseDensity, systemCount) {
756
+ return Array.from({ length: systemCount }, (_, i) => {
757
+ return baseDensity * Math.pow(PHI, i) % 56 + 4; // Keep in 4-60 range
758
+ });
759
+ }
760
+ ```
761
+
762
+ ### 5B. Lissajous Rotation Intertwining
763
+
764
+ Two systems' 4D rotations follow Lissajous curves — creating mesmerizing interlinked patterns.
765
+
766
+ ```javascript
767
+ function lissajousRotations(time, adapterA, adapterB, freqRatio = 3/2) {
768
+ const t = time / 1000;
769
+ // System A: simple frequency
770
+ adapterA.setParam('rot4dXW', Math.sin(t * 2) * Math.PI);
771
+ adapterA.setParam('rot4dYW', Math.cos(t * 2) * Math.PI * 0.7);
772
+
773
+ // System B: frequency ratio creates Lissajous knot
774
+ adapterB.setParam('rot4dXW', Math.sin(t * 2 * freqRatio) * Math.PI);
775
+ adapterB.setParam('rot4dYW', Math.cos(t * 2 * freqRatio + Math.PI / 4) * Math.PI * 0.7);
776
+
777
+ // Phase shift creates figure-8 patterns when viewed together
778
+ }
779
+ ```
780
+
781
+ ### 5C. Fibonacci Stagger Timing
782
+
783
+ Element reveals follow Fibonacci timing for natural-feeling cascades.
784
+
785
+ ```javascript
786
+ function fibonacciStagger(elementCount) {
787
+ const fibs = [0, 1];
788
+ for (let i = 2; i < elementCount + 2; i++) {
789
+ fibs.push(fibs[i-1] + fibs[i-2]);
790
+ }
791
+ const max = fibs[fibs.length - 1];
792
+ return fibs.slice(2).map(f => f / max); // Normalized 0-1
793
+ }
794
+
795
+ // Usage: stagger delays that feel organic
796
+ const delays = fibonacciStagger(6);
797
+ // [0.08, 0.13, 0.21, 0.34, 0.55, 1.0] — accelerating cascade
798
+ ```
799
+
800
+ ### 5D. Sine-Product Interference Pattern
801
+
802
+ Two systems' densities multiply as sine waves, creating interference patterns.
803
+
804
+ ```javascript
805
+ function sineInterference(progress, adapterA, adapterB) {
806
+ const freqA = 3, freqB = 5; // Different frequencies
807
+ const waveA = Math.sin(progress * Math.PI * freqA);
808
+ const waveB = Math.sin(progress * Math.PI * freqB);
809
+
810
+ // Interference product: creates beating pattern
811
+ const interference = (waveA * waveB + 1) / 2;
812
+
813
+ adapterA.setParam('gridDensity', 10 + waveA * waveA * 30); // Always positive
814
+ adapterB.setParam('gridDensity', 10 + waveB * waveB * 30);
815
+
816
+ // The PRODUCT drives a shared parameter (e.g., shared glow intensity)
817
+ return interference; // Use for glow seam, vignette, etc.
818
+ }
819
+ ```
820
+
821
+ ### 5E. Exponential Crescendo + Logarithmic Calm
822
+
823
+ *Inspired by: current speed crescendo, simone's mode threshold*
824
+
825
+ ```javascript
826
+ // Dramatic build: slow start, explosive acceleration
827
+ function exponentialBuild(progress, adapter) {
828
+ const exp = Math.pow(progress, 3); // cubic acceleration
829
+ adapter.setParams({
830
+ speed: 0.3 + exp * 2.5,
831
+ chaos: 0.05 + exp * 0.7,
832
+ intensity: 0.4 + exp * 0.5,
833
+ gridDensity: 20 + exp * 35,
834
+ });
835
+ }
836
+
837
+ // Calm recovery: fast initial relief, slow final settle
838
+ function logarithmicCalm(progress, adapter) {
839
+ const log = 1 - Math.pow(1 - progress, 3); // cubic deceleration
840
+ adapter.setParams({
841
+ speed: 2.8 - log * 2.5,
842
+ chaos: 0.75 - log * 0.7,
843
+ intensity: 0.9 - log * 0.5,
844
+ gridDensity: 55 - log * 35,
845
+ });
846
+ }
847
+ ```
848
+
849
+ ### 5F. Complementary Hue Breathing
850
+
851
+ Two systems breathe between complementary colors, with the breathing rate tied to scroll position.
852
+
853
+ ```javascript
854
+ function complementaryBreathing(time, scrollProgress, adapterA, adapterB) {
855
+ const breathRate = 0.5 + scrollProgress * 2; // Faster as you scroll
856
+ const breath = Math.sin(time / 1000 * breathRate * Math.PI * 2);
857
+
858
+ const baseHue = 200 + scrollProgress * 160;
859
+ const complementary = (baseHue + 180) % 360;
860
+
861
+ // A breathes between base and complement
862
+ adapterA.setParam('hue', lerp(baseHue, complementary, (breath + 1) / 2));
863
+ // B breathes inversely
864
+ adapterB.setParam('hue', lerp(complementary, baseHue, (breath + 1) / 2));
865
+
866
+ // When both are at the SAME hue (crossover point):
867
+ // Brief chaos spike — the "collision" moment
868
+ const hueDiff = Math.abs(adapterA.params.hue - adapterB.params.hue);
869
+ if (hueDiff < 10) {
870
+ adapterA.setParam('chaos', 0.5);
871
+ adapterB.setParam('chaos', 0.5);
872
+ }
873
+ }
874
+ ```
875
+
876
+ ---
877
+
878
+ ## 6. Implementation Priority Map
879
+
880
+ ### Tier 1: HIGH IMPACT, MODERATE EFFORT
881
+
882
+ | Pattern | Section | Visual Impact | Effort |
883
+ |---------|---------|--------------|--------|
884
+ | **Density-as-Distance** (1A/1B) | All sections | Transforms depth perception | Medium — parameter math only |
885
+ | **Faux-Shadow System** (1D) | All visualizer containers | Grounds elements in space | Low — CSS + 5 lines JS |
886
+ | **Push-Pull Depth** (1C) | Energy, CTA | Dramatic depth oscillation | Medium — coordinate 2 systems |
887
+ | **Glow Seam** (4E) | Triptych, CTA, Cascade | Living borders between systems | Low — CSS + 3 lines JS |
888
+ | **Vignette Frame** (4B) | All GPU sections | Focuses attention, adds depth | Low — CSS + 2 lines JS |
889
+
890
+ ### Tier 2: HIGH IMPACT, HIGHER EFFORT
891
+
892
+ | Pattern | Section | Visual Impact | Effort |
893
+ |---------|---------|--------------|--------|
894
+ | **Triptych Depth Rotation** (3B) | Triptych | Systems swap depth planes | High — 5-phase choreography |
895
+ | **Energy Depth Dance** (3D) | Energy | Full push-pull with geometry swap | High — 7-phase timeline |
896
+ | **Opposition→Unity** (3E) | CTA | Depth convergence finale | High — 3-act structure |
897
+ | **Dimensional Crossfade** (2F) | Section transitions | Blur/fade between systems | Medium — per boundary |
898
+
899
+ ### Tier 3: ACCENT EFFECTS
900
+
901
+ | Pattern | Where | Impact | Effort |
902
+ |---------|-------|--------|--------|
903
+ | **Chromatic Border** (4C) | Morph card, Energy card | Rotation-responsive border glow | Low |
904
+ | **Divider Bars** (4A) | Opening, Agent | Scan-line holographic overlay | Low |
905
+ | **Particle Trail** (4D) | CTA, Energy | Ambient movement | Low |
906
+ | **Fibonacci Stagger** (5C) | Cascade, Agent cards | Natural reveal timing | Low |
907
+
908
+ ### Tier 4: MATHEMATICAL BEAUTY
909
+
910
+ | Pattern | Where | Impact | Effort |
911
+ |---------|-------|--------|--------|
912
+ | **Lissajous Rotations** (5B) | Triptych, CTA | Interlinked rotation patterns | Low — parameter math |
913
+ | **Sine Interference** (5D) | Triptych | Beating density patterns | Low |
914
+ | **Complementary Breathing** (5F) | Energy, CTA | Hue collision moments | Low |
915
+ | **Golden Ratio Density** (5A) | Triptych | Naturally proportioned depths | Low |
916
+ | **Exponential/Log Crescendo** (5E) | Agent crescendo | More dramatic build/calm | Low |
917
+
918
+ ---
919
+
920
+ ## Quick Reference: Depth Illusion Parameters
921
+
922
+ | Parameter | Close (Approaching) | Far (Retreating) | Unit |
923
+ |-----------|-------------------|-----------------|------|
924
+ | gridDensity | 4-12 | 45-60 | count |
925
+ | intensity | 0.7-0.95 | 0.1-0.3 | 0-1 |
926
+ | speed | 0.8-1.5 | 0.05-0.2 | multiplier |
927
+ | chaos | 0.2-0.5 | 0.0-0.05 | 0-1 |
928
+ | dimension | 3.0-3.3 | 4.0-4.5 | projection distance |
929
+ | CSS scale | 1.1-1.3 | 0.4-0.7 | multiplier |
930
+ | CSS blur | 0px | 6-16px | px |
931
+ | CSS shadow | 30-50px tight | 0-4px wide | px |
932
+
933
+ ---
934
+
935
+ *End of Multi-Visualizer Choreography Patterns.*
936
+ *See DOCS/REFERENCE_SCROLL_ANALYSIS.md for the source analysis.*
937
+ *See DOCS/SCROLL_TIMELINE_v3.md for the current implementation.*