react-native-webrtc-kaleidoscope 2.5.1 → 2.6.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 (25) hide show
  1. package/android/src/main/java/com/simiancraft/kaleidoscope/gpu/ShadersGenerated.kt +101 -0
  2. package/catalog/shaders/index.ts +4 -0
  3. package/catalog/shaders/outrun-grid/outrun-grid.form.tsx +38 -0
  4. package/catalog/shaders/outrun-grid/outrun-grid.frag +128 -0
  5. package/catalog/shaders/outrun-grid/outrun-grid.ts +124 -0
  6. package/dist/catalog/shaders/index.d.ts +4 -0
  7. package/dist/catalog/shaders/index.d.ts.map +1 -1
  8. package/dist/catalog/shaders/index.js +3 -1
  9. package/dist/catalog/shaders/index.js.map +1 -1
  10. package/dist/catalog/shaders/outrun-grid/outrun-grid.d.ts +32 -0
  11. package/dist/catalog/shaders/outrun-grid/outrun-grid.d.ts.map +1 -0
  12. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts +3 -0
  13. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.d.ts.map +1 -0
  14. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.js +13 -0
  15. package/dist/catalog/shaders/outrun-grid/outrun-grid.form.js.map +1 -0
  16. package/dist/catalog/shaders/outrun-grid/outrun-grid.js +96 -0
  17. package/dist/catalog/shaders/outrun-grid/outrun-grid.js.map +1 -0
  18. package/dist/web-driver/shaders.generated.d.ts +1 -0
  19. package/dist/web-driver/shaders.generated.d.ts.map +1 -1
  20. package/dist/web-driver/shaders.generated.js +101 -1
  21. package/dist/web-driver/shaders.generated.js.map +1 -1
  22. package/ios/KaleidoscopeModule/shaders/GENERATIVE.txt +1 -0
  23. package/ios/KaleidoscopeModule/shaders/SHADERS.txt +1 -0
  24. package/ios/KaleidoscopeModule/shaders/outrun-grid.metalsrc +48 -0
  25. package/package.json +8 -1
@@ -501,6 +501,106 @@ void main() {
501
501
  // Opaque procedural background; the person is composited over it downstream.
502
502
  oColor = vec4(color, 1.0);
503
503
  }
504
+ """
505
+
506
+ const val OUTRUN_GRID_FRAG = """#version 300 es
507
+ precision highp float;
508
+
509
+ uniform float uTime; // seconds, monotonically increasing; range [0, inf)
510
+ uniform vec2 uResolution; // framebuffer size in pixels; both components > 0
511
+ uniform vec3 uSkyTop; // sky gradient color at the top of frame
512
+ uniform vec3 uSkyHorizon; // sky gradient color at the horizon
513
+ uniform vec3 uSunTop; // sun gradient color at its top
514
+ uniform vec3 uSunBottom; // sun gradient color at its bottom
515
+ uniform vec3 uGridColor; // neon grid line tint (also the horizon seam)
516
+ uniform float uGridDensity; // grid cells across the floor; higher = finer
517
+ uniform float uGridGlow; // line glow width/softness, 0..1
518
+ uniform float uSpeed; // grid scroll rate toward the viewer; 0 freezes
519
+ uniform float uSunSize; // sun radius in vUv.y units
520
+ uniform float uSunBands; // horizontal slit count cut into the sun's lower half
521
+ uniform float uHorizon; // horizon height in vUv.y, 0..1 (floor below, sky above)
522
+ uniform float uCalm; // 0..1 eases the additive glow at frame center (face zone)
523
+
524
+ in highp vec2 vUv;
525
+ out vec4 oColor;
526
+
527
+ void main() {
528
+ float aspect = uResolution.x / uResolution.y;
529
+ float fx = (vUv.x - 0.5) * aspect; // aspect-correct, screen-centered x
530
+ float fy = vUv.y; // 0 bottom .. 1 top
531
+ float h = clamp(uHorizon, 0.05, 0.95);
532
+
533
+ // Ease additive glow near the frame center (the subject's face sits there).
534
+ float calm = 1.0 - uCalm * (1.0 - smoothstep(0.18, 0.62, length(vec2(fx, fy - 0.5))));
535
+
536
+ vec3 col;
537
+
538
+ if (fy > h) {
539
+ // --- SKY ---
540
+ float skyT = (fy - h) / (1.0 - h); // 0 at horizon, 1 at the top of frame
541
+ col = mix(uSkyHorizon, uSkyTop, skyT);
542
+
543
+ // --- SUN --- centered just above the horizon so its lower arc sinks below
544
+ // it and is occluded by the floor (the half-set sun, for free).
545
+ float sunCY = h + uSunSize * 0.55;
546
+ vec2 sd = vec2(fx, fy - sunCY);
547
+ float r = length(sd) / max(uSunSize, 1e-3); // normalized radius, 1 at the edge
548
+
549
+ // Soft glow halo bleeding into the sky around the disc.
550
+ float halo = exp(-max(r - 1.0, 0.0) * 5.5);
551
+ col += uSunTop * halo * 0.55 * calm;
552
+
553
+ // Sun body: vertical gradient, with horizontal bands cut from the lower half
554
+ // (each gap thickening toward the bottom, the iconic retrowave slit pattern).
555
+ float disc = smoothstep(1.0, 0.985, r);
556
+ float vy = clamp(sd.y / max(uSunSize, 1e-3) * 0.5 + 0.5, 0.0, 1.0);
557
+ vec3 sunCol = mix(uSunBottom, uSunTop, vy);
558
+
559
+ float below = max(-sd.y / max(uSunSize, 1e-3), 0.0); // 0 above center, grows downward
560
+ // Drift the slit phase over time so the sun's scanlines crawl downward.
561
+ float slit = fract(below * uSunBands - uTime * 0.18);
562
+ float gapW = clamp(below, 0.0, 1.0) * 0.85; // gap fraction grows downward
563
+ float cut = step(slit, gapW) * smoothstep(0.04, 0.12, below); // keep upper sun whole
564
+ float sunBody = disc * (1.0 - cut);
565
+
566
+ col = mix(col, sunCol, sunBody);
567
+ } else {
568
+ // --- FLOOR --- perspective grid. Guard the divide; shade only below horizon.
569
+ float depth = 1.0 / max(h - fy, 1.5e-3); // large near the horizon
570
+ float depthMin = 1.0 / h; // depth at the very front (fy = 0)
571
+
572
+ // Grid coordinates: x widens with depth (perspective); uGridDensity sets the
573
+ // cell count; the scroll is in cell units so its rate is density-independent.
574
+ vec2 g = vec2(fx * depth, depth) * uGridDensity;
575
+ g.y += uTime * uSpeed * 2.0;
576
+ vec2 cell = abs(fract(g) - 0.5); // 0 on a line .. 0.5 mid-cell, per axis
577
+
578
+ // Per-axis, depth-scaled line half-width: the rungs (g.y) compress toward the
579
+ // horizon as depth^2 and the verticals (g.x) ~linearly, so widening each axis'
580
+ // line band at its own compression rate holds the on-screen line width roughly
581
+ // constant. Far lines fuse into a band instead of a sub-pixel sheet that
582
+ // shimmers as it scrolls; near lines stay crisp. Written 1 - smoothstep(0, w, .)
583
+ // (NOT the reversed-edge smoothstep(w, 0, .), which is undefined on GLSL ES /
584
+ // Metal) and derivative-free, so it is portable and mobile-precision safe.
585
+ vec2 w = max(vec2(depth, depth * depth * 0.2) * uGridDensity * 0.0013, vec2(1e-4));
586
+ vec2 core = 1.0 - smoothstep(vec2(0.0), w, cell);
587
+ vec2 halo = (1.0 - smoothstep(vec2(0.0), w * 6.0, cell)) * (0.5 * uGridGlow);
588
+ float gridVal = clamp(core.x + core.y + halo.x + halo.y, 0.0, 1.5);
589
+
590
+ // Distance fog: fade the grid out toward the horizon for the converging look.
591
+ float fog = clamp(1.0 - (depth - depthMin) / (depthMin * 10.0), 0.0, 1.0);
592
+ fog *= fog;
593
+
594
+ vec3 floorBase = mix(vec3(0.0), uSkyHorizon * 0.16, fog * 0.6);
595
+ col = floorBase + uGridColor * gridVal * fog * calm;
596
+ }
597
+
598
+ // Glowing horizon seam where floor meets sky.
599
+ float seam = exp(-abs(fy - h) * 90.0);
600
+ col += uGridColor * seam * 0.5 * calm;
601
+
602
+ oColor = vec4(col, 1.0);
603
+ }
504
604
  """
505
605
 
506
606
  const val CLOUDS_FRAG = """#version 300 es
