@vib3code/sdk 2.0.1 → 2.0.3-canary.0a63e71

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