@wave3d/core 0.6.0 → 0.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.
- package/dist/config/model.d.ts +72 -8
- package/dist/config/model.js +44 -1
- package/dist/config/model.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/presets.d.ts +8 -2
- package/dist/presets.js +437 -1
- package/dist/presets.js.map +1 -1
- package/dist/renderer/WaveGeometry.d.ts +22 -3
- package/dist/renderer/WaveGeometry.js +22 -3
- package/dist/renderer/WaveGeometry.js.map +1 -1
- package/dist/renderer/WaveRenderer.d.ts +20 -0
- package/dist/renderer/WaveRenderer.js +101 -1
- package/dist/renderer/WaveRenderer.js.map +1 -1
- package/dist/renderer/palette.d.ts +1 -1
- package/dist/renderer/palette.js +7 -5
- package/dist/renderer/palette.js.map +1 -1
- package/dist/renderer/particleField.d.ts +50 -0
- package/dist/renderer/particleField.js +220 -0
- package/dist/renderer/particleField.js.map +1 -0
- package/dist/renderer/shaders.js +247 -89
- package/dist/renderer/shaders.js.map +1 -1
- package/dist/standalone/wave3d.standalone.js +2712 -1951
- package/dist/standalone.d.ts +2 -2
- package/dist/standalone.js +2 -2
- package/dist/studio/thumbnail.d.ts +2 -2
- package/dist/studio/thumbnail.js +16 -7
- package/dist/studio/thumbnail.js.map +1 -1
- package/package.json +6 -4
- package/skills/wave3d/SKILL.md +1 -1
package/dist/presets.js
CHANGED
|
@@ -6,6 +6,100 @@ import { createDefaultConfig, makeStops, makeWaveSpread } from "./config/model.j
|
|
|
6
6
|
* "Stripe *" display names) on top; see apps/studio/src/presets.ts.
|
|
7
7
|
*/
|
|
8
8
|
const RAD = 180 / Math.PI;
|
|
9
|
+
/**
|
|
10
|
+
* Reusable particle STYLES applied to a wave's `particles` block. Surfaced in the studio's per-wave
|
|
11
|
+
* Particles folder (the "style" picker) and used by the "Particle Zoo" showcase preset. Each is a dust
|
|
12
|
+
* look independent of the wave it rides — clone before mutating (`structuredClone`).
|
|
13
|
+
*/
|
|
14
|
+
const PARTICLE_PRESETS = {
|
|
15
|
+
Glitter: {
|
|
16
|
+
count: 16e3,
|
|
17
|
+
size: 2.6,
|
|
18
|
+
seed: 7,
|
|
19
|
+
color: "#ffdca8",
|
|
20
|
+
shape: "glitter",
|
|
21
|
+
edgeBias: 1,
|
|
22
|
+
drift: 300,
|
|
23
|
+
bias: -.6,
|
|
24
|
+
twinkle: .8
|
|
25
|
+
},
|
|
26
|
+
Embers: {
|
|
27
|
+
count: 16e3,
|
|
28
|
+
size: 3.6,
|
|
29
|
+
seed: 7,
|
|
30
|
+
color: "#ff8a2c",
|
|
31
|
+
color2: "#ffe19a",
|
|
32
|
+
shape: "soft",
|
|
33
|
+
edgeBias: .15,
|
|
34
|
+
drift: 40,
|
|
35
|
+
rise: 320,
|
|
36
|
+
wander: 120,
|
|
37
|
+
twinkle: .85,
|
|
38
|
+
life: 6
|
|
39
|
+
},
|
|
40
|
+
Snow: {
|
|
41
|
+
count: 12e3,
|
|
42
|
+
size: 3,
|
|
43
|
+
seed: 4,
|
|
44
|
+
color: "#eef4ff",
|
|
45
|
+
color2: "#bcd0ee",
|
|
46
|
+
shape: "soft",
|
|
47
|
+
edgeBias: .1,
|
|
48
|
+
drift: 20,
|
|
49
|
+
rise: -260,
|
|
50
|
+
wander: 80,
|
|
51
|
+
twinkle: .5,
|
|
52
|
+
life: 8
|
|
53
|
+
},
|
|
54
|
+
Sparks: {
|
|
55
|
+
count: 9e3,
|
|
56
|
+
size: 5,
|
|
57
|
+
seed: 9,
|
|
58
|
+
color: "#ffd27a",
|
|
59
|
+
color2: "#fff4d0",
|
|
60
|
+
shape: "streak",
|
|
61
|
+
edgeBias: 1,
|
|
62
|
+
drift: 620,
|
|
63
|
+
rise: 90,
|
|
64
|
+
wander: 20,
|
|
65
|
+
bias: -.4,
|
|
66
|
+
twinkle: .9,
|
|
67
|
+
life: 2.5
|
|
68
|
+
},
|
|
69
|
+
Fireflies: {
|
|
70
|
+
count: 2200,
|
|
71
|
+
size: 5,
|
|
72
|
+
seed: 11,
|
|
73
|
+
color: "#dfff9a",
|
|
74
|
+
color2: "#8fd94a",
|
|
75
|
+
shape: "star",
|
|
76
|
+
edgeBias: .1,
|
|
77
|
+
drift: 25,
|
|
78
|
+
swirl: .3,
|
|
79
|
+
wander: 170,
|
|
80
|
+
twinkle: 1,
|
|
81
|
+
life: 5
|
|
82
|
+
},
|
|
83
|
+
Bubbles: {
|
|
84
|
+
count: 3e3,
|
|
85
|
+
size: 7,
|
|
86
|
+
sizeJitter: .9,
|
|
87
|
+
seed: 6,
|
|
88
|
+
color: "#cdeefb",
|
|
89
|
+
color2: "#8fd0e6",
|
|
90
|
+
shape: "ring",
|
|
91
|
+
edgeBias: .2,
|
|
92
|
+
drift: 30,
|
|
93
|
+
rise: 240,
|
|
94
|
+
wander: 60,
|
|
95
|
+
twinkle: .3,
|
|
96
|
+
life: 7
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/** Degrees → radians (for the Particle Zoo's per-wave rotation, authored in degrees). */
|
|
100
|
+
const rad = (deg) => deg * Math.PI / 180;
|
|
101
|
+
/** Clamp a signed magnitude to ±m (used to cap the Zoo's long-range particle motion terms). */
|
|
102
|
+
const capMag = (v, m) => v == null ? v : Math.sign(v) * Math.min(Math.abs(v), m);
|
|
9
103
|
/** Build a preset from a set of wave parameters. rotation/hue are given in RADIANS and
|
|
10
104
|
* converted to degrees. All presets are solid-theme, so they reuse the hero palette +
|
|
11
105
|
* surfaceColor fibers (600/0.2) and sheen 0, like the hero. camTarget/zoom frame the
|
|
@@ -350,6 +444,348 @@ const PRESETS = {
|
|
|
350
444
|
c.transparentBackground = false;
|
|
351
445
|
return c;
|
|
352
446
|
},
|
|
447
|
+
"Latte Ring": () => {
|
|
448
|
+
const c = PRESETS["Hero"]();
|
|
449
|
+
const w = c.waves[0];
|
|
450
|
+
w.radialAmount = .72;
|
|
451
|
+
w.radialArc = 286;
|
|
452
|
+
w.radialCenter = -160;
|
|
453
|
+
w.radialRadius = 300;
|
|
454
|
+
w.radialSpread = 1.47;
|
|
455
|
+
w.rotation = {
|
|
456
|
+
x: 0,
|
|
457
|
+
y: 0,
|
|
458
|
+
z: 0
|
|
459
|
+
};
|
|
460
|
+
w.position = {
|
|
461
|
+
x: -280,
|
|
462
|
+
y: -320,
|
|
463
|
+
z: 0
|
|
464
|
+
};
|
|
465
|
+
w.scale = {
|
|
466
|
+
x: 1.12,
|
|
467
|
+
y: 1.12,
|
|
468
|
+
z: 1.12
|
|
469
|
+
};
|
|
470
|
+
w.opacity = .5;
|
|
471
|
+
w.displaceFrequency = {
|
|
472
|
+
x: .0026,
|
|
473
|
+
y: .0048
|
|
474
|
+
};
|
|
475
|
+
w.displaceAmount = 101.73;
|
|
476
|
+
w.detailAmount = 6;
|
|
477
|
+
w.detailFrequency = .1;
|
|
478
|
+
w.speed = .21;
|
|
479
|
+
w.fiberCount = 110;
|
|
480
|
+
w.fiberStrength = .95;
|
|
481
|
+
w.creaseLight = .55;
|
|
482
|
+
w.edgeFeather = .34;
|
|
483
|
+
w.noiseBands = [{
|
|
484
|
+
startX: 0,
|
|
485
|
+
endX: 1,
|
|
486
|
+
startY: .5,
|
|
487
|
+
endY: 1,
|
|
488
|
+
feather: .4,
|
|
489
|
+
strength: 1,
|
|
490
|
+
frequency: 300,
|
|
491
|
+
colorAttenuation: .85,
|
|
492
|
+
parabolaPower: 2.5
|
|
493
|
+
}];
|
|
494
|
+
w.usePaletteTexture = false;
|
|
495
|
+
w.gradientType = "mesh";
|
|
496
|
+
w.meshGradientSoftness = .7;
|
|
497
|
+
w.meshGradientPoints = [
|
|
498
|
+
{
|
|
499
|
+
color: "#f3c06a",
|
|
500
|
+
x: .5,
|
|
501
|
+
y: .1,
|
|
502
|
+
influence: .7
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
color: "#f9edd4",
|
|
506
|
+
x: .34,
|
|
507
|
+
y: .36,
|
|
508
|
+
influence: .62
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
color: "#e6923a",
|
|
512
|
+
x: .15,
|
|
513
|
+
y: .55,
|
|
514
|
+
influence: .5
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
color: "#f1d49a",
|
|
518
|
+
x: .82,
|
|
519
|
+
y: .42,
|
|
520
|
+
influence: .55
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
color: "#ece7d8",
|
|
524
|
+
x: .58,
|
|
525
|
+
y: .88,
|
|
526
|
+
influence: .72
|
|
527
|
+
}
|
|
528
|
+
];
|
|
529
|
+
w.blendMode = "normal";
|
|
530
|
+
w.hueShift = 0;
|
|
531
|
+
w.colorContrast = 1.05;
|
|
532
|
+
w.colorSaturation = 1.15;
|
|
533
|
+
c.cameraDistance = 600;
|
|
534
|
+
c.cameraPosition = {
|
|
535
|
+
x: -854.327,
|
|
536
|
+
y: 135.331,
|
|
537
|
+
z: 478.048
|
|
538
|
+
};
|
|
539
|
+
c.cameraTarget = {
|
|
540
|
+
x: -720.043,
|
|
541
|
+
y: 10.575,
|
|
542
|
+
z: -93.27
|
|
543
|
+
};
|
|
544
|
+
c.cameraZoom = 1.222;
|
|
545
|
+
c.background = "#050404";
|
|
546
|
+
c.backgroundMode = "color";
|
|
547
|
+
c.transparentBackground = false;
|
|
548
|
+
c.grain = .25;
|
|
549
|
+
c.blur = 0;
|
|
550
|
+
c.bloomStrength = .18;
|
|
551
|
+
c.bloomRadius = .55;
|
|
552
|
+
c.bloomThreshold = .72;
|
|
553
|
+
w.particles = {
|
|
554
|
+
count: 2e4,
|
|
555
|
+
size: 2.9,
|
|
556
|
+
color: "#ffdca8",
|
|
557
|
+
seed: 7,
|
|
558
|
+
twinkle: .8,
|
|
559
|
+
edgeBias: 1,
|
|
560
|
+
drift: 490,
|
|
561
|
+
bias: -.6
|
|
562
|
+
};
|
|
563
|
+
return c;
|
|
564
|
+
},
|
|
565
|
+
"Particle Zoo": () => {
|
|
566
|
+
const c = createDefaultConfig();
|
|
567
|
+
c.background = "#05070d";
|
|
568
|
+
c.backgroundMode = "color";
|
|
569
|
+
c.transparentBackground = false;
|
|
570
|
+
c.grain = .26;
|
|
571
|
+
c.blur = 0;
|
|
572
|
+
c.bloomStrength = .3;
|
|
573
|
+
c.bloomThreshold = .66;
|
|
574
|
+
c.cameraPosition = {
|
|
575
|
+
x: 100,
|
|
576
|
+
y: 0,
|
|
577
|
+
z: 5e3
|
|
578
|
+
};
|
|
579
|
+
c.cameraTarget = {
|
|
580
|
+
x: 0,
|
|
581
|
+
y: 0,
|
|
582
|
+
z: 0
|
|
583
|
+
};
|
|
584
|
+
c.cameraZoom = .6;
|
|
585
|
+
const zoo = [
|
|
586
|
+
{
|
|
587
|
+
style: "Embers",
|
|
588
|
+
palette: [
|
|
589
|
+
"#ff7a1e",
|
|
590
|
+
"#ffd27a",
|
|
591
|
+
"#c23a12"
|
|
592
|
+
],
|
|
593
|
+
pos: [-720, 285],
|
|
594
|
+
scale: [
|
|
595
|
+
1,
|
|
596
|
+
1,
|
|
597
|
+
1
|
|
598
|
+
],
|
|
599
|
+
rot: [
|
|
600
|
+
-20,
|
|
601
|
+
0,
|
|
602
|
+
-14
|
|
603
|
+
],
|
|
604
|
+
opacity: .72,
|
|
605
|
+
shape: {
|
|
606
|
+
displaceFrequency: {
|
|
607
|
+
x: .0024,
|
|
608
|
+
y: .0065
|
|
609
|
+
},
|
|
610
|
+
displaceAmount: 118,
|
|
611
|
+
twistPower: {
|
|
612
|
+
x: 2.4,
|
|
613
|
+
y: 2.4,
|
|
614
|
+
z: 3.2
|
|
615
|
+
}
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
style: "Snow",
|
|
620
|
+
palette: [
|
|
621
|
+
"#8fb8e8",
|
|
622
|
+
"#e8f1fb",
|
|
623
|
+
"#aeb9d6"
|
|
624
|
+
],
|
|
625
|
+
pos: [700, 320],
|
|
626
|
+
scale: [
|
|
627
|
+
1.1,
|
|
628
|
+
1,
|
|
629
|
+
.9
|
|
630
|
+
],
|
|
631
|
+
rot: [
|
|
632
|
+
-62,
|
|
633
|
+
0,
|
|
634
|
+
12
|
|
635
|
+
],
|
|
636
|
+
opacity: .72,
|
|
637
|
+
shape: {
|
|
638
|
+
displaceFrequency: {
|
|
639
|
+
x: .006,
|
|
640
|
+
y: .013
|
|
641
|
+
},
|
|
642
|
+
displaceAmount: 22,
|
|
643
|
+
twistPower: {
|
|
644
|
+
x: .8,
|
|
645
|
+
y: .8,
|
|
646
|
+
z: 1
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
style: "Sparks",
|
|
652
|
+
palette: [
|
|
653
|
+
"#ffd27a",
|
|
654
|
+
"#fff4d0",
|
|
655
|
+
"#c8853a"
|
|
656
|
+
],
|
|
657
|
+
pos: [0, -30],
|
|
658
|
+
scale: [
|
|
659
|
+
.85,
|
|
660
|
+
.85,
|
|
661
|
+
.85
|
|
662
|
+
],
|
|
663
|
+
rot: [
|
|
664
|
+
0,
|
|
665
|
+
0,
|
|
666
|
+
0
|
|
667
|
+
],
|
|
668
|
+
opacity: .32,
|
|
669
|
+
shape: {
|
|
670
|
+
radialAmount: .82,
|
|
671
|
+
radialArc: 118,
|
|
672
|
+
radialCenter: 90,
|
|
673
|
+
radialRadius: 40,
|
|
674
|
+
radialSpread: 1,
|
|
675
|
+
displaceAmount: 30
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
style: "Fireflies",
|
|
680
|
+
palette: [
|
|
681
|
+
"#3d5a24",
|
|
682
|
+
"#7bd23a",
|
|
683
|
+
"#40521f"
|
|
684
|
+
],
|
|
685
|
+
pos: [-560, -300],
|
|
686
|
+
scale: [
|
|
687
|
+
1.25,
|
|
688
|
+
1.25,
|
|
689
|
+
1.25
|
|
690
|
+
],
|
|
691
|
+
rot: [
|
|
692
|
+
0,
|
|
693
|
+
0,
|
|
694
|
+
8
|
|
695
|
+
],
|
|
696
|
+
opacity: .72,
|
|
697
|
+
shape: {
|
|
698
|
+
helixTurns: 3,
|
|
699
|
+
helixRadius: 44,
|
|
700
|
+
helixRoll: 1,
|
|
701
|
+
displaceAmount: 8,
|
|
702
|
+
twistPower: {
|
|
703
|
+
x: 1,
|
|
704
|
+
y: 1,
|
|
705
|
+
z: 1.2
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
style: "Bubbles",
|
|
711
|
+
palette: [
|
|
712
|
+
"#2e8fb0",
|
|
713
|
+
"#7fd4e8",
|
|
714
|
+
"#1a5a6e"
|
|
715
|
+
],
|
|
716
|
+
pos: [660, -270],
|
|
717
|
+
scale: [
|
|
718
|
+
1,
|
|
719
|
+
1.15,
|
|
720
|
+
1
|
|
721
|
+
],
|
|
722
|
+
rot: [
|
|
723
|
+
-16,
|
|
724
|
+
0,
|
|
725
|
+
-20
|
|
726
|
+
],
|
|
727
|
+
opacity: .72,
|
|
728
|
+
shape: {
|
|
729
|
+
displaceFrequency: {
|
|
730
|
+
x: .005,
|
|
731
|
+
y: .011
|
|
732
|
+
},
|
|
733
|
+
displaceAmount: 46,
|
|
734
|
+
twistFrequency: {
|
|
735
|
+
x: -.06,
|
|
736
|
+
y: .09,
|
|
737
|
+
z: -.5
|
|
738
|
+
},
|
|
739
|
+
twistPower: {
|
|
740
|
+
x: 4,
|
|
741
|
+
y: 6,
|
|
742
|
+
z: 9
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
];
|
|
747
|
+
const base = c.waves[0];
|
|
748
|
+
c.waves = zoo.map((z, i) => {
|
|
749
|
+
const w = structuredClone(base);
|
|
750
|
+
w.usePaletteTexture = false;
|
|
751
|
+
w.gradientType = "linear";
|
|
752
|
+
w.gradientAngle = 0;
|
|
753
|
+
w.palette = makeStops(z.palette);
|
|
754
|
+
w.blendMode = "normal";
|
|
755
|
+
w.hueShift = 0;
|
|
756
|
+
w.colorContrast = 1;
|
|
757
|
+
w.colorSaturation = 1.1;
|
|
758
|
+
w.opacity = z.opacity;
|
|
759
|
+
w.scale = {
|
|
760
|
+
x: z.scale[0],
|
|
761
|
+
y: z.scale[1],
|
|
762
|
+
z: z.scale[2]
|
|
763
|
+
};
|
|
764
|
+
w.rotation = {
|
|
765
|
+
x: rad(z.rot[0]),
|
|
766
|
+
y: rad(z.rot[1]),
|
|
767
|
+
z: rad(z.rot[2])
|
|
768
|
+
};
|
|
769
|
+
w.position = {
|
|
770
|
+
x: z.pos[0],
|
|
771
|
+
y: z.pos[1],
|
|
772
|
+
z: 0
|
|
773
|
+
};
|
|
774
|
+
w.seed = i * 7;
|
|
775
|
+
w.speed = .05;
|
|
776
|
+
Object.assign(w, z.shape);
|
|
777
|
+
const p = structuredClone(PARTICLE_PRESETS[z.style]);
|
|
778
|
+
const PULL = .13;
|
|
779
|
+
if (p.drift != null) p.drift = capMag(p.drift * PULL, 24);
|
|
780
|
+
if (p.rise != null) p.rise = capMag(p.rise * PULL, 28);
|
|
781
|
+
if (p.wander != null) p.wander = capMag(p.wander * PULL, 15);
|
|
782
|
+
if (p.swirl != null) p.swirl = capMag(p.swirl * PULL, .05);
|
|
783
|
+
w.particles = p;
|
|
784
|
+
return w;
|
|
785
|
+
});
|
|
786
|
+
c.waveCount = c.waves.length;
|
|
787
|
+
return c;
|
|
788
|
+
},
|
|
353
789
|
Holographic: () => {
|
|
354
790
|
const c = PRESETS["Hero"]();
|
|
355
791
|
const w = c.waves[0];
|
|
@@ -659,6 +1095,6 @@ const PRESETS = {
|
|
|
659
1095
|
}
|
|
660
1096
|
};
|
|
661
1097
|
//#endregion
|
|
662
|
-
export { PRESETS };
|
|
1098
|
+
export { PARTICLE_PRESETS, PRESETS };
|
|
663
1099
|
|
|
664
1100
|
//# sourceMappingURL=presets.js.map
|
package/dist/presets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.js","names":[],"sources":["../src/presets.ts"],"sourcesContent":["/**\n * Built-in presets: each a complete studio config (scene + one or more waves) in the wave model.\n * IP-clean — no copyrighted assets. The studio layers its own extra presets (and its historical\n * \"Stripe *\" display names) on top; see apps/studio/src/presets.ts.\n */\nimport { createDefaultConfig, makeStops, makeWaveSpread } from \"./config/model\";\nimport type { StudioConfig, NoiseBand } from \"./config/model\";\n\nconst RAD = 180 / Math.PI;\n\n/** Build a preset from a set of wave parameters. rotation/hue are given in RADIANS and\n * converted to degrees. All presets are solid-theme, so they reuse the hero palette +\n * surfaceColor fibers (600/0.2) and sheen 0, like the hero. camTarget/zoom frame the\n * wave (we pan the look-at to centre each one). */\nfunction buildPreset(p: {\n speed: number;\n contrast: number;\n sat: number;\n hueRad: number;\n dispX: number;\n dispZ: number;\n dispAmt: number;\n pos: [number, number, number];\n rotRad: [number, number, number];\n scale: [number, number, number];\n twF: [number, number, number];\n twP: [number, number, number];\n glow: [number, number, number];\n grain: number;\n blur: number;\n zoom: number;\n camTarget: [number, number];\n noiseBands?: NoiseBand[];\n twistMotion?: boolean;\n}): StudioConfig {\n const c = createDefaultConfig();\n const w = c.waves[0];\n w.speed = p.speed;\n w.colorContrast = p.contrast;\n w.colorSaturation = p.sat;\n w.hueShift = p.hueRad * RAD;\n w.displaceFrequency = { x: p.dispX, y: p.dispZ };\n w.displaceAmount = p.dispAmt;\n w.position = { x: p.pos[0], y: p.pos[1], z: p.pos[2] };\n w.rotation = { x: p.rotRad[0] * RAD, y: p.rotRad[1] * RAD, z: p.rotRad[2] * RAD };\n w.scale = { x: p.scale[0], y: p.scale[1], z: p.scale[2] };\n w.twistFrequency = { x: p.twF[0], y: p.twF[1], z: p.twF[2] };\n w.twistPower = { x: p.twP[0], y: p.twP[1], z: p.twP[2] };\n w.creaseLight = p.glow[0];\n w.creaseSharpness = p.glow[1];\n w.creaseSoftness = p.glow[2];\n if (p.noiseBands) w.noiseBands = p.noiseBands;\n if (p.twistMotion) w.twistMotion = true;\n c.grain = p.grain;\n c.blur = p.blur;\n c.cameraPosition = { x: 100, y: 0, z: 5000 };\n c.cameraTarget = { x: p.camTarget[0], y: p.camTarget[1], z: 0 };\n c.cameraZoom = p.zoom;\n return c;\n}\n\n/** Presets: each a complete studio config (scene + one or more waves) in the wave model. */\nexport const PRESETS: Record<string, () => StudioConfig> = {\n // The app's default wave: a centred, full-frame ribbon (window-independent framing).\n // Shown first and named \"Hero\"; several presets below derive from it.\n Hero: () =>\n buildPreset({\n speed: 0.04,\n contrast: 1,\n sat: 1,\n hueRad: -0.00159265,\n dispX: 0.005831,\n dispZ: 0.016001,\n dispAmt: -7.821,\n pos: [380, -301.7, -11.1],\n rotRad: [-0.44959, -0.11759, 1.874407],\n scale: [9, 8, 5],\n twF: [-0.65, 0.41, -0.58],\n twP: [3.63, 0.7, 3.95],\n glow: [1.98, 0.806, 0.834],\n grain: 1.1,\n blur: 0.02,\n zoom: 0.55,\n camTarget: [-420, -200], // user-tuned default framing\n }),\n // Stripe's real hero, recreated faithfully: an orthographic ×10 scene that overflows the\n // frame, so only the twisted crop shows. This is the model's plain default config.\n \"Wave 2\": () => createDefaultConfig(),\n // camTarget on the waves below is a first-pass centring; tune per-wave. NOTE: Wave 4 also\n // uses a variant vertex shader (animated twist-X wobble) we don't fully replicate — its\n // STATIC frame is close, the motion differs.\n \"Wave 3\": () =>\n buildPreset({\n speed: 0.08,\n contrast: 1,\n sat: 1,\n hueRad: -0.00159265,\n dispX: 0.005831,\n dispZ: 0.016001,\n dispAmt: -7.821,\n pos: [-200.7, -65.4, -11.1],\n rotRad: [-2.875593, 3.095927, -2.925927],\n scale: [3, 3, 3],\n twF: [0.059, 0.32, -0.397],\n twP: [3.63, 0.44, 5.99],\n glow: [3.86, 0.923, 1],\n grain: 1.2,\n blur: 0.02,\n zoom: 1.3,\n camTarget: [-104, 13], // centred; zoomed in (wide/flat wave)\n }),\n \"Wave 4\": () =>\n buildPreset({\n speed: 0.0525,\n contrast: 0.969,\n sat: 1.383,\n hueRad: 0.0376991,\n dispX: 0.005,\n dispZ: 0.0212,\n dispAmt: 6.68,\n pos: [206.1, -438, -11.1],\n rotRad: [-0.666018, -0.031416, 0.779115],\n scale: [6.0501, 8.3983, 6.9854],\n twF: [-0.424, 0.024, -1.312],\n twP: [1.81, 0.94, 4.76],\n glow: [1.55, 1.174, 0.972],\n grain: 0.576,\n blur: 0,\n zoom: 0.9316,\n camTarget: [194, -402], // centred on the wave\n twistMotion: true, // variant vertex shader — animated twist-X wobble\n noiseBands: [\n {\n startX: 0.856,\n endX: 1,\n startY: 0,\n endY: 0.913,\n feather: 0.5,\n strength: 0.346,\n frequency: 1018,\n colorAttenuation: 1,\n parabolaPower: 0,\n },\n {\n startX: 0.038,\n endX: 0.538,\n startY: 0.105,\n endY: 1,\n feather: 0.3315,\n strength: 1,\n frequency: 190,\n colorAttenuation: 0,\n parabolaPower: 2.11,\n },\n ],\n }),\n // The dark-background hero: identical geometry/camera to the default hero, but theme\n // \"wireframe\" → the line shader on a dark page background, with grain 1.2. Same palette.\n Wireframe: () => {\n const c = createDefaultConfig();\n c.waves[0].theme = \"wireframe\";\n c.grain = 1.2;\n c.background = \"#0a2540\"; // dark navy page background\n c.transparentBackground = false;\n return c;\n },\n \"Neon Dark Multistrand\": () => {\n const c = createDefaultConfig();\n const w = c.waves[0];\n w.theme = \"wireframe\"; // line shader on the near-black background — neon wireframe look\n w.blendMode = \"additive\";\n w.palette = makeStops([\"#00f5d4\", \"#00bbf9\", \"#9b5de5\", \"#f15bb5\", \"#fee440\"]);\n w.creaseLight = 1.0;\n c.background = \"#05060c\";\n c.transparentBackground = false; // fill the dark bg so the neon lines read on black (not the page)\n c.waves = makeWaveSpread(w, 3); // three overlapping neon waves\n c.waveCount = 3;\n return c;\n },\n \"Mesh Gradient\": () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a84ff\", x: 0.06, y: 0.9, influence: 0.68 },\n { color: \"#64d2ff\", x: 0.88, y: 0.92, influence: 0.72 },\n { color: \"#bf5af2\", x: 0.5, y: 0.64, influence: 0.58 },\n { color: \"#ff375f\", x: 0.1, y: 0.14, influence: 0.7 },\n { color: \"#ff9f0a\", x: 0.84, y: 0.12, influence: 0.74 },\n { color: \"#30d158\", x: 0.94, y: 0.5, influence: 0.54 },\n ];\n w.meshGradientSoftness = 0.68;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.06;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.14;\n c.grain = 0.3;\n c.blur = 0.008;\n c.background = \"#070914\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n return c;\n },\n \"Solar Bloom\": () => {\n // Radial gradient: a warm core blooming out to a deep-indigo edge. usePaletteTexture off so\n // our own stops map along the radial gradCoord instead of sampling the baked hero LUT.\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.usePaletteTexture = false;\n w.gradientType = \"radial\";\n w.gradientShift = 0.14;\n w.palette = [\n { color: \"#fff3c4\", pos: 0 }, // warm-white core\n { color: \"#ffd166\", pos: 0.22 }, // gold\n { color: \"#ff8c42\", pos: 0.42 }, // orange\n { color: \"#ff5d8f\", pos: 0.62 }, // coral-pink\n { color: \"#a64dff\", pos: 0.82 }, // violet\n { color: \"#241246\", pos: 1 }, // deep indigo edge\n ];\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.18;\n w.fiberStrength = 0.12;\n c.grain = 0.3;\n c.blur = 0.01;\n // Deep warm radial vignette behind the bloom.\n c.background = \"#0a0714\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"radial\";\n c.backgroundGradientSource = \"stops\";\n c.backgroundPalette = makeStops([\"#2a1330\", \"#08040f\"]);\n c.transparentBackground = false;\n return c;\n },\n Holographic: () => {\n // Conic gradient: an iridescent oil-slick sweep. The palette wraps (first ≈ last stop) so\n // the conic seam is invisible.\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.usePaletteTexture = false;\n w.gradientType = \"conic\";\n w.gradientShift = 0.08;\n w.palette = [\n { color: \"#8ef6e4\", pos: 0 }, // mint (seam)\n { color: \"#6ec3ff\", pos: 0.18 }, // sky\n { color: \"#9b8cff\", pos: 0.36 }, // periwinkle\n { color: \"#ff8ad8\", pos: 0.54 }, // pink\n { color: \"#ffd98e\", pos: 0.72 }, // peach\n { color: \"#a0f0c8\", pos: 0.88 }, // seafoam\n { color: \"#8ef6e4\", pos: 1 }, // mint again (seamless wrap)\n ];\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.04;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.12;\n c.grain = 0.28;\n c.blur = 0.01;\n // Subtle deep teal → violet wash behind the iridescence.\n c.background = \"#05060c\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"linear\";\n c.backgroundGradientAngle = 135;\n c.backgroundGradientSource = \"stops\";\n c.backgroundPalette = makeStops([\"#04121a\", \"#0a0518\"]);\n c.transparentBackground = false;\n return c;\n },\n Aurora: () => {\n // Mesh gradient: a moody aurora — teals/greens drifting into violet over a night-sky base\n // (distinct from the brighter iOS-style \"Mesh Gradient\").\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a1f3c\", x: 0.08, y: 0.12, influence: 0.62 },\n { color: \"#1fddb0\", x: 0.3, y: 0.7, influence: 0.78 },\n { color: \"#57f5a3\", x: 0.58, y: 0.86, influence: 0.7 },\n { color: \"#3a86ff\", x: 0.82, y: 0.55, influence: 0.62 },\n { color: \"#a15cff\", x: 0.5, y: 0.32, influence: 0.7 },\n { color: \"#071433\", x: 0.92, y: 0.08, influence: 0.6 },\n ];\n w.meshGradientSoftness = 0.72;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.18;\n w.fiberStrength = 0.12;\n c.grain = 0.3;\n c.blur = 0.008;\n // Dark night-sky MESH backdrop (also shows off the mesh background type).\n c.background = \"#03060f\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"mesh\";\n c.backgroundMeshPoints = [\n { color: \"#02040c\", x: 0.15, y: 0.85, influence: 0.7 },\n { color: \"#08243a\", x: 0.5, y: 0.5, influence: 0.75 },\n { color: \"#0a0f2e\", x: 0.85, y: 0.7, influence: 0.7 },\n { color: \"#04121a\", x: 0.7, y: 0.2, influence: 0.6 },\n { color: \"#000208\", x: 0.12, y: 0.12, influence: 0.6 },\n ];\n c.backgroundMeshSoftness = 0.75;\n c.transparentBackground = false;\n return c;\n },\n Palestine: () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.paletteSource = \"palestine\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1;\n w.colorSaturation = 1;\n c.grain = 0.35;\n c.background = \"#f2efe8\";\n c.transparentBackground = true;\n return c;\n },\n Spain: () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.paletteSource = \"spain\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.18;\n w.colorSaturation = 1.25;\n w.creaseLight = 1.6; // moderate crease-light: rich crimson without washing to salmon (Hero's is 1.98)\n c.grain = 0.3;\n c.background = \"#1a0608\"; // deep oxblood stage\n c.backgroundMode = \"color\";\n c.transparentBackground = false; // opaque, so the dark stage makes the flag pop\n return c;\n },\n \"Vaporwave Sunset\": () => {\n // The Hero wave re-posed/re-framed, plus the vaporwave palette.\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.position.x = 525;\n w.rotation.x = -0.64 * RAD;\n w.rotation.z = 1.68 * RAD;\n w.paletteSource = \"vaporwave\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.08;\n w.colorSaturation = 1.15;\n w.creaseLight = 1.25;\n c.cameraZoom = 1.1;\n c.cameraTarget = { x: 150, y: 360, z: 0 };\n c.background = \"#09051f\";\n c.transparentBackground = false;\n return c;\n },\n Corkscrew: () => {\n // The helix mode, shown off on its own: `helixRoll` at 1 rolls the ribbon's cross-section in\n // step with the sweep, so the flat strip becomes an auger blade winding around its own length\n // axis, and `helixRadius` lifts that blade off the axis so the turns read as a screw thread\n // rather than a flat twist. No twist at all — this shape is unreachable with twistFrequency,\n // whose expStep angle is monotone and can only ramp once (see the helix docs in config/model).\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.helixTurns = 5;\n w.helixRadius = 45;\n w.helixRoll = 1;\n w.helixPhase = 0;\n w.twistFrequency = { x: 0, y: 0, z: 0 };\n w.twistPower = { x: 4, y: 4, z: 2 };\n // A slow swell along the blade so it breathes; the corkscrew itself is static geometry.\n w.displaceAmount = 16;\n w.displaceFrequency = { x: 0.006, y: 0.0008 };\n w.speed = 0.1;\n w.position = { x: 0, y: 0, z: 0 };\n w.rotation = { x: 0, y: 0, z: 12 }; // tilt so it climbs across the frame\n w.scale = { x: 3, y: 3, z: 1.5 };\n // Mesh gradient: the colour field runs along the blade, so each turn picks up a different part\n // of the spectrum instead of the one hue a linear stop ramp would give.\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a84ff\", x: 0.06, y: 0.9, influence: 0.68 },\n { color: \"#64d2ff\", x: 0.88, y: 0.92, influence: 0.72 },\n { color: \"#bf5af2\", x: 0.5, y: 0.64, influence: 0.58 },\n { color: \"#ff375f\", x: 0.1, y: 0.14, influence: 0.7 },\n { color: \"#ff9f0a\", x: 0.84, y: 0.12, influence: 0.74 },\n { color: \"#30d158\", x: 0.94, y: 0.5, influence: 0.54 },\n ];\n w.meshGradientSoftness = 0.68;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.06;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.14;\n // Framed down the axis rather than side-on: the coil reads as a screw receding into the frame,\n // and each turn shows its blade face instead of an edge. cameraDistance is the orbit radius\n // (= |position − target|); the camera is orthographic, so it's the rig's dolly, not the scale —\n // cameraZoom sets that.\n c.cameraPosition = { x: -526.009, y: -285.284, z: -425.489 };\n c.cameraTarget = { x: -95.046, y: -17.053, z: -105.608 };\n c.cameraDistance = 600;\n c.cameraZoom = 1.176;\n c.grain = 0.3;\n c.blur = 0.008;\n c.bloomStrength = 0.35;\n c.bloomRadius = 0.6;\n c.bloomThreshold = 0.55;\n c.background = \"#070914\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n return c;\n },\n Kaleidoscope: () => {\n const c = PRESETS[\"Wave 3\"]();\n const w = c.waves[0];\n w.paletteSource = \"kaleidoscope\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.12;\n c.grain = 0.5;\n return c;\n },\n};\n"],"mappings":";;;;;;;AAQA,MAAM,MAAM,MAAM,KAAK;;;;;AAMvB,SAAS,YAAY,GAoBJ;CACf,MAAM,IAAI,oBAAoB;CAC9B,MAAM,IAAI,EAAE,MAAM;CAClB,EAAE,QAAQ,EAAE;CACZ,EAAE,gBAAgB,EAAE;CACpB,EAAE,kBAAkB,EAAE;CACtB,EAAE,WAAW,EAAE,SAAS;CACxB,EAAE,oBAAoB;EAAE,GAAG,EAAE;EAAO,GAAG,EAAE;CAAM;CAC/C,EAAE,iBAAiB,EAAE;CACrB,EAAE,WAAW;EAAE,GAAG,EAAE,IAAI;EAAI,GAAG,EAAE,IAAI;EAAI,GAAG,EAAE,IAAI;CAAG;CACrD,EAAE,WAAW;EAAE,GAAG,EAAE,OAAO,KAAK;EAAK,GAAG,EAAE,OAAO,KAAK;EAAK,GAAG,EAAE,OAAO,KAAK;CAAI;CAChF,EAAE,QAAQ;EAAE,GAAG,EAAE,MAAM;EAAI,GAAG,EAAE,MAAM;EAAI,GAAG,EAAE,MAAM;CAAG;CACxD,EAAE,iBAAiB;EAAE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E,OAAO;IAAW,GAAG;IAAK,GAAG;IAAM,WAAW;GAAK;GACrD;IAAE,OAAO;IAAW,GAAG;IAAK,GAAG;IAAM,WAAW;GAAI;GACpD;IAAE,OAAO;IAAW,GAAG;IAAM,GAAG;IAAM,WAAW;GAAK;GACtD;IAAE,OAAO;IAAW,GAAG;IAAM,GAAG;IAAK,WAAW;GAAK;EACvD;EACA,EAAE,uBAAuB;EACzB,EAAE,YAAY;EACd,EAAE,WAAW;EACb,EAAE,gBAAgB;EAClB,EAAE,kBAAkB;EACpB,EAAE,gBAAgB;EAKlB,EAAE,iBAAiB;GAAE,GAAG;GAAU,GAAG;GAAU,GAAG;EAAS;EAC3D,EAAE,eAAe;GAAE,GAAG;GAAS,GAAG;GAAS,GAAG;EAAS;EACvD,EAAE,iBAAiB;EACnB,EAAE,aAAa;EACf,EAAE,QAAQ;EACV,EAAE,OAAO;EACT,EAAE,gBAAgB;EAClB,EAAE,cAAc;EAChB,EAAE,iBAAiB;EACnB,EAAE,aAAa;EACf,EAAE,iBAAiB;EACnB,EAAE,wBAAwB;EAC1B,OAAO;CACT;CACA,oBAAoB;EAClB,MAAM,IAAI,QAAQ,SAAS,CAAC;EAC5B,MAAM,IAAI,EAAE,MAAM;EAClB,EAAE,gBAAgB;EAClB,EAAE,YAAY;EACd,EAAE,WAAW;EACb,EAAE,gBAAgB;EAClB,EAAE,kBAAkB;EACpB,EAAE,QAAQ;EACV,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"presets.js","names":[],"sources":["../src/presets.ts"],"sourcesContent":["/**\n * Built-in presets: each a complete studio config (scene + one or more waves) in the wave model.\n * IP-clean — no copyrighted assets. The studio layers its own extra presets (and its historical\n * \"Stripe *\" display names) on top; see apps/studio/src/presets.ts.\n */\nimport { createDefaultConfig, makeStops, makeWaveSpread } from \"./config/model\";\nimport type { ParticlesConfig, StudioConfig, NoiseBand } from \"./config/model\";\n\nconst RAD = 180 / Math.PI;\n\n/**\n * Reusable particle STYLES applied to a wave's `particles` block. Surfaced in the studio's per-wave\n * Particles folder (the \"style\" picker) and used by the \"Particle Zoo\" showcase preset. Each is a dust\n * look independent of the wave it rides — clone before mutating (`structuredClone`).\n */\nexport const PARTICLE_PRESETS: Record<string, ParticlesConfig> = {\n Glitter: {\n count: 16000,\n size: 2.6,\n seed: 7,\n color: \"#ffdca8\",\n shape: \"glitter\",\n edgeBias: 1,\n drift: 300,\n bias: -0.6,\n twinkle: 0.8,\n },\n Embers: {\n count: 16000,\n size: 3.6,\n seed: 7,\n color: \"#ff8a2c\",\n color2: \"#ffe19a\",\n shape: \"soft\",\n edgeBias: 0.15,\n drift: 40,\n rise: 320,\n wander: 120,\n twinkle: 0.85,\n life: 6,\n },\n Snow: {\n count: 12000,\n size: 3,\n seed: 4,\n color: \"#eef4ff\",\n color2: \"#bcd0ee\",\n shape: \"soft\",\n edgeBias: 0.1,\n drift: 20,\n rise: -260,\n wander: 80,\n twinkle: 0.5,\n life: 8,\n },\n Sparks: {\n count: 9000,\n size: 5,\n seed: 9,\n color: \"#ffd27a\",\n color2: \"#fff4d0\",\n shape: \"streak\",\n edgeBias: 1,\n drift: 620,\n rise: 90,\n wander: 20,\n bias: -0.4,\n twinkle: 0.9,\n life: 2.5,\n },\n Fireflies: {\n count: 2200,\n size: 5,\n seed: 11,\n color: \"#dfff9a\",\n color2: \"#8fd94a\",\n shape: \"star\",\n edgeBias: 0.1,\n drift: 25,\n swirl: 0.3,\n wander: 170,\n twinkle: 1,\n life: 5,\n },\n Bubbles: {\n count: 3000,\n size: 7,\n sizeJitter: 0.9,\n seed: 6,\n color: \"#cdeefb\",\n color2: \"#8fd0e6\",\n shape: \"ring\",\n edgeBias: 0.2,\n drift: 30,\n rise: 240,\n wander: 60,\n twinkle: 0.3,\n life: 7,\n },\n};\n\n/** Degrees → radians (for the Particle Zoo's per-wave rotation, authored in degrees). */\nconst rad = (deg: number): number => (deg * Math.PI) / 180;\n\n/** Clamp a signed magnitude to ±m (used to cap the Zoo's long-range particle motion terms). */\nconst capMag = (v: number | undefined, m: number): number | undefined =>\n v == null ? v : Math.sign(v) * Math.min(Math.abs(v), m);\n\n/** Build a preset from a set of wave parameters. rotation/hue are given in RADIANS and\n * converted to degrees. All presets are solid-theme, so they reuse the hero palette +\n * surfaceColor fibers (600/0.2) and sheen 0, like the hero. camTarget/zoom frame the\n * wave (we pan the look-at to centre each one). */\nfunction buildPreset(p: {\n speed: number;\n contrast: number;\n sat: number;\n hueRad: number;\n dispX: number;\n dispZ: number;\n dispAmt: number;\n pos: [number, number, number];\n rotRad: [number, number, number];\n scale: [number, number, number];\n twF: [number, number, number];\n twP: [number, number, number];\n glow: [number, number, number];\n grain: number;\n blur: number;\n zoom: number;\n camTarget: [number, number];\n noiseBands?: NoiseBand[];\n twistMotion?: boolean;\n}): StudioConfig {\n const c = createDefaultConfig();\n const w = c.waves[0];\n w.speed = p.speed;\n w.colorContrast = p.contrast;\n w.colorSaturation = p.sat;\n w.hueShift = p.hueRad * RAD;\n w.displaceFrequency = { x: p.dispX, y: p.dispZ };\n w.displaceAmount = p.dispAmt;\n w.position = { x: p.pos[0], y: p.pos[1], z: p.pos[2] };\n w.rotation = { x: p.rotRad[0] * RAD, y: p.rotRad[1] * RAD, z: p.rotRad[2] * RAD };\n w.scale = { x: p.scale[0], y: p.scale[1], z: p.scale[2] };\n w.twistFrequency = { x: p.twF[0], y: p.twF[1], z: p.twF[2] };\n w.twistPower = { x: p.twP[0], y: p.twP[1], z: p.twP[2] };\n w.creaseLight = p.glow[0];\n w.creaseSharpness = p.glow[1];\n w.creaseSoftness = p.glow[2];\n if (p.noiseBands) w.noiseBands = p.noiseBands;\n if (p.twistMotion) w.twistMotion = true;\n c.grain = p.grain;\n c.blur = p.blur;\n c.cameraPosition = { x: 100, y: 0, z: 5000 };\n c.cameraTarget = { x: p.camTarget[0], y: p.camTarget[1], z: 0 };\n c.cameraZoom = p.zoom;\n return c;\n}\n\n/** Presets: each a complete studio config (scene + one or more waves) in the wave model. */\nexport const PRESETS: Record<string, () => StudioConfig> = {\n // The app's default wave: a centred, full-frame ribbon (window-independent framing).\n // Shown first and named \"Hero\"; several presets below derive from it.\n Hero: () =>\n buildPreset({\n speed: 0.04,\n contrast: 1,\n sat: 1,\n hueRad: -0.00159265,\n dispX: 0.005831,\n dispZ: 0.016001,\n dispAmt: -7.821,\n pos: [380, -301.7, -11.1],\n rotRad: [-0.44959, -0.11759, 1.874407],\n scale: [9, 8, 5],\n twF: [-0.65, 0.41, -0.58],\n twP: [3.63, 0.7, 3.95],\n glow: [1.98, 0.806, 0.834],\n grain: 1.1,\n blur: 0.02,\n zoom: 0.55,\n camTarget: [-420, -200], // user-tuned default framing\n }),\n // Stripe's real hero, recreated faithfully: an orthographic ×10 scene that overflows the\n // frame, so only the twisted crop shows. This is the model's plain default config.\n \"Wave 2\": () => createDefaultConfig(),\n // camTarget on the waves below is a first-pass centring; tune per-wave. NOTE: Wave 4 also\n // uses a variant vertex shader (animated twist-X wobble) we don't fully replicate — its\n // STATIC frame is close, the motion differs.\n \"Wave 3\": () =>\n buildPreset({\n speed: 0.08,\n contrast: 1,\n sat: 1,\n hueRad: -0.00159265,\n dispX: 0.005831,\n dispZ: 0.016001,\n dispAmt: -7.821,\n pos: [-200.7, -65.4, -11.1],\n rotRad: [-2.875593, 3.095927, -2.925927],\n scale: [3, 3, 3],\n twF: [0.059, 0.32, -0.397],\n twP: [3.63, 0.44, 5.99],\n glow: [3.86, 0.923, 1],\n grain: 1.2,\n blur: 0.02,\n zoom: 1.3,\n camTarget: [-104, 13], // centred; zoomed in (wide/flat wave)\n }),\n \"Wave 4\": () =>\n buildPreset({\n speed: 0.0525,\n contrast: 0.969,\n sat: 1.383,\n hueRad: 0.0376991,\n dispX: 0.005,\n dispZ: 0.0212,\n dispAmt: 6.68,\n pos: [206.1, -438, -11.1],\n rotRad: [-0.666018, -0.031416, 0.779115],\n scale: [6.0501, 8.3983, 6.9854],\n twF: [-0.424, 0.024, -1.312],\n twP: [1.81, 0.94, 4.76],\n glow: [1.55, 1.174, 0.972],\n grain: 0.576,\n blur: 0,\n zoom: 0.9316,\n camTarget: [194, -402], // centred on the wave\n twistMotion: true, // variant vertex shader — animated twist-X wobble\n noiseBands: [\n {\n startX: 0.856,\n endX: 1,\n startY: 0,\n endY: 0.913,\n feather: 0.5,\n strength: 0.346,\n frequency: 1018,\n colorAttenuation: 1,\n parabolaPower: 0,\n },\n {\n startX: 0.038,\n endX: 0.538,\n startY: 0.105,\n endY: 1,\n feather: 0.3315,\n strength: 1,\n frequency: 190,\n colorAttenuation: 0,\n parabolaPower: 2.11,\n },\n ],\n }),\n // The dark-background hero: identical geometry/camera to the default hero, but theme\n // \"wireframe\" → the line shader on a dark page background, with grain 1.2. Same palette.\n Wireframe: () => {\n const c = createDefaultConfig();\n c.waves[0].theme = \"wireframe\";\n c.grain = 1.2;\n c.background = \"#0a2540\"; // dark navy page background\n c.transparentBackground = false;\n return c;\n },\n \"Neon Dark Multistrand\": () => {\n const c = createDefaultConfig();\n const w = c.waves[0];\n w.theme = \"wireframe\"; // line shader on the near-black background — neon wireframe look\n w.blendMode = \"additive\";\n w.palette = makeStops([\"#00f5d4\", \"#00bbf9\", \"#9b5de5\", \"#f15bb5\", \"#fee440\"]);\n w.creaseLight = 1.0;\n c.background = \"#05060c\";\n c.transparentBackground = false; // fill the dark bg so the neon lines read on black (not the page)\n c.waves = makeWaveSpread(w, 3); // three overlapping neon waves\n c.waveCount = 3;\n return c;\n },\n \"Mesh Gradient\": () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a84ff\", x: 0.06, y: 0.9, influence: 0.68 },\n { color: \"#64d2ff\", x: 0.88, y: 0.92, influence: 0.72 },\n { color: \"#bf5af2\", x: 0.5, y: 0.64, influence: 0.58 },\n { color: \"#ff375f\", x: 0.1, y: 0.14, influence: 0.7 },\n { color: \"#ff9f0a\", x: 0.84, y: 0.12, influence: 0.74 },\n { color: \"#30d158\", x: 0.94, y: 0.5, influence: 0.54 },\n ];\n w.meshGradientSoftness = 0.68;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.06;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.14;\n c.grain = 0.3;\n c.blur = 0.008;\n c.background = \"#070914\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n return c;\n },\n \"Solar Bloom\": () => {\n // Radial gradient: a warm core blooming out to a deep-indigo edge. usePaletteTexture off so\n // our own stops map along the radial gradCoord instead of sampling the baked hero LUT.\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.usePaletteTexture = false;\n w.gradientType = \"radial\";\n w.gradientShift = 0.14;\n w.palette = [\n { color: \"#fff3c4\", pos: 0 }, // warm-white core\n { color: \"#ffd166\", pos: 0.22 }, // gold\n { color: \"#ff8c42\", pos: 0.42 }, // orange\n { color: \"#ff5d8f\", pos: 0.62 }, // coral-pink\n { color: \"#a64dff\", pos: 0.82 }, // violet\n { color: \"#241246\", pos: 1 }, // deep indigo edge\n ];\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.18;\n w.fiberStrength = 0.12;\n c.grain = 0.3;\n c.blur = 0.01;\n // Deep warm radial vignette behind the bloom.\n c.background = \"#0a0714\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"radial\";\n c.backgroundGradientSource = \"stops\";\n c.backgroundPalette = makeStops([\"#2a1330\", \"#08040f\"]);\n c.transparentBackground = false;\n return c;\n },\n \"Latte Ring\": () => {\n // A warm cream-and-gold ring of combed silk curling around a dark void — the crema swirl on a\n // latte. The camera ORBITS a wide radial fan (arc 286°) so its combed length sweeps across the\n // frame as a flowing arc instead of a head-on fan; a mesh gradient warms it gold→cream with an\n // orange edge, and a noise band frays the fibers finer toward the tips. Exercises the radial wave\n // mode + the particle layer (ambient field + shed-from-edge dust into the void).\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n // A wide radial fan (fans the ribbon's length); the orbiting camera below crops it to a ring.\n w.radialAmount = 0.72;\n w.radialArc = 286;\n w.radialCenter = -160;\n w.radialRadius = 300;\n w.radialSpread = 1.47;\n w.rotation = { x: 0, y: 0, z: 0 };\n w.position = { x: -280, y: -320, z: 0 };\n w.scale = { x: 1.12, y: 1.12, z: 1.12 };\n w.opacity = 0.5;\n // A big broad swell (amount 101.73) with a fine second octave riding on it, so the ring's silk\n // ripples and folds as it turns; `speed` sets the swell's drift rate.\n w.displaceFrequency = { x: 0.0026, y: 0.0048 };\n w.displaceAmount = 101.73;\n w.detailAmount = 6;\n w.detailFrequency = 0.1;\n w.speed = 0.21;\n // Fine combed fibers; the noise band overrides them finer + wispier over the OUTER half (uv.y>0.5)\n // for organic variation instead of a uniform comb. (Bands override fiber params per uv region.)\n w.fiberCount = 110;\n w.fiberStrength = 0.95;\n w.creaseLight = 0.55;\n w.edgeFeather = 0.34;\n w.noiseBands = [\n {\n startX: 0,\n endX: 1,\n startY: 0.5,\n endY: 1,\n feather: 0.4,\n strength: 1,\n frequency: 300,\n colorAttenuation: 0.85,\n parabolaPower: 2.5,\n },\n ];\n // Mesh gradient: gold + cream dominant with an orange accent — the latte's crema tones. A 2D\n // colour field (not a length-wise ramp) so the warmth pools within the fibers.\n w.usePaletteTexture = false;\n w.gradientType = \"mesh\";\n w.meshGradientSoftness = 0.7;\n w.meshGradientPoints = [\n { color: \"#f3c06a\", x: 0.5, y: 0.1, influence: 0.7 }, // warm gold\n { color: \"#f9edd4\", x: 0.34, y: 0.36, influence: 0.62 }, // hot cream\n { color: \"#e6923a\", x: 0.15, y: 0.55, influence: 0.5 }, // orange accent\n { color: \"#f1d49a\", x: 0.82, y: 0.42, influence: 0.55 }, // gold\n { color: \"#ece7d8\", x: 0.58, y: 0.88, influence: 0.72 }, // cool cream\n ];\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.15;\n // Orbit the camera around the fan so its length reads as a sweeping arc wrapping the void.\n c.cameraDistance = 600;\n c.cameraPosition = { x: -854.327, y: 135.331, z: 478.048 };\n c.cameraTarget = { x: -720.043, y: 10.575, z: -93.27 };\n c.cameraZoom = 1.222;\n // Scene: a near-black void with gentle bloom on the silk + dust.\n c.background = \"#050404\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n c.grain = 0.25;\n c.blur = 0;\n c.bloomStrength = 0.18;\n c.bloomRadius = 0.55;\n c.bloomThreshold = 0.72;\n // Golden dust shed off the ring's own edge into the void (biased to one flank). Per-wave: it rides\n // this wave's deform and drifts outward from it. edgeBias 1 = spawn on the rim (the shed look).\n w.particles = {\n count: 20000,\n size: 2.9,\n color: \"#ffdca8\",\n seed: 7,\n twinkle: 0.8,\n edgeBias: 1,\n drift: 490,\n bias: -0.6,\n };\n return c;\n },\n \"Particle Zoo\": () => {\n // One scene demoing every particle STYLE — each wave sheds a different kind of dust off its own\n // surface (embers / snow / sparks / fireflies / bubbles). Every wave is a DIFFERENT shape family\n // too (dome / flat sheet / radial fan / helix coil / twist curl), spread apart so none overlap and\n // the frame stays full. The showcase for the per-wave particle system; styles come from\n // PARTICLE_PRESETS (the studio \"preset style\" picker).\n const c = createDefaultConfig();\n c.background = \"#05070d\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n c.grain = 0.26;\n c.blur = 0;\n c.bloomStrength = 0.3;\n c.bloomThreshold = 0.66; // high, so the central sparks fan glows without blowing the middle out\n c.cameraPosition = { x: 100, y: 0, z: 5000 };\n c.cameraTarget = { x: 0, y: 0, z: 0 };\n c.cameraZoom = 0.6;\n // Five well-separated waves, each a DIFFERENT shape family so the silhouettes read as distinct,\n // not five copies of one ribbon. Frame at cameraZoom 0.6 spans ~2222×1250 world units centred on\n // the origin (x ∈ [-1111, 1111], y ∈ [-625, 625], orthographic → screen-xy = world-xy), so the\n // positions/scales below keep the meshes from overlapping. `shape` carries the per-family knobs\n // (displace / twist / helix / radial); `rot` is in degrees. style, palette, opacity as before.\n const zoo = [\n {\n // Embers rising off a broad DOME — low-frequency, high-amplitude displacement mound.\n style: \"Embers\",\n palette: [\"#ff7a1e\", \"#ffd27a\", \"#c23a12\"],\n pos: [-720, 285],\n scale: [1.0, 1.0, 1.0],\n rot: [-20, 0, -14],\n opacity: 0.72,\n shape: {\n displaceFrequency: { x: 0.0024, y: 0.0065 },\n displaceAmount: 118,\n twistPower: { x: 2.4, y: 2.4, z: 3.2 },\n },\n },\n {\n // Snow settling on a near-flat drifting SHEET — tilted toward the camera, barely rippled.\n style: \"Snow\",\n palette: [\"#8fb8e8\", \"#e8f1fb\", \"#aeb9d6\"],\n pos: [700, 320],\n scale: [1.1, 1.0, 0.9],\n rot: [-62, 0, 12],\n opacity: 0.72,\n shape: {\n displaceFrequency: { x: 0.006, y: 0.013 },\n displaceAmount: 22,\n twistPower: { x: 0.8, y: 0.8, z: 1.0 },\n },\n },\n {\n // Sparks bursting off a RADIAL FAN — the one spiky, fanned silhouette; dimmed so it glows\n // without blowing the centre out.\n style: \"Sparks\",\n palette: [\"#ffd27a\", \"#fff4d0\", \"#c8853a\"],\n pos: [0, -30],\n scale: [0.85, 0.85, 0.85],\n rot: [0, 0, 0],\n opacity: 0.32,\n shape: {\n radialAmount: 0.82,\n radialArc: 118,\n radialCenter: 90, // fan points up\n radialRadius: 40,\n radialSpread: 1.0,\n displaceAmount: 30,\n },\n },\n {\n // Fireflies wandering around a HELIX coil — a screw-thread column of light.\n style: \"Fireflies\",\n palette: [\"#3d5a24\", \"#7bd23a\", \"#40521f\"],\n pos: [-560, -300],\n scale: [1.25, 1.25, 1.25],\n rot: [0, 0, 8],\n opacity: 0.72,\n shape: {\n helixTurns: 3,\n helixRadius: 44,\n helixRoll: 1,\n displaceAmount: 8,\n twistPower: { x: 1.0, y: 1.0, z: 1.2 },\n },\n },\n {\n // Bubbles rising off a strongly TWISTED curl — an S-ribbon coiling on its length.\n style: \"Bubbles\",\n palette: [\"#2e8fb0\", \"#7fd4e8\", \"#1a5a6e\"],\n pos: [660, -270],\n scale: [1.0, 1.15, 1.0],\n rot: [-16, 0, -20],\n opacity: 0.72,\n shape: {\n displaceFrequency: { x: 0.005, y: 0.011 },\n displaceAmount: 46,\n twistFrequency: { x: -0.06, y: 0.09, z: -0.5 },\n twistPower: { x: 4.0, y: 6.0, z: 9.0 },\n },\n },\n ];\n const base = c.waves[0];\n c.waves = zoo.map((z, i) => {\n const w = structuredClone(base);\n w.usePaletteTexture = false;\n w.gradientType = \"linear\";\n w.gradientAngle = 0;\n w.palette = makeStops(z.palette);\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1;\n w.colorSaturation = 1.1;\n w.opacity = z.opacity;\n w.scale = { x: z.scale[0], y: z.scale[1], z: z.scale[2] };\n w.rotation = { x: rad(z.rot[0]), y: rad(z.rot[1]), z: rad(z.rot[2]) };\n w.position = { x: z.pos[0], y: z.pos[1], z: 0 };\n w.seed = i * 7;\n w.speed = 0.05;\n Object.assign(w, z.shape); // the wave's distinct shape family (displace / twist / helix / radial)\n // Each PARTICLE_PRESET is tuned as a standalone hero cloud whose dust flings far; here every\n // specimen should sit ON the wave that emits it, reading as dust clinging to the surface rather\n // than a cloud floating nearby. Pull the motion terms right down (a small fraction of the hero\n // reach + tight clamps) so the dust overlaps its own wave; the styles still read apart by sprite\n // shape / colour / wave shape.\n const p = structuredClone(PARTICLE_PRESETS[z.style]);\n const PULL = 0.13; // fraction of each preset's hero-scale reach kept here\n if (p.drift != null) p.drift = capMag(p.drift * PULL, 24);\n if (p.rise != null) p.rise = capMag(p.rise * PULL, 28);\n if (p.wander != null) p.wander = capMag(p.wander * PULL, 15);\n if (p.swirl != null) p.swirl = capMag(p.swirl * PULL, 0.05);\n w.particles = p;\n return w;\n });\n c.waveCount = c.waves.length;\n return c;\n },\n Holographic: () => {\n // Conic gradient: an iridescent oil-slick sweep. The palette wraps (first ≈ last stop) so\n // the conic seam is invisible.\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.usePaletteTexture = false;\n w.gradientType = \"conic\";\n w.gradientShift = 0.08;\n w.palette = [\n { color: \"#8ef6e4\", pos: 0 }, // mint (seam)\n { color: \"#6ec3ff\", pos: 0.18 }, // sky\n { color: \"#9b8cff\", pos: 0.36 }, // periwinkle\n { color: \"#ff8ad8\", pos: 0.54 }, // pink\n { color: \"#ffd98e\", pos: 0.72 }, // peach\n { color: \"#a0f0c8\", pos: 0.88 }, // seafoam\n { color: \"#8ef6e4\", pos: 1 }, // mint again (seamless wrap)\n ];\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.04;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.12;\n c.grain = 0.28;\n c.blur = 0.01;\n // Subtle deep teal → violet wash behind the iridescence.\n c.background = \"#05060c\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"linear\";\n c.backgroundGradientAngle = 135;\n c.backgroundGradientSource = \"stops\";\n c.backgroundPalette = makeStops([\"#04121a\", \"#0a0518\"]);\n c.transparentBackground = false;\n return c;\n },\n Aurora: () => {\n // Mesh gradient: a moody aurora — teals/greens drifting into violet over a night-sky base\n // (distinct from the brighter iOS-style \"Mesh Gradient\").\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a1f3c\", x: 0.08, y: 0.12, influence: 0.62 },\n { color: \"#1fddb0\", x: 0.3, y: 0.7, influence: 0.78 },\n { color: \"#57f5a3\", x: 0.58, y: 0.86, influence: 0.7 },\n { color: \"#3a86ff\", x: 0.82, y: 0.55, influence: 0.62 },\n { color: \"#a15cff\", x: 0.5, y: 0.32, influence: 0.7 },\n { color: \"#071433\", x: 0.92, y: 0.08, influence: 0.6 },\n ];\n w.meshGradientSoftness = 0.72;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.18;\n w.fiberStrength = 0.12;\n c.grain = 0.3;\n c.blur = 0.008;\n // Dark night-sky MESH backdrop (also shows off the mesh background type).\n c.background = \"#03060f\";\n c.backgroundMode = \"gradient\";\n c.backgroundGradientType = \"mesh\";\n c.backgroundMeshPoints = [\n { color: \"#02040c\", x: 0.15, y: 0.85, influence: 0.7 },\n { color: \"#08243a\", x: 0.5, y: 0.5, influence: 0.75 },\n { color: \"#0a0f2e\", x: 0.85, y: 0.7, influence: 0.7 },\n { color: \"#04121a\", x: 0.7, y: 0.2, influence: 0.6 },\n { color: \"#000208\", x: 0.12, y: 0.12, influence: 0.6 },\n ];\n c.backgroundMeshSoftness = 0.75;\n c.transparentBackground = false;\n return c;\n },\n Palestine: () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.paletteSource = \"palestine\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1;\n w.colorSaturation = 1;\n c.grain = 0.35;\n c.background = \"#f2efe8\";\n c.transparentBackground = true;\n return c;\n },\n Spain: () => {\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.paletteSource = \"spain\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.18;\n w.colorSaturation = 1.25;\n w.creaseLight = 1.6; // moderate crease-light: rich crimson without washing to salmon (Hero's is 1.98)\n c.grain = 0.3;\n c.background = \"#1a0608\"; // deep oxblood stage\n c.backgroundMode = \"color\";\n c.transparentBackground = false; // opaque, so the dark stage makes the flag pop\n return c;\n },\n \"Vaporwave Sunset\": () => {\n // The Hero wave re-posed/re-framed, plus the vaporwave palette.\n const c = PRESETS[\"Hero\"](); // the centred default \"Hero\" wave\n const w = c.waves[0];\n w.position.x = 525;\n w.rotation.x = -0.64 * RAD;\n w.rotation.z = 1.68 * RAD;\n w.paletteSource = \"vaporwave\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.08;\n w.colorSaturation = 1.15;\n w.creaseLight = 1.25;\n c.cameraZoom = 1.1;\n c.cameraTarget = { x: 150, y: 360, z: 0 };\n c.background = \"#09051f\";\n c.transparentBackground = false;\n return c;\n },\n Corkscrew: () => {\n // The helix mode, shown off on its own: `helixRoll` at 1 rolls the ribbon's cross-section in\n // step with the sweep, so the flat strip becomes an auger blade winding around its own length\n // axis, and `helixRadius` lifts that blade off the axis so the turns read as a screw thread\n // rather than a flat twist. No twist at all — this shape is unreachable with twistFrequency,\n // whose expStep angle is monotone and can only ramp once (see the helix docs in config/model).\n const c = PRESETS[\"Hero\"]();\n const w = c.waves[0];\n w.helixTurns = 5;\n w.helixRadius = 45;\n w.helixRoll = 1;\n w.helixPhase = 0;\n w.twistFrequency = { x: 0, y: 0, z: 0 };\n w.twistPower = { x: 4, y: 4, z: 2 };\n // A slow swell along the blade so it breathes; the corkscrew itself is static geometry.\n w.displaceAmount = 16;\n w.displaceFrequency = { x: 0.006, y: 0.0008 };\n w.speed = 0.1;\n w.position = { x: 0, y: 0, z: 0 };\n w.rotation = { x: 0, y: 0, z: 12 }; // tilt so it climbs across the frame\n w.scale = { x: 3, y: 3, z: 1.5 };\n // Mesh gradient: the colour field runs along the blade, so each turn picks up a different part\n // of the spectrum instead of the one hue a linear stop ramp would give.\n w.gradientType = \"mesh\";\n w.meshGradientPoints = [\n { color: \"#0a84ff\", x: 0.06, y: 0.9, influence: 0.68 },\n { color: \"#64d2ff\", x: 0.88, y: 0.92, influence: 0.72 },\n { color: \"#bf5af2\", x: 0.5, y: 0.64, influence: 0.58 },\n { color: \"#ff375f\", x: 0.1, y: 0.14, influence: 0.7 },\n { color: \"#ff9f0a\", x: 0.84, y: 0.12, influence: 0.74 },\n { color: \"#30d158\", x: 0.94, y: 0.5, influence: 0.54 },\n ];\n w.meshGradientSoftness = 0.68;\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.06;\n w.colorSaturation = 1.12;\n w.fiberStrength = 0.14;\n // Framed down the axis rather than side-on: the coil reads as a screw receding into the frame,\n // and each turn shows its blade face instead of an edge. cameraDistance is the orbit radius\n // (= |position − target|); the camera is orthographic, so it's the rig's dolly, not the scale —\n // cameraZoom sets that.\n c.cameraPosition = { x: -526.009, y: -285.284, z: -425.489 };\n c.cameraTarget = { x: -95.046, y: -17.053, z: -105.608 };\n c.cameraDistance = 600;\n c.cameraZoom = 1.176;\n c.grain = 0.3;\n c.blur = 0.008;\n c.bloomStrength = 0.35;\n c.bloomRadius = 0.6;\n c.bloomThreshold = 0.55;\n c.background = \"#070914\";\n c.backgroundMode = \"color\";\n c.transparentBackground = false;\n return c;\n },\n Kaleidoscope: () => {\n const c = PRESETS[\"Wave 3\"]();\n const w = c.waves[0];\n w.paletteSource = \"kaleidoscope\";\n w.blendMode = \"normal\";\n w.hueShift = 0;\n w.colorContrast = 1.05;\n w.colorSaturation = 1.12;\n c.grain = 0.5;\n return c;\n },\n};\n"],"mappings":";;;;;;;AAQA,MAAM,MAAM,MAAM,KAAK;;;;;;AAOvB,MAAa,mBAAoD;CAC/D,SAAS;EACP,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACP,OAAO;EACP,UAAU;EACV,OAAO;EACP,MAAM;EACN,SAAS;CACX;CACA,QAAQ;EACN,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACP,QAAQ;EACR,OAAO;EACP,UAAU;EACV,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,MAAM;EACJ,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACP,QAAQ;EACR,OAAO;EACP,UAAU;EACV,OAAO;EACP,MAAM;EACN,QAAQ;EACR,SAAS;EACT,MAAM;CACR;CACA,QAAQ;EACN,OAAO;EACP,MAAM;EACN,MAAM;EACN,OAAO;EACP,QAAQ;EACR,OAAO;EACP,UAAU;EACV,OAAO;EACP,MAAM;EACN,QAAQ;EACR,MAAM;EACN,SAAS;EACT,MAAM;CACR;CACA,WAAW;EACT,OAAO;EACP,MAAM;EACN,MA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AE,aAAa;EACf,EAAE,QAAQ;EACV,EAAE,OAAO;EACT,EAAE,gBAAgB;EAClB,EAAE,cAAc;EAChB,EAAE,iBAAiB;EACnB,EAAE,aAAa;EACf,EAAE,iBAAiB;EACnB,EAAE,wBAAwB;EAC1B,OAAO;CACT;CACA,oBAAoB;EAClB,MAAM,IAAI,QAAQ,SAAS,CAAC;EAC5B,MAAM,IAAI,EAAE,MAAM;EAClB,EAAE,gBAAgB;EAClB,EAAE,YAAY;EACd,EAAE,WAAW;EACb,EAAE,gBAAgB;EAClB,EAAE,kBAAkB;EACpB,EAAE,QAAQ;EACV,OAAO;CACT;AACF"}
|
|
@@ -4,8 +4,8 @@ import * as THREE from "three";
|
|
|
4
4
|
* Base wave geometry — `folded()`: a flat PlaneGeometry folded into a hairpin
|
|
5
5
|
* (sideways-U) cross-section, then stood up so the fold runs along the wave's length.
|
|
6
6
|
*
|
|
7
|
-
* - Each vertex gets a half-thickness `r` (per-vertex math below): tight
|
|
8
|
-
*
|
|
7
|
+
* - Each vertex gets a half-thickness `r` (per-vertex math below): tight at the middle
|
|
8
|
+
* of the wave's length, flaring toward both ends.
|
|
9
9
|
* - The strip |x| < FOLD_X becomes a semicircular hinge; the plane's two halves bend
|
|
10
10
|
* around it into parallel arms offset to +r and -r.
|
|
11
11
|
* - Two −90° rotations (about X then Y) orient the U upright and down its length.
|
|
@@ -16,7 +16,26 @@ import * as THREE from "three";
|
|
|
16
16
|
* faces only, no vertex positions move.
|
|
17
17
|
*
|
|
18
18
|
* All further deformation (displacement, twist, transform) happens in the vertex shader
|
|
19
|
-
* on top of this base.
|
|
19
|
+
* on top of this base.
|
|
20
|
+
*
|
|
21
|
+
* UV AXES — the canonical statement, because this is easy to get backwards and the rest of
|
|
22
|
+
* the codebase reasons in uv. The plane is folded along its local x, which is the COLUMN
|
|
23
|
+
* direction (uv.x), and the two −90° rotations land world = (plane.y, plane.z, plane.x):
|
|
24
|
+
*
|
|
25
|
+
* uv.y → the ribbon's 400-unit LENGTH (world X — the axis `displaceFrequency.x` drives)
|
|
26
|
+
* uv.x → the folded ~188-unit WIDTH, wrapping the hairpin cross-section (world Z)
|
|
27
|
+
*
|
|
28
|
+
* So u runs ACROSS the fold and v runs ALONG it. The welding below corroborates it twice:
|
|
29
|
+
* the end-caps fan across columns at rows v=0 / v=subX, and the seam joins col 0 to col
|
|
30
|
+
* subX down every row — a join that necessarily runs the full length. Measured on a built
|
|
31
|
+
* mesh, the correlation of uv.y with world X is exactly 1.0, and of uv.x with world X, 0.
|
|
32
|
+
* (uv.x vs world Z also reads 0 — the fold's own signature: a monotone mapping would give
|
|
33
|
+
* ±1, but the hairpin runs out along one arm and back along the other.)
|
|
34
|
+
*
|
|
35
|
+
* Consequences that read backwards if you assume otherwise: a `NoiseBand`'s startX/endX
|
|
36
|
+
* are the SHORT axis; `edgeFeather` softens the two ends, not the long edges; the palette
|
|
37
|
+
* texture's "edge tint" lands on the ends; `parabolaPower` bunches streaks toward the long
|
|
38
|
+
* edges; and the twist X/Z falloffs run lengthwise while Y runs across the width.
|
|
20
39
|
*/
|
|
21
40
|
declare class WaveGeometry {
|
|
22
41
|
readonly geometry: THREE.BufferGeometry;
|