react-native-webrtc-kaleidoscope 2.6.0 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +173 -3
  2. package/catalog/composites/clouds/clouds.ts +5 -5
  3. package/catalog/composites/nebula/nebula.thumb.webp +0 -0
  4. package/catalog/shaders/data-mesh/data-mesh.form.tsx +53 -0
  5. package/catalog/shaders/data-mesh/data-mesh.frag +205 -0
  6. package/catalog/shaders/data-mesh/data-mesh.ts +225 -0
  7. package/catalog/shaders/index.ts +4 -0
  8. package/catalog/shaders/nebula/nebula.frag +11 -3
  9. package/dist/catalog/composites/clouds/clouds.d.ts +5 -5
  10. package/dist/catalog/composites/clouds/clouds.js +5 -5
  11. package/dist/catalog/composites/clouds/clouds.js.map +1 -1
  12. package/dist/catalog/composites/nebula/nebula.thumb.webp +0 -0
  13. package/dist/catalog/shaders/data-mesh/data-mesh.d.ts +50 -0
  14. package/dist/catalog/shaders/data-mesh/data-mesh.d.ts.map +1 -0
  15. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts +3 -0
  16. package/dist/catalog/shaders/data-mesh/data-mesh.form.d.ts.map +1 -0
  17. package/dist/catalog/shaders/data-mesh/data-mesh.form.js +15 -0
  18. package/dist/catalog/shaders/data-mesh/data-mesh.form.js.map +1 -0
  19. package/dist/catalog/shaders/data-mesh/data-mesh.js +179 -0
  20. package/dist/catalog/shaders/data-mesh/data-mesh.js.map +1 -0
  21. package/dist/catalog/shaders/index.d.ts +4 -0
  22. package/dist/catalog/shaders/index.d.ts.map +1 -1
  23. package/dist/catalog/shaders/index.js +3 -1
  24. package/dist/catalog/shaders/index.js.map +1 -1
  25. package/dist/web-driver/shaders.generated.d.ts +2 -1
  26. package/dist/web-driver/shaders.generated.d.ts.map +1 -1
  27. package/dist/web-driver/shaders.generated.js +173 -4
  28. package/dist/web-driver/shaders.generated.js.map +1 -1
  29. package/ios/KaleidoscopeModule/shaders/GENERATIVE.txt +1 -0
  30. package/ios/KaleidoscopeModule/shaders/SHADERS.txt +1 -0
  31. package/ios/KaleidoscopeModule/shaders/data-mesh.metalsrc +99 -0
  32. package/ios/KaleidoscopeModule/shaders/nebula.metalsrc +56 -51
  33. package/package.json +8 -1
