-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms-full.txt
More file actions
5010 lines (3924 loc) · 235 KB
/
Copy pathllms-full.txt
File metadata and controls
5010 lines (3924 loc) · 235 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Gradient Flow (shader)
> Silky domain-warped color field in deep blue, purple and teal; slow hypnotic drift.
- **id**: `gradient` · **kind**: shader · **section**: generative
- **tags**: noise, flow, plasma, glow, webgl2, background · **vibe**: calm, ambient, meditative
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [gradient.json](https://fx.rosuh.me/effects/gradient.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Dot-Matrix Wave (shader)
> Blue-teal dot grid pulses in rolling waves; cursor pushes dots outward in a satisfying bulge.
- **id**: `dots` · **kind**: shader · **section**: generative
- **tags**: dots, grid, waves, noise, webgl2, background · **vibe**: calm, playful, geometric
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [dots.json](https://fx.rosuh.me/effects/dots.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Metaballs (shader)
> Five glowing purple-magenta blobs orbit and merge organically; cursor draws in a sixth.
- **id**: `metaballs` · **kind**: shader · **section**: generative
- **tags**: metaballs, plasma, glow, fluid, webgl2, background · **vibe**: hypnotic, psychedelic, organic
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [metaballs.json](https://fx.rosuh.me/effects/metaballs.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Aurora Ribbons (shader)
> Shimmering green-and-purple aurora curtains stream down a starry night sky; serene fullscreen background.
- **id**: `aurora` · **kind**: shader · **section**: generative
- **tags**: aurora, waves, glow, noise, webgl2, background · **vibe**: calm, meditative, ambient
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [aurora.json](https://fx.rosuh.me/effects/aurora.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Ripple Grid (shader)
> Teal grid lines bend under expanding ripple rings that emanate from the cursor.
- **id**: `ripple` · **kind**: shader · **section**: generative
- **tags**: ripple, grid, waves, noise, webgl2, background · **vibe**: hypnotic, technical, geometric
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [ripple.json](https://fx.rosuh.me/effects/ripple.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Voronoi Cells (shader)
> Animated colour-cell mosaic with drifting seeds in jewel tones; organic and hypnotic.
- **id**: `voronoi` · **kind**: shader · **section**: generative
- **tags**: voronoi, cellular, geometry, noise, webgl2, background · **vibe**: hypnotic, organic, geometric
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [voronoi.json](https://fx.rosuh.me/effects/voronoi.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Truchet Tiles (shader)
> Scrolling arc-tile maze in dark teal; endlessly generative, calm, low-contrast texture.
- **id**: `truchet` · **kind**: shader · **section**: generative
- **tags**: tiling, geometry, lines, webgl2, background · **vibe**: calm, geometric, meditative
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [truchet.json](https://fx.rosuh.me/effects/truchet.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Kaleidoscope (shader)
> 8-fold FBM kaleidoscope blooms with shifting hues; cursor tilts the mandala in real time.
- **id**: `kaleido` · **kind**: shader · **section**: generative
- **tags**: kaleidoscope, mandala, fractal, noise, webgl2, background · **vibe**: hypnotic, psychedelic
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [kaleido.json](https://fx.rosuh.me/effects/kaleido.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Raymarch SDF (shader)
> Glowing torus spins in deep space via 48-step SDF raymarching; blue-to-magenta Fresnel rim.
- **id**: `raymarch` · **kind**: shader · **section**: generative
- **tags**: geometry, orbit, glow, rings, webgl2, background · **vibe**: hypnotic, futuristic, technical
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [raymarch.json](https://fx.rosuh.me/effects/raymarch.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Vaporwave Grid (shader)
> Retro vaporwave: banded sunset sun over a perspective cyan neon grid scrolling to the horizon.
- **id**: `vapor` · **kind**: shader · **section**: post-and-print
- **tags**: grid, neon, geometry, lines, webgl2, background · **vibe**: retro, calm, futuristic
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [vapor.json](https://fx.rosuh.me/effects/vapor.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Chromatic Glitch (shader)
> Horizontal RGB bands jitter and split over CRT scanlines; aggressive retro glitch.
- **id**: `glitch` · **kind**: shader · **section**: post-and-print
- **tags**: glitch, scanlines, noise, neon, webgl2, overlay · **vibe**: aggressive, retro, dramatic
- **culture**: —
- **perf**: gpu med / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
See full GLSL + drop-in snippet in [glitch.json](https://fx.rosuh.me/effects/glitch.json).
## Runtime notes
WebGL2 fragment shader compiled against the shared PRE preamble (uniforms iResolution, iTime, iMouse — iMouse is Y-flipped physical px, centered when no pointer). Browsers cap ~8–16 live WebGL2 contexts; the gallery lazy-unmounts off-screen tiles to stay under the limit. Perf budget — gpu: med, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- WebGL2 context limit: browsers cap ~8–16 live contexts; unmount off-screen shaders (the gallery does this) to stay under it.
---
# Flow Field (canvas)
> Dim constellation of drifting particles draws faint connecting lines; cursor repels the swarm.
- **id**: `field` · **kind**: canvas · **section**: data-and-system
- **tags**: particles, canvas2d, flow, trail, lines · **vibe**: calm, ambient, elegant
- **culture**: —
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: field — Flow Field (canvas) · license MIT -->
<canvas id="fx-field" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function field(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.p=[];for(let i=0;i<60;i++)s.p.push({x:Math.random()*w,y:Math.random()*h,vx:Math.random()-.5,vy:Math.random()-.5});}
ctx.fillStyle='rgba(12,13,16,0.32)';ctx.fillRect(0,0,w,h); const ps=s.p;
for(const p of ps){ const dx=p.x-mx,dy=p.y-my,d=Math.hypot(dx,dy)||1; if(mx>=0&&d<130){const f=(1-d/130)*0.8;p.vx+=dx/d*f;p.vy+=dy/d*f;} p.vx+=(Math.random()-.5)*0.06;p.vy+=(Math.random()-.5)*0.06;p.vx*=0.95;p.vy*=0.95;p.x+=p.vx;p.y+=p.vy; if(p.x<0)p.x+=w;else if(p.x>w)p.x-=w; if(p.y<0)p.y+=h;else if(p.y>h)p.y-=h; }
ctx.lineWidth=1; for(let i=0;i<ps.length;i++)for(let j=i+1;j<ps.length;j++){const a=ps[i],b=ps[j],dx=a.x-b.x,dy=a.y-b.y,d2=dx*dx+dy*dy;if(d2<8100){ctx.strokeStyle='rgba(127,200,255,'+((1-Math.sqrt(d2)/90)*0.22).toFixed(3)+')';ctx.beginPath();ctx.moveTo(a.x,a.y);ctx.lineTo(b.x,b.y);ctx.stroke();}}
ctx.fillStyle='rgba(190,225,255,0.9)'; for(const p of ps){ctx.beginPath();ctx.arc(p.x,p.y,1.5,0,7);ctx.fill();} };
const cv = document.getElementById('fx-field');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Persistent accumulator: Particle positions and connecting-line trails accumulate via partial alpha clear Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
- Accumulates state across frames — Particle positions and connecting-line trails accumulate via partial alpha clear; remount to reset.
---
# Seigaiha (canvas)
> Serene overlapping blue-white wave fans tile the screen; calm Japanese oceanic elegance.
- **id**: `seigaiha` · **kind**: canvas · **section**: world-patterns
- **tags**: waves, tiling, geometry, canvas2d, background · **vibe**: calm, elegant, cultural
- **culture**: Japan
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: seigaiha — Seigaiha (canvas) · license MIT
accuracy: Procedural approximation of Japanese Seigaiha wave tiling; not a faithful reproduction of any specific historical motif. -->
<canvas id="fx-seigaiha" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function seigaiha(ctx,w,h,t){ ctx.fillStyle='#0d1b2a';ctx.fillRect(0,0,w,h); const R=26,sx=R,sy=R*0.62,ph=t*0.4; ctx.lineWidth=2;
for(let row=0,y=0;y<h+R;row++,y+=sy){ const off=(row%2)*sx; for(let x=-R;x<w+R;x+=sx*2){ const cx=x+off,cy=y+Math.sin(x*0.02+ph)*2;
for(let k=4;k>=1;k--){ const rr=R*k/4; ctx.strokeStyle=(k%2)?'rgba(120,190,230,0.95)':'rgba(225,238,247,0.85)'; ctx.beginPath();ctx.arc(cx,cy,rr,Math.PI,Math.PI*2);ctx.stroke(); } } } };
const cv = document.getElementById('fx-seigaiha');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- Procedural approximation of Japanese Seigaiha wave tiling; not a faithful reproduction of any specific historical motif.
---
# Girih (canvas)
> Dark ground of slowly rotating golden octagram lattice; elegant Islamic geometric meditation.
- **id**: `girih` · **kind**: canvas · **section**: world-patterns
- **tags**: geometry, tiling, mosaic, canvas2d, background · **vibe**: elegant, hypnotic, cultural
- **culture**: Islamic
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: girih — Girih (canvas) · license MIT
accuracy: Procedural approximation of Islamic girih tiling; not a faithful reproduction of any specific historical motif. -->
<canvas id="fx-girih" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function girih(ctx,w,h,t){ ctx.fillStyle='#10130f';ctx.fillRect(0,0,w,h); ctx.strokeStyle='rgba(212,175,90,0.85)';ctx.lineWidth=1.3; const R=30,rot=t*0.06,S=R*1.7;
for(let gy=0;gy<h+S;gy+=S)for(let gx=0;gx<w+S;gx+=S){ for(let q=0;q<2;q++){ ctx.beginPath(); for(let i=0;i<4;i++){const a=rot+q*Math.PI/4+i*Math.PI/2;const x=gx+Math.cos(a)*R,y=gy+Math.sin(a)*R;i?ctx.lineTo(x,y):ctx.moveTo(x,y);} ctx.closePath();ctx.stroke(); }
ctx.beginPath(); for(let i=0;i<8;i++){const a=rot+i*Math.PI/4+Math.PI/8;const x=gx+Math.cos(a)*R*0.46,y=gy+Math.sin(a)*R*0.46;i?ctx.lineTo(x,y):ctx.moveTo(x,y);} ctx.closePath();ctx.stroke(); } };
const cv = document.getElementById('fx-girih');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- Procedural approximation of Islamic girih tiling; not a faithful reproduction of any specific historical motif.
---
# Celtic Knot (canvas)
> Glowing green interlace arcs weave across a dark field with a flowing animated dash; hypnotic.
- **id**: `celtic` · **kind**: canvas · **section**: world-patterns
- **tags**: knot, weave, geometry, canvas2d, background · **vibe**: hypnotic, elegant, cultural
- **culture**: Celtic
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: celtic — Celtic Knot (canvas) · license MIT
accuracy: Procedural approximation of Celtic knotwork interlace; not a faithful reproduction of any specific historical motif. -->
<canvas id="fx-celtic" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function celtic(ctx,w,h,t){ ctx.fillStyle='#0c1410';ctx.fillRect(0,0,w,h); ctx.strokeStyle='rgba(120,225,170,0.9)';ctx.lineWidth=3.2;ctx.lineCap='round'; ctx.setLineDash([15,9]);ctx.lineDashOffset=-t*22; const C=34;
for(let y=0;y<h+C;y+=C)for(let x=0;x<w+C;x+=C){ const o=(((x/C)+(y/C))%2===0); ctx.beginPath(); if(o){ctx.arc(x,y,C*0.5,0,Math.PI*0.5);ctx.moveTo(x+C,y+C);ctx.arc(x+C,y+C,C*0.5,Math.PI,Math.PI*1.5);} else {ctx.arc(x+C,y,C*0.5,Math.PI*0.5,Math.PI);ctx.moveTo(x,y+C);ctx.arc(x,y+C,C*0.5,Math.PI*1.5,Math.PI*2);} ctx.stroke(); } ctx.setLineDash([]); };
const cv = document.getElementById('fx-celtic');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- Procedural approximation of Celtic knotwork interlace; not a faithful reproduction of any specific historical motif.
---
# Dot Painting (canvas)
> Warm earth-tone concentric dot rings orbit fixed anchors on dark brown; organic and meditative.
- **id**: `aboriginal` · **kind**: canvas · **section**: world-patterns
- **tags**: dots, geometry, canvas2d, background · **vibe**: meditative, organic, cultural
- **culture**: Aboriginal Australian
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: aboriginal — Dot Painting (canvas) · license MIT
accuracy: Procedural approximation of Aboriginal Australian dot painting; not a faithful reproduction of any specific historical motif. -->
<canvas id="fx-aboriginal" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function aboriginal(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.c=[];for(let i=0;i<6;i++)s.c.push({x:Math.random()*w,y:Math.random()*h});} ctx.fillStyle='#2a1a0f';ctx.fillRect(0,0,w,h); const cols=['#e8b04b','#d9763a','#ece0cf','#b5472a','#7a3b1f'];
for(const c of s.c){ for(let ring=0;ring<6;ring++){ const rad=7+ring*9; const n=Math.max(6,Math.floor(rad*0.7)); for(let i=0;i<n;i++){ const a=i/n*6.2831+ring*0.3+t*0.12*(ring%2?1:-1); ctx.fillStyle=cols[(ring+i)%cols.length]; ctx.beginPath();ctx.arc(c.x+Math.cos(a)*rad,c.y+Math.sin(a)*rad,2.0,0,7);ctx.fill(); } } } };
const cv = document.getElementById('fx-aboriginal');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Persistent accumulator: Dot centre positions generated once on first frame via Math.random. Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Procedural approximation of Aboriginal Australian dot painting; not a faithful reproduction of any specific historical motif.
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
- Accumulates state across frames — Dot centre positions generated once on first frame via Math.random.; remount to reset.
---
# Ink Wash (canvas)
> Soft ink blobs drift on cream paper; hover to drop a brushstroke wash at the cursor.
- **id**: `inkwash` · **kind**: canvas · **section**: world-patterns
- **tags**: ink, canvas2d, background, overlay · **vibe**: calm, meditative, cultural, minimal
- **culture**: China
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: inkwash — Ink Wash (canvas) · license MIT
accuracy: Procedural approximation of Chinese ink wash painting; not a faithful reproduction of any specific historical motif. -->
<canvas id="fx-inkwash" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function inkwash(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.b=[];for(let i=0;i<5;i++)s.b.push({x:Math.random()*w,y:Math.random()*h,r:24+Math.random()*40,p:Math.random()*6});} ctx.fillStyle='#f3efe6';ctx.fillRect(0,0,w,h);
for(const b of s.b){ const cx=b.x+Math.sin(t*0.2+b.p)*22,cy=b.y+Math.cos(t*0.17+b.p)*16; const g=ctx.createRadialGradient(cx,cy,0,cx,cy,b.r); g.addColorStop(0,'rgba(18,18,22,0.5)');g.addColorStop(0.6,'rgba(28,28,34,0.2)');g.addColorStop(1,'rgba(40,40,46,0)'); ctx.fillStyle=g;ctx.beginPath();ctx.arc(cx,cy,b.r,0,7);ctx.fill(); }
if(mx>=0){ const g=ctx.createRadialGradient(mx,my,0,mx,my,42);g.addColorStop(0,'rgba(8,8,12,0.55)');g.addColorStop(1,'rgba(8,8,12,0)');ctx.fillStyle=g;ctx.beginPath();ctx.arc(mx,my,42,0,7);ctx.fill(); } };
const cv = document.getElementById('fx-inkwash');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Persistent accumulator: Ink blob positions generated once on first frame via Math.random. Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Procedural approximation of Chinese ink wash painting; not a faithful reproduction of any specific historical motif.
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
- Accumulates state across frames — Ink blob positions generated once on first frame via Math.random.; remount to reset.
---
# Op-Art Moiré (canvas)
> Black-and-white concentric rings create a dizzying moiré illusion; cursor shifts the offset.
- **id**: `opart` · **kind**: canvas · **section**: design-movements
- **tags**: moire, canvas2d, optical, rings, geometry · **vibe**: hypnotic, geometric
- **culture**: Op-Art / optical illusion
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: opart — Op-Art Moiré (canvas) · license MIT -->
<canvas id="fx-opart" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function opart(ctx,w,h,t,mx,my){ ctx.fillStyle='#fff';ctx.fillRect(0,0,w,h); const cx=mx>=0?mx:w*0.5+Math.sin(t*0.6)*w*0.22, cy=my>=0?my:h*0.5+Math.cos(t*0.5)*h*0.22; const R=Math.hypot(w,h);
ctx.lineWidth=7;ctx.strokeStyle='#0a0a0a'; for(let r=4;r<R;r+=14){ctx.beginPath();ctx.arc(w*0.5,h*0.5,r,0,7);ctx.stroke();}
ctx.globalCompositeOperation='difference';ctx.strokeStyle='#fff'; for(let r=4;r<R;r+=14){ctx.beginPath();ctx.arc(cx,cy,r,0,7);ctx.stroke();} ctx.globalCompositeOperation='source-over'; };
const cv = document.getElementById('fx-opart');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- None noted.
---
# Bauhaus (canvas)
> Bold Bauhaus shapes — blue circle, red arc, yellow triangle — slow-turn in primary colours.
- **id**: `bauhaus` · **kind**: canvas · **section**: design-movements
- **tags**: geometry, canvas2d, curves, lines · **vibe**: elegant, geometric, minimal
- **culture**: Bauhaus / design movement
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: bauhaus — Bauhaus (canvas) · license MIT -->
<canvas id="fx-bauhaus" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function bauhaus(ctx,w,h,t){ ctx.fillStyle='#e8e2d4';ctx.fillRect(0,0,w,h); const a=t*0.3,M=Math.min(w,h);
ctx.fillStyle='#2b4a9b';ctx.beginPath();ctx.arc(w*0.32,h*0.4,M*0.26,0,7);ctx.fill();
ctx.save();ctx.translate(w*0.7,h*0.62);ctx.rotate(a);ctx.fillStyle='#d23b2a';ctx.beginPath();ctx.arc(0,0,M*0.2,0,Math.PI);ctx.fill();ctx.restore();
ctx.fillStyle='#e8b53a';ctx.beginPath();ctx.moveTo(w*0.55,h*0.08);ctx.lineTo(w*0.82,h*0.08);ctx.lineTo(w*0.55,h*0.42);ctx.closePath();ctx.fill();
ctx.fillStyle='#1a1a1a';ctx.fillRect(w*0.1,h*0.76,w*0.8,6);ctx.fillRect(w*0.12,h*0.86,w*0.46,6); };
const cv = document.getElementById('fx-bauhaus');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- None noted.
---
# Memphis 80s (canvas)
> Neon Memphis shapes drift and spin on dark; vibrant 80s pop-design energy.
- **id**: `memphis` · **kind**: canvas · **section**: design-movements
- **tags**: geometry, canvas2d, particles, lines · **vibe**: playful, energetic, retro
- **culture**: Memphis / pop design
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: memphis — Memphis 80s (canvas) · license MIT -->
<canvas id="fx-memphis" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function memphis(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.sh=[];for(let i=0;i<16;i++)s.sh.push({x:Math.random()*w,y:Math.random()*h,k:i%4,c:i%5,r:8+Math.random()*15,p:Math.random()*6});} ctx.fillStyle='#0f1020';ctx.fillRect(0,0,w,h); const cols=['#ff5a8a','#34d1c4','#ffd23f','#7b6cf6','#ff8f3f'];
for(const o of s.sh){ const y=o.y+Math.sin(t*0.6+o.p)*6; ctx.fillStyle=cols[o.c];ctx.strokeStyle=cols[o.c];ctx.lineWidth=3; ctx.save();ctx.translate(o.x,y);ctx.rotate(t*0.2+o.p);
if(o.k===0){ctx.beginPath();ctx.arc(0,0,o.r,0,7);ctx.fill();} else if(o.k===1){ctx.beginPath();ctx.moveTo(-o.r,o.r);ctx.lineTo(0,-o.r);ctx.lineTo(o.r,o.r);ctx.closePath();ctx.fill();} else if(o.k===2){ctx.beginPath();ctx.arc(0,0,o.r,0,7);ctx.stroke();} else {ctx.beginPath();ctx.moveTo(-o.r,0);ctx.lineTo(o.r,0);ctx.moveTo(0,-o.r);ctx.lineTo(0,o.r);ctx.stroke();} ctx.restore(); } };
const cv = document.getElementById('fx-memphis');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
---
# Matrix Rain (canvas)
> Green Katakana glyphs cascade in columns on black; iconic hacker-terminal rain effect.
- **id**: `matrix` · **kind**: canvas · **section**: data-and-system
- **tags**: ascii, canvas2d, rain, trail, neon · **vibe**: retro, dramatic, technical
- **culture**: —
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: matrix — Matrix Rain (canvas) · license MIT -->
<canvas id="fx-matrix" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function matrix(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.cols=Math.floor(w/12);s.y=[];for(let i=0;i<s.cols;i++)s.y[i]=Math.random()*h;} ctx.fillStyle='rgba(2,8,4,0.16)';ctx.fillRect(0,0,w,h); ctx.font='13px monospace';
for(let i=0;i<s.cols;i++){ const x=i*12; ctx.fillStyle='rgba(190,255,205,0.95)';ctx.fillText(String.fromCharCode(0x30A0+Math.floor(Math.random()*92)),x,s.y[i]); ctx.fillStyle='rgba(60,220,120,0.4)';ctx.fillText(String.fromCharCode(0x30A0+Math.floor(Math.random()*92)),x,s.y[i]-15); s.y[i]+=8; if(s.y[i]>h&&Math.random()>0.975)s.y[i]=0; } };
const cv = document.getElementById('fx-matrix');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Persistent accumulator: Column y-positions and character trails accumulate via partial alpha clear Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
- Accumulates state across frames — Column y-positions and character trails accumulate via partial alpha clear; remount to reset.
---
# Oscilloscope (canvas)
> Phosphor-green oscilloscope waveform glows on a dim CRT grid; calm technical atmosphere.
- **id**: `scope` · **kind**: canvas · **section**: data-and-system
- **tags**: oscilloscope, canvas2d, waves, glow, grid · **vibe**: calm, technical, retro
- **culture**: —
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: scope — Oscilloscope (canvas) · license MIT -->
<canvas id="fx-scope" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function scope(ctx,w,h,t){ ctx.fillStyle='#04140a';ctx.fillRect(0,0,w,h); ctx.strokeStyle='rgba(40,120,70,0.3)';ctx.lineWidth=1; for(let x=0;x<w;x+=w/8){ctx.beginPath();ctx.moveTo(x,0);ctx.lineTo(x,h);ctx.stroke();} for(let y=0;y<h;y+=h/6){ctx.beginPath();ctx.moveTo(0,y);ctx.lineTo(w,y);ctx.stroke();}
ctx.strokeStyle='#7CFFB0';ctx.lineWidth=2;ctx.shadowBlur=8;ctx.shadowColor='#7CFFB0';ctx.beginPath(); for(let x=0;x<=w;x+=2){const u=x/w;const y=h/2+Math.sin(u*12+t*3)*h*0.18*Math.sin(t*0.7)+Math.sin(u*30+t*5)*h*0.07;x?ctx.lineTo(x,y):ctx.moveTo(x,y);} ctx.stroke();ctx.shadowBlur=0; };
const cv = document.getElementById('fx-scope');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Reduced motion: freeze.
## Known limitations
- None noted.
---
# Starfield Warp (canvas)
> Stars streak inward at warp speed from a deep-space vanishing point; hypnotic forward pull.
- **id**: `starfield` · **kind**: canvas · **section**: data-and-system
- **tags**: starfield, canvas2d, stars, trail, tunnel · **vibe**: futuristic, hypnotic, energetic
- **culture**: —
- **perf**: gpu low / cpu low / mobileSafe true
- **interactive**: followsCursor false, trigger auto
- **reducedMotion**: freeze · **deterministic**: false
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: starfield — Starfield Warp (canvas) · license MIT -->
<canvas id="fx-starfield" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function starfield(ctx,w,h,t,mx,my,s){ if(!s.init){s.init=1;s.st=[];for(let i=0;i<150;i++)s.st.push({x:(Math.random()-.5)*w,y:(Math.random()-.5)*h,z:Math.random()*w});} ctx.fillStyle='rgba(4,5,12,0.4)';ctx.fillRect(0,0,w,h); const cx=w/2,cy=h/2;
for(const p of s.st){ p.z-=4; if(p.z<1){p.z=w;p.x=(Math.random()-.5)*w;p.y=(Math.random()-.5)*h;} const k=128/p.z,k2=128/(p.z+5); const x=cx+p.x*k,y=cy+p.y*k,px=cx+p.x*k2,py=cy+p.y*k2; const b=Math.min(1,(1-p.z/w)*1.6); ctx.strokeStyle='rgba('+(180+b*60|0)+','+(200+b*40|0)+',255,'+b.toFixed(2)+')';ctx.lineWidth=b*1.6;ctx.beginPath();ctx.moveTo(px,py);ctx.lineTo(x,y);ctx.stroke(); } };
const cv = document.getElementById('fx-starfield');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);
if (cv.width !== Math.round(w * DPR) || cv.height !== Math.round(h * DPR)) {
cv.width = Math.round(w * DPR); cv.height = Math.round(h * DPR);
}
ctx.setTransform(DPR, 0, 0, DPR, 0, 0); // draw in CSS px
const t = (performance.now() - t0) / 1000;
draw(ctx, w, h, t, mx, my, state);
requestAnimationFrame(frame);
})();
</script>
```
## Runtime notes
Canvas2D: draw(ctx, w, h, t, mx, my, state) runs each frame; w/h and mx/my are CSS px (mx,my = -9999 when not hovering), ctx is pre-scaled by DPR = min(2, devicePixelRatio). Perf budget — gpu: low, cpu: low, mobileSafe: true. Persistent accumulator: Star positions and warp-streak trails accumulate via partial alpha clear Non-deterministic: uses unseeded randomness or wall-clock time, so output differs run to run. Reduced motion: freeze.
## Known limitations
- Non-deterministic (unseeded random / wall-clock): pixels differ run to run.
- Accumulates state across frames — Star positions and warp-streak trails accumulate via partial alpha clear; remount to reset.
---
# Halftone CMYK (canvas)
> Warm CMYK halftone dots bloom from cursor position; editorial print-design feel.
- **id**: `halftone` · **kind**: canvas · **section**: post-and-print
- **tags**: halftone, dots, canvas2d, geometry · **vibe**: elegant, retro
- **culture**: print / design
- **perf**: gpu low / cpu high / mobileSafe false
- **interactive**: followsCursor true, trigger hover
- **reducedMotion**: freeze · **deterministic**: true
- **license**: MIT
## Drop-in snippet
```html
<!-- fx-lab effect: halftone — Halftone CMYK (canvas) · license MIT -->
<canvas id="fx-halftone" style="display:block;width:100%;height:100%;min-height:240px"></canvas>
<script type="module">
const draw = function halftone(ctx,w,h,t,mx,my){ ctx.fillStyle='#f4f1ea';ctx.fillRect(0,0,w,h); const cx=mx>=0?mx:w*0.5+Math.sin(t*0.5)*w*0.25, cy=my>=0?my:h*0.5+Math.cos(t*0.4)*h*0.25; const screens=[['rgba(0,170,235,0.8)',2,1],['rgba(236,0,140,0.72)',6,4],['rgba(255,210,0,0.78)',4,7]]; const S=10,maxd=Math.hypot(w,h)*0.62;
ctx.globalCompositeOperation='multiply'; for(const sc of screens){ ctx.fillStyle=sc[0]; for(let y=sc[2];y<h;y+=S)for(let x=sc[1];x<w;x+=S){ const v=Math.max(0,1-Math.hypot(x-cx,y-cy)/maxd); const rad=v*S*0.62; if(rad>0.3){ctx.beginPath();ctx.arc(x,y,rad,0,7);ctx.fill();} } } ctx.globalCompositeOperation='source-over'; };
const cv = document.getElementById('fx-halftone');
const ctx = cv.getContext('2d');
const DPR = Math.min(2, window.devicePixelRatio || 1);
const state = {};
let mx = -9999, my = -9999; // -9999 == not hovering (CONTRACT 2)
cv.addEventListener('pointermove', (e) => {
const r = cv.getBoundingClientRect(); mx = e.clientX - r.left; my = e.clientY - r.top;
});
cv.addEventListener('pointerleave', () => { mx = -9999; my = -9999; });
const t0 = performance.now();
(function frame() {
const w = Math.max(1, cv.clientWidth || 300), h = Math.max(1, cv.clientHeight || 240);