@vib3code/sdk 2.0.1

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 (258) hide show
  1. package/CHANGELOG.md +118 -0
  2. package/DOCS/BLUEPRINT_EXECUTION_PLAN_2026-01-07.md +34 -0
  3. package/DOCS/CI_TESTING.md +38 -0
  4. package/DOCS/CLI_ONBOARDING.md +75 -0
  5. package/DOCS/CONTROL_REFERENCE.md +64 -0
  6. package/DOCS/DEV_TRACK_ANALYSIS.md +77 -0
  7. package/DOCS/DEV_TRACK_PLAN_2026-01-07.md +42 -0
  8. package/DOCS/DEV_TRACK_SESSION_2026-01-31.md +220 -0
  9. package/DOCS/ENV_SETUP.md +189 -0
  10. package/DOCS/EXPORT_FORMATS.md +417 -0
  11. package/DOCS/GPU_DISPOSAL_GUIDE.md +21 -0
  12. package/DOCS/LICENSING_TIERS.md +275 -0
  13. package/DOCS/MASTER_PLAN_2026-01-31.md +570 -0
  14. package/DOCS/OBS_SETUP_GUIDE.md +98 -0
  15. package/DOCS/PROJECT_SETUP.md +66 -0
  16. package/DOCS/RENDERER_LIFECYCLE.md +40 -0
  17. package/DOCS/REPO_MANIFEST.md +121 -0
  18. package/DOCS/SESSION_014_PLAN.md +195 -0
  19. package/DOCS/SESSION_LOG_2026-01-07.md +56 -0
  20. package/DOCS/STRATEGIC_BLUEPRINT_2026-01-07.md +72 -0
  21. package/DOCS/SYSTEM_AUDIT_2026-01-30.md +738 -0
  22. package/DOCS/SYSTEM_INVENTORY.md +520 -0
  23. package/DOCS/TELEMETRY_EXPORTS.md +34 -0
  24. package/DOCS/WEBGPU_STATUS.md +38 -0
  25. package/DOCS/XR_BENCHMARKS.md +608 -0
  26. package/LICENSE +21 -0
  27. package/README.md +426 -0
  28. package/docs/.nojekyll +0 -0
  29. package/docs/01-dissolution_of_euclidean_hegemony.html +346 -0
  30. package/docs/02-hyperspatial_ego_death.html +346 -0
  31. package/docs/03-post_cartesian_sublime.html +346 -0
  32. package/docs/04-crystalline_void_meditation.html +346 -0
  33. package/docs/05-quantum_decoherence_ballet.html +346 -0
  34. package/docs/06-dissolution_of_euclidean_hegemony.html +346 -0
  35. package/docs/07-hyperspatial_ego_death.html +346 -0
  36. package/docs/08-post_cartesian_sublime.html +346 -0
  37. package/docs/09-crystalline_void_meditation.html +346 -0
  38. package/docs/10-quantum_decoherence_ballet.html +346 -0
  39. package/docs/11-dissolution_of_euclidean_hegemony.html +346 -0
  40. package/docs/12-hyperspatial_ego_death.html +346 -0
  41. package/docs/13-post_cartesian_sublime.html +346 -0
  42. package/docs/index.html +794 -0
  43. package/docs/test-hub.html +441 -0
  44. package/docs/url-state.js +102 -0
  45. package/docs/vib3-exports/01-quantum-quantum-tetrahedron-lattice.html +489 -0
  46. package/docs/vib3-exports/02-quantum-quantum-hypersphere-matrix.html +489 -0
  47. package/docs/vib3-exports/03-quantum-quantum-hypertetra-fractal.html +489 -0
  48. package/docs/vib3-exports/04-faceted-faceted-crystal-structure.html +407 -0
  49. package/docs/vib3-exports/05-faceted-faceted-klein-bottle.html +407 -0
  50. package/docs/vib3-exports/06-faceted-faceted-hypertetra-torus.html +407 -0
  51. package/docs/vib3-exports/07-holographic-holographic-wave-field.html +457 -0
  52. package/docs/vib3-exports/08-holographic-holographic-hypersphere-sphere.html +457 -0
  53. package/docs/vib3-exports/09-holographic-holographic-hypertetra-crystal.html +457 -0
  54. package/docs/vib3-exports/index.html +238 -0
  55. package/docs/webgpu-live.html +702 -0
  56. package/package.json +367 -0
  57. package/src/advanced/AIPresetGenerator.js +777 -0
  58. package/src/advanced/MIDIController.js +703 -0
  59. package/src/advanced/OffscreenWorker.js +1051 -0
  60. package/src/advanced/WebGPUCompute.js +1051 -0
  61. package/src/advanced/WebXRRenderer.js +680 -0
  62. package/src/agent/cli/AgentCLI.js +615 -0
  63. package/src/agent/cli/index.js +14 -0
  64. package/src/agent/index.js +73 -0
  65. package/src/agent/mcp/MCPServer.js +950 -0
  66. package/src/agent/mcp/index.js +9 -0
  67. package/src/agent/mcp/tools.js +548 -0
  68. package/src/agent/telemetry/EventStream.js +669 -0
  69. package/src/agent/telemetry/Instrumentation.js +618 -0
  70. package/src/agent/telemetry/TelemetryExporters.js +427 -0
  71. package/src/agent/telemetry/TelemetryService.js +464 -0
  72. package/src/agent/telemetry/index.js +52 -0
  73. package/src/benchmarks/BenchmarkRunner.js +381 -0
  74. package/src/benchmarks/MetricsCollector.js +299 -0
  75. package/src/benchmarks/index.js +9 -0
  76. package/src/benchmarks/scenes.js +259 -0
  77. package/src/cli/index.js +675 -0
  78. package/src/config/ApiConfig.js +88 -0
  79. package/src/core/CanvasManager.js +217 -0
  80. package/src/core/ErrorReporter.js +117 -0
  81. package/src/core/ParameterMapper.js +333 -0
  82. package/src/core/Parameters.js +396 -0
  83. package/src/core/RendererContracts.js +200 -0
  84. package/src/core/UnifiedResourceManager.js +370 -0
  85. package/src/core/VIB3Engine.js +636 -0
  86. package/src/core/renderers/FacetedRendererAdapter.js +32 -0
  87. package/src/core/renderers/HolographicRendererAdapter.js +29 -0
  88. package/src/core/renderers/QuantumRendererAdapter.js +29 -0
  89. package/src/core/renderers/RendererLifecycleManager.js +63 -0
  90. package/src/creative/ColorPresetsSystem.js +980 -0
  91. package/src/creative/ParameterTimeline.js +1061 -0
  92. package/src/creative/PostProcessingPipeline.js +1113 -0
  93. package/src/creative/TransitionAnimator.js +683 -0
  94. package/src/export/CSSExporter.js +226 -0
  95. package/src/export/CardGeneratorBase.js +279 -0
  96. package/src/export/ExportManager.js +580 -0
  97. package/src/export/FacetedCardGenerator.js +279 -0
  98. package/src/export/HolographicCardGenerator.js +543 -0
  99. package/src/export/LottieExporter.js +552 -0
  100. package/src/export/QuantumCardGenerator.js +315 -0
  101. package/src/export/SVGExporter.js +519 -0
  102. package/src/export/ShaderExporter.js +903 -0
  103. package/src/export/TradingCardGenerator.js +3055 -0
  104. package/src/export/TradingCardManager.js +181 -0
  105. package/src/export/VIB3PackageExporter.js +559 -0
  106. package/src/export/index.js +14 -0
  107. package/src/export/systems/TradingCardSystemFaceted.js +494 -0
  108. package/src/export/systems/TradingCardSystemHolographic.js +452 -0
  109. package/src/export/systems/TradingCardSystemQuantum.js +411 -0
  110. package/src/faceted/FacetedSystem.js +963 -0
  111. package/src/features/CollectionManager.js +433 -0
  112. package/src/gallery/CollectionManager.js +240 -0
  113. package/src/gallery/GallerySystem.js +485 -0
  114. package/src/geometry/GeometryFactory.js +314 -0
  115. package/src/geometry/GeometryLibrary.js +72 -0
  116. package/src/geometry/buffers/BufferBuilder.js +338 -0
  117. package/src/geometry/buffers/index.js +18 -0
  118. package/src/geometry/generators/Crystal.js +420 -0
  119. package/src/geometry/generators/Fractal.js +298 -0
  120. package/src/geometry/generators/KleinBottle.js +197 -0
  121. package/src/geometry/generators/Sphere.js +192 -0
  122. package/src/geometry/generators/Tesseract.js +160 -0
  123. package/src/geometry/generators/Tetrahedron.js +225 -0
  124. package/src/geometry/generators/Torus.js +304 -0
  125. package/src/geometry/generators/Wave.js +341 -0
  126. package/src/geometry/index.js +142 -0
  127. package/src/geometry/warp/HypersphereCore.js +211 -0
  128. package/src/geometry/warp/HypertetraCore.js +386 -0
  129. package/src/geometry/warp/index.js +57 -0
  130. package/src/holograms/HolographicVisualizer.js +1073 -0
  131. package/src/holograms/RealHolographicSystem.js +966 -0
  132. package/src/holograms/variantRegistry.js +69 -0
  133. package/src/integrations/FigmaPlugin.js +854 -0
  134. package/src/integrations/OBSMode.js +754 -0
  135. package/src/integrations/ThreeJsPackage.js +660 -0
  136. package/src/integrations/TouchDesignerExport.js +552 -0
  137. package/src/integrations/frameworks/Vib3React.js +591 -0
  138. package/src/integrations/frameworks/Vib3Svelte.js +654 -0
  139. package/src/integrations/frameworks/Vib3Vue.js +628 -0
  140. package/src/llm/LLMParameterInterface.js +240 -0
  141. package/src/llm/LLMParameterUI.js +577 -0
  142. package/src/math/Mat4x4.js +708 -0
  143. package/src/math/Projection.js +341 -0
  144. package/src/math/Rotor4D.js +637 -0
  145. package/src/math/Vec4.js +476 -0
  146. package/src/math/constants.js +164 -0
  147. package/src/math/index.js +68 -0
  148. package/src/math/projections.js +54 -0
  149. package/src/math/rotations.js +196 -0
  150. package/src/quantum/QuantumEngine.js +906 -0
  151. package/src/quantum/QuantumVisualizer.js +1103 -0
  152. package/src/reactivity/ReactivityConfig.js +499 -0
  153. package/src/reactivity/ReactivityManager.js +586 -0
  154. package/src/reactivity/SpatialInputSystem.js +1783 -0
  155. package/src/reactivity/index.js +93 -0
  156. package/src/render/CommandBuffer.js +465 -0
  157. package/src/render/MultiCanvasBridge.js +340 -0
  158. package/src/render/RenderCommand.js +514 -0
  159. package/src/render/RenderResourceRegistry.js +523 -0
  160. package/src/render/RenderState.js +552 -0
  161. package/src/render/RenderTarget.js +512 -0
  162. package/src/render/ShaderLoader.js +253 -0
  163. package/src/render/ShaderProgram.js +599 -0
  164. package/src/render/UnifiedRenderBridge.js +496 -0
  165. package/src/render/backends/WebGLBackend.js +1108 -0
  166. package/src/render/backends/WebGPUBackend.js +1409 -0
  167. package/src/render/commands/CommandBufferExecutor.js +607 -0
  168. package/src/render/commands/RenderCommandBuffer.js +661 -0
  169. package/src/render/commands/index.js +17 -0
  170. package/src/render/index.js +367 -0
  171. package/src/scene/Disposable.js +498 -0
  172. package/src/scene/MemoryPool.js +618 -0
  173. package/src/scene/Node4D.js +697 -0
  174. package/src/scene/ResourceManager.js +599 -0
  175. package/src/scene/Scene4D.js +540 -0
  176. package/src/scene/index.js +98 -0
  177. package/src/schemas/error.schema.json +84 -0
  178. package/src/schemas/extension.schema.json +88 -0
  179. package/src/schemas/index.js +214 -0
  180. package/src/schemas/parameters.schema.json +142 -0
  181. package/src/schemas/tool-pack.schema.json +44 -0
  182. package/src/schemas/tool-response.schema.json +127 -0
  183. package/src/shaders/common/fullscreen.vert.glsl +5 -0
  184. package/src/shaders/common/fullscreen.vert.wgsl +17 -0
  185. package/src/shaders/common/geometry24.glsl +65 -0
  186. package/src/shaders/common/geometry24.wgsl +54 -0
  187. package/src/shaders/common/rotation4d.glsl +85 -0
  188. package/src/shaders/common/rotation4d.wgsl +86 -0
  189. package/src/shaders/common/uniforms.glsl +44 -0
  190. package/src/shaders/common/uniforms.wgsl +48 -0
  191. package/src/shaders/faceted/faceted.frag.glsl +129 -0
  192. package/src/shaders/faceted/faceted.frag.wgsl +164 -0
  193. package/src/shaders/holographic/holographic.frag.glsl +406 -0
  194. package/src/shaders/holographic/holographic.frag.wgsl +185 -0
  195. package/src/shaders/quantum/quantum.frag.glsl +513 -0
  196. package/src/shaders/quantum/quantum.frag.wgsl +361 -0
  197. package/src/testing/ParallelTestFramework.js +519 -0
  198. package/src/testing/__snapshots__/exportFormats.test.js.snap +24 -0
  199. package/src/testing/exportFormats.test.js +8 -0
  200. package/src/testing/projections.test.js +14 -0
  201. package/src/testing/rotations.test.js +37 -0
  202. package/src/ui/InteractivityMenu.js +516 -0
  203. package/src/ui/StatusManager.js +96 -0
  204. package/src/ui/adaptive/renderers/webgpu/BufferLayout.ts +252 -0
  205. package/src/ui/adaptive/renderers/webgpu/PolytopeInstanceBuffer.ts +144 -0
  206. package/src/ui/adaptive/renderers/webgpu/TripleBufferedUniform.ts +170 -0
  207. package/src/ui/adaptive/renderers/webgpu/WebGPURenderer.ts +735 -0
  208. package/src/ui/adaptive/renderers/webgpu/index.ts +112 -0
  209. package/src/variations/VariationManager.js +431 -0
  210. package/src/viewer/AudioReactivity.js +505 -0
  211. package/src/viewer/CardBending.js +481 -0
  212. package/src/viewer/GalleryUI.js +832 -0
  213. package/src/viewer/ReactivityManager.js +590 -0
  214. package/src/viewer/TradingCardExporter.js +600 -0
  215. package/src/viewer/ViewerPortal.js +374 -0
  216. package/src/viewer/index.js +12 -0
  217. package/src/wasm/WasmLoader.js +296 -0
  218. package/src/wasm/index.js +132 -0
  219. package/tools/agentic/mcpTools.js +88 -0
  220. package/tools/cli/agent-cli.js +92 -0
  221. package/tools/export/formats.js +24 -0
  222. package/tools/math/rotation-baseline.mjs +64 -0
  223. package/tools/shader-sync-verify.js +937 -0
  224. package/tools/telemetry/manifestPipeline.js +141 -0
  225. package/tools/telemetry/telemetryEvents.js +35 -0
  226. package/types/adaptive-sdk.d.ts +185 -0
  227. package/types/advanced/AIPresetGenerator.d.ts +81 -0
  228. package/types/advanced/MIDIController.d.ts +100 -0
  229. package/types/advanced/OffscreenWorker.d.ts +82 -0
  230. package/types/advanced/WebGPUCompute.d.ts +52 -0
  231. package/types/advanced/WebXRRenderer.d.ts +77 -0
  232. package/types/advanced/index.d.ts +46 -0
  233. package/types/core/ErrorReporter.d.ts +50 -0
  234. package/types/core/VIB3Engine.d.ts +204 -0
  235. package/types/creative/ColorPresetsSystem.d.ts +91 -0
  236. package/types/creative/ParameterTimeline.d.ts +74 -0
  237. package/types/creative/PostProcessingPipeline.d.ts +109 -0
  238. package/types/creative/TransitionAnimator.d.ts +71 -0
  239. package/types/creative/index.d.ts +35 -0
  240. package/types/integrations/FigmaPlugin.d.ts +46 -0
  241. package/types/integrations/OBSMode.d.ts +74 -0
  242. package/types/integrations/ThreeJsPackage.d.ts +62 -0
  243. package/types/integrations/TouchDesignerExport.d.ts +36 -0
  244. package/types/integrations/Vib3React.d.ts +74 -0
  245. package/types/integrations/Vib3Svelte.d.ts +63 -0
  246. package/types/integrations/Vib3Vue.d.ts +55 -0
  247. package/types/integrations/index.d.ts +52 -0
  248. package/types/reactivity/SpatialInputSystem.d.ts +173 -0
  249. package/types/reactivity/index.d.ts +394 -0
  250. package/types/render/CommandBuffer.d.ts +169 -0
  251. package/types/render/RenderCommand.d.ts +312 -0
  252. package/types/render/RenderState.d.ts +279 -0
  253. package/types/render/RenderTarget.d.ts +254 -0
  254. package/types/render/ShaderProgram.d.ts +277 -0
  255. package/types/render/UnifiedRenderBridge.d.ts +143 -0
  256. package/types/render/WebGLBackend.d.ts +168 -0
  257. package/types/render/WebGPUBackend.d.ts +186 -0
  258. package/types/render/index.d.ts +141 -0
@@ -0,0 +1,441 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
6
+ <title>VIB3+ Mobile Test Hub</title>
7
+ <style>
8
+ * { margin: 0; padding: 0; box-sizing: border-box; }
9
+ body {
10
+ background: #0a0a12;
11
+ color: #e0e0e0;
12
+ font-family: 'SF Mono', 'Fira Code', monospace;
13
+ padding: 16px;
14
+ padding-bottom: 80px;
15
+ }
16
+ h1 {
17
+ font-size: 18px;
18
+ color: #0ff;
19
+ text-align: center;
20
+ padding: 16px 0;
21
+ letter-spacing: 3px;
22
+ text-transform: uppercase;
23
+ }
24
+ .status-bar {
25
+ background: rgba(0,255,0,0.1);
26
+ border: 1px solid rgba(0,255,0,0.3);
27
+ border-radius: 8px;
28
+ padding: 12px;
29
+ margin-bottom: 16px;
30
+ font-size: 11px;
31
+ }
32
+ .status-bar .label { color: #888; }
33
+ .status-bar .value { color: #0f0; font-weight: bold; }
34
+ .status-bar .fail { color: #f44; }
35
+ .status-bar .warn { color: #ff0; }
36
+ .section {
37
+ margin-bottom: 24px;
38
+ }
39
+ .section h2 {
40
+ font-size: 13px;
41
+ color: #0ff;
42
+ padding: 8px 0;
43
+ border-bottom: 1px solid rgba(255,255,255,0.1);
44
+ margin-bottom: 8px;
45
+ letter-spacing: 2px;
46
+ }
47
+ .card {
48
+ display: block;
49
+ background: rgba(255,255,255,0.04);
50
+ border: 1px solid rgba(255,255,255,0.1);
51
+ border-radius: 8px;
52
+ padding: 14px 16px;
53
+ margin-bottom: 8px;
54
+ text-decoration: none;
55
+ color: inherit;
56
+ transition: background 0.2s, border-color 0.2s;
57
+ }
58
+ .card:active {
59
+ background: rgba(0,255,255,0.1);
60
+ border-color: #0ff;
61
+ }
62
+ .card .title {
63
+ font-size: 13px;
64
+ color: #fff;
65
+ margin-bottom: 4px;
66
+ }
67
+ .card .meta {
68
+ font-size: 10px;
69
+ color: #666;
70
+ }
71
+ .card .system {
72
+ display: inline-block;
73
+ padding: 2px 6px;
74
+ border-radius: 4px;
75
+ font-size: 9px;
76
+ font-weight: bold;
77
+ letter-spacing: 1px;
78
+ margin-right: 6px;
79
+ }
80
+ .card .system.quantum { background: rgba(100,255,150,0.2); color: #64ff96; }
81
+ .card .system.faceted { background: rgba(0,255,255,0.2); color: #0ff; }
82
+ .card .system.holographic { background: rgba(255,0,255,0.2); color: #f0f; }
83
+ .card .system.gallery { background: rgba(255,255,0,0.2); color: #ff0; }
84
+ .fullwidth-btn {
85
+ display: block;
86
+ width: 100%;
87
+ padding: 14px;
88
+ background: rgba(0,255,255,0.15);
89
+ border: 1px solid #0ff;
90
+ border-radius: 8px;
91
+ color: #0ff;
92
+ font-size: 14px;
93
+ font-family: inherit;
94
+ text-align: center;
95
+ text-decoration: none;
96
+ margin-bottom: 8px;
97
+ }
98
+ .fullwidth-btn:active {
99
+ background: rgba(0,255,255,0.3);
100
+ }
101
+ #gpu-report {
102
+ margin-top: 12px;
103
+ padding: 12px;
104
+ background: rgba(0,0,0,0.5);
105
+ border-radius: 8px;
106
+ font-size: 10px;
107
+ white-space: pre-wrap;
108
+ max-height: 300px;
109
+ overflow-y: auto;
110
+ }
111
+ .pass { color: #0f0; }
112
+ .fail { color: #f44; }
113
+ </style>
114
+ </head>
115
+ <body>
116
+ <h1>VIB3+ Test Hub</h1>
117
+
118
+ <div class="status-bar" id="gpu-status">
119
+ <div><span class="label">WebGL: </span><span id="webgl-status" class="value">checking...</span></div>
120
+ <div><span class="label">WebGL2: </span><span id="webgl2-status" class="value">checking...</span></div>
121
+ <div><span class="label">WebGPU: </span><span id="webgpu-status" class="value">checking...</span></div>
122
+ <div><span class="label">GPU: </span><span id="gpu-name" class="value">detecting...</span></div>
123
+ <div><span class="label">Screen: </span><span id="screen-info" class="value">...</span></div>
124
+ <div><span class="label">DPR: </span><span id="dpr-info" class="value">...</span></div>
125
+ </div>
126
+
127
+ <div class="section">
128
+ <h2>LIVE ENGINE</h2>
129
+ <a class="card" href="webgpu-live.html" style="border-color: rgba(0,255,100,0.4);">
130
+ <div class="title"><span class="system" style="background:rgba(0,255,100,0.2);color:#0f6;">WebGPU</span> Live 4D Visualization Engine</div>
131
+ <div class="meta">Fullscreen interactive &bull; WebGPU preferred, WebGL fallback &bull; All 24 geometries &bull; 6D rotation</div>
132
+ </a>
133
+ </div>
134
+
135
+ <div class="section">
136
+ <h2>GALLERIES</h2>
137
+ <a class="card" href="index.html">
138
+ <div class="title"><span class="system gallery">GALLERY</span> Algorithmic Avant-Garde Collection</div>
139
+ <div class="meta">13 visualizations in iframe gallery layout</div>
140
+ </a>
141
+ <a class="card" href="vib3-exports/index.html">
142
+ <div class="title"><span class="system gallery">EXPORTS</span> Real Shader Exports</div>
143
+ <div class="meta">9 exported visualizations (3 quantum, 3 faceted, 3 holographic)</div>
144
+ </a>
145
+ </div>
146
+
147
+ <div class="section">
148
+ <h2>QUANTUM SYSTEM (3)</h2>
149
+ <a class="card" href="vib3-exports/01-quantum-quantum-tetrahedron-lattice.html">
150
+ <div class="title"><span class="system quantum">QUANTUM</span> Tetrahedron Lattice</div>
151
+ <div class="meta">Geometry 0 (Base) &bull; Grid 18 &bull; Morph 1.2 &bull; Hue 180</div>
152
+ </a>
153
+ <a class="card" href="vib3-exports/02-quantum-quantum-hypersphere-matrix.html">
154
+ <div class="title"><span class="system quantum">QUANTUM</span> Hypersphere Matrix</div>
155
+ <div class="meta">Geometry 8 (Hypersphere) &bull; 4D rotation active</div>
156
+ </a>
157
+ <a class="card" href="vib3-exports/03-quantum-quantum-hypertetra-fractal.html">
158
+ <div class="title"><span class="system quantum">QUANTUM</span> Hypertetra Fractal</div>
159
+ <div class="meta">Geometry 16 (Hypertetrahedron) &bull; Fractal patterns</div>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="section">
164
+ <h2>FACETED SYSTEM (3)</h2>
165
+ <a class="card" href="vib3-exports/04-faceted-faceted-crystal-structure.html">
166
+ <div class="title"><span class="system faceted">FACETED</span> Crystal Structure</div>
167
+ <div class="meta">Clean 2D geometric patterns with 4D rotation</div>
168
+ </a>
169
+ <a class="card" href="vib3-exports/05-faceted-faceted-klein-bottle.html">
170
+ <div class="title"><span class="system faceted">FACETED</span> Klein Bottle</div>
171
+ <div class="meta">Non-orientable surface projection</div>
172
+ </a>
173
+ <a class="card" href="vib3-exports/06-faceted-faceted-hypertetra-torus.html">
174
+ <div class="title"><span class="system faceted">FACETED</span> Hypertetra Torus</div>
175
+ <div class="meta">Hypertetrahedron + toroidal geometry</div>
176
+ </a>
177
+ </div>
178
+
179
+ <div class="section">
180
+ <h2>HOLOGRAPHIC SYSTEM (3)</h2>
181
+ <a class="card" href="vib3-exports/07-holographic-holographic-wave-field.html">
182
+ <div class="title"><span class="system holographic">HOLO</span> Wave Field</div>
183
+ <div class="meta">5-layer glassmorphic wave patterns</div>
184
+ </a>
185
+ <a class="card" href="vib3-exports/08-holographic-holographic-hypersphere-sphere.html">
186
+ <div class="title"><span class="system holographic">HOLO</span> Hypersphere</div>
187
+ <div class="meta">Spherical holographic projection</div>
188
+ </a>
189
+ <a class="card" href="vib3-exports/09-holographic-holographic-hypertetra-crystal.html">
190
+ <div class="title"><span class="system holographic">HOLO</span> Hypertetra Crystal</div>
191
+ <div class="meta">Crystalline hypertetrahedron rendering</div>
192
+ </a>
193
+ </div>
194
+
195
+ <div class="section">
196
+ <h2>STANDALONE VISUALIZATIONS (13)</h2>
197
+ <a class="card" href="01-dissolution_of_euclidean_hegemony.html">
198
+ <div class="title">01 &mdash; Dissolution of Euclidean Hegemony</div>
199
+ <div class="meta">Recursive non-orientable manifold projections</div>
200
+ </a>
201
+ <a class="card" href="02-hyperspatial_ego_death.html">
202
+ <div class="title">02 &mdash; Hyperspatial Ego Death</div>
203
+ <div class="meta">Dimensional transcendence through tesseract unfolding</div>
204
+ </a>
205
+ <a class="card" href="03-post_cartesian_sublime.html">
206
+ <div class="title">03 &mdash; Post-Cartesian Sublime</div>
207
+ <div class="meta">Beyond coordinate geometry</div>
208
+ </a>
209
+ <a class="card" href="04-crystalline_void_meditation.html">
210
+ <div class="title">04 &mdash; Crystalline Void Meditation</div>
211
+ <div class="meta">Crystal structure in the void</div>
212
+ </a>
213
+ <a class="card" href="05-quantum_decoherence_ballet.html">
214
+ <div class="title">05 &mdash; Quantum Decoherence Ballet</div>
215
+ <div class="meta">Wavefunction collapse through stochastic geometry</div>
216
+ </a>
217
+ <a class="card" href="06-dissolution_of_euclidean_hegemony.html">
218
+ <div class="title">06 &mdash; Dissolution of Euclidean Hegemony (v2)</div>
219
+ <div class="meta">Extended variation</div>
220
+ </a>
221
+ <a class="card" href="07-hyperspatial_ego_death.html">
222
+ <div class="title">07 &mdash; Hyperspatial Ego Death (v2)</div>
223
+ <div class="meta">Extended variation</div>
224
+ </a>
225
+ <a class="card" href="08-post_cartesian_sublime.html">
226
+ <div class="title">08 &mdash; Post-Cartesian Sublime (v2)</div>
227
+ <div class="meta">Extended variation</div>
228
+ </a>
229
+ <a class="card" href="09-crystalline_void_meditation.html">
230
+ <div class="title">09 &mdash; Crystalline Void Meditation (v2)</div>
231
+ <div class="meta">Extended variation</div>
232
+ </a>
233
+ <a class="card" href="10-quantum_decoherence_ballet.html">
234
+ <div class="title">10 &mdash; Quantum Decoherence Ballet (v2)</div>
235
+ <div class="meta">Extended variation</div>
236
+ </a>
237
+ <a class="card" href="11-dissolution_of_euclidean_hegemony.html">
238
+ <div class="title">11 &mdash; Dissolution of Euclidean Hegemony (v3)</div>
239
+ <div class="meta">Extended variation</div>
240
+ </a>
241
+ <a class="card" href="12-hyperspatial_ego_death.html">
242
+ <div class="title">12 &mdash; Hyperspatial Ego Death (v3)</div>
243
+ <div class="meta">Extended variation</div>
244
+ </a>
245
+ <a class="card" href="13-post_cartesian_sublime.html">
246
+ <div class="title">13 &mdash; Post-Cartesian Sublime (v3)</div>
247
+ <div class="meta">Extended variation</div>
248
+ </a>
249
+ </div>
250
+
251
+ <div class="section">
252
+ <h2>GPU DIAGNOSTICS</h2>
253
+ <button class="fullwidth-btn" onclick="runGPUDiag()">Run Full GPU Diagnostic</button>
254
+ <div id="gpu-report"></div>
255
+ </div>
256
+
257
+ <script>
258
+ // GPU capability detection
259
+ (async function detect() {
260
+ const canvas = document.createElement('canvas');
261
+
262
+ // WebGL 1
263
+ const gl1 = canvas.getContext('webgl');
264
+ const el1 = document.getElementById('webgl-status');
265
+ if (gl1) {
266
+ const ext = gl1.getExtension('WEBGL_debug_renderer_info');
267
+ const renderer = ext ? gl1.getParameter(ext.UNMASKED_RENDERER_WEBGL) : 'yes';
268
+ el1.textContent = 'YES';
269
+ el1.className = 'value pass';
270
+ document.getElementById('gpu-name').textContent = renderer;
271
+ } else {
272
+ el1.textContent = 'NO';
273
+ el1.className = 'value fail';
274
+ }
275
+
276
+ // WebGL 2
277
+ const gl2 = document.createElement('canvas').getContext('webgl2');
278
+ const el2 = document.getElementById('webgl2-status');
279
+ el2.textContent = gl2 ? 'YES' : 'NO';
280
+ el2.className = gl2 ? 'value pass' : 'value fail';
281
+
282
+ // WebGPU
283
+ const elGPU = document.getElementById('webgpu-status');
284
+ if (navigator.gpu) {
285
+ try {
286
+ const adapter = await navigator.gpu.requestAdapter();
287
+ if (adapter) {
288
+ const info = adapter.info || {};
289
+ elGPU.textContent = `YES (${info.vendor || ''} ${info.architecture || ''})`.trim();
290
+ elGPU.className = 'value pass';
291
+ } else {
292
+ elGPU.textContent = 'NO (no adapter)';
293
+ elGPU.className = 'value fail';
294
+ }
295
+ } catch(e) {
296
+ elGPU.textContent = `NO (${e.message})`;
297
+ elGPU.className = 'value fail';
298
+ }
299
+ } else {
300
+ elGPU.textContent = 'NO (not available)';
301
+ elGPU.className = 'value warn';
302
+ }
303
+
304
+ // Screen info
305
+ document.getElementById('screen-info').textContent =
306
+ `${screen.width}x${screen.height} (viewport: ${window.innerWidth}x${window.innerHeight})`;
307
+ document.getElementById('dpr-info').textContent = window.devicePixelRatio;
308
+ })();
309
+
310
+ // Full GPU diagnostic
311
+ async function runGPUDiag() {
312
+ const out = document.getElementById('gpu-report');
313
+ const lines = [];
314
+ function log(s) { lines.push(s); out.textContent = lines.join('\n'); }
315
+
316
+ log('=== VIB3+ GPU Diagnostic ===');
317
+ log(`Date: ${new Date().toISOString()}`);
318
+ log(`UA: ${navigator.userAgent}`);
319
+ log(`Screen: ${screen.width}x${screen.height} @ ${window.devicePixelRatio}x`);
320
+ log(`Viewport: ${window.innerWidth}x${window.innerHeight}`);
321
+ log('');
322
+
323
+ // WebGL 1
324
+ const canvas = document.createElement('canvas');
325
+ canvas.width = 256;
326
+ canvas.height = 256;
327
+ const gl = canvas.getContext('webgl');
328
+ if (gl) {
329
+ log('--- WebGL 1 ---');
330
+ const ext = gl.getExtension('WEBGL_debug_renderer_info');
331
+ log(`Vendor: ${ext ? gl.getParameter(ext.UNMASKED_VENDOR_WEBGL) : gl.getParameter(gl.VENDOR)}`);
332
+ log(`Renderer: ${ext ? gl.getParameter(ext.UNMASKED_RENDERER_WEBGL) : gl.getParameter(gl.RENDERER)}`);
333
+ log(`Version: ${gl.getParameter(gl.VERSION)}`);
334
+ log(`GLSL: ${gl.getParameter(gl.SHADING_LANGUAGE_VERSION)}`);
335
+ log(`Max Tex Size: ${gl.getParameter(gl.MAX_TEXTURE_SIZE)}`);
336
+ log(`Max Viewp: ${gl.getParameter(gl.MAX_VIEWPORT_DIMS)}`);
337
+ log(`Extensions: ${gl.getSupportedExtensions().length}`);
338
+
339
+ // Quick shader compile test
340
+ log('');
341
+ log('--- Shader Compile Test ---');
342
+ const vs = gl.createShader(gl.VERTEX_SHADER);
343
+ gl.shaderSource(vs, 'attribute vec2 p;void main(){gl_Position=vec4(p,0,1);}');
344
+ gl.compileShader(vs);
345
+ log(`Vertex: ${gl.getShaderParameter(vs, gl.COMPILE_STATUS) ? 'PASS' : 'FAIL'}`);
346
+
347
+ const fs = gl.createShader(gl.FRAGMENT_SHADER);
348
+ gl.shaderSource(fs, `
349
+ precision highp float;
350
+ uniform float u_time;
351
+ uniform vec2 u_resolution;
352
+ mat4 rotateXW(float a){float c=cos(a),s=sin(a);return mat4(c,0,0,-s,0,1,0,0,0,0,1,0,s,0,0,c);}
353
+ void main(){
354
+ vec2 uv=(gl_FragCoord.xy-0.5*u_resolution)/min(u_resolution.x,u_resolution.y);
355
+ vec4 p=vec4(uv,0,0);
356
+ p=rotateXW(u_time*0.01)*p;
357
+ float d=length(p.xyz/(2.5-p.w))-0.5;
358
+ vec3 col=vec3(0.2,0.8,1.0)*smoothstep(0.02,0.0,abs(d));
359
+ gl_FragColor=vec4(col,1);
360
+ }
361
+ `);
362
+ gl.compileShader(fs);
363
+ const fsOk = gl.getShaderParameter(fs, gl.COMPILE_STATUS);
364
+ log(`Fragment (4D rotation): ${fsOk ? 'PASS' : 'FAIL: ' + gl.getShaderInfoLog(fs)}`);
365
+
366
+ if (fsOk) {
367
+ const prog = gl.createProgram();
368
+ gl.attachShader(prog, vs);
369
+ gl.attachShader(prog, fs);
370
+ gl.linkProgram(prog);
371
+ const linked = gl.getProgramParameter(prog, gl.LINK_STATUS);
372
+ log(`Link: ${linked ? 'PASS' : 'FAIL'}`);
373
+
374
+ if (linked) {
375
+ // Render a frame
376
+ gl.useProgram(prog);
377
+ const buf = gl.createBuffer();
378
+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);
379
+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1,-1,1,-1,-1,1,1,1]), gl.STATIC_DRAW);
380
+ const loc = gl.getAttribLocation(prog, 'p');
381
+ gl.enableVertexAttribArray(loc);
382
+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);
383
+ gl.uniform1f(gl.getUniformLocation(prog, 'u_time'), performance.now());
384
+ gl.uniform2f(gl.getUniformLocation(prog, 'u_resolution'), 256, 256);
385
+ gl.viewport(0, 0, 256, 256);
386
+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
387
+
388
+ // Read pixels
389
+ const pixels = new Uint8Array(256 * 256 * 4);
390
+ gl.readPixels(0, 0, 256, 256, gl.RGBA, gl.UNSIGNED_BYTE, pixels);
391
+ let nonBlack = 0;
392
+ for (let i = 0; i < pixels.length; i += 4) {
393
+ if (pixels[i] > 5 || pixels[i+1] > 5 || pixels[i+2] > 5) nonBlack++;
394
+ }
395
+ const total = 256 * 256;
396
+ const pct = (nonBlack / total * 100).toFixed(1);
397
+ log(`Render test: ${pct}% non-black pixels (${nonBlack}/${total})`);
398
+ log(nonBlack > 100 ? '>>> GPU RENDERING WORKS <<<' : '>>> RENDERING FAILED (all black) <<<');
399
+ }
400
+ }
401
+ } else {
402
+ log('--- WebGL 1: NOT AVAILABLE ---');
403
+ }
404
+
405
+ // WebGL 2
406
+ log('');
407
+ const gl2 = document.createElement('canvas').getContext('webgl2');
408
+ log(`--- WebGL 2: ${gl2 ? 'AVAILABLE' : 'NOT AVAILABLE'} ---`);
409
+
410
+ // WebGPU
411
+ log('');
412
+ if (navigator.gpu) {
413
+ try {
414
+ const adapter = await navigator.gpu.requestAdapter();
415
+ if (adapter) {
416
+ const info = adapter.info || {};
417
+ log('--- WebGPU ---');
418
+ log(`Vendor: ${info.vendor || 'unknown'}`);
419
+ log(`Architecture: ${info.architecture || 'unknown'}`);
420
+ log(`Description: ${info.description || 'unknown'}`);
421
+
422
+ const device = await adapter.requestDevice();
423
+ log(`Device: ${device ? 'created' : 'failed'}`);
424
+ log(`Max Buffer: ${device.limits.maxBufferSize}`);
425
+ log(`Max Tex 2D: ${device.limits.maxTextureDimension2D}`);
426
+ } else {
427
+ log('--- WebGPU: no adapter ---');
428
+ }
429
+ } catch(e) {
430
+ log(`--- WebGPU error: ${e.message} ---`);
431
+ }
432
+ } else {
433
+ log('--- WebGPU: not available in this browser ---');
434
+ }
435
+
436
+ log('');
437
+ log('=== Diagnostic Complete ===');
438
+ }
439
+ </script>
440
+ </body>
441
+ </html>
@@ -0,0 +1,102 @@
1
+ /**
2
+ * VIB3+ URL State Manager
3
+ * Reads/writes visualization parameters to URL query string for shareable links.
4
+ *
5
+ * Usage: Include this script in any demo page.
6
+ * On load, applies URL params. On change, updates URL without reload.
7
+ *
8
+ * Supported params: system, geometry, hue, saturation, intensity, speed,
9
+ * chaos, morphFactor, gridDensity, dimension, rot4dXY..ZW
10
+ */
11
+ (function () {
12
+ 'use strict';
13
+
14
+ const PARAM_KEYS = [
15
+ 'system', 'geometry', 'hue', 'saturation', 'intensity', 'speed',
16
+ 'chaos', 'morphFactor', 'gridDensity', 'dimension',
17
+ 'rot4dXY', 'rot4dXZ', 'rot4dYZ', 'rot4dXW', 'rot4dYW', 'rot4dZW'
18
+ ];
19
+
20
+ const NUMERIC_PARAMS = PARAM_KEYS.filter(k => k !== 'system');
21
+
22
+ /**
23
+ * Read URL params and return as object.
24
+ */
25
+ function readURLState() {
26
+ const params = new URLSearchParams(window.location.search);
27
+ const state = {};
28
+ for (const key of PARAM_KEYS) {
29
+ if (params.has(key)) {
30
+ const raw = params.get(key);
31
+ if (key === 'system') {
32
+ if (['quantum', 'faceted', 'holographic'].includes(raw)) {
33
+ state.system = raw;
34
+ }
35
+ } else {
36
+ const num = parseFloat(raw);
37
+ if (Number.isFinite(num)) {
38
+ state[key] = num;
39
+ }
40
+ }
41
+ }
42
+ }
43
+ return state;
44
+ }
45
+
46
+ /**
47
+ * Write current state to URL without page reload.
48
+ */
49
+ function writeURLState(state) {
50
+ const params = new URLSearchParams();
51
+ for (const key of PARAM_KEYS) {
52
+ if (state[key] !== undefined && state[key] !== null) {
53
+ params.set(key, String(state[key]));
54
+ }
55
+ }
56
+ const qs = params.toString();
57
+ const newURL = qs
58
+ ? `${window.location.pathname}?${qs}`
59
+ : window.location.pathname;
60
+ window.history.replaceState(null, '', newURL);
61
+ }
62
+
63
+ /**
64
+ * Apply URL state to engine if available.
65
+ */
66
+ function applyURLState() {
67
+ const state = readURLState();
68
+ if (Object.keys(state).length === 0) return;
69
+
70
+ // Try to find the engine on window
71
+ const engine = window.vib3Engine || window.engine;
72
+ if (!engine) {
73
+ // Retry after engine might be initialized
74
+ setTimeout(applyURLState, 500);
75
+ return;
76
+ }
77
+
78
+ // Switch system first if specified
79
+ if (state.system && typeof engine.switchSystem === 'function') {
80
+ engine.switchSystem(state.system);
81
+ }
82
+
83
+ // Apply numeric parameters
84
+ for (const key of NUMERIC_PARAMS) {
85
+ if (state[key] !== undefined && typeof engine.setParameter === 'function') {
86
+ engine.setParameter(key, state[key]);
87
+ }
88
+ }
89
+
90
+ console.log('[VIB3 URL State] Applied:', state);
91
+ }
92
+
93
+ // Export for use by other scripts
94
+ window.vib3URLState = { read: readURLState, write: writeURLState, apply: applyURLState };
95
+
96
+ // Auto-apply on load
97
+ if (document.readyState === 'loading') {
98
+ document.addEventListener('DOMContentLoaded', applyURLState);
99
+ } else {
100
+ applyURLState();
101
+ }
102
+ })();