@@ -0,0 +1,225 @@
1
+ // Data-mesh layer-shader interface: typed uniforms + control descriptor. A mid-
2
+ // 2000s corporate wireframe-wave background, an opaque BACKGROUND layer. One
3
+ // data-mesh.frag fans out into the book presets (datafield, boardroom, acid,
4
+ // cobalt, and slate) by varying these uniforms; the color set is the
5
+ // big lever (gradient + line/crest/haze/accent), the structural dials set
6
+ // composition and motion. Shader source is shaders/data-mesh/data-mesh.frag.
7
+
8
+ import type { RGB } from '../../../src/lib/primitives.types';
9
+ import type { UniformControl } from '../_shared/types';
10
+
11
+ /** Typed uniforms for the `data-mesh` layer shader. */
12
+ export type DataMeshUniforms = {
13
+ /** Background gradient color at the top of frame. */
14
+ readonly uBgTop: RGB;
15
+ /** Background gradient color at the bottom of frame. */
16
+ readonly uBgBottom: RGB;
17
+ /** Mid wireframe-line tint (the trough/body color). */
18
+ readonly uLineColor: RGB;
19
+ /** Crest highlight color (brightest along the peaks). */
20
+ readonly uCrestColor: RGB;
21
+ /** Atmospheric haze tint on the far rows. */
22
+ readonly uHazeColor: RGB;
23
+ /** The one restrained accent color (e.g. enterprise red). */
24
+ readonly uAccentColor: RGB;
25
+ /** Wave-field spatial frequency; lower = looser, broader hills. */
26
+ readonly uWaveScale: number;
27
+ /** Vertical wave displacement amount (near rows). */
28
+ readonly uWaveAmp: number;
29
+ /** Animation rate; 0 freezes the surface. */
30
+ readonly uWaveSpeed: number;
31
+ /** Column-grid density across the surface; keep loose. */
32
+ readonly uGridX: number;
33
+ /** Horizon height in uv.y units (rows converge toward it). */
34
+ readonly uHorizon: number;
35
+ /** Perspective scale of the farthest row; > 0 (guards the divide). */
36
+ readonly uFarScale: number;
37
+ /** Diagonal tilt; raises the right side for corner composition. */
38
+ readonly uSlant: number;
39
+ /** Wireframe line half-width (smaller = finer, sharper). */
40
+ readonly uLineWidth: number;
41
+ /** Emphasis of glowing intersection nodes (the dot reading), 0..1. */
42
+ readonly uNodeMix: number;
43
+ /** Emphasis of vertical struts (the wireframe reading), 0..1. */
44
+ readonly uStrutMix: number;
45
+ /** Overall additive mesh-glow / bloom strength. */
46
+ readonly uGlow: number;
47
+ /** Atmospheric far-haze strength. */
48
+ readonly uHaze: number;
49
+ /** Floating-particle intensity; 0 disables the field. */
50
+ readonly uParticles: number;
51
+ /** Lone accent-mote intensity; 0 disables it. */
52
+ readonly uAccent: number;
53
+ /** Eases the additive glow at frame center (the face zone); 0 = off. */
54
+ readonly uCalm: number;
55
+ };
56
+
57
+ /** The `data-mesh` shader's tunables; defaults are the cyan "datafield" look. */
58
+ export const DATA_MESH_CONTROLS: readonly UniformControl[] = [
59
+ {
60
+ name: 'uBgTop',
61
+ kind: 'color',
62
+ default: [0.01, 0.02, 0.05],
63
+ doc: 'Background color at top of frame.',
64
+ },
65
+ {
66
+ name: 'uBgBottom',
67
+ kind: 'color',
68
+ default: [0.02, 0.05, 0.12],
69
+ doc: 'Background color at bottom of frame.',
70
+ },
71
+ {
72
+ name: 'uLineColor',
73
+ kind: 'color',
74
+ default: [0.1, 0.55, 0.75],
75
+ doc: 'Mid wireframe-line tint.',
76
+ },
77
+ { name: 'uCrestColor', kind: 'color', default: [0.85, 0.97, 1.0], doc: 'Crest highlight color.' },
78
+ {
79
+ name: 'uHazeColor',
80
+ kind: 'color',
81
+ default: [0.05, 0.25, 0.4],
82
+ doc: 'Far-row atmospheric haze tint.',
83
+ },
84
+ {
85
+ name: 'uAccentColor',
86
+ kind: 'color',
87
+ default: [0.9, 0.15, 0.12],
88
+ doc: 'The one restrained accent color.',
89
+ },
90
+ {
91
+ name: 'uWaveScale',
92
+ kind: 'float',
93
+ default: 1.2,
94
+ min: 0.4,
95
+ max: 4,
96
+ step: 0.05,
97
+ doc: 'Wave frequency; lower = looser, broader hills.',
98
+ },
99
+ {
100
+ name: 'uWaveAmp',
101
+ kind: 'float',
102
+ default: 0.14,
103
+ min: 0,
104
+ max: 0.4,
105
+ step: 0.005,
106
+ doc: 'Vertical wave displacement (near rows).',
107
+ },
108
+ {
109
+ name: 'uWaveSpeed',
110
+ kind: 'float',
111
+ default: 0.25,
112
+ min: 0,
113
+ max: 2,
114
+ step: 0.01,
115
+ doc: 'Animation rate; 0 freezes.',
116
+ },
117
+ {
118
+ name: 'uGridX',
119
+ kind: 'float',
120
+ default: 7,
121
+ min: 1,
122
+ max: 24,
123
+ step: 0.5,
124
+ doc: 'Column-grid density; keep loose.',
125
+ },
126
+ {
127
+ name: 'uHorizon',
128
+ kind: 'float',
129
+ default: 0.16,
130
+ min: -0.2,
131
+ max: 0.45,
132
+ step: 0.01,
133
+ doc: 'Horizon height (rows converge toward it).',
134
+ },
135
+ {
136
+ name: 'uFarScale',
137
+ kind: 'float',
138
+ default: 0.12,
139
+ min: 0.05,
140
+ max: 0.5,
141
+ step: 0.01,
142
+ doc: 'Perspective scale of the farthest row.',
143
+ },
144
+ {
145
+ name: 'uSlant',
146
+ kind: 'float',
147
+ default: 0.18,
148
+ min: -0.6,
149
+ max: 0.6,
150
+ step: 0.01,
151
+ doc: 'Diagonal tilt for corner composition.',
152
+ },
153
+ {
154
+ name: 'uLineWidth',
155
+ kind: 'float',
156
+ default: 0.018,
157
+ min: 0.004,
158
+ max: 0.06,
159
+ step: 0.001,
160
+ doc: 'Wireframe line half-width; smaller = finer.',
161
+ },
162
+ {
163
+ name: 'uNodeMix',
164
+ kind: 'float',
165
+ default: 0.5,
166
+ min: 0,
167
+ max: 1,
168
+ step: 0.01,
169
+ doc: 'Glowing-node (dot) emphasis.',
170
+ },
171
+ {
172
+ name: 'uStrutMix',
173
+ kind: 'float',
174
+ default: 0.35,
175
+ min: 0,
176
+ max: 1,
177
+ step: 0.01,
178
+ doc: 'Vertical-strut (wireframe) emphasis.',
179
+ },
180
+ {
181
+ name: 'uGlow',
182
+ kind: 'float',
183
+ default: 1,
184
+ min: 0,
185
+ max: 3,
186
+ step: 0.01,
187
+ doc: 'Overall mesh-glow / bloom strength.',
188
+ },
189
+ {
190
+ name: 'uHaze',
191
+ kind: 'float',
192
+ default: 0.6,
193
+ min: 0,
194
+ max: 2,
195
+ step: 0.01,
196
+ doc: 'Atmospheric far-haze strength.',
197
+ },
198
+ {
199
+ name: 'uParticles',
200
+ kind: 'float',
201
+ default: 0.5,
202
+ min: 0,
203
+ max: 2,
204
+ step: 0.01,
205
+ doc: 'Floating-particle intensity; 0 disables.',
206
+ },
207
+ {
208
+ name: 'uAccent',
209
+ kind: 'float',
210
+ default: 0,
211
+ min: 0,
212
+ max: 2,
213
+ step: 0.01,
214
+ doc: 'Lone accent-mote intensity; 0 disables.',
215
+ },
216
+ {
217
+ name: 'uCalm',
218
+ kind: 'float',
219
+ default: 0,
220
+ min: 0,
221
+ max: 1,
222
+ step: 0.01,
223
+ doc: 'Eases the additive glow at frame center (face zone).',
224
+ },
225
+ ];
@@ -8,6 +8,7 @@ import type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';
8
8
  import type { BlurUniforms } from './blur/blur';
