@idle-screens/savers-classic 3.1.0 → 3.2.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/{chunk-PU6BQ5S3.js → chunk-GVD3Q4LE.js} +413 -199
- package/dist/chunk-GVD3Q4LE.js.map +1 -0
- package/dist/idle-worker.js +4 -1
- package/dist/idle-worker.js.map +1 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
- package/dist/chunk-PU6BQ5S3.js.map +0 -1
|
@@ -21,6 +21,7 @@ var PARAM_SPACE = {
|
|
|
21
21
|
var dvdManifest = {
|
|
22
22
|
id: "dvd",
|
|
23
23
|
label: "Bouncing Logo",
|
|
24
|
+
timeModel: "closed-form",
|
|
24
25
|
passthrough: false,
|
|
25
26
|
minBackend: "canvas2d",
|
|
26
27
|
costTier: "low",
|
|
@@ -365,6 +366,7 @@ var PARAM_SPACE2 = {
|
|
|
365
366
|
var warpManifest = {
|
|
366
367
|
id: "warp",
|
|
367
368
|
label: "Warp",
|
|
369
|
+
timeModel: "closed-form",
|
|
368
370
|
passthrough: false,
|
|
369
371
|
minBackend: "canvas2d",
|
|
370
372
|
costTier: "low",
|
|
@@ -603,6 +605,7 @@ var warpDemoTrack = {
|
|
|
603
605
|
var hardRainManifest = {
|
|
604
606
|
id: "hard-rain",
|
|
605
607
|
label: "Hard Rain",
|
|
608
|
+
timeModel: "closed-form",
|
|
606
609
|
passthrough: false,
|
|
607
610
|
minBackend: "canvas2d",
|
|
608
611
|
costTier: "low",
|
|
@@ -894,6 +897,7 @@ var hardRain = {
|
|
|
894
897
|
var rainstormManifest = {
|
|
895
898
|
id: "rainstorm",
|
|
896
899
|
label: "Rainstorm",
|
|
900
|
+
timeModel: "closed-form",
|
|
897
901
|
passthrough: false,
|
|
898
902
|
minBackend: "canvas2d",
|
|
899
903
|
costTier: "low",
|
|
@@ -1104,6 +1108,7 @@ var PARAM_SPACE3 = {
|
|
|
1104
1108
|
var globeManifest = {
|
|
1105
1109
|
id: "globe",
|
|
1106
1110
|
label: "Globe",
|
|
1111
|
+
timeModel: "closed-form",
|
|
1107
1112
|
passthrough: false,
|
|
1108
1113
|
minBackend: "canvas2d",
|
|
1109
1114
|
costTier: "low",
|
|
@@ -1411,6 +1416,7 @@ var globeDemoTrack = {
|
|
|
1411
1416
|
var spotlightManifest = {
|
|
1412
1417
|
id: "spotlight",
|
|
1413
1418
|
label: "Spotlight",
|
|
1419
|
+
timeModel: "closed-form",
|
|
1414
1420
|
passthrough: true,
|
|
1415
1421
|
minBackend: "canvas2d",
|
|
1416
1422
|
costTier: "low",
|
|
@@ -1547,14 +1553,33 @@ var spotlight = {
|
|
|
1547
1553
|
};
|
|
1548
1554
|
|
|
1549
1555
|
// src/mystify.ts
|
|
1556
|
+
import {
|
|
1557
|
+
sampleTrack as sampleTrack4,
|
|
1558
|
+
defaultParams as defaultParams4
|
|
1559
|
+
} from "@idle-screens/core";
|
|
1560
|
+
var PARAM_SPACE4 = {
|
|
1561
|
+
/** How many polygons perform. Identities are stable per slot (seeded
|
|
1562
|
+
* forks), so steering the count never re-rolls the visible shapes. */
|
|
1563
|
+
shapes: { type: "number", default: 3, min: 1, max: 6 },
|
|
1564
|
+
/** Motion rate multiplier — integrated, so live changes never teleport. */
|
|
1565
|
+
speed: { type: "number", default: 1, min: 0.25, max: 2.5, ease: "smooth" },
|
|
1566
|
+
/** Trail persistence: 0 = crisp outline, 1 = long dreamy ribbons. */
|
|
1567
|
+
trail: { type: "number", default: 0.55, min: 0, max: 1, ease: "smooth" },
|
|
1568
|
+
/** Stroke width, px. */
|
|
1569
|
+
width: { type: "number", default: 2, min: 1, max: 5, ease: "smooth" },
|
|
1570
|
+
/** Additive hue rotation over each shape's seeded base hue, degrees. */
|
|
1571
|
+
hueShift: { type: "number", default: 0, min: 0, max: 360, ease: "smooth" }
|
|
1572
|
+
};
|
|
1550
1573
|
var mystifyManifest = {
|
|
1551
1574
|
id: "mystify",
|
|
1552
1575
|
label: "Mystify",
|
|
1576
|
+
timeModel: "closed-form",
|
|
1553
1577
|
passthrough: false,
|
|
1554
1578
|
minBackend: "canvas2d",
|
|
1555
1579
|
costTier: "low",
|
|
1556
1580
|
motionIntensity: "moderate",
|
|
1557
1581
|
reducedMotionFallback: "static",
|
|
1582
|
+
paramSpace: PARAM_SPACE4,
|
|
1558
1583
|
attribution: {
|
|
1559
1584
|
source: 'Windows "Mystify" \u2014 concept only; clean-room reimplementation',
|
|
1560
1585
|
license: "MIT (original code)"
|
|
@@ -1562,18 +1587,39 @@ var mystifyManifest = {
|
|
|
1562
1587
|
a11y: { flashSafe: true, notes: "Slow-fade polygon trails on black; no strobing." },
|
|
1563
1588
|
workerReady: true
|
|
1564
1589
|
};
|
|
1565
|
-
var
|
|
1566
|
-
var
|
|
1567
|
-
var
|
|
1590
|
+
var MAX_SHAPES = 6;
|
|
1591
|
+
var GHOST_MS = 25;
|
|
1592
|
+
var PHASE_BUCKET_MS = 250;
|
|
1593
|
+
var fold = (p, span) => {
|
|
1594
|
+
const period = 2 * span;
|
|
1595
|
+
const m = (p % period + period) % period;
|
|
1596
|
+
return m <= span ? m : period - m;
|
|
1597
|
+
};
|
|
1598
|
+
var MystifyInstance = class _MystifyInstance {
|
|
1568
1599
|
ctxSaver;
|
|
1569
1600
|
canvas;
|
|
1570
1601
|
ctx;
|
|
1571
1602
|
w = 0;
|
|
1572
1603
|
h = 0;
|
|
1573
|
-
shapes
|
|
1604
|
+
shapes;
|
|
1605
|
+
track = null;
|
|
1606
|
+
baseParams = defaultParams4(PARAM_SPACE4);
|
|
1607
|
+
/** Append-only speed-integral caches, one slot per PHASE_BUCKET_MS. */
|
|
1608
|
+
phiPrefix = [0];
|
|
1609
|
+
phiSpeeds = [];
|
|
1574
1610
|
frameId = null;
|
|
1575
|
-
last = 0;
|
|
1576
1611
|
paused = false;
|
|
1612
|
+
startT = 0;
|
|
1613
|
+
/** Logical time the next rAF origin resumes from.
|
|
1614
|
+
*
|
|
1615
|
+
* `start()` re-anchors `startT` to the next frame's timestamp, so on its own
|
|
1616
|
+
* `now - startT` always begins at zero. Mount wants that; resuming from a
|
|
1617
|
+
* pause does not — without carrying the frozen `t` forward, every
|
|
1618
|
+
* pause/resume (and every reduced-motion toggle) snaps the scene back to its
|
|
1619
|
+
* opening frame and restarts any applied control track. Set only in
|
|
1620
|
+
* `setPaused(false)`, so first mount still starts at 0. */
|
|
1621
|
+
resumeFrom = 0;
|
|
1622
|
+
t = 0;
|
|
1577
1623
|
constructor(ctx) {
|
|
1578
1624
|
this.ctxSaver = ctx;
|
|
1579
1625
|
let canvas;
|
|
@@ -1593,31 +1639,28 @@ var MystifyInstance = class {
|
|
|
1593
1639
|
this.w = ctx.width;
|
|
1594
1640
|
this.h = ctx.height;
|
|
1595
1641
|
this.sizeCanvas();
|
|
1596
|
-
this.shapes =
|
|
1597
|
-
this.clearFull();
|
|
1642
|
+
this.shapes = _MystifyInstance.buildShapes(ctx.rng);
|
|
1598
1643
|
this.paused = ctx.reducedMotion;
|
|
1599
1644
|
if (this.paused) this.renderStill();
|
|
1600
1645
|
else this.start();
|
|
1601
1646
|
}
|
|
1602
|
-
|
|
1647
|
+
/** The full identity pool, one fork per slot — count-independent. */
|
|
1648
|
+
static buildShapes(rng) {
|
|
1603
1649
|
const out = [];
|
|
1604
|
-
for (let s = 0; s <
|
|
1605
|
-
const
|
|
1606
|
-
const
|
|
1607
|
-
const
|
|
1650
|
+
for (let s = 0; s < MAX_SHAPES; s++) {
|
|
1651
|
+
const f = rng.fork(61469 + s);
|
|
1652
|
+
const vertCount = f.int(3, 5);
|
|
1653
|
+
const hue = f.int(0, 359);
|
|
1654
|
+
const id = { hue, fx: [], fy: [], vx: [], vy: [] };
|
|
1608
1655
|
for (let v = 0; v < vertCount; v++) {
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
const dir =
|
|
1612
|
-
const speed =
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
y,
|
|
1616
|
-
vx: Math.cos(dir) * speed,
|
|
1617
|
-
vy: Math.sin(dir) * speed
|
|
1618
|
-
});
|
|
1656
|
+
id.fx.push(f.range(0.15, 0.85));
|
|
1657
|
+
id.fy.push(f.range(0.15, 0.85));
|
|
1658
|
+
const dir = f.range(0, Math.PI * 2);
|
|
1659
|
+
const speed = f.range(70, 150);
|
|
1660
|
+
id.vx.push(Math.cos(dir) * speed);
|
|
1661
|
+
id.vy.push(Math.sin(dir) * speed);
|
|
1619
1662
|
}
|
|
1620
|
-
out.push(
|
|
1663
|
+
out.push(id);
|
|
1621
1664
|
}
|
|
1622
1665
|
return out;
|
|
1623
1666
|
}
|
|
@@ -1627,13 +1670,40 @@ var MystifyInstance = class {
|
|
|
1627
1670
|
this.canvas.height = Math.max(1, Math.round(this.h * dpr));
|
|
1628
1671
|
this.ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
1629
1672
|
}
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
this.
|
|
1673
|
+
/** Params at `t` — track-driven when applied, defaults otherwise. */
|
|
1674
|
+
paramsAt(t) {
|
|
1675
|
+
if (!this.track) return this.baseParams;
|
|
1676
|
+
const p = sampleTrack4(PARAM_SPACE4, this.track, t);
|
|
1677
|
+
const out = { ...this.baseParams };
|
|
1678
|
+
for (const k of Object.keys(PARAM_SPACE4)) {
|
|
1679
|
+
const v = p[k];
|
|
1680
|
+
if (typeof v === "number") out[k] = v;
|
|
1681
|
+
}
|
|
1682
|
+
return out;
|
|
1633
1683
|
}
|
|
1684
|
+
/** Speed the phase integral uses across one bucket (sampled at its centre). */
|
|
1685
|
+
bucketSpeed(b) {
|
|
1686
|
+
let s = this.phiSpeeds[b];
|
|
1687
|
+
if (s === void 0) {
|
|
1688
|
+
for (let k = this.phiSpeeds.length; k <= b; k++) {
|
|
1689
|
+
this.phiSpeeds[k] = this.paramsAt(k * PHASE_BUCKET_MS + PHASE_BUCKET_MS / 2).speed;
|
|
1690
|
+
this.phiPrefix[k + 1] = this.phiPrefix[k] + this.phiSpeeds[k] * (PHASE_BUCKET_MS / 1e3);
|
|
1691
|
+
}
|
|
1692
|
+
s = this.phiSpeeds[b];
|
|
1693
|
+
}
|
|
1694
|
+
return s;
|
|
1695
|
+
}
|
|
1696
|
+
/** ∫ speed dt in seconds — continuous in t, pure (prefix grounds at 0). */
|
|
1697
|
+
phaseAt(t) {
|
|
1698
|
+
if (t <= 0) return 0;
|
|
1699
|
+
const b = Math.floor(t / PHASE_BUCKET_MS);
|
|
1700
|
+
const s = this.bucketSpeed(b);
|
|
1701
|
+
return this.phiPrefix[b] + s * ((t - b * PHASE_BUCKET_MS) / 1e3);
|
|
1702
|
+
}
|
|
1703
|
+
// ---- loop ----
|
|
1634
1704
|
start() {
|
|
1635
1705
|
if (this.frameId !== null || typeof requestAnimationFrame === "undefined") return;
|
|
1636
|
-
this.
|
|
1706
|
+
this.startT = 0;
|
|
1637
1707
|
this.frameId = requestAnimationFrame((now) => this.loop(now));
|
|
1638
1708
|
}
|
|
1639
1709
|
stop() {
|
|
@@ -1644,66 +1714,58 @@ var MystifyInstance = class {
|
|
|
1644
1714
|
}
|
|
1645
1715
|
loop(now) {
|
|
1646
1716
|
this.frameId = requestAnimationFrame((n) => this.loop(n));
|
|
1647
|
-
if (this.
|
|
1648
|
-
|
|
1649
|
-
this.last = now;
|
|
1650
|
-
this.update(dt);
|
|
1651
|
-
this.render();
|
|
1717
|
+
if (this.startT === 0) this.startT = now;
|
|
1718
|
+
this.renderFrame(now - this.startT + this.resumeFrom, this.ctxSaver.seed);
|
|
1652
1719
|
}
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
v.vy = -Math.abs(v.vy);
|
|
1671
|
-
}
|
|
1672
|
-
}
|
|
1720
|
+
renderStill() {
|
|
1721
|
+
const t = this.t === 0 ? 1200 : this.t;
|
|
1722
|
+
this.renderFrame(t, this.ctxSaver.seed);
|
|
1723
|
+
}
|
|
1724
|
+
// ---- draw ----
|
|
1725
|
+
strokeShape(id, phi, alpha, width, hueShift) {
|
|
1726
|
+
const ctx = this.ctx;
|
|
1727
|
+
const sw = Math.max(1, this.w);
|
|
1728
|
+
const sh = Math.max(1, this.h);
|
|
1729
|
+
ctx.strokeStyle = `hsla(${(id.hue + hueShift) % 360}, 90%, 62%, ${alpha.toFixed(3)})`;
|
|
1730
|
+
ctx.lineWidth = width;
|
|
1731
|
+
ctx.beginPath();
|
|
1732
|
+
for (let v = 0; v < id.fx.length; v++) {
|
|
1733
|
+
const x = fold(id.fx[v] * sw + id.vx[v] * phi, sw);
|
|
1734
|
+
const y = fold(id.fy[v] * sh + id.vy[v] * phi, sh);
|
|
1735
|
+
if (v === 0) ctx.moveTo(x, y);
|
|
1736
|
+
else ctx.lineTo(x, y);
|
|
1673
1737
|
}
|
|
1738
|
+
ctx.closePath();
|
|
1739
|
+
ctx.stroke();
|
|
1674
1740
|
}
|
|
1675
|
-
|
|
1741
|
+
/** Pure, frame-addressable render: black field, ghost trail oldest-first,
|
|
1742
|
+
* live outline last. Everything derives from (t, seed, params-at-t). */
|
|
1743
|
+
renderFrame(t, _seed) {
|
|
1744
|
+
this.t = t;
|
|
1745
|
+
const p = this.paramsAt(t);
|
|
1676
1746
|
const ctx = this.ctx;
|
|
1747
|
+
ctx.fillStyle = "#000";
|
|
1748
|
+
ctx.fillRect(0, 0, this.w, this.h);
|
|
1677
1749
|
ctx.lineCap = "round";
|
|
1678
1750
|
ctx.lineJoin = "round";
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
ctx.stroke();
|
|
1751
|
+
const n = Math.max(1, Math.min(MAX_SHAPES, Math.round(p.shapes)));
|
|
1752
|
+
const decay = 0.68 + p.trail * 0.29;
|
|
1753
|
+
const ghosts = Math.min(48, Math.max(1, Math.ceil(Math.log(0.03 / 0.92) / Math.log(decay))));
|
|
1754
|
+
for (let k = ghosts - 1; k >= 0; k--) {
|
|
1755
|
+
const tk = t - k * GHOST_MS;
|
|
1756
|
+
if (tk < 0) continue;
|
|
1757
|
+
const phi = this.phaseAt(tk);
|
|
1758
|
+
const alpha = 0.92 * Math.pow(decay, k);
|
|
1759
|
+
for (let s = 0; s < n; s++) this.strokeShape(this.shapes[s], phi, alpha, p.width, p.hueShift);
|
|
1689
1760
|
}
|
|
1690
1761
|
}
|
|
1691
|
-
render() {
|
|
1692
|
-
this.ctx.fillStyle = `rgba(0,0,0,${TRAIL_ALPHA})`;
|
|
1693
|
-
this.ctx.fillRect(0, 0, this.w, this.h);
|
|
1694
|
-
this.drawShapes();
|
|
1695
|
-
}
|
|
1696
|
-
renderStill() {
|
|
1697
|
-
this.clearFull();
|
|
1698
|
-
this.drawShapes();
|
|
1699
|
-
}
|
|
1700
1762
|
setPaused(paused) {
|
|
1701
1763
|
this.paused = paused;
|
|
1702
1764
|
if (paused) {
|
|
1703
1765
|
this.stop();
|
|
1704
1766
|
this.renderStill();
|
|
1705
1767
|
} else {
|
|
1706
|
-
this.
|
|
1768
|
+
this.resumeFrom = this.t;
|
|
1707
1769
|
this.start();
|
|
1708
1770
|
}
|
|
1709
1771
|
}
|
|
@@ -1712,14 +1774,13 @@ var MystifyInstance = class {
|
|
|
1712
1774
|
this.h = height;
|
|
1713
1775
|
if (dpr !== void 0) this.ctxSaver.dpr = dpr;
|
|
1714
1776
|
this.sizeCanvas();
|
|
1715
|
-
for (const shape of this.shapes) {
|
|
1716
|
-
for (const v of shape.verts) {
|
|
1717
|
-
v.x = Math.min(Math.max(v.x, 0), this.w);
|
|
1718
|
-
v.y = Math.min(Math.max(v.y, 0), this.h);
|
|
1719
|
-
}
|
|
1720
|
-
}
|
|
1721
1777
|
if (this.paused) this.renderStill();
|
|
1722
|
-
|
|
1778
|
+
}
|
|
1779
|
+
applyTrack(track) {
|
|
1780
|
+
this.track = track;
|
|
1781
|
+
this.phiPrefix = [0];
|
|
1782
|
+
this.phiSpeeds = [];
|
|
1783
|
+
if (this.paused) this.renderStill();
|
|
1723
1784
|
}
|
|
1724
1785
|
dispose() {
|
|
1725
1786
|
this.stop();
|
|
@@ -1732,23 +1793,61 @@ var mystify = {
|
|
|
1732
1793
|
manifest: mystifyManifest,
|
|
1733
1794
|
mount: (ctx) => new MystifyInstance(ctx)
|
|
1734
1795
|
};
|
|
1796
|
+
var mystifyDemoTrack = {
|
|
1797
|
+
program: "mystify",
|
|
1798
|
+
seed: 5,
|
|
1799
|
+
duration: 24e3,
|
|
1800
|
+
loop: true,
|
|
1801
|
+
deltas: [
|
|
1802
|
+
{ t: 0, path: "shapes", value: 3 },
|
|
1803
|
+
{ t: 1e4, path: "shapes", value: 6 },
|
|
1804
|
+
{ t: 2e4, path: "shapes", value: 3 },
|
|
1805
|
+
{ t: 0, path: "speed", value: 0.8 },
|
|
1806
|
+
{ t: 12e3, path: "speed", value: 2, ease: "smooth" },
|
|
1807
|
+
{ t: 24e3, path: "speed", value: 0.8, ease: "smooth" },
|
|
1808
|
+
{ t: 0, path: "trail", value: 0.45 },
|
|
1809
|
+
{ t: 12e3, path: "trail", value: 0.85, ease: "smooth" },
|
|
1810
|
+
{ t: 24e3, path: "trail", value: 0.45, ease: "smooth" },
|
|
1811
|
+
{ t: 0, path: "hueShift", value: 0 },
|
|
1812
|
+
{ t: 24e3, path: "hueShift", value: 300, ease: "smooth" }
|
|
1813
|
+
]
|
|
1814
|
+
};
|
|
1735
1815
|
|
|
1736
1816
|
// src/pipes.ts
|
|
1817
|
+
import {
|
|
1818
|
+
sampleTrack as sampleTrack5,
|
|
1819
|
+
defaultParams as defaultParams5
|
|
1820
|
+
} from "@idle-screens/core";
|
|
1821
|
+
var PARAM_SPACE5 = {
|
|
1822
|
+
/** Growth speed multiplier. Sampled at each epoch's start — a run keeps its
|
|
1823
|
+
* pace for its whole life, so the step clock stays a pure function of t. */
|
|
1824
|
+
tempo: { type: "number", default: 1, min: 0.3, max: 3, ease: "smooth" },
|
|
1825
|
+
/** Fraction of the grid a run fills before the screen clears. Sampled per
|
|
1826
|
+
* epoch, like every param here. */
|
|
1827
|
+
density: { type: "number", default: 0.65, min: 0.3, max: 0.9, ease: "smooth" },
|
|
1828
|
+
/** Grid pitch, px. Small cells read as circuitry; large ones as plumbing. */
|
|
1829
|
+
cell: { type: "number", default: 20, min: 10, max: 40, ease: "smooth" },
|
|
1830
|
+
/** Chance a pipe keeps its heading when it can — the classic bias is 0.65.
|
|
1831
|
+
* Low values grow twisty mazes; high values long straight runs. */
|
|
1832
|
+
straightness: { type: "number", default: 0.65, min: 0, max: 0.95, ease: "smooth" },
|
|
1833
|
+
/** Pipe stroke width, px. */
|
|
1834
|
+
thickness: { type: "number", default: 8, min: 3, max: 14, ease: "smooth" }
|
|
1835
|
+
};
|
|
1737
1836
|
var pipesManifest = {
|
|
1738
1837
|
id: "pipes",
|
|
1739
1838
|
label: "Pipes",
|
|
1839
|
+
timeModel: "closed-form",
|
|
1740
1840
|
passthrough: false,
|
|
1741
1841
|
minBackend: "canvas2d",
|
|
1742
1842
|
costTier: "low",
|
|
1743
1843
|
motionIntensity: "moderate",
|
|
1744
1844
|
reducedMotionFallback: "static",
|
|
1845
|
+
paramSpace: PARAM_SPACE5,
|
|
1745
1846
|
a11y: { flashSafe: true },
|
|
1746
1847
|
workerReady: true
|
|
1747
1848
|
};
|
|
1748
|
-
var
|
|
1749
|
-
var
|
|
1750
|
-
var STEPS_PER_FRAME = 3;
|
|
1751
|
-
var FILL_THRESHOLD = 0.65;
|
|
1849
|
+
var STEP_MS = 1e3 / 180;
|
|
1850
|
+
var PLAN_CACHE = 4;
|
|
1752
1851
|
var PALETTE = ["#c0392b", "#2980b9", "#27ae60", "#f39c12", "#8e44ad", "#d4a259", "#7f8c8d"];
|
|
1753
1852
|
var DX = { 0: 1, 1: 0, 2: -1, 3: 0 };
|
|
1754
1853
|
var DY = { 0: 0, 1: 1, 2: 0, 3: -1 };
|
|
@@ -1758,17 +1857,31 @@ var PipesInstance = class {
|
|
|
1758
1857
|
ctx;
|
|
1759
1858
|
w = 0;
|
|
1760
1859
|
h = 0;
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1860
|
+
/** Prefix-sum of epoch start times (ms); index i = epoch i's start. */
|
|
1861
|
+
epochStarts = [];
|
|
1862
|
+
/** Step counts per compiled-at-least-once epoch (start + count = summary). */
|
|
1863
|
+
epochSteps = [];
|
|
1864
|
+
plans = /* @__PURE__ */ new Map();
|
|
1865
|
+
track = null;
|
|
1866
|
+
baseParams = defaultParams5(PARAM_SPACE5);
|
|
1867
|
+
/** What the canvas currently shows: epoch index + steps drawn. -1 = dirty. */
|
|
1868
|
+
paintedEpoch = -1;
|
|
1869
|
+
paintedSteps = 0;
|
|
1767
1870
|
frameId = null;
|
|
1768
1871
|
paused = false;
|
|
1872
|
+
startT = 0;
|
|
1873
|
+
/** Logical time the next rAF origin resumes from.
|
|
1874
|
+
*
|
|
1875
|
+
* `start()` re-anchors `startT` to the next frame's timestamp, so on its own
|
|
1876
|
+
* `now - startT` always begins at zero. Mount wants that; resuming from a
|
|
1877
|
+
* pause does not — without carrying the frozen `t` forward, every
|
|
1878
|
+
* pause/resume (and every reduced-motion toggle) snaps the scene back to its
|
|
1879
|
+
* opening frame and restarts any applied control track. Set only in
|
|
1880
|
+
* `setPaused(false)`, so first mount still starts at 0. */
|
|
1881
|
+
resumeFrom = 0;
|
|
1882
|
+
t = 0;
|
|
1769
1883
|
constructor(ctx) {
|
|
1770
1884
|
this.ctxSaver = ctx;
|
|
1771
|
-
this.rng = ctx.rng;
|
|
1772
1885
|
let canvas;
|
|
1773
1886
|
if (ctx.surface) {
|
|
1774
1887
|
canvas = ctx.surface;
|
|
@@ -1798,121 +1911,171 @@ var PipesInstance = class {
|
|
|
1798
1911
|
this.ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
1799
1912
|
}
|
|
1800
1913
|
rebuild() {
|
|
1801
|
-
this.
|
|
1802
|
-
this.
|
|
1803
|
-
this.
|
|
1804
|
-
this.
|
|
1805
|
-
this.
|
|
1914
|
+
this.epochStarts = [];
|
|
1915
|
+
this.epochSteps = [];
|
|
1916
|
+
this.plans.clear();
|
|
1917
|
+
this.paintedEpoch = -1;
|
|
1918
|
+
this.paintedSteps = 0;
|
|
1806
1919
|
this.paintBackground();
|
|
1807
1920
|
}
|
|
1808
1921
|
paintBackground() {
|
|
1809
1922
|
this.ctx.fillStyle = "#111";
|
|
1810
1923
|
this.ctx.fillRect(0, 0, this.w, this.h);
|
|
1811
1924
|
}
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
if (!this.grid[i]) empty.push(i);
|
|
1822
|
-
}
|
|
1823
|
-
if (empty.length === 0) {
|
|
1824
|
-
this.clearGrid();
|
|
1825
|
-
return;
|
|
1925
|
+
// ---- the compiled plan ----
|
|
1926
|
+
/** Params at `t` — track-driven when a track is applied, defaults otherwise. */
|
|
1927
|
+
paramsAt(t) {
|
|
1928
|
+
if (!this.track) return this.baseParams;
|
|
1929
|
+
const p = sampleTrack5(PARAM_SPACE5, this.track, t);
|
|
1930
|
+
const out = { ...this.baseParams };
|
|
1931
|
+
for (const k of Object.keys(PARAM_SPACE5)) {
|
|
1932
|
+
const v = p[k];
|
|
1933
|
+
if (typeof v === "number") out[k] = v;
|
|
1826
1934
|
}
|
|
1827
|
-
|
|
1828
|
-
const col = cell % this.cols;
|
|
1829
|
-
const row = Math.floor(cell / this.cols);
|
|
1830
|
-
this.pipe = {
|
|
1831
|
-
col,
|
|
1832
|
-
row,
|
|
1833
|
-
dir: this.rng.int(0, 3),
|
|
1834
|
-
color: this.rng.pick(PALETTE)
|
|
1835
|
-
};
|
|
1836
|
-
this.grid[cell] = true;
|
|
1837
|
-
this.filled++;
|
|
1838
|
-
this.drawJoint(col, row, this.pipe.color);
|
|
1839
|
-
}
|
|
1840
|
-
clearGrid() {
|
|
1841
|
-
this.grid.fill(false);
|
|
1842
|
-
this.filled = 0;
|
|
1843
|
-
this.pipe = null;
|
|
1844
|
-
this.paintBackground();
|
|
1935
|
+
return out;
|
|
1845
1936
|
}
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
const
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
const
|
|
1861
|
-
const
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1937
|
+
/**
|
|
1938
|
+
* Compile one epoch's full growth history. Pure in (seed, epoch, cols,
|
|
1939
|
+
* rows, params-at-epoch-start): the rng is an epoch-keyed fork, and the
|
|
1940
|
+
* walk is exactly the old per-frame algorithm — spawn on an empty cell,
|
|
1941
|
+
* grow with a 0.65 bias to continue straight, die when boxed in, stop at
|
|
1942
|
+
* the fill threshold. tempo/density are sampled once at the epoch's start,
|
|
1943
|
+
* so a run keeps its pace and appetite for its whole life.
|
|
1944
|
+
*/
|
|
1945
|
+
compileEpoch(epoch, start) {
|
|
1946
|
+
const p = this.paramsAt(start);
|
|
1947
|
+
const rng = this.ctxSaver.rng.fork(596453 + epoch * 7919);
|
|
1948
|
+
const cell = Math.max(6, p.cell);
|
|
1949
|
+
const cols = Math.max(2, Math.floor(this.w / cell));
|
|
1950
|
+
const rows = Math.max(2, Math.floor(this.h / cell));
|
|
1951
|
+
const size = cols * rows;
|
|
1952
|
+
const grid = new Uint8Array(size);
|
|
1953
|
+
let filled = 0;
|
|
1954
|
+
let pipe = null;
|
|
1955
|
+
const steps = [];
|
|
1956
|
+
while (filled / size <= p.density) {
|
|
1957
|
+
if (!pipe) {
|
|
1958
|
+
const empty = [];
|
|
1959
|
+
for (let i = 0; i < size; i++) if (!grid[i]) empty.push(i);
|
|
1960
|
+
if (empty.length === 0) break;
|
|
1961
|
+
const at = rng.pick(empty);
|
|
1962
|
+
const col = at % cols;
|
|
1963
|
+
const row = Math.floor(at / cols);
|
|
1964
|
+
pipe = { col, row, dir: rng.int(0, 3), color: PALETTE.indexOf(rng.pick(PALETTE)) };
|
|
1965
|
+
grid[at] = 1;
|
|
1966
|
+
filled++;
|
|
1967
|
+
steps.push({ kind: "spawn", col, row, c2: -1, r2: -1, turn: false, color: pipe.color });
|
|
1968
|
+
continue;
|
|
1969
|
+
}
|
|
1970
|
+
const candidates = [];
|
|
1971
|
+
for (let d = 0; d < 4; d++) {
|
|
1972
|
+
const nc2 = pipe.col + DX[d];
|
|
1973
|
+
const nr2 = pipe.row + DY[d];
|
|
1974
|
+
if (nc2 >= 0 && nc2 < cols && nr2 >= 0 && nr2 < rows && !grid[nr2 * cols + nc2]) {
|
|
1975
|
+
candidates.push(d);
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
const pool = candidates.includes(pipe.dir) && rng.next() < p.straightness ? [pipe.dir] : candidates;
|
|
1979
|
+
if (pool.length === 0) {
|
|
1980
|
+
pipe = null;
|
|
1981
|
+
steps.push({ kind: "end", col: -1, row: -1, c2: -1, r2: -1, turn: false, color: -1 });
|
|
1982
|
+
continue;
|
|
1983
|
+
}
|
|
1984
|
+
const newDir = rng.pick(pool);
|
|
1985
|
+
const turn = newDir !== pipe.dir;
|
|
1986
|
+
const nc = pipe.col + DX[newDir];
|
|
1987
|
+
const nr = pipe.row + DY[newDir];
|
|
1988
|
+
steps.push({ kind: "seg", col: pipe.col, row: pipe.row, c2: nc, r2: nr, turn, color: pipe.color });
|
|
1989
|
+
pipe.col = nc;
|
|
1990
|
+
pipe.row = nr;
|
|
1991
|
+
pipe.dir = newDir;
|
|
1992
|
+
grid[nr * cols + nc] = 1;
|
|
1993
|
+
filled++;
|
|
1870
1994
|
}
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1995
|
+
return {
|
|
1996
|
+
steps,
|
|
1997
|
+
stepMs: STEP_MS / Math.max(0.05, p.tempo),
|
|
1998
|
+
cell,
|
|
1999
|
+
thickness: Math.min(p.thickness, cell * 0.7),
|
|
2000
|
+
cols,
|
|
2001
|
+
rows
|
|
2002
|
+
};
|
|
1875
2003
|
}
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
2004
|
+
/** The plan for an epoch, via the small cache. Recompiles are bit-identical. */
|
|
2005
|
+
planFor(epoch, start) {
|
|
2006
|
+
let plan = this.plans.get(epoch);
|
|
2007
|
+
if (!plan) {
|
|
2008
|
+
plan = this.compileEpoch(epoch, start);
|
|
2009
|
+
this.plans.set(epoch, plan);
|
|
2010
|
+
if (this.plans.size > PLAN_CACHE) {
|
|
2011
|
+
let worst = epoch;
|
|
2012
|
+
let worstD = -1;
|
|
2013
|
+
for (const k of this.plans.keys()) {
|
|
2014
|
+
const d = Math.abs(k - epoch);
|
|
2015
|
+
if (d > worstD) {
|
|
2016
|
+
worstD = d;
|
|
2017
|
+
worst = k;
|
|
2018
|
+
}
|
|
2019
|
+
}
|
|
2020
|
+
this.plans.delete(worst);
|
|
1883
2021
|
}
|
|
1884
2022
|
}
|
|
1885
|
-
if (
|
|
1886
|
-
|
|
2023
|
+
if (this.epochSteps.length === epoch) this.epochSteps.push(plan.steps.length);
|
|
2024
|
+
return plan;
|
|
2025
|
+
}
|
|
2026
|
+
/** Epoch containing `t`, extending the prefix sum as needed. */
|
|
2027
|
+
epochAt(t) {
|
|
2028
|
+
if (this.epochStarts.length === 0) this.epochStarts.push(0);
|
|
2029
|
+
let e = 0;
|
|
2030
|
+
for (e = this.epochStarts.length - 1; e > 0; e--) {
|
|
2031
|
+
if (t >= this.epochStarts[e]) break;
|
|
2032
|
+
}
|
|
2033
|
+
for (; ; ) {
|
|
2034
|
+
const start = this.epochStarts[e];
|
|
2035
|
+
const plan = this.planFor(e, start);
|
|
2036
|
+
const dur = Math.max(1, plan.steps.length) * plan.stepMs;
|
|
2037
|
+
if (t < start + dur) return { epoch: e, start, plan };
|
|
2038
|
+
if (this.epochStarts.length === e + 1) this.epochStarts.push(start + dur);
|
|
2039
|
+
e++;
|
|
1887
2040
|
}
|
|
1888
|
-
return out;
|
|
1889
|
-
}
|
|
1890
|
-
cellCenter(col, row) {
|
|
1891
|
-
return [col * CELL + CELL / 2, row * CELL + CELL / 2];
|
|
1892
2041
|
}
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
2042
|
+
// ---- drawing (identical marks to the accumulative version; geometry from
|
|
2043
|
+
// the epoch's own plan, since cell/thickness are epoch-sampled params) ----
|
|
2044
|
+
drawSegment(plan, c1, r1, c2, r2, color) {
|
|
2045
|
+
const half = plan.cell / 2;
|
|
1896
2046
|
const ctx = this.ctx;
|
|
1897
2047
|
ctx.strokeStyle = color;
|
|
1898
|
-
ctx.lineWidth =
|
|
2048
|
+
ctx.lineWidth = plan.thickness;
|
|
1899
2049
|
ctx.lineCap = "round";
|
|
1900
2050
|
ctx.beginPath();
|
|
1901
|
-
ctx.moveTo(
|
|
1902
|
-
ctx.lineTo(
|
|
2051
|
+
ctx.moveTo(c1 * plan.cell + half, r1 * plan.cell + half);
|
|
2052
|
+
ctx.lineTo(c2 * plan.cell + half, r2 * plan.cell + half);
|
|
1903
2053
|
ctx.stroke();
|
|
1904
2054
|
}
|
|
1905
|
-
drawJoint(col, row, color) {
|
|
1906
|
-
const
|
|
2055
|
+
drawJoint(plan, col, row, color) {
|
|
2056
|
+
const half = plan.cell / 2;
|
|
1907
2057
|
const ctx = this.ctx;
|
|
1908
2058
|
ctx.fillStyle = color;
|
|
1909
2059
|
ctx.beginPath();
|
|
1910
|
-
ctx.arc(
|
|
2060
|
+
ctx.arc(col * plan.cell + half, row * plan.cell + half, plan.thickness * 0.65, 0, Math.PI * 2);
|
|
1911
2061
|
ctx.fill();
|
|
1912
2062
|
}
|
|
2063
|
+
drawSteps(plan, from, to) {
|
|
2064
|
+
for (let i = from; i < to; i++) {
|
|
2065
|
+
const s = plan.steps[i];
|
|
2066
|
+
if (s.kind === "spawn") {
|
|
2067
|
+
this.drawJoint(plan, s.col, s.row, PALETTE[s.color]);
|
|
2068
|
+
} else if (s.kind === "seg") {
|
|
2069
|
+
this.drawSegment(plan, s.col, s.row, s.c2, s.r2, PALETTE[s.color]);
|
|
2070
|
+
if (s.turn) this.drawJoint(plan, s.col, s.row, PALETTE[s.color]);
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
// ---- loop ----
|
|
1913
2075
|
start() {
|
|
1914
2076
|
if (this.frameId !== null || typeof requestAnimationFrame === "undefined") return;
|
|
1915
|
-
this.
|
|
2077
|
+
this.startT = 0;
|
|
2078
|
+
this.frameId = requestAnimationFrame((now) => this.loop(now));
|
|
1916
2079
|
}
|
|
1917
2080
|
stop() {
|
|
1918
2081
|
if (this.frameId !== null) {
|
|
@@ -1920,22 +2083,53 @@ var PipesInstance = class {
|
|
|
1920
2083
|
this.frameId = null;
|
|
1921
2084
|
}
|
|
1922
2085
|
}
|
|
1923
|
-
loop() {
|
|
1924
|
-
this.frameId = requestAnimationFrame(() => this.loop());
|
|
1925
|
-
|
|
2086
|
+
loop(now) {
|
|
2087
|
+
this.frameId = requestAnimationFrame((n) => this.loop(n));
|
|
2088
|
+
if (this.startT === 0) this.startT = now;
|
|
2089
|
+
this.renderFrame(now - this.startT + this.resumeFrom, this.ctxSaver.seed);
|
|
1926
2090
|
}
|
|
1927
2091
|
renderStill() {
|
|
1928
|
-
this.
|
|
1929
|
-
|
|
2092
|
+
const t = this.t === 0 ? 80 * STEP_MS : this.t;
|
|
2093
|
+
this.renderFrame(t, this.ctxSaver.seed);
|
|
2094
|
+
}
|
|
2095
|
+
/**
|
|
2096
|
+
* Pure, frame-addressable render: the canvas after this call is a function
|
|
2097
|
+
* of (t, seed, size) only. Forward motion within an epoch appends new
|
|
2098
|
+
* steps; anything else repaints and replays the prefix.
|
|
2099
|
+
*/
|
|
2100
|
+
renderFrame(t, _seed) {
|
|
2101
|
+
this.t = t;
|
|
2102
|
+
const { epoch, start, plan } = this.epochAt(Math.max(0, t));
|
|
2103
|
+
const stepsDone = Math.min(plan.steps.length, Math.floor((t - start) / plan.stepMs));
|
|
2104
|
+
if (epoch === this.paintedEpoch && stepsDone >= this.paintedSteps) {
|
|
2105
|
+
this.drawSteps(plan, this.paintedSteps, stepsDone);
|
|
2106
|
+
} else {
|
|
2107
|
+
this.paintBackground();
|
|
2108
|
+
this.drawSteps(plan, 0, stepsDone);
|
|
2109
|
+
}
|
|
2110
|
+
this.paintedEpoch = epoch;
|
|
2111
|
+
this.paintedSteps = stepsDone;
|
|
1930
2112
|
}
|
|
1931
2113
|
setPaused(paused) {
|
|
1932
2114
|
this.paused = paused;
|
|
1933
2115
|
if (paused) {
|
|
1934
2116
|
this.stop();
|
|
2117
|
+
this.renderStill();
|
|
1935
2118
|
} else {
|
|
2119
|
+
this.resumeFrom = this.t;
|
|
1936
2120
|
this.start();
|
|
1937
2121
|
}
|
|
1938
2122
|
}
|
|
2123
|
+
applyTrack(track) {
|
|
2124
|
+
this.track = track;
|
|
2125
|
+
this.epochStarts = [];
|
|
2126
|
+
this.epochSteps = [];
|
|
2127
|
+
this.plans.clear();
|
|
2128
|
+
this.paintedEpoch = -1;
|
|
2129
|
+
this.paintedSteps = 0;
|
|
2130
|
+
this.paintBackground();
|
|
2131
|
+
if (this.paused) this.renderStill();
|
|
2132
|
+
}
|
|
1939
2133
|
resize(width, height, dpr) {
|
|
1940
2134
|
this.w = width;
|
|
1941
2135
|
this.h = height;
|
|
@@ -1953,11 +2147,25 @@ var pipes = {
|
|
|
1953
2147
|
manifest: pipesManifest,
|
|
1954
2148
|
mount: (ctx) => new PipesInstance(ctx)
|
|
1955
2149
|
};
|
|
2150
|
+
var pipesDemoTrack = {
|
|
2151
|
+
program: "pipes",
|
|
2152
|
+
seed: 7,
|
|
2153
|
+
duration: 3e4,
|
|
2154
|
+
loop: true,
|
|
2155
|
+
deltas: [
|
|
2156
|
+
{ t: 0, path: "tempo", value: 0.8 },
|
|
2157
|
+
{ t: 15e3, path: "tempo", value: 2.4, ease: "smooth" },
|
|
2158
|
+
{ t: 3e4, path: "tempo", value: 0.8, ease: "smooth" },
|
|
2159
|
+
{ t: 0, path: "density", value: 0.55 },
|
|
2160
|
+
{ t: 15e3, path: "density", value: 0.8, ease: "smooth" },
|
|
2161
|
+
{ t: 3e4, path: "density", value: 0.55, ease: "smooth" }
|
|
2162
|
+
]
|
|
2163
|
+
};
|
|
1956
2164
|
|
|
1957
2165
|
// src/flurry.ts
|
|
1958
2166
|
import {
|
|
1959
|
-
sampleTrack as
|
|
1960
|
-
defaultParams as
|
|
2167
|
+
sampleTrack as sampleTrack6,
|
|
2168
|
+
defaultParams as defaultParams6
|
|
1961
2169
|
} from "@idle-screens/core";
|
|
1962
2170
|
var STREAM_COUNT = 5;
|
|
1963
2171
|
var PARTICLES_PER_ARM = 56;
|
|
@@ -1967,7 +2175,7 @@ var TRAIL_FRAC_MIN = 0.12;
|
|
|
1967
2175
|
var TRAIL_FRAC_MAX = 0.42;
|
|
1968
2176
|
var TAIL_SIZE_FLOOR = 0.45;
|
|
1969
2177
|
var TAIL_ALPHA_POWER = 1.4;
|
|
1970
|
-
var
|
|
2178
|
+
var PARAM_SPACE6 = {
|
|
1971
2179
|
/** Arm count. Build-time: rebuilt (deterministically, from the same seeded
|
|
1972
2180
|
* RNG forks) whenever this changes rather than smoothly animated — more
|
|
1973
2181
|
* arms means re-deriving the whole cast, not interpolating between two. */
|
|
@@ -1986,12 +2194,13 @@ var PARAM_SPACE4 = {
|
|
|
1986
2194
|
var flurryManifest = {
|
|
1987
2195
|
id: "flurry",
|
|
1988
2196
|
label: "Flurry",
|
|
2197
|
+
timeModel: "closed-form",
|
|
1989
2198
|
passthrough: false,
|
|
1990
2199
|
minBackend: "canvas2d",
|
|
1991
2200
|
costTier: "low",
|
|
1992
2201
|
motionIntensity: "calm",
|
|
1993
2202
|
reducedMotionFallback: "static",
|
|
1994
|
-
paramSpace:
|
|
2203
|
+
paramSpace: PARAM_SPACE6,
|
|
1995
2204
|
a11y: {
|
|
1996
2205
|
flashSafe: true,
|
|
1997
2206
|
notes: "Softly glowing arms drifting on black. The spectrum palette rotates hue over ~20s; no flashing."
|
|
@@ -2053,7 +2262,7 @@ var FlurryInstance = class {
|
|
|
2053
2262
|
resumeFrom = 0;
|
|
2054
2263
|
t = STILL_T;
|
|
2055
2264
|
// anchor frame until the loop (or a seek) moves it
|
|
2056
|
-
params =
|
|
2265
|
+
params = defaultParams6(PARAM_SPACE6);
|
|
2057
2266
|
track = null;
|
|
2058
2267
|
constructor(ctx) {
|
|
2059
2268
|
this.ctxSaver = ctx;
|
|
@@ -2082,8 +2291,8 @@ var FlurryInstance = class {
|
|
|
2082
2291
|
}
|
|
2083
2292
|
}
|
|
2084
2293
|
applyParams(t) {
|
|
2085
|
-
const p = this.track ?
|
|
2086
|
-
for (const k of Object.keys(
|
|
2294
|
+
const p = this.track ? sampleTrack6(PARAM_SPACE6, this.track, t) : this.params;
|
|
2295
|
+
for (const k of Object.keys(PARAM_SPACE6)) {
|
|
2087
2296
|
const v = p[k];
|
|
2088
2297
|
if (v !== void 0) this.params[k] = v;
|
|
2089
2298
|
}
|
|
@@ -2998,6 +3207,7 @@ function gpuMainThreadEligible(ctx) {
|
|
|
2998
3207
|
var fluidManifest = {
|
|
2999
3208
|
id: "fluid",
|
|
3000
3209
|
label: "Fluid",
|
|
3210
|
+
timeModel: "simulated",
|
|
3001
3211
|
passthrough: false,
|
|
3002
3212
|
minBackend: "canvas2d",
|
|
3003
3213
|
costTier: "low",
|
|
@@ -3754,6 +3964,7 @@ var ReactionDiffusionGPU = class {
|
|
|
3754
3964
|
var reactionDiffusionManifest = {
|
|
3755
3965
|
id: "reaction-diffusion",
|
|
3756
3966
|
label: "Reaction Diffusion",
|
|
3967
|
+
timeModel: "simulated",
|
|
3757
3968
|
passthrough: false,
|
|
3758
3969
|
minBackend: "canvas2d",
|
|
3759
3970
|
costTier: "low",
|
|
@@ -3926,8 +4137,8 @@ var reactionDiffusion = {
|
|
|
3926
4137
|
|
|
3927
4138
|
// src/messages.ts
|
|
3928
4139
|
import {
|
|
3929
|
-
sampleTrack as
|
|
3930
|
-
defaultParams as
|
|
4140
|
+
sampleTrack as sampleTrack7,
|
|
4141
|
+
defaultParams as defaultParams7
|
|
3931
4142
|
} from "@idle-screens/core";
|
|
3932
4143
|
var PHRASES = {
|
|
3933
4144
|
"out-to-lunch": "OUT TO LUNCH",
|
|
@@ -3936,7 +4147,7 @@ var PHRASES = {
|
|
|
3936
4147
|
"gone-idle": "gone idle \u2014 leave a message",
|
|
3937
4148
|
"ship-it": "SHIP IT IN THE MORNING"
|
|
3938
4149
|
};
|
|
3939
|
-
var
|
|
4150
|
+
var PARAM_SPACE7 = {
|
|
3940
4151
|
/** Which line the screen mutters. */
|
|
3941
4152
|
phrase: { type: "enum", default: "out-to-lunch", options: Object.keys(PHRASES) },
|
|
3942
4153
|
/** 'marquee' = the Out-to-Lunch crawl (steps down the page);
|
|
@@ -3954,12 +4165,13 @@ var PARAM_SPACE5 = {
|
|
|
3954
4165
|
var messagesManifest = {
|
|
3955
4166
|
id: "messages",
|
|
3956
4167
|
label: "Messages",
|
|
4168
|
+
timeModel: "closed-form",
|
|
3957
4169
|
passthrough: false,
|
|
3958
4170
|
minBackend: "canvas2d",
|
|
3959
4171
|
costTier: "low",
|
|
3960
4172
|
motionIntensity: "calm",
|
|
3961
4173
|
reducedMotionFallback: "static",
|
|
3962
|
-
paramSpace:
|
|
4174
|
+
paramSpace: PARAM_SPACE7,
|
|
3963
4175
|
attribution: {
|
|
3964
4176
|
source: 'After Dark "Messages" \u2014 concepts by Berkeley Systems',
|
|
3965
4177
|
license: "MIT port; reference CSS MIT (Bryan Braun)",
|
|
@@ -3982,7 +4194,7 @@ var MessagesInstance = class {
|
|
|
3982
4194
|
paused = false;
|
|
3983
4195
|
startT = 0;
|
|
3984
4196
|
t = 0;
|
|
3985
|
-
params =
|
|
4197
|
+
params = defaultParams7(PARAM_SPACE7);
|
|
3986
4198
|
track = null;
|
|
3987
4199
|
constructor(ctx) {
|
|
3988
4200
|
this.ctxSaver = ctx;
|
|
@@ -4005,8 +4217,8 @@ var MessagesInstance = class {
|
|
|
4005
4217
|
else this.start();
|
|
4006
4218
|
}
|
|
4007
4219
|
applyParams(t) {
|
|
4008
|
-
const p = this.track ?
|
|
4009
|
-
for (const k of Object.keys(
|
|
4220
|
+
const p = this.track ? sampleTrack7(PARAM_SPACE7, this.track, t) : this.params;
|
|
4221
|
+
for (const k of Object.keys(PARAM_SPACE7)) {
|
|
4010
4222
|
const v = p[k];
|
|
4011
4223
|
if (v !== void 0) this.params[k] = v;
|
|
4012
4224
|
}
|
|
@@ -4153,7 +4365,9 @@ export {
|
|
|
4153
4365
|
globeDemoTrack,
|
|
4154
4366
|
spotlight,
|
|
4155
4367
|
mystify,
|
|
4368
|
+
mystifyDemoTrack,
|
|
4156
4369
|
pipes,
|
|
4370
|
+
pipesDemoTrack,
|
|
4157
4371
|
flurry,
|
|
4158
4372
|
flurryDemoTrack,
|
|
4159
4373
|
fluid,
|
|
@@ -4161,4 +4375,4 @@ export {
|
|
|
4161
4375
|
messages,
|
|
4162
4376
|
messagesDemoTrack
|
|
4163
4377
|
};
|
|
4164
|
-
//# sourceMappingURL=chunk-
|
|
4378
|
+
//# sourceMappingURL=chunk-GVD3Q4LE.js.map
|