@@ -1589,6 +1689,7 @@ void main() {
1589
1689
  "neo-memphis" to NEO_MEMPHIS_FRAG,
1590
1690
  "halftone-waves" to HALFTONE_WAVES_FRAG,
1591
1691
  "aurora-silk" to AURORA_SILK_FRAG,
1692
+ "outrun-grid" to OUTRUN_GRID_FRAG,
1592
1693
  "clouds" to CLOUDS_FRAG,
1593
1694
  "nebula" to NEBULA_FRAG,
1594
1695
  "godrays" to GODRAYS_FRAG,
@@ -15,6 +15,7 @@ import type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';
15
15
  import type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';
16
16
  import type { NebulaUniforms } from './nebula/nebula';
17
17
  import type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';
18
+ import type { OutrunGridUniforms } from './outrun-grid/outrun-grid';
18
19
  import type { PlasmaUniforms } from './plasma/plasma';
19
20
  import type { SimianlightsUniforms } from './simianlights/simianlights';
20
21
 
@@ -43,6 +44,8 @@ export type { NebulaUniforms } from './nebula/nebula';
43
44
  export { NEBULA_CONTROLS } from './nebula/nebula';
44
45
  export type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';
45
46
  export { NEO_MEMPHIS_CONTROLS } from './neo-memphis/neo-memphis';
47
+ export type { OutrunGridUniforms } from './outrun-grid/outrun-grid';
48
+ export { OUTRUN_GRID_CONTROLS } from './outrun-grid/outrun-grid';
46
49
  export type { PlasmaUniforms } from './plasma/plasma';
47
50
  export { PLASMA_CONTROLS } from './plasma/plasma';
48
51
  export type { SimianlightsUniforms } from './simianlights/simianlights';
@@ -64,6 +67,7 @@ export type ShaderUniformsMap = {
64
67
  readonly plasma: PlasmaUniforms;
65
68
  readonly nebula: NebulaUniforms;
66
69
  readonly 'neo-memphis': NeoMemphisUniforms;
70
+ readonly 'outrun-grid': OutrunGridUniforms;
67
71
  readonly simianlights: SimianlightsUniforms;
68
72
  readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;
69
73
  readonly 'aurora-silk': AuroraSilkUniforms;
@@ -0,0 +1,38 @@
1
+ // Outrun-grid's editor form: the shader OWNS its control layout (the plasma
2
+ // pattern). One <Control uniform="…"/> per uniform in declared order.
3
+ // Conventional layer id: "outrun-grid".
4
+
5
+ import {
6
+ Control,
7
+ ControlForm,
8
+ ControlSection,
9
+ type KaleidoscopeControls,
10
+ } from '../../../src/components/preset-control-panel';
11
+ import { OUTRUN_GRID_CONTROLS } from './outrun-grid';
12
+
13
+ export function OutrunGridForm({ uniforms, onPatch, disabled }: KaleidoscopeControls) {
14
+ return (
15
+ <ControlForm
16
+ id="outrun-grid"
17
+ uniforms={uniforms['outrun-grid'] ?? {}}
18
+ onPatch={onPatch}
19
+ disabled={disabled}
20
+ controls={OUTRUN_GRID_CONTROLS}
21
+ >
22
+ <ControlSection title="outrun-grid">
23
+ <Control uniform="uSkyTop" />
24
+ <Control uniform="uSkyHorizon" />
25
+ <Control uniform="uSunTop" />
26
+ <Control uniform="uSunBottom" />
27
+ <Control uniform="uGridColor" />
28
+ <Control uniform="uGridDensity" />
29
+ <Control uniform="uGridGlow" />
30
+ <Control uniform="uSpeed" />
31
+ <Control uniform="uSunSize" />
32
+ <Control uniform="uSunBands" />
33
+ <Control uniform="uHorizon" />
34
+ <Control uniform="uCalm" />
35
+ </ControlSection>
36
+ </ControlForm>
37
+ );
38
+ }
@@ -0,0 +1,128 @@
1
+ // Outrun grid: a scrolling neon perspective grid receding to a horizon, with a
2
+ // banded retrowave sun resting on it and a glowing horizon seam. The classic
3
+ // synthwave/outrun backdrop. An opaque BACKGROUND layer (issue #70); the masked
4
+ // subject composites over it downstream.
5
+ //
6
+ // Overdrive surface: the three color pairs are the big levers and define the
7
+ // whole mood. uGridColor is the neon line tint; uSunTop/uSunBottom grade the
8
+ // sun; uSkyHorizon/uSkyTop set the sky hue. Structural dials (uGridDensity,
9
+ // uSpeed, uSunSize, uSunBands, uHorizon) set composition and motion. uCalm eases
10
+ // the additive glow near frame center, where the masked subject's face sits.
11
+ //
12
+ // Cost: NO raymarch, NO fbm, NO loops. One guarded perspective divide, a few
13
+ // sin/exp/smoothstep. Plasma bracket; well under the clouds/nebula tier.
14
+ //
15
+ // UV convention: matches passthrough.vert. vUv = (0, 0) bottom-left, (1, 1)
16
+ // top-right. fragCoord-free; reads vUv directly. Fully procedural: no input
17
+ // texture, so ZERO net texture flips on every runtime (web/Android/Metal alike).
18
+ //
19
+ // Cross-target correctness: the floor's depth is 1 / (uHorizon - y), which would
20
+ // blow to Inf/NaN exactly at the horizon and diverges between desktop highp and
21
+ // mobile mediump. The denominator is clamped (max(..., 1.5e-3)) and the floor is
22
+ // shaded only BELOW the horizon. Grid anti-aliasing is per-axis, depth-scaled line
23
+ // width (NOT fwidth, NOT reversed-edge smoothstep): each axis' line band widens at
24
+ // its own screen-space compression rate, so far lines never go sub-pixel and the
25
+ // grid does not shimmer as it scrolls. No derivative-precision question on the
26
+ // Android/Metal targets. No variable-exponent pow, no gl_FragCoord, no arrays.
27
+ //
28
+ // Precision: highp float throughout; the depth divide and grid coordinate need
29
+ // the range and the front-to-horizon dynamic range.
30
+
31
+ #version 300 es
32
+ precision highp float;
33
+
34
+ uniform float uTime; // seconds, monotonically increasing; range [0, inf)
35
+ uniform vec2 uResolution; // framebuffer size in pixels; both components > 0
36
+ uniform vec3 uSkyTop; // sky gradient color at the top of frame
37
+ uniform vec3 uSkyHorizon; // sky gradient color at the horizon
38
+ uniform vec3 uSunTop; // sun gradient color at its top
39
+ uniform vec3 uSunBottom; // sun gradient color at its bottom
40
+ uniform vec3 uGridColor; // neon grid line tint (also the horizon seam)
41
+ uniform float uGridDensity; // grid cells across the floor; higher = finer
42
+ uniform float uGridGlow; // line glow width/softness, 0..1
43
+ uniform float uSpeed; // grid scroll rate toward the viewer; 0 freezes
44
+ uniform float uSunSize; // sun radius in vUv.y units
45
+ uniform float uSunBands; // horizontal slit count cut into the sun's lower half
46
+ uniform float uHorizon; // horizon height in vUv.y, 0..1 (floor below, sky above)
47
+ uniform float uCalm; // 0..1 eases the additive glow at frame center (face zone)
48
+
49
+ in highp vec2 vUv;
50
+ out vec4 oColor;
51
+
52
+ void main() {
53
+ float aspect = uResolution.x / uResolution.y;
54
+ float fx = (vUv.x - 0.5) * aspect; // aspect-correct, screen-centered x
55
+ float fy = vUv.y; // 0 bottom .. 1 top
56
+ float h = clamp(uHorizon, 0.05, 0.95);
57
+
58
+ // Ease additive glow near the frame center (the subject's face sits there).
59
+ float calm = 1.0 - uCalm * (1.0 - smoothstep(0.18, 0.62, length(vec2(fx, fy - 0.5))));
60
+
61
+ vec3 col;
62
+
63
+ if (fy > h) {
64
+ // --- SKY ---
65
+ float skyT = (fy - h) / (1.0 - h); // 0 at horizon, 1 at the top of frame
66
+ col = mix(uSkyHorizon, uSkyTop, skyT);
67
+
68
+ // --- SUN --- centered just above the horizon so its lower arc sinks below
69
+ // it and is occluded by the floor (the half-set sun, for free).
70
+ float sunCY = h + uSunSize * 0.55;
71
+ vec2 sd = vec2(fx, fy - sunCY);
72
+ float r = length(sd) / max(uSunSize, 1e-3); // normalized radius, 1 at the edge
73
+
74
+ // Soft glow halo bleeding into the sky around the disc.
75
+ float halo = exp(-max(r - 1.0, 0.0) * 5.5);
76
+ col += uSunTop * halo * 0.55 * calm;
77
+
78
+ // Sun body: vertical gradient, with horizontal bands cut from the lower half
79
+ // (each gap thickening toward the bottom, the iconic retrowave slit pattern).
80
+ float disc = smoothstep(1.0, 0.985, r);
81
+ float vy = clamp(sd.y / max(uSunSize, 1e-3) * 0.5 + 0.5, 0.0, 1.0);
82
+ vec3 sunCol = mix(uSunBottom, uSunTop, vy);
83
+
84
+ float below = max(-sd.y / max(uSunSize, 1e-3), 0.0); // 0 above center, grows downward
85
+ // Drift the slit phase over time so the sun's scanlines crawl downward.
86
+ float slit = fract(below * uSunBands - uTime * 0.18);
87
+ float gapW = clamp(below, 0.0, 1.0) * 0.85; // gap fraction grows downward
88
+ float cut = step(slit, gapW) * smoothstep(0.04, 0.12, below); // keep upper sun whole
89
+ float sunBody = disc * (1.0 - cut);
90
+
91
+ col = mix(col, sunCol, sunBody);
92
+ } else {
93
+ // --- FLOOR --- perspective grid. Guard the divide; shade only below horizon.
94
+ float depth = 1.0 / max(h - fy, 1.5e-3); // large near the horizon
95
+ float depthMin = 1.0 / h; // depth at the very front (fy = 0)
96
+
97
+ // Grid coordinates: x widens with depth (perspective); uGridDensity sets the
98
+ // cell count; the scroll is in cell units so its rate is density-independent.
99
+ vec2 g = vec2(fx * depth, depth) * uGridDensity;
100
+ g.y += uTime * uSpeed * 2.0;
101
+ vec2 cell = abs(fract(g) - 0.5); // 0 on a line .. 0.5 mid-cell, per axis
102
+
103
+ // Per-axis, depth-scaled line half-width: the rungs (g.y) compress toward the
104
+ // horizon as depth^2 and the verticals (g.x) ~linearly, so widening each axis'
105
+ // line band at its own compression rate holds the on-screen line width roughly
106
+ // constant. Far lines fuse into a band instead of a sub-pixel sheet that
107
+ // shimmers as it scrolls; near lines stay crisp. Written 1 - smoothstep(0, w, .)
108
+ // (NOT the reversed-edge smoothstep(w, 0, .), which is undefined on GLSL ES /
109
+ // Metal) and derivative-free, so it is portable and mobile-precision safe.
110
+ vec2 w = max(vec2(depth, depth * depth * 0.2) * uGridDensity * 0.0013, vec2(1e-4));
111
+ vec2 core = 1.0 - smoothstep(vec2(0.0), w, cell);
112
+ vec2 halo = (1.0 - smoothstep(vec2(0.0), w * 6.0, cell)) * (0.5 * uGridGlow);
113
+ float gridVal = clamp(core.x + core.y + halo.x + halo.y, 0.0, 1.5);
114
+
115
+ // Distance fog: fade the grid out toward the horizon for the converging look.
116
+ float fog = clamp(1.0 - (depth - depthMin) / (depthMin * 10.0), 0.0, 1.0);
117
+ fog *= fog;
118
+
119
+ vec3 floorBase = mix(vec3(0.0), uSkyHorizon * 0.16, fog * 0.6);
120
+ col = floorBase + uGridColor * gridVal * fog * calm;
121
+ }
122
+
123
+ // Glowing horizon seam where floor meets sky.
124
+ float seam = exp(-abs(fy - h) * 90.0);
125
+ col += uGridColor * seam * 0.5 * calm;
126
+
127
+ oColor = vec4(col, 1.0);
128
+ }
@@ -0,0 +1,124 @@
1
+ // Outrun-grid layer-shader interface: typed uniforms + control descriptor.
2
+ // A scrolling neon perspective grid with a banded retrowave sun, an opaque
3
+ // BACKGROUND layer (issue #70). One outrun-grid.frag fans out into the book
4
+ // presets (classic, miami, tron, acid, vapor) by varying these uniforms; the
5
+ // three color pairs (grid, sun, sky) are the big levers. Shader source is
6
+ // shaders/outrun-grid/outrun-grid.frag.
7
+
8
+ import type { RGB } from '../../../src/lib/primitives.types';
9
+ import type { UniformControl } from '../_shared/types';
10
+
11
+ /** Typed uniforms for the `outrun-grid` layer shader. */
12
+ export type OutrunGridUniforms = {
13
+ /** Sky gradient color at the top of frame. */
14
+ readonly uSkyTop: RGB;
15
+ /** Sky gradient color at the horizon. */
16
+ readonly uSkyHorizon: RGB;
17
+ /** Sun gradient color at its top. */
18
+ readonly uSunTop: RGB;
19
+ /** Sun gradient color at its bottom. */
20
+ readonly uSunBottom: RGB;
21
+ /** Neon grid line tint (also the horizon seam). */
22
+ readonly uGridColor: RGB;
23
+ /** Grid cells across the floor; higher is finer. */
24
+ readonly uGridDensity: number;
25
+ /** Line glow width/softness, 0..1. */
26
+ readonly uGridGlow: number;
27
+ /** Grid scroll rate toward the viewer; 0 freezes. */
28
+ readonly uSpeed: number;
29
+ /** Sun radius in vUv.y units. */
30
+ readonly uSunSize: number;
31
+ /** Horizontal slit count cut into the sun's lower half. */
32
+ readonly uSunBands: number;
33
+ /** Horizon height in vUv.y, 0..1 (floor below, sky above). */
34
+ readonly uHorizon: number;
35
+ /** Eases the additive glow at frame center (the face zone); 0 = off. */
36
+ readonly uCalm: number;
37
+ };
38
+
39
+ /** The `outrun-grid` shader's tunables; defaults are the "classic" synthwave look. */
40
+ export const OUTRUN_GRID_CONTROLS: readonly UniformControl[] = [
41
+ {
42
+ name: 'uSkyTop',
43
+ kind: 'color',
44
+ default: [0.05, 0.02, 0.18],
45
+ doc: 'Sky color at top of frame.',
46
+ },
47
+ {
48
+ name: 'uSkyHorizon',
49
+ kind: 'color',
50
+ default: [0.35, 0.05, 0.4],
51
+ doc: 'Sky color at the horizon.',
52
+ },
53
+ { name: 'uSunTop', kind: 'color', default: [1.0, 0.85, 0.3], doc: 'Sun color at its top.' },
54
+ {
55
+ name: 'uSunBottom',
56
+ kind: 'color',
57
+ default: [0.95, 0.15, 0.5],
58
+ doc: 'Sun color at its bottom.',
59
+ },
60
+ { name: 'uGridColor', kind: 'color', default: [0.95, 0.2, 0.7], doc: 'Neon grid line tint.' },
61
+ {
62
+ name: 'uGridDensity',
63
+ kind: 'float',
64
+ default: 4,
65
+ min: 4,
66
+ max: 32,
67
+ step: 1,
68
+ doc: 'Grid cells across the floor.',
69
+ },
70
+ {
71
+ name: 'uGridGlow',
72
+ kind: 'float',
73
+ default: 0.5,
74
+ min: 0.05,
75
+ max: 1,
76
+ step: 0.01,
77
+ doc: 'Line glow width/softness.',
78
+ },
79
+ {
80
+ name: 'uSpeed',
81
+ kind: 'float',
82
+ default: 0.3,
83
+ min: 0,
84
+ max: 3,
85
+ step: 0.01,
86
+ doc: 'Scroll rate toward the viewer; 0 freezes.',
87
+ },
88
+ {
89
+ name: 'uSunSize',
90
+ kind: 'float',
91
+ default: 0.32,
92
+ min: 0.1,
93
+ max: 0.6,
94
+ step: 0.01,
95
+ doc: 'Sun radius.',
96
+ },
97
+ {
98
+ name: 'uSunBands',
99
+ kind: 'float',
100
+ default: 7,
101
+ min: 0,
102
+ max: 16,
103
+ step: 1,
104
+ doc: 'Horizontal slit count in the sun.',
105
+ },
106
+ {
107
+ name: 'uHorizon',
108
+ kind: 'float',
109
+ default: 0.55,
110
+ min: 0.2,
111
+ max: 0.8,
112
+ step: 0.01,
113
+ doc: 'Horizon height (floor below, sky above).',
114
+ },
115
+ {
116
+ name: 'uCalm',
117
+ kind: 'float',
118
+ default: 0,
119
+ min: 0,
120
+ max: 1,
121
+ step: 0.01,
122
+ doc: 'Eases the additive glow at frame center (face zone).',
123
+ },
124
+ ];
@@ -10,6 +10,7 @@ import type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';
10
10
  import type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';
11
11
  import type { NebulaUniforms } from './nebula/nebula';
12
12
  import type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';
13
+ import type { OutrunGridUniforms } from './outrun-grid/outrun-grid';
13
14
  import type { PlasmaUniforms } from './plasma/plasma';
14
15
  import type { SimianlightsUniforms } from './simianlights/simianlights';
15
16
  export { defaultUniforms, type UniformControl } from './_shared/types';
@@ -37,6 +38,8 @@ export type { NebulaUniforms } from './nebula/nebula';
37
38
  export { NEBULA_CONTROLS } from './nebula/nebula';
38
39
  export type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';
39
40
  export { NEO_MEMPHIS_CONTROLS } from './neo-memphis/neo-memphis';
41
+ export type { OutrunGridUniforms } from './outrun-grid/outrun-grid';
42
+ export { OUTRUN_GRID_CONTROLS } from './outrun-grid/outrun-grid';
40
43
  export type { PlasmaUniforms } from './plasma/plasma';
41
44
  export { PLASMA_CONTROLS } from './plasma/plasma';
42
45
  export type { SimianlightsUniforms } from './simianlights/simianlights';
@@ -57,6 +60,7 @@ export type ShaderUniformsMap = {
57
60
  readonly plasma: PlasmaUniforms;
58
61
  readonly nebula: NebulaUniforms;
59
62
  readonly 'neo-memphis': NeoMemphisUniforms;
63
+ readonly 'outrun-grid': OutrunGridUniforms;
60
64
  readonly simianlights: SimianlightsUniforms;
61
65
  readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;
62
66
  readonly 'aurora-silk': AuroraSilkUniforms;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../catalog/shaders/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,6CAA6C,CAAC;AAC/F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAChG,OAAO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,CAAC;IAC7D,QAAQ,CAAC,aAAa,EAAE,kBAAkB,CAAC;IAC3C,QAAQ,CAAC,uBAAuB,EAAE,0BAA0B,CAAC;IAC7D,QAAQ,CAAC,iBAAiB,EAAE,sBAAsB,CAAC;CACpD,CAAC;AAEF,uDAAuD;AACvD,MAAM,MAAM,mBAAmB,GAAG,MAAM,iBAAiB,CAAC;AAE1D;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;CACvC,GAAG;IACF,QAAQ,EAAE,CAAC,IAAI,MAAM,iBAAiB,GAAG;QAAE,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE;CAC9F,CAAC;AAEF,kEAAkE;AAClE,MAAM,MAAM,eAAe,GAAG,MAAM,kBAAkB,CAAC"}
@@ -4,7 +4,7 @@
4
4
  // from, and the shader's documentation). The per-shader `*_CONTROLS` are
5
5
  // re-exported individually; a consumer imports the one its preset's layer needs.
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.SIMIANLIGHTS_CONTROLS = exports.PLASMA_CONTROLS = exports.NEO_MEMPHIS_CONTROLS = exports.NEBULA_CONTROLS = exports.LIGHT_BEAMS_AND_MOTES_CONTROLS = exports.KALEIDOSCOPE_CONTROLS = exports.HALFTONE_WAVES_CONTROLS = exports.GODRAYS_CONTROLS = exports.FIREFLIES_CONTROLS = exports.CORPORATE_BLOBS_CONTROLS = exports.CLOUDS_CONTROLS = exports.BLUR_CONTROLS = exports.AURORA_SILK_CONTROLS = exports.ANAMORPHIC_LENSFLARE_CONTROLS = exports.defaultUniforms = void 0;
7
+ exports.SIMIANLIGHTS_CONTROLS = exports.PLASMA_CONTROLS = exports.OUTRUN_GRID_CONTROLS = exports.NEO_MEMPHIS_CONTROLS = exports.NEBULA_CONTROLS = exports.LIGHT_BEAMS_AND_MOTES_CONTROLS = exports.KALEIDOSCOPE_CONTROLS = exports.HALFTONE_WAVES_CONTROLS = exports.GODRAYS_CONTROLS = exports.FIREFLIES_CONTROLS = exports.CORPORATE_BLOBS_CONTROLS = exports.CLOUDS_CONTROLS = exports.BLUR_CONTROLS = exports.AURORA_SILK_CONTROLS = exports.ANAMORPHIC_LENSFLARE_CONTROLS = exports.defaultUniforms = void 0;
8
8
  var types_1 = require("./_shared/types");
9
9
  Object.defineProperty(exports, "defaultUniforms", { enumerable: true, get: function () { return types_1.defaultUniforms; } });
10
10
  var anamorphic_lensflare_1 = require("./anamorphic-lensflare/anamorphic-lensflare");
@@ -31,6 +31,8 @@ var nebula_1 = require("./nebula/nebula");
31
31
  Object.defineProperty(exports, "NEBULA_CONTROLS", { enumerable: true, get: function () { return nebula_1.NEBULA_CONTROLS; } });
32
32
  var neo_memphis_1 = require("./neo-memphis/neo-memphis");
33
33
  Object.defineProperty(exports, "NEO_MEMPHIS_CONTROLS", { enumerable: true, get: function () { return neo_memphis_1.NEO_MEMPHIS_CONTROLS; } });
34
+ var outrun_grid_1 = require("./outrun-grid/outrun-grid");
35
+ Object.defineProperty(exports, "OUTRUN_GRID_CONTROLS", { enumerable: true, get: function () { return outrun_grid_1.OUTRUN_GRID_CONTROLS; } });
34
36
  var plasma_1 = require("./plasma/plasma");
35
37
  Object.defineProperty(exports, "PLASMA_CONTROLS", { enumerable: true, get: function () { return plasma_1.PLASMA_CONTROLS; } });
36
38
  var simianlights_1 = require("./simianlights/simianlights");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../catalog/shaders/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,gFAAgF;AAChF,yEAAyE;AACzE,iFAAiF;;;AAiBjF,yCAAuE;AAA9D,wGAAA,eAAe,OAAA;AAExB,oFAA4F;AAAnF,qIAAA,6BAA6B,OAAA;AAEtC,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,oCAA4C;AAAnC,qGAAA,aAAa,OAAA;AAEtB,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,qEAA6E;AAApE,2HAAA,wBAAwB,OAAA;AAEjC,mDAA2D;AAAlD,+GAAA,kBAAkB,OAAA;AAE3B,6CAAqD;AAA5C,2GAAA,gBAAgB,OAAA;AAEzB,kEAA0E;AAAjE,yHAAA,uBAAuB,OAAA;AAEhC,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA;AAE9B,uFAA+F;AAAtF,uIAAA,8BAA8B,OAAA;AAEvC,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA","sourcesContent":["// Per-shader interface barrel. Each layer shader exports its typed uniforms and\n// a control descriptor (the runtime metadata the demo generates tuning controls\n// from, and the shader's documentation). The per-shader `*_CONTROLS` are\n// re-exported individually; a consumer imports the one its preset's layer needs.\n\nimport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nimport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nimport type { BlurUniforms } from './blur/blur';\nimport type { CloudsUniforms } from './clouds/clouds';\nimport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nimport type { FirefliesUniforms } from './fireflies/fireflies';\nimport type { GodraysUniforms } from './godrays/godrays';\nimport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nimport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nimport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nimport type { NebulaUniforms } from './nebula/nebula';\nimport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nimport type { PlasmaUniforms } from './plasma/plasma';\nimport type { SimianlightsUniforms } from './simianlights/simianlights';\n\nexport { defaultUniforms, type UniformControl } from './_shared/types';\nexport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nexport { ANAMORPHIC_LENSFLARE_CONTROLS } from './anamorphic-lensflare/anamorphic-lensflare';\nexport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nexport { AURORA_SILK_CONTROLS } from './aurora-silk/aurora-silk';\nexport type { BlurUniforms } from './blur/blur';\nexport { BLUR_CONTROLS } from './blur/blur';\nexport type { CloudsUniforms } from './clouds/clouds';\nexport { CLOUDS_CONTROLS } from './clouds/clouds';\nexport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nexport { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';\nexport type { FirefliesUniforms } from './fireflies/fireflies';\nexport { FIREFLIES_CONTROLS } from './fireflies/fireflies';\nexport type { GodraysUniforms } from './godrays/godrays';\nexport { GODRAYS_CONTROLS } from './godrays/godrays';\nexport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nexport { HALFTONE_WAVES_CONTROLS } from './halftone-waves/halftone-waves';\nexport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nexport { KALEIDOSCOPE_CONTROLS } from './kaleidoscope/kaleidoscope';\nexport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nexport { LIGHT_BEAMS_AND_MOTES_CONTROLS } from './light-beams-and-motes/light-beams-and-motes';\nexport type { NebulaUniforms } from './nebula/nebula';\nexport { NEBULA_CONTROLS } from './nebula/nebula';\nexport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nexport { NEO_MEMPHIS_CONTROLS } from './neo-memphis/neo-memphis';\nexport type { PlasmaUniforms } from './plasma/plasma';\nexport { PLASMA_CONTROLS } from './plasma/plasma';\nexport type { SimianlightsUniforms } from './simianlights/simianlights';\nexport { SIMIANLIGHTS_CONTROLS } from './simianlights/simianlights';\n\n/**\n * The uniform-bearing layer shaders → their typed uniforms. `image` and `direct`\n * carry no uniforms, so they are absent. This is the map `PatchFor` re-indexes by\n * a layer's literal `shader` to type its `uniforms` as `Partial<PlasmaUniforms>`,\n * giving authors IntelliSense on a `kaleidoscope(id, patches)` call.\n */\nexport type ShaderUniformsMap = {\n readonly blur: BlurUniforms;\n readonly clouds: CloudsUniforms;\n readonly godrays: GodraysUniforms;\n readonly fireflies: FirefliesUniforms;\n readonly kaleidoscope: KaleidoscopeShaderUniforms;\n readonly 'halftone-waves': HalftoneWavesUniforms;\n readonly plasma: PlasmaUniforms;\n readonly nebula: NebulaUniforms;\n readonly 'neo-memphis': NeoMemphisUniforms;\n readonly simianlights: SimianlightsUniforms;\n readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;\n readonly 'aurora-silk': AuroraSilkUniforms;\n readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;\n readonly 'corporate-blobs': CorporateBlobsUniforms;\n};\n\n/** A patchable (uniform-bearing) layer shader name. */\nexport type PatchableShaderName = keyof ShaderUniformsMap;\n\n/**\n * What each layer `shader` accepts in a preset, DERIVED from `ShaderUniformsMap`\n * so adding a shader there flows through automatically (no hand-mirrored list):\n * every uniform-bearing shader's options are a `Partial` of its uniforms, plus\n * the two non-uniform layer kinds. The `KaleidoscopeLayer` discriminant narrows\n * over this.\n * - `image` replaces the target with a still image (needs `source`).\n * - `direct` passes the target through unchanged (a matrix passthrough).\n */\nexport type LayerShaderOptions = {\n readonly image: { readonly source: string };\n readonly direct: Record<never, never>;\n} & {\n readonly [K in keyof ShaderUniformsMap]: { readonly uniforms: Partial<ShaderUniformsMap[K]> };\n};\n\n/** A layer shader name (the `KaleidoscopeLayer` discriminant). */\nexport type LayerShaderName = keyof LayerShaderOptions;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../catalog/shaders/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,gFAAgF;AAChF,yEAAyE;AACzE,iFAAiF;;;AAkBjF,yCAAuE;AAA9D,wGAAA,eAAe,OAAA;AAExB,oFAA4F;AAAnF,qIAAA,6BAA6B,OAAA;AAEtC,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,oCAA4C;AAAnC,qGAAA,aAAa,OAAA;AAEtB,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,qEAA6E;AAApE,2HAAA,wBAAwB,OAAA;AAEjC,mDAA2D;AAAlD,+GAAA,kBAAkB,OAAA;AAE3B,6CAAqD;AAA5C,2GAAA,gBAAgB,OAAA;AAEzB,kEAA0E;AAAjE,yHAAA,uBAAuB,OAAA;AAEhC,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA;AAE9B,uFAA+F;AAAtF,uIAAA,8BAA8B,OAAA;AAEvC,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,yDAAiE;AAAxD,mHAAA,oBAAoB,OAAA;AAE7B,0CAAkD;AAAzC,yGAAA,eAAe,OAAA;AAExB,4DAAoE;AAA3D,qHAAA,qBAAqB,OAAA","sourcesContent":["// Per-shader interface barrel. Each layer shader exports its typed uniforms and\n// a control descriptor (the runtime metadata the demo generates tuning controls\n// from, and the shader's documentation). The per-shader `*_CONTROLS` are\n// re-exported individually; a consumer imports the one its preset's layer needs.\n\nimport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nimport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nimport type { BlurUniforms } from './blur/blur';\nimport type { CloudsUniforms } from './clouds/clouds';\nimport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nimport type { FirefliesUniforms } from './fireflies/fireflies';\nimport type { GodraysUniforms } from './godrays/godrays';\nimport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nimport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nimport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nimport type { NebulaUniforms } from './nebula/nebula';\nimport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nimport type { OutrunGridUniforms } from './outrun-grid/outrun-grid';\nimport type { PlasmaUniforms } from './plasma/plasma';\nimport type { SimianlightsUniforms } from './simianlights/simianlights';\n\nexport { defaultUniforms, type UniformControl } from './_shared/types';\nexport type { AnamorphicLensFlareUniforms } from './anamorphic-lensflare/anamorphic-lensflare';\nexport { ANAMORPHIC_LENSFLARE_CONTROLS } from './anamorphic-lensflare/anamorphic-lensflare';\nexport type { AuroraSilkUniforms } from './aurora-silk/aurora-silk';\nexport { AURORA_SILK_CONTROLS } from './aurora-silk/aurora-silk';\nexport type { BlurUniforms } from './blur/blur';\nexport { BLUR_CONTROLS } from './blur/blur';\nexport type { CloudsUniforms } from './clouds/clouds';\nexport { CLOUDS_CONTROLS } from './clouds/clouds';\nexport type { CorporateBlobsUniforms } from './corporate-blobs/corporate-blobs';\nexport { CORPORATE_BLOBS_CONTROLS } from './corporate-blobs/corporate-blobs';\nexport type { FirefliesUniforms } from './fireflies/fireflies';\nexport { FIREFLIES_CONTROLS } from './fireflies/fireflies';\nexport type { GodraysUniforms } from './godrays/godrays';\nexport { GODRAYS_CONTROLS } from './godrays/godrays';\nexport type { HalftoneWavesUniforms } from './halftone-waves/halftone-waves';\nexport { HALFTONE_WAVES_CONTROLS } from './halftone-waves/halftone-waves';\nexport type { KaleidoscopeShaderUniforms } from './kaleidoscope/kaleidoscope';\nexport { KALEIDOSCOPE_CONTROLS } from './kaleidoscope/kaleidoscope';\nexport type { LightBeamsAndMotesUniforms } from './light-beams-and-motes/light-beams-and-motes';\nexport { LIGHT_BEAMS_AND_MOTES_CONTROLS } from './light-beams-and-motes/light-beams-and-motes';\nexport type { NebulaUniforms } from './nebula/nebula';\nexport { NEBULA_CONTROLS } from './nebula/nebula';\nexport type { NeoMemphisUniforms } from './neo-memphis/neo-memphis';\nexport { NEO_MEMPHIS_CONTROLS } from './neo-memphis/neo-memphis';\nexport type { OutrunGridUniforms } from './outrun-grid/outrun-grid';\nexport { OUTRUN_GRID_CONTROLS } from './outrun-grid/outrun-grid';\nexport type { PlasmaUniforms } from './plasma/plasma';\nexport { PLASMA_CONTROLS } from './plasma/plasma';\nexport type { SimianlightsUniforms } from './simianlights/simianlights';\nexport { SIMIANLIGHTS_CONTROLS } from './simianlights/simianlights';\n\n/**\n * The uniform-bearing layer shaders → their typed uniforms. `image` and `direct`\n * carry no uniforms, so they are absent. This is the map `PatchFor` re-indexes by\n * a layer's literal `shader` to type its `uniforms` as `Partial<PlasmaUniforms>`,\n * giving authors IntelliSense on a `kaleidoscope(id, patches)` call.\n */\nexport type ShaderUniformsMap = {\n readonly blur: BlurUniforms;\n readonly clouds: CloudsUniforms;\n readonly godrays: GodraysUniforms;\n readonly fireflies: FirefliesUniforms;\n readonly kaleidoscope: KaleidoscopeShaderUniforms;\n readonly 'halftone-waves': HalftoneWavesUniforms;\n readonly plasma: PlasmaUniforms;\n readonly nebula: NebulaUniforms;\n readonly 'neo-memphis': NeoMemphisUniforms;\n readonly 'outrun-grid': OutrunGridUniforms;\n readonly simianlights: SimianlightsUniforms;\n readonly 'anamorphic-lensflare': AnamorphicLensFlareUniforms;\n readonly 'aurora-silk': AuroraSilkUniforms;\n readonly 'light-beams-and-motes': LightBeamsAndMotesUniforms;\n readonly 'corporate-blobs': CorporateBlobsUniforms;\n};\n\n/** A patchable (uniform-bearing) layer shader name. */\nexport type PatchableShaderName = keyof ShaderUniformsMap;\n\n/**\n * What each layer `shader` accepts in a preset, DERIVED from `ShaderUniformsMap`\n * so adding a shader there flows through automatically (no hand-mirrored list):\n * every uniform-bearing shader's options are a `Partial` of its uniforms, plus\n * the two non-uniform layer kinds. The `KaleidoscopeLayer` discriminant narrows\n * over this.\n * - `image` replaces the target with a still image (needs `source`).\n * - `direct` passes the target through unchanged (a matrix passthrough).\n */\nexport type LayerShaderOptions = {\n readonly image: { readonly source: string };\n readonly direct: Record<never, never>;\n} & {\n readonly [K in keyof ShaderUniformsMap]: { readonly uniforms: Partial<ShaderUniformsMap[K]> };\n};\n\n/** A layer shader name (the `KaleidoscopeLayer` discriminant). */\nexport type LayerShaderName = keyof LayerShaderOptions;\n"]}
@@ -0,0 +1,32 @@
1
+ import type { RGB } from '../../../src/lib/primitives.types';
2
+ import type { UniformControl } from '../_shared/types';
3
+ /** Typed uniforms for the `outrun-grid` layer shader. */
4
+ export type OutrunGridUniforms = {
5
+ /** Sky gradient color at the top of frame. */
6
+ readonly uSkyTop: RGB;
7
+ /** Sky gradient color at the horizon. */
8
+ readonly uSkyHorizon: RGB;
9
+ /** Sun gradient color at its top. */
10
+ readonly uSunTop: RGB;
11
+ /** Sun gradient color at its bottom. */
12
+ readonly uSunBottom: RGB;
13
+ /** Neon grid line tint (also the horizon seam). */
14
+ readonly uGridColor: RGB;
15
+ /** Grid cells across the floor; higher is finer. */
16
+ readonly uGridDensity: number;
17
+ /** Line glow width/softness, 0..1. */
18
+ readonly uGridGlow: number;
19
+ /** Grid scroll rate toward the viewer; 0 freezes. */
20
+ readonly uSpeed: number;
21
+ /** Sun radius in vUv.y units. */
22
+ readonly uSunSize: number;
23
+ /** Horizontal slit count cut into the sun's lower half. */
24
+ readonly uSunBands: number;
25
+ /** Horizon height in vUv.y, 0..1 (floor below, sky above). */
26
+ readonly uHorizon: number;
27
+ /** Eases the additive glow at frame center (the face zone); 0 = off. */
28
+ readonly uCalm: number;
29
+ };
30
+ /** The `outrun-grid` shader's tunables; defaults are the "classic" synthwave look. */
31
+ export declare const OUTRUN_GRID_CONTROLS: readonly UniformControl[];
32
+ //# sourceMappingURL=outrun-grid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outrun-grid.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/outrun-grid/outrun-grid.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,wCAAwC;IACxC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;IACzB,mDAAmD;IACnD,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC;IACzB,oDAAoD;IACpD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,sCAAsC;IACtC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,qDAAqD;IACrD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iCAAiC;IACjC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,2DAA2D;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,sFAAsF;AACtF,eAAO,MAAM,oBAAoB,EAAE,SAAS,cAAc,EAoFzD,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type KaleidoscopeControls } from '../../../src/components/preset-control-panel';
2
+ export declare function OutrunGridForm({ uniforms, onPatch, disabled }: KaleidoscopeControls): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=outrun-grid.form.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outrun-grid.form.d.ts","sourceRoot":"","sources":["../../../../catalog/shaders/outrun-grid/outrun-grid.form.tsx"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8CAA8C,CAAC;AAGtD,wBAAgB,cAAc,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAyBnF"}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OutrunGridForm = OutrunGridForm;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ // Outrun-grid's editor form: the shader OWNS its control layout (the plasma
6
+ // pattern). One <Control uniform="…"/> per uniform in declared order.
7
+ // Conventional layer id: "outrun-grid".
8
+ const preset_control_panel_1 = require("../../../src/components/preset-control-panel");
9
+ const outrun_grid_1 = require("./outrun-grid");
10
+ function OutrunGridForm({ uniforms, onPatch, disabled }) {
11
+ return ((0, jsx_runtime_1.jsx)(preset_control_panel_1.ControlForm, { id: "outrun-grid", uniforms: uniforms['outrun-grid'] ?? {}, onPatch: onPatch, disabled: disabled, controls: outrun_grid_1.OUTRUN_GRID_CONTROLS, children: (0, jsx_runtime_1.jsxs)(preset_control_panel_1.ControlSection, { title: "outrun-grid", children: [(0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSkyTop" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSkyHorizon" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSunTop" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSunBottom" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uGridColor" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uGridDensity" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uGridGlow" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSpeed" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSunSize" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uSunBands" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uHorizon" }), (0, jsx_runtime_1.jsx)(preset_control_panel_1.Control, { uniform: "uCalm" })] }) }));
12
+ }
13
+ //# sourceMappingURL=outrun-grid.form.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outrun-grid.form.js","sourceRoot":"","sources":["../../../../catalog/shaders/outrun-grid/outrun-grid.form.tsx"],"names":[],"mappings":";;;;AAAA,4EAA4E;AAC5E,sEAAsE;AACtE,wCAAwC;AAExC,uFAKsD;AACtD,+CAAqD;AAErD,wBAA+B,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAwB;IAClF,OAAO,CACL,uBAAC,kCAAW,IACV,EAAE,EAAC,aAAa,EAChB,QAAQ,EAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,EAAE,EACvC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,kCAAoB,YAE9B,wBAAC,qCAAc,IAAC,KAAK,EAAC,aAAa,aACjC,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,aAAa,GAAG,EACjC,uBAAC,8BAAO,IAAC,OAAO,EAAC,SAAS,GAAG,EAC7B,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,YAAY,GAAG,EAChC,uBAAC,8BAAO,IAAC,OAAO,EAAC,cAAc,GAAG,EAClC,uBAAC,8BAAO,IAAC,OAAO,EAAC,WAAW,GAAG,EAC/B,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,UAAU,GAAG,EAC9B,uBAAC,8BAAO,IAAC,OAAO,EAAC,OAAO,GAAG,IACZ,GACL,CACf,CAAC;AACJ,CAAC","sourcesContent":["// Outrun-grid's editor form: the shader OWNS its control layout (the plasma\n// pattern). One <Control uniform=\"…\"/> per uniform in declared order.\n// Conventional layer id: \"outrun-grid\".\n\nimport {\n Control,\n ControlForm,\n ControlSection,\n type KaleidoscopeControls,\n} from '../../../src/components/preset-control-panel';\nimport { OUTRUN_GRID_CONTROLS } from './outrun-grid';\n\nexport function OutrunGridForm({ uniforms, onPatch, disabled }: KaleidoscopeControls) {\n return (\n <ControlForm\n id=\"outrun-grid\"\n uniforms={uniforms['outrun-grid'] ?? {}}\n onPatch={onPatch}\n disabled={disabled}\n controls={OUTRUN_GRID_CONTROLS}\n >\n <ControlSection title=\"outrun-grid\">\n <Control uniform=\"uSkyTop\" />\n <Control uniform=\"uSkyHorizon\" />\n <Control uniform=\"uSunTop\" />\n <Control uniform=\"uSunBottom\" />\n <Control uniform=\"uGridColor\" />\n <Control uniform=\"uGridDensity\" />\n <Control uniform=\"uGridGlow\" />\n <Control uniform=\"uSpeed\" />\n <Control uniform=\"uSunSize\" />\n <Control uniform=\"uSunBands\" />\n <Control uniform=\"uHorizon\" />\n <Control uniform=\"uCalm\" />\n </ControlSection>\n </ControlForm>\n );\n}\n"]}