9
9
  import type { CloudsUniforms } from './clouds/clouds';
10
10
  import type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';
11
+ import type { DataMeshUniforms } from './data-mesh/data-mesh';
11
12
  import type { FirefliesUniforms } from './fireflies/fireflies';
12
13
  import type { GodraysUniforms } from './godrays/godrays';
13
14
  import type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';
@@ -30,6 +31,8 @@ export type { CloudsUniforms } from './clouds/clouds';
30
31
  export { CLOUDS_CONTROLS } from './clouds/clouds';
31
32
  export type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';
32
33
  export { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';
34
+ export type { DataMeshUniforms } from './data-mesh/data-mesh';
35
+ export { DATA_MESH_CONTROLS } from './data-mesh/data-mesh';
33
36
  export type { FirefliesUniforms } from './fireflies/fireflies';
34
37
  export { FIREFLIES_CONTROLS } from './fireflies/fireflies';
35
38
  export type { GodraysUniforms } from './godrays/godrays';
@@ -73,6 +76,7 @@ export type ShaderUniformsMap = {
73
76
  readonly 'aurora-silk': AuroraSilkUniforms;
74
77
  readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;
75
78
  readonly 'corporate-blobs': CorporateBlobsUniforms;
79
+ readonly 'data-mesh': DataMeshUniforms;
76
80
  };
77
81
 
78
82
  /** A patchable (uniform-bearing) layer shader name. */
@@ -40,9 +40,11 @@ const float MIN_DIVIDE = 64.0;
40
40
  const float MAX_DIVIDE = 0.01;
41
41
  // Number of stacked starfield layers. Compile-time constant so the layer
42
42
  // loop has a fixed integer bound (cross-compile-safe; no float loop counter).
43
- // 8 (was 12) for low-end-mobile cost (issue #39); the work is linear in the
44
- // count and dimByDensity rebalances per-star brightness automatically.
45
- const int STARFIELD_LAYERS_COUNT = 8;
43
+ // 7 (was 8 #74, was 12 #39) for cost; the work is linear in the count and
44
+ // dimByDensity rebalances per-star brightness automatically. 7 keeps the dense
45
+ // look essentially intact (6 was visibly sparser at some animation phases);
46
+ // paired with the empty-cell early-out below it lands ~34% under the old 8.
47
+ const int STARFIELD_LAYERS_COUNT = 7;
46
48
 
47
49
  mat2 Rotate(float angle) {
48
50
  float s = sin(angle);
@@ -110,6 +112,12 @@ vec3 StarFieldLayer(vec2 uv, float rotAngle) {
110
112
  float size = fract(randomN * 1356.33);
111
113
  float flareSwitch = smoothstep(0.9, 1.0, size);
112
114
  float star = Star(randomPosition, flareSwitch, rotAngle, randomN);
115
+ // The per-cell color below is multiplied by `star` at the end, so for any
116
+ // cell whose star is 0 (Star() returns exactly 0 for d >= 1.0, i.e. the
117
+ // empty-sky majority of the 8x9 = 72 cells/pixel) the whole term is 0.
118
+ // Skipping the sin(vec3) color work for those cells is output-identical and
119
+ // is the bulk of the win (issue #74).
120
+ if (star <= 0.0) continue;
113
121
 
114
122
  // fract trick: random colors
115
123
  float randomStarColorSeed = fract(randomN * 2150.0) * (3.0 * PI) * deltaTimeTwinkle;
@@ -9,13 +9,13 @@ export declare const clouds: {
9
9
  readonly uSkyHighColor: readonly [0.04, 0.03, 0.86];
10
10
  readonly uCloudLightColor: readonly [1, 0.91, 0.77];
11
11
  readonly uCloudDarkColor: readonly [0.3, 0.3, 0.5];
12
- readonly uExposure: 1.18;
12
+ readonly uExposure: 1.27;
13
13
  readonly uStepSize: 0.16;
14
- readonly uCloudSpeed: 0.16;
14
+ readonly uCloudSpeed: 0.52;
15
15
  readonly uCloudScale: 1.08;
16
- readonly uDensity: 0.235;
17
- readonly uCoverage: 0.42;
18
- readonly uSoftness: 0.39;
16
+ readonly uDensity: 0.245;
17
+ readonly uCoverage: 0.47;
18
+ readonly uSoftness: 0.28;
19
19
  };
20
20
  }, {
21
21
  readonly id: 'you';
@@ -17,13 +17,13 @@ exports.clouds = {
17
17
  uSkyHighColor: [0.04, 0.03, 0.86],
18
18
  uCloudLightColor: [1.0, 0.91, 0.77],
19
19
  uCloudDarkColor: [0.3, 0.3, 0.5],
20
- uExposure: 1.18,
20
+ uExposure: 1.27,
21
21
  uStepSize: 0.16,
22
- uCloudSpeed: 0.16,
22
+ uCloudSpeed: 0.52,
23
23
  uCloudScale: 1.08,
24
- uDensity: 0.235,
25
- uCoverage: 0.42,
26
- uSoftness: 0.39,
24
+ uDensity: 0.245,
25
+ uCoverage: 0.47,
26
+ uSoftness: 0.28,
27
27
  },
28
28
  },
29
29
  // You, under the sky.
@@ -1 +1 @@
1
- {"version":3,"file":"clouds.js","sourceRoot":"","sources":["../../../../catalog/composites/clouds/clouds.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,8BAA8B;AAC9B,EAAE;AACF,oEAAoE;;;AAIvD,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;IAC5B,MAAM,EAAE;QACN;YACE,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;gBAChC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;gBACjC,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;gBACnC,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;gBAChC,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,IAAI;gBACjB,WAAW,EAAE,IAAI;gBACjB,QAAQ,EAAE,KAAK;gBACf,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;aAChB;SACF;QACD,sBAAsB;QACtB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;KACnD;CACoC,CAAC","sourcesContent":["// Sky: raymarched daytime clouds with you composited over them. Fully\n// procedural; no image layer.\n//\n// A packaged composite consumers can list by importing this module.\n\nimport type { KaleidoscopePreset } from '../../../src/kaleidoscope.preset-book.types';\n\nexport const clouds = {\n name: 'Daytime',\n taxonomy: ['Shaders', 'Sky'],\n layers: [\n {\n id: 'sky',\n shader: 'clouds',\n uniforms: {\n uSkyLowColor: [0.09, 0.63, 0.95],\n uSkyHighColor: [0.04, 0.03, 0.86],\n uCloudLightColor: [1.0, 0.91, 0.77],\n uCloudDarkColor: [0.3, 0.3, 0.5],\n uExposure: 1.18,\n uStepSize: 0.16,\n uCloudSpeed: 0.16,\n uCloudScale: 1.08,\n uDensity: 0.235,\n uCoverage: 0.42,\n uSoftness: 0.39,\n },\n },\n // You, under the sky.\n { id: 'you', shader: 'direct', target: 'subject' },\n ],\n} as const satisfies KaleidoscopePreset;\n"]}
1
+ {"version":3,"file":"clouds.js","sourceRoot":"","sources":["../../../../catalog/composites/clouds/clouds.ts"],"names":[],"mappings":";AAAA,sEAAsE;AACtE,8BAA8B;AAC9B,EAAE;AACF,oEAAoE;;;AAIvD,QAAA,MAAM,GAAG;IACpB,IAAI,EAAE,SAAS;IACf,QAAQ,EAAE,CAAC,SAAS,EAAE,KAAK,CAAC;IAC5B,MAAM,EAAE;QACN;YACE,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE;gBACR,YAAY,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;gBAChC,aAAa,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;gBACjC,gBAAgB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC;gBACnC,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;gBAChC,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;gBACf,WAAW,EAAE,IAAI;gBACjB,WAAW,EAAE,IAAI;gBACjB,QAAQ,EAAE,KAAK;gBACf,SAAS,EAAE,IAAI;gBACf,SAAS,EAAE,IAAI;aAChB;SACF;QACD,sBAAsB;QACtB,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE;KACnD;CACoC,CAAC","sourcesContent":["// Sky: raymarched daytime clouds with you composited over them. Fully\n// procedural; no image layer.\n//\n// A packaged composite consumers can list by importing this module.\n\nimport type { KaleidoscopePreset } from '../../../src/kaleidoscope.preset-book.types';\n\nexport const clouds = {\n name: 'Daytime',\n taxonomy: ['Shaders', 'Sky'],\n layers: [\n {\n id: 'sky',\n shader: 'clouds',\n uniforms: {\n uSkyLowColor: [0.09, 0.63, 0.95],\n uSkyHighColor: [0.04, 0.03, 0.86],\n uCloudLightColor: [1.0, 0.91, 0.77],\n uCloudDarkColor: [0.3, 0.3, 0.5],\n uExposure: 1.27,\n uStepSize: 0.16,\n uCloudSpeed: 0.52,\n uCloudScale: 1.08,\n uDensity: 0.245,\n uCoverage: 0.47,\n uSoftness: 0.28,\n },\n },\n // You, under the sky.\n { id: 'you', shader: 'direct', target: 'subject' },\n ],\n} as const satisfies KaleidoscopePreset;\n"]}
@@ -0,0 +1,50 @@
1
+ import type { RGB } from '../../../src/lib/primitives.types';
2
+ import type { UniformControl } from '../_shared/types';
3
+ /** Typed uniforms for the `data-mesh` layer shader. */
4
+ export type DataMeshUniforms = {
5
+ /** Background gradient color at the top of frame. */
6
+ readonly uBgTop: RGB;
7
+ /** Background gradient color at the bottom of frame. */
8
+ readonly uBgBottom: RGB;
9
+ /** Mid wireframe-line tint (the trough/body color). */
10
+ readonly uLineColor: RGB;
11
+ /** Crest highlight color (brightest along the peaks). */
12
+ readonly uCrestColor: RGB;
13
+ /** Atmospheric haze tint on the far rows. */
14
+ readonly uHazeColor: RGB;
15
+ /** The one restrained accent color (e.g. enterprise red). */
16
+ readonly uAccentColor: RGB;
17
+ /** Wave-field spatial frequency; lower = looser, broader hills. */
18
+ readonly uWaveScale: number;
19
+ /** Vertical wave displacement amount (near rows). */
20
+ readonly uWaveAmp: number;
21
+ /** Animation rate; 0 freezes the surface. */
22
+ readonly uWaveSpeed: number;
23
+ /** Column-grid density across the surface; keep loose. */
24
+ readonly uGridX: number;
25
+ /** Horizon height in uv.y units (rows converge toward it). */
26
+ readonly uHorizon: number;
27
+ /** Perspective scale of the farthest row; > 0 (guards the divide). */
28
+ readonly uFarScale: number;
29
+ /** Diagonal tilt; raises the right side for corner composition. */
30
+ readonly uSlant: number;
31
+ /** Wireframe line half-width (smaller = finer, sharper). */
32
+ readonly uLineWidth: number;
33
+ /** Emphasis of glowing intersection nodes (the dot reading), 0..1. */
34
+ readonly uNodeMix: number;
35
+ /** Emphasis of vertical struts (the wireframe reading), 0..1. */
36
+ readonly uStrutMix: number;
37
+ /** Overall additive mesh-glow / bloom strength. */
38
+ readonly uGlow: number;
39
+ /** Atmospheric far-haze strength. */
40
+ readonly uHaze: number;
41
+ /** Floating-particle intensity; 0 disables the field. */
42
+ readonly uParticles: number;
43
+ /** Lone accent-mote intensity; 0 disables it. */
44
+ readonly uAccent: number;
45
+ /** Eases the additive glow at frame center (the face zone); 0 = off. */
46
+ readonly uCalm: number;
47
+ };
48
+ /** The `data-mesh` shader's tunables; defaults are the cyan "datafield" look. */
49
+ export declare const DATA_MESH_CONTROLS: readonly UniformControl[];
50
+ //# sourceMappingURL=data-mesh.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-mesh.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/data-mesh/data-mesh.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,uDAAuD;AACvD,MAAM,MAAM,gBAAgB,GAAG;IAC7B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC;IACrB,wDAAwD;IACxD,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC;IACxB,uDAAuD;IACvD,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;IACzB,yDAAyD;IACzD,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,GAAG,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,qDAAqD;IACrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,6CAA6C;IAC7C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,sEAAsE;IACtE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mEAAmE;IACnE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,4DAA4D;IAC5D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,sEAAsE;IACtE,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,iEAAiE;IACjE,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,mDAAmD;IACnD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,qCAAqC;IACrC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,iDAAiD;IACjD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,EAAE,SAAS,cAAc,EAuKvD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type KaleidoscopeControls } from '../../../src/components/preset-control-panel';
2
+ export declare function DataMeshForm({ uniforms, onPatch, disabled }: KaleidoscopeControls): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=data-mesh.form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-mesh.form.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/data-mesh/data-mesh.form.tsx"],"names":[],"mappings":"AAMA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8CAA8C,CAAC;AAGtD,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAsCjF"}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DataMeshForm = DataMeshForm;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Data-mesh's editor form: the shader OWNS its control layout. One
6
+ // <Control uniform="…"/> per uniform; grouped into palette / surface / glow
7
+ // sections so the big color levers, the structural dials, and the additive extras
8
+ // read as three clusters. A new primitive flows in through <Control> without
9
+ // touching this file. Conventional layer id: "mesh".
10
+ const preset_control_panel_1 = require("../../../src/components/preset-control-panel");
11
+ const data_mesh_1 = require("./data-mesh");
12
+ function DataMeshForm({ uniforms, onPatch, disabled }) {
13
+ return ((0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlForm, { id: "mesh", uniforms: uniforms.mesh ?? {}, onPatch: onPatch, disabled: disabled, controls: data_mesh_1.DATA_MESH_CONTROLS, children: [(0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "palette", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uBgTop" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uBgBottom" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uLineColor" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uCrestColor" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uHazeColor" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uAccentColor" })] }), (0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "surface", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uWaveScale" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uWaveAmp" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uWaveSpeed" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uGridX" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uHorizon" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uFarScale" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSlant" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uLineWidth" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uNodeMix" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uStrutMix" })] }), (0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "glow", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uGlow" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uHaze" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uParticles" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uAccent" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uCalm" })] })] }));
14
+ }
15
+ //# sourceMappingURL=data-mesh.form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-mesh.form.js","sourceRoot":"","sources":["../../../../catalog/shaders/data-mesh/data-mesh.form.tsx"],"names":[],"mappings":";;;;AAAA,mEAAmE;AACnE,4EAA4E;AAC5E,kFAAkF;AAClF,6EAA6E;AAC7E,qDAAqD;AAErD,uFAKsD;AACtD,2CAAiD;AAEjD,sBAA6B,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAwB;IAChF,OAAO,CACL,wBAAC,kCAAW,IACV,EAAE,EAAC,MAAM,EACT,QAAQ,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE,EAC7B,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,8BAAkB,aAE5B,wBAAC,qCAAc,IAAC,KAAK,EAAC,SAAS,aAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,WAAW,GAAG,EAC/B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,aAAa,GAAG,EACjC,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,cAAc,GAAG,IACnB,EACjB,wBAAC,qCAAc,IAAC,KAAK,EAAC,SAAS,aAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,WAAW,GAAG,EAC/B,uBAAC,8BAAO,IAAC,OAAO,EAAC,QAAQ,GAAG,EAC5B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,WAAW,GAAG,IAChB,EACjB,wBAAC,qCAAc,IAAC,KAAK,EAAC,MAAM,aAC1B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,EAC3B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,EAC3B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,IACZ,IACL,CACf,CAAC;AACJ,CAAC","sourcesContent":["// Data-mesh's editor form: the shader OWNS its control layout. One\n// <Control uniform=\"…\"/> per uniform; grouped into palette / surface / glow\n// sections so the big color levers, the structural dials, and the additive extras\n// read as three clusters. A new primitive flows in through <Control> without\n// touching this file. Conventional layer id: \"mesh\".\n\nimport {\n Control,\n ControlForm,\n ControlSection,\n type KaleidoscopeControls,\n} from '../../../src/components/preset-control-panel';\nimport { DATA_MESH_CONTROLS } from './data-mesh';\n\nexport function DataMeshForm({ uniforms, onPatch, disabled }: KaleidoscopeControls) {\n return (\n <ControlForm\n id=\"mesh\"\n uniforms={uniforms.mesh ?? {}}\n onPatch={onPatch}\n disabled={disabled}\n controls={DATA_MESH_CONTROLS}\n >\n <ControlSection title=\"palette\">\n <Control uniform=\"uBgTop\" />\n <Control uniform=\"uBgBottom\" />\n <Control uniform=\"uLineColor\" />\n <Control uniform=\"uCrestColor\" />\n <Control uniform=\"uHazeColor\" />\n <Control uniform=\"uAccentColor\" />\n </ControlSection>\n <ControlSection title=\"surface\">\n <Control uniform=\"uWaveScale\" />\n <Control uniform=\"uWaveAmp\" />\n <Control uniform=\"uWaveSpeed\" />\n <Control uniform=\"uGridX\" />\n <Control uniform=\"uHorizon\" />\n <Control uniform=\"uFarScale\" />\n <Control uniform=\"uSlant\" />\n <Control uniform=\"uLineWidth\" />\n <Control uniform=\"uNodeMix\" />\n <Control uniform=\"uStrutMix\" />\n </ControlSection>\n <ControlSection title=\"glow\">\n <Control uniform=\"uGlow\" />\n <Control uniform=\"uHaze\" />\n <Control uniform=\"uParticles\" />\n <Control uniform=\"uAccent\" />\n <Control uniform=\"uCalm\" />\n </ControlSection>\n </ControlForm>\n );\n}\n"]}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ // Data-mesh layer-shader interface: typed uniforms + control descriptor. A mid-
3
+ // 2000s corporate wireframe-wave background, an opaque BACKGROUND layer. One
4
+ // data-mesh.frag fans out into the book presets (datafield, boardroom, acid,
5
+ // cobalt, and slate) by varying these uniforms; the color set is the
6
+ // big lever (gradient + line/crest/haze/accent), the structural dials set
7
+ // composition and motion. Shader source is shaders/data-mesh/data-mesh.frag.
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.DATA_MESH_CONTROLS = void 0;
10
+ /** The `data-mesh` shader's tunables; defaults are the cyan "datafield" look. */
11
+ exports.DATA_MESH_CONTROLS = [
12
+ {
13
+ name: 'uBgTop',
14
+ kind: 'color',
15
+ default: [0.01, 0.02, 0.05],
16
+ doc: 'Background color at top of frame.',
17
+ },
18
+ {
19
+ name: 'uBgBottom',
20
+ kind: 'color',
21
+ default: [0.02, 0.05, 0.12],
22
+ doc: 'Background color at bottom of frame.',
23
+ },
24
+ {
25
+ name: 'uLineColor',
26
+ kind: 'color',
27
+ default: [0.1, 0.55, 0.75],
28
+ doc: 'Mid wireframe-line tint.',
29
+ },
30
+ { name: 'uCrestColor', kind: 'color', default: [0.85, 0.97, 1.0], doc: 'Crest highlight color.' },
31
+ {
32
+ name: 'uHazeColor',
33
+ kind: 'color',
34
+ default: [0.05, 0.25, 0.4],
35
+ doc: 'Far-row atmospheric haze tint.',
36
+ },
37
+ {
38
+ name: 'uAccentColor',
39
+ kind: 'color',
40
+ default: [0.9, 0.15, 0.12],
41
+ doc: 'The one restrained accent color.',
42
+ },
43
+ {
44
+ name: 'uWaveScale',
45
+ kind: 'float',
46
+ default: 1.2,
47
+ min: 0.4,
48
+ max: 4,
49
+ step: 0.05,
50
+ doc: 'Wave frequency; lower = looser, broader hills.',
51
+ },
52
+ {
53
+ name: 'uWaveAmp',
54
+ kind: 'float',
55
+ default: 0.14,
56
+ min: 0,
57
+ max: 0.4,
58
+ step: 0.005,
59
+ doc: 'Vertical wave displacement (near rows).',
60
+ },
61
+ {
62
+ name: 'uWaveSpeed',
63
+ kind: 'float',
64
+ default: 0.25,
65
+ min: 0,
66
+ max: 2,
67
+ step: 0.01,
68
+ doc: 'Animation rate; 0 freezes.',
69
+ },
70
+ {
71
+ name: 'uGridX',
72
+ kind: 'float',
73
+ default: 7,
74
+ min: 1,
75
+ max: 24,
76
+ step: 0.5,
77
+ doc: 'Column-grid density; keep loose.',
78
+ },
79
+ {
80
+ name: 'uHorizon',
81
+ kind: 'float',
82
+ default: 0.16,
83
+ min: -0.2,
84
+ max: 0.45,
85
+ step: 0.01,
86
+ doc: 'Horizon height (rows converge toward it).',
87
+ },
88
+ {
89
+ name: 'uFarScale',
90
+ kind: 'float',
91
+ default: 0.12,
92
+ min: 0.05,
93
+ max: 0.5,
94
+ step: 0.01,
95
+ doc: 'Perspective scale of the farthest row.',
96
+ },
97
+ {
98
+ name: 'uSlant',
99
+ kind: 'float',
100
+ default: 0.18,
101
+ min: -0.6,
102
+ max: 0.6,
103
+ step: 0.01,
104
+ doc: 'Diagonal tilt for corner composition.',
105
+ },
106
+ {
107
+ name: 'uLineWidth',
108
+ kind: 'float',
109
+ default: 0.018,
110
+ min: 0.004,
111
+ max: 0.06,
112
+ step: 0.001,
113
+ doc: 'Wireframe line half-width; smaller = finer.',
114
+ },
115
+ {
116
+ name: 'uNodeMix',
117
+ kind: 'float',
118
+ default: 0.5,
119
+ min: 0,
120
+ max: 1,
121
+ step: 0.01,
122
+ doc: 'Glowing-node (dot) emphasis.',
123
+ },
124
+ {
125
+ name: 'uStrutMix',
126
+ kind: 'float',
127
+ default: 0.35,
128
+ min: 0,
129
+ max: 1,
130
+ step: 0.01,
131
+ doc: 'Vertical-strut (wireframe) emphasis.',
132
+ },
133
+ {
134
+ name: 'uGlow',
135
+ kind: 'float',
136
+ default: 1,
137
+ min: 0,
138
+ max: 3,
139
+ step: 0.01,
140
+ doc: 'Overall mesh-glow / bloom strength.',
141
+ },
142
+ {
143
+ name: 'uHaze',
144
+ kind: 'float',
145
+ default: 0.6,
146
+ min: 0,
147
+ max: 2,
148
+ step: 0.01,
149
+ doc: 'Atmospheric far-haze strength.',
150
+ },
151
+ {
152
+ name: 'uParticles',
153
+ kind: 'float',
154
+ default: 0.5,
155
+ min: 0,
156
+ max: 2,
157
+ step: 0.01,
158
+ doc: 'Floating-particle intensity; 0 disables.',
159
+ },
160
+ {
161
+ name: 'uAccent',
162
+ kind: 'float',
163
+ default: 0,
164
+ min: 0,
165
+ max: 2,
166
+ step: 0.01,
167
+ doc: 'Lone accent-mote intensity; 0 disables.',
168
+ },
169
+ {
170
+ name: 'uCalm',
171
+ kind: 'float',
172
+ default: 0,
173
+ min: 0,
174
+ max: 1,
175
+ step: 0.01,
176
+ doc: 'Eases the additive glow at frame center (face zone).',
177
+ },
178
+ ];
179
+ //# sourceMappingURL=data-mesh.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-mesh.js","sourceRoot":"","sources":["../../../../catalog/shaders/data-mesh/data-mesh.ts"],"names":[],"mappings":"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","sourcesContent":["// Data-mesh layer-shader interface: typed uniforms + control descriptor. A mid-\n// 2000s corporate wireframe-wave background, an opaque BACKGROUND layer. One\n// data-mesh.frag fans out into the book presets (datafield, boardroom, acid,\n// cobalt, and slate) by varying these uniforms; the color set is the\n// big lever (gradient + line/crest/haze/accent), the structural dials set\n// composition and motion. Shader source is shaders/data-mesh/data-mesh.frag.\n\nimport type { RGB } from '../../../src/lib/primitives.types';\nimport type { UniformControl } from '../_shared/types';\n\n/** Typed uniforms for the `data-mesh` layer shader. */\nexport type DataMeshUniforms = {\n /** Background gradient color at the top of frame. */\n readonly uBgTop: RGB;\n /** Background gradient color at the bottom of frame. */\n readonly uBgBottom: RGB;\n /** Mid wireframe-line tint (the trough/body color). */\n readonly uLineColor: RGB;\n /** Crest highlight color (brightest along the peaks). */\n readonly uCrestColor: RGB;\n /** Atmospheric haze tint on the far rows. */\n readonly uHazeColor: RGB;\n /** The one restrained accent color (e.g. enterprise red). */\n readonly uAccentColor: RGB;\n /** Wave-field spatial frequency; lower = looser, broader hills. */\n readonly uWaveScale: number;\n /** Vertical wave displacement amount (near rows). */\n readonly uWaveAmp: number;\n /** Animation rate; 0 freezes the surface. */\n readonly uWaveSpeed: number;\n /** Column-grid density across the surface; keep loose. */\n readonly uGridX: number;\n /** Horizon height in uv.y units (rows converge toward it). */\n readonly uHorizon: number;\n /** Perspective scale of the farthest row; > 0 (guards the divide). */\n readonly uFarScale: number;\n /** Diagonal tilt; raises the right side for corner composition. */\n readonly uSlant: number;\n /** Wireframe line half-width (smaller = finer, sharper). */\n readonly uLineWidth: number;\n /** Emphasis of glowing intersection nodes (the dot reading), 0..1. */\n readonly uNodeMix: number;\n /** Emphasis of vertical struts (the wireframe reading), 0..1. */\n readonly uStrutMix: number;\n /** Overall additive mesh-glow / bloom strength. */\n readonly uGlow: number;\n /** Atmospheric far-haze strength. */\n readonly uHaze: number;\n /** Floating-particle intensity; 0 disables the field. */\n readonly uParticles: number;\n /** Lone accent-mote intensity; 0 disables it. */\n readonly uAccent: number;\n /** Eases the additive glow at frame center (the face zone); 0 = off. */\n readonly uCalm: number;\n};\n\n/** The `data-mesh` shader's tunables; defaults are the cyan \"datafield\" look. */\nexport const DATA_MESH_CONTROLS: readonly UniformControl[] = [\n {\n name: 'uBgTop',\n kind: 'color',\n default: [0.01, 0.02, 0.05],\n doc: 'Background color at top of frame.',\n },\n {\n name: 'uBgBottom',\n kind: 'color',\n default: [0.02, 0.05, 0.12],\n doc: 'Background color at bottom of frame.',\n },\n {\n name: 'uLineColor',\n kind: 'color',\n default: [0.1, 0.55, 0.75],\n doc: 'Mid wireframe-line tint.',\n },\n { name: 'uCrestColor', kind: 'color', default: [0.85, 0.97, 1.0], doc: 'Crest highlight color.' },\n {\n name: 'uHazeColor',\n kind: 'color',\n default: [0.05, 0.25, 0.4],\n doc: 'Far-row atmospheric haze tint.',\n },\n {\n name: 'uAccentColor',\n kind: 'color',\n default: [0.9, 0.15, 0.12],\n doc: 'The one restrained accent color.',\n },\n {\n name: 'uWaveScale',\n kind: 'float',\n default: 1.2,\n min: 0.4,\n max: 4,\n step: 0.05,\n doc: 'Wave frequency; lower = looser, broader hills.',\n },\n {\n name: 'uWaveAmp',\n kind: 'float',\n default: 0.14,\n min: 0,\n max: 0.4,\n step: 0.005,\n doc: 'Vertical wave displacement (near rows).',\n },\n {\n name: 'uWaveSpeed',\n kind: 'float',\n default: 0.25,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Animation rate; 0 freezes.',\n },\n {\n name: 'uGridX',\n kind: 'float',\n default: 7,\n min: 1,\n max: 24,\n step: 0.5,\n doc: 'Column-grid density; keep loose.',\n },\n {\n name: 'uHorizon',\n kind: 'float',\n default: 0.16,\n min: -0.2,\n max: 0.45,\n step: 0.01,\n doc: 'Horizon height (rows converge toward it).',\n },\n {\n name: 'uFarScale',\n kind: 'float',\n default: 0.12,\n min: 0.05,\n max: 0.5,\n step: 0.01,\n doc: 'Perspective scale of the farthest row.',\n },\n {\n name: 'uSlant',\n kind: 'float',\n default: 0.18,\n min: -0.6,\n max: 0.6,\n step: 0.01,\n doc: 'Diagonal tilt for corner composition.',\n },\n {\n name: 'uLineWidth',\n kind: 'float',\n default: 0.018,\n min: 0.004,\n max: 0.06,\n step: 0.001,\n doc: 'Wireframe line half-width; smaller = finer.',\n },\n {\n name: 'uNodeMix',\n kind: 'float',\n default: 0.5,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Glowing-node (dot) emphasis.',\n },\n {\n name: 'uStrutMix',\n kind: 'float',\n default: 0.35,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Vertical-strut (wireframe) emphasis.',\n },\n {\n name: 'uGlow',\n kind: 'float',\n default: 1,\n min: 0,\n max: 3,\n step: 0.01,\n doc: 'Overall mesh-glow / bloom strength.',\n },\n {\n name: 'uHaze',\n kind: 'float',\n default: 0.6,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Atmospheric far-haze strength.',\n },\n {\n name: 'uParticles',\n kind: 'float',\n default: 0.5,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Floating-particle intensity; 0 disables.',\n },\n {\n name: 'uAccent',\n kind: 'float',\n default: 0,\n min: 0,\n max: 2,\n step: 0.01,\n doc: 'Lone accent-mote intensity; 0 disables.',\n },\n {\n name: 'uCalm',\n kind: 'float',\n default: 0,\n min: 0,\n max: 1,\n step: 0.01,\n doc: 'Eases the additive glow at frame center (face zone).',\n },\n];\n"]}
@@ -3,6 +3,7 @@ import type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';
3
3
  import type { BlurUniforms } from './blur/blur';
4
4
  import type { CloudsUniforms } from './clouds/clouds';
5
5
  import type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';
6
+ import type { DataMeshUniforms } from './data-mesh/data-mesh';
6
7
  import type { FirefliesUniforms } from './fireflies/fireflies';
7
8
  import type { GodraysUniforms } from './godrays/godrays';
8
9
  import type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';
@@ -24,6 +25,8 @@ export type { CloudsUniforms } from './clouds/clouds';
24
25
  export { CLOUDS_CONTROLS } from './clouds/clouds';
25
26
  export type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';
26
27
  export { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';
28
+ export type { DataMeshUniforms } from './data-mesh/data-mesh';
29
+ export { DATA_MESH_CONTROLS } from './data-mesh/data-mesh';
27
30
  export type { FirefliesUniforms } from './fireflies/fireflies';
28
31
  export { FIREFLIES_CONTROLS } from './fireflies/fireflies';
29
32
  export type { GodraysUniforms } from './godrays/godrays';
@@ -66,6 +69,7 @@ export type ShaderUniformsMap = {
66
69
  readonly 'aurora-silk': AuroraSilkUniforms;
67
70
  readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;
68
71
  readonly 'corporate-blobs': CorporateBlobsUniforms;
72
+ readonly 'data-mesh': DataMeshUniforms;
69
73
  };
70
74
  /** A patchable (uniform-bearing) layer shader name. */
71
75
  export type PatchableShaderName = keyof ShaderUniformsMap;