@pixerate/editor 0.136.0 → 0.137.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/animation-editor/index.cjs +60 -55
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +4 -4
- package/dist/animation-editor/index.d.ts +4 -4
- package/dist/animation-editor/index.js +7 -2
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/{bezier-CdccFsF8.d.cts → bezier-CZ2AhjID.d.cts} +1 -1
- package/dist/{bezier-DG9qNZQV.d.ts → bezier-Dywv3Bw8.d.ts} +1 -1
- package/dist/blending-D7jCmjO6.d.cts +1026 -0
- package/dist/blending-NgF3qo3d.d.ts +1026 -0
- package/dist/brushes-CnvZSYYU.d.cts +744 -0
- package/dist/brushes-DJmUbIgz.d.ts +744 -0
- package/dist/{brushstrokeRender-SII6MG4R.js → brushstrokeRender-2FAXA3XC.js} +13 -16
- package/dist/{brushstrokeRender-SII6MG4R.js.map → brushstrokeRender-2FAXA3XC.js.map} +1 -1
- package/dist/{brushstrokeRender-JNHVEUFG.cjs → brushstrokeRender-IMFY3FF6.cjs} +16 -19
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +1 -0
- package/dist/canvas/index.cjs +10 -10
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +7 -7
- package/dist/canvas/index.d.ts +7 -7
- package/dist/canvas/index.js +4 -4
- package/dist/{chunk-W4LNKTHT.cjs → chunk-2XS6LTUP.cjs} +63 -63
- package/dist/{chunk-W4LNKTHT.cjs.map → chunk-2XS6LTUP.cjs.map} +1 -1
- package/dist/{chunk-MAHQC3SK.js → chunk-3D77LOBM.js} +222 -135
- package/dist/chunk-3D77LOBM.js.map +1 -0
- package/dist/{chunk-BR7EKQUP.js → chunk-3G6J7UFV.js} +322 -2
- package/dist/chunk-3G6J7UFV.js.map +1 -0
- package/dist/{chunk-62XUO5LB.js → chunk-3X6IAJUQ.js} +2 -2
- package/dist/{chunk-EM3FMJWE.js → chunk-5FSRTP6E.js} +320 -3
- package/dist/chunk-5FSRTP6E.js.map +1 -0
- package/dist/{chunk-2R3UW57U.cjs → chunk-5OOIUXNJ.cjs} +333 -246
- package/dist/chunk-5OOIUXNJ.cjs.map +1 -0
- package/dist/{chunk-KZXLZCQ7.js → chunk-6S6362D2.js} +2 -2
- package/dist/{chunk-24ATT2PE.cjs → chunk-AEAAN4AD.cjs} +120 -120
- package/dist/{chunk-24ATT2PE.cjs.map → chunk-AEAAN4AD.cjs.map} +1 -1
- package/dist/{chunk-SVYE5HIM.js → chunk-EQQMGO42.js} +2 -2
- package/dist/{chunk-FHPVDTI2.cjs → chunk-F2Y4E4GU.cjs} +22 -22
- package/dist/{chunk-FHPVDTI2.cjs.map → chunk-F2Y4E4GU.cjs.map} +1 -1
- package/dist/{chunk-UYQUPUR6.js → chunk-HUO3TI4C.js} +3 -3
- package/dist/{chunk-DDSO4HS7.cjs → chunk-KEENUAFN.cjs} +2 -2
- package/dist/{chunk-DDSO4HS7.cjs.map → chunk-KEENUAFN.cjs.map} +1 -1
- package/dist/{chunk-2HC4DRF4.js → chunk-LLFHCSU2.js} +2 -2
- package/dist/{chunk-J5BA3BQ6.cjs → chunk-O7LUD7MH.cjs} +323 -3
- package/dist/chunk-O7LUD7MH.cjs.map +1 -0
- package/dist/{chunk-ILYFOJUN.js → chunk-OIBIRXRG.js} +3 -3
- package/dist/{chunk-B2CUCM7Y.cjs → chunk-PRSRYHQD.cjs} +36 -36
- package/dist/{chunk-B2CUCM7Y.cjs.map → chunk-PRSRYHQD.cjs.map} +1 -1
- package/dist/{chunk-6GFRKLLS.cjs → chunk-QBWEH3IM.cjs} +429 -112
- package/dist/chunk-QBWEH3IM.cjs.map +1 -0
- package/dist/{chunk-6QQR4LKE.js → chunk-SYT2TLQF.js} +35 -37
- package/dist/{chunk-6QQR4LKE.js.map → chunk-SYT2TLQF.js.map} +1 -1
- package/dist/{chunk-YT3JL7YM.cjs → chunk-TLCTTQFF.cjs} +53 -53
- package/dist/{chunk-YT3JL7YM.cjs.map → chunk-TLCTTQFF.cjs.map} +1 -1
- package/dist/{chunk-JLGNZMUV.cjs → chunk-XN2NBLV5.cjs} +313 -315
- package/dist/chunk-XN2NBLV5.cjs.map +1 -0
- package/dist/effects/index.d.cts +4 -4
- package/dist/effects/index.d.ts +4 -4
- package/dist/{export-Ds7zgGD8.d.ts → export-41rL6Cne.d.ts} +1 -1
- package/dist/{export-BOheWw2R.d.cts → export-CyJdfP_Z.d.cts} +5 -4
- package/dist/{export-CEYeRQXH.d.cts → export-D9mXp05Q.d.cts} +1 -1
- package/dist/{export-ByKKIA2S.d.ts → export-DwnZ_hvQ.d.ts} +5 -4
- package/dist/{helpers--ns3W2D7.d.ts → helpers-C-RgeyvH.d.ts} +18 -7
- package/dist/{helpers-BVkU4oUi.d.cts → helpers-v6GMazzg.d.cts} +18 -7
- package/dist/image-editor/index.cjs +984 -987
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +12 -11
- package/dist/image-editor/index.d.ts +12 -11
- package/dist/image-editor/index.js +92 -95
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-yi-Kz4ND.d.cts → opentype-KR_jj6b_.d.cts} +1 -1
- package/dist/{opentype-DfoVYgmG.d.ts → opentype-a1KAW-qs.d.ts} +1 -1
- package/dist/paint/index.cjs +5 -8
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +4 -2
- package/dist/paint/index.d.ts +4 -2
- package/dist/paint/index.js +15 -18
- package/dist/paint-editor/index.cjs +403 -404
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +12 -748
- package/dist/paint-editor/index.d.ts +12 -748
- package/dist/paint-editor/index.js +77 -78
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/{pathfinder-7JkMwYvC.d.cts → pathfinder-BHS4vQNm.d.cts} +1 -1
- package/dist/{pathfinder-GM3UWdBZ.d.ts → pathfinder-BVvTIBMo.d.ts} +1 -1
- package/dist/{pool-CkTxlLMC.d.ts → pool-CZQOrSXZ.d.ts} +1 -1
- package/dist/{pool-04qp8iW4.d.cts → pool-FjZZmZ80.d.cts} +1 -1
- package/dist/rand-8xbUb6ur.d.ts +1118 -0
- package/dist/rand-Cw9VLrVC.d.cts +1118 -0
- package/dist/raster/index.cjs +17 -19
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.js +9 -11
- package/dist/raster/index.js.map +1 -1
- package/dist/{svg-rV6_HPmn.d.ts → svg-CSz3mzkw.d.ts} +2 -2
- package/dist/{svg-BDDKvWWY.d.cts → svg-DTb40ICU.d.cts} +2 -2
- package/dist/{tools-DPYerqeR.d.ts → tools-B0wXP5cF.d.ts} +1 -1
- package/dist/{tools-BAjSbTdY.d.cts → tools-Ca0kI1qo.d.cts} +1 -1
- package/dist/vector/index.cjs +1459 -1259
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +87 -11
- package/dist/vector/index.d.ts +87 -11
- package/dist/vector/index.js +213 -13
- package/dist/vector/index.js.map +1 -1
- package/dist/video-editor/index.d.cts +4 -4
- package/dist/video-editor/index.d.ts +4 -4
- package/dist/{warp-DQh9R7Ie.d.cts → warp-DTOp0lON.d.cts} +1 -1
- package/dist/{warp-XVL6SpSh.d.ts → warp-pd7hrH4T.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +8 -0
- package/dist/brushstrokeRender-JNHVEUFG.cjs.map +0 -1
- package/dist/chunk-2R3UW57U.cjs.map +0 -1
- package/dist/chunk-64PYNEHJ.js +0 -340
- package/dist/chunk-64PYNEHJ.js.map +0 -1
- package/dist/chunk-6GFRKLLS.cjs.map +0 -1
- package/dist/chunk-7QN76ESJ.js +0 -323
- package/dist/chunk-7QN76ESJ.js.map +0 -1
- package/dist/chunk-BR7EKQUP.js.map +0 -1
- package/dist/chunk-DCLJNVZS.cjs +0 -323
- package/dist/chunk-DCLJNVZS.cjs.map +0 -1
- package/dist/chunk-EM3FMJWE.js.map +0 -1
- package/dist/chunk-J5BA3BQ6.cjs.map +0 -1
- package/dist/chunk-JLGNZMUV.cjs.map +0 -1
- package/dist/chunk-MAHQC3SK.js.map +0 -1
- package/dist/chunk-Z6OUCS2K.cjs +0 -340
- package/dist/chunk-Z6OUCS2K.cjs.map +0 -1
- package/dist/rand-BszBST4s.d.ts +0 -2140
- package/dist/rand-DOH_aMvm.d.cts +0 -2140
- /package/dist/{chunk-62XUO5LB.js.map → chunk-3X6IAJUQ.js.map} +0 -0
- /package/dist/{chunk-KZXLZCQ7.js.map → chunk-6S6362D2.js.map} +0 -0
- /package/dist/{chunk-SVYE5HIM.js.map → chunk-EQQMGO42.js.map} +0 -0
- /package/dist/{chunk-UYQUPUR6.js.map → chunk-HUO3TI4C.js.map} +0 -0
- /package/dist/{chunk-2HC4DRF4.js.map → chunk-LLFHCSU2.js.map} +0 -0
- /package/dist/{chunk-ILYFOJUN.js.map → chunk-OIBIRXRG.js.map} +0 -0
|
@@ -74,7 +74,7 @@ function profileAlongPolyline(points, values, count = 32) {
|
|
|
74
74
|
var round3 = (v) => Math.round(v * 1e3) / 1e3;
|
|
75
75
|
var loading = null;
|
|
76
76
|
function loadCanvasBrushstrokeRenderer() {
|
|
77
|
-
loading ??= import("./brushstrokeRender-
|
|
77
|
+
loading ??= import("./brushstrokeRender-2FAXA3XC.js").catch((error) => {
|
|
78
78
|
loading = null;
|
|
79
79
|
throw error;
|
|
80
80
|
});
|
|
@@ -109,4 +109,4 @@ export {
|
|
|
109
109
|
renderShapeBrushstroke,
|
|
110
110
|
getBrushedShapeSvg
|
|
111
111
|
};
|
|
112
|
-
//# sourceMappingURL=chunk-
|
|
112
|
+
//# sourceMappingURL=chunk-EQQMGO42.js.map
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkO7LUD7MHcjs = require('./chunk-O7LUD7MH.cjs');
|
|
9
9
|
|
|
10
10
|
// src/paint/pigment-tools.ts
|
|
11
11
|
var HEX = /^#?([0-9a-f]{6})$/i;
|
|
@@ -62,8 +62,8 @@ function createPigmentTools() {
|
|
|
62
62
|
const rgbs = items.map((item, i) => parseHex(item.color, i));
|
|
63
63
|
const total = items.reduce((sum, item) => sum + item.weight, 0);
|
|
64
64
|
if (!(total > 0)) throw new Error("Every weight is 0; give at least one colour a weight above 0.");
|
|
65
|
-
const pigments = rgbs.map((rgb2, i) =>
|
|
66
|
-
const mixed =
|
|
65
|
+
const pigments = rgbs.map((rgb2, i) => _chunkO7LUD7MHcjs.createPigment.call(void 0, rgb2, { strength: items[i].strength }));
|
|
66
|
+
const mixed = _chunkO7LUD7MHcjs.mixPigments.call(void 0, pigments, items.map((item) => item.weight));
|
|
67
67
|
const lerp = [0, 1, 2].map((c) => rgbs.reduce((sum, rgb2, i) => sum + rgb2[c] * items[i].weight, 0) / total);
|
|
68
68
|
const rgb = args.model === "rgb";
|
|
69
69
|
return {
|
|
@@ -1034,7 +1034,7 @@ var WetWorld = (_class = class {
|
|
|
1034
1034
|
params: normalizeWetParams(_nullishCoalesce(options.params, () => ( {})), DEFAULT_WET_PARAMS),
|
|
1035
1035
|
flow: _nullishCoalesce(options.flow, () => ( null)),
|
|
1036
1036
|
flowStrength: options.flow ? _nullishCoalesce(options.flowStrength, () => ( 1)) : 0,
|
|
1037
|
-
base: _nullishCoalesce(options.base, () => ( new (0,
|
|
1037
|
+
base: _nullishCoalesce(options.base, () => ( new (0, _chunkO7LUD7MHcjs.TiledSurface)(4, /* @__PURE__ */ new Map(), 0))),
|
|
1038
1038
|
shaded: /* @__PURE__ */ new Map(),
|
|
1039
1039
|
urgent: /* @__PURE__ */ new Set(),
|
|
1040
1040
|
stamp: 1,
|
|
@@ -1189,7 +1189,7 @@ var WetWorld = (_class = class {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
tileKeyOf(key) {
|
|
1191
1191
|
const [tx, ty] = this.tileXY(key);
|
|
1192
|
-
return
|
|
1192
|
+
return _chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty);
|
|
1193
1193
|
}
|
|
1194
1194
|
fillPaper(key) {
|
|
1195
1195
|
this.gpuDirtySlot(this.slotOf(key), 0, SLOT_SIDE - 1);
|
|
@@ -1519,7 +1519,7 @@ var WetWorld = (_class = class {
|
|
|
1519
1519
|
const { tilesX, perLane } = this.layout;
|
|
1520
1520
|
for (let ty = y0 >> 8; ty <= y1 - 1 >> 8; ty++)
|
|
1521
1521
|
for (let tx = x0 >> 8; tx <= x1 - 1 >> 8; tx++) {
|
|
1522
|
-
lane.urgent.add(
|
|
1522
|
+
lane.urgent.add(_chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty));
|
|
1523
1523
|
const slot = this.slotOf(lane.index * perLane + ty * tilesX + tx);
|
|
1524
1524
|
if (slot >= 0) this.gpuDirtySlot(slot, Math.max(1, y0 - ty * WET_TILE + 1), Math.min(WET_TILE, y1 - ty * WET_TILE));
|
|
1525
1525
|
}
|
|
@@ -1701,7 +1701,7 @@ var WetWorld = (_class = class {
|
|
|
1701
1701
|
if (!(this.f32[c + P_RHO * PLANE] >= DRY_EPS)) return;
|
|
1702
1702
|
const a = Math.min(1, Math.max(0, amount * w));
|
|
1703
1703
|
if (!(a > 0)) return;
|
|
1704
|
-
const key =
|
|
1704
|
+
const key = _chunkO7LUD7MHcjs.tileKey.call(void 0, x >> 8, y >> 8);
|
|
1705
1705
|
let tile = tiles.get(key);
|
|
1706
1706
|
if (!tile) return;
|
|
1707
1707
|
if (!written.has(key)) {
|
|
@@ -1709,7 +1709,7 @@ var WetWorld = (_class = class {
|
|
|
1709
1709
|
tiles.set(key, tile);
|
|
1710
1710
|
written.add(key);
|
|
1711
1711
|
}
|
|
1712
|
-
const i = ((y & 255) *
|
|
1712
|
+
const i = ((y & 255) * _chunkO7LUD7MHcjs.TILE + (x & 255)) * 4;
|
|
1713
1713
|
if (tile.data[i + 3] === 0) return;
|
|
1714
1714
|
pixelPigment(tile.data, i, paper, pig);
|
|
1715
1715
|
if (!(pig[0] > 0 || pig[1] > 0 || pig[2] > 0)) return;
|
|
@@ -1723,11 +1723,11 @@ var WetWorld = (_class = class {
|
|
|
1723
1723
|
);
|
|
1724
1724
|
if (written.size) {
|
|
1725
1725
|
for (const key of written) {
|
|
1726
|
-
const t =
|
|
1726
|
+
const t = _chunkO7LUD7MHcjs.finishTile.call(void 0, tiles.get(key).data, 4, 0);
|
|
1727
1727
|
if (t) tiles.set(key, t);
|
|
1728
1728
|
else tiles.delete(key);
|
|
1729
1729
|
}
|
|
1730
|
-
this.setBase(id, new (0,
|
|
1730
|
+
this.setBase(id, new (0, _chunkO7LUD7MHcjs.TiledSurface)(4, tiles, 0));
|
|
1731
1731
|
}
|
|
1732
1732
|
}
|
|
1733
1733
|
/**
|
|
@@ -1787,15 +1787,15 @@ var WetWorld = (_class = class {
|
|
|
1787
1787
|
bakeKey(key, all) {
|
|
1788
1788
|
const lane = this.lanes[this.laneIndexOf(key)];
|
|
1789
1789
|
const [tx, ty] = this.tileXY(key);
|
|
1790
|
-
const tk =
|
|
1790
|
+
const tk = _chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty);
|
|
1791
1791
|
const src = _nullishCoalesce(_optionalChain([lane, 'access', _19 => _19.base, 'access', _20 => _20.tiles, 'access', _21 => _21.get, 'call', _22 => _22(tk), 'optionalAccess', _23 => _23.data]), () => ( null));
|
|
1792
1792
|
const out = this.shadeSlot(key, src, all ? "bake-all" : "bake");
|
|
1793
1793
|
if (!out) return false;
|
|
1794
1794
|
const tiles = new Map(lane.base.tiles);
|
|
1795
|
-
const t =
|
|
1795
|
+
const t = _chunkO7LUD7MHcjs.finishTile.call(void 0, out, 4, 0);
|
|
1796
1796
|
if (t) tiles.set(tk, t);
|
|
1797
1797
|
else tiles.delete(tk);
|
|
1798
|
-
this.setBase(lane.id, new (0,
|
|
1798
|
+
this.setBase(lane.id, new (0, _chunkO7LUD7MHcjs.TiledSurface)(4, tiles, 0));
|
|
1799
1799
|
return true;
|
|
1800
1800
|
}
|
|
1801
1801
|
/**
|
|
@@ -1807,7 +1807,7 @@ var WetWorld = (_class = class {
|
|
|
1807
1807
|
const [tx, ty] = this.tileXY(key);
|
|
1808
1808
|
const b = this.slotBase(this.slotOf(key));
|
|
1809
1809
|
const cur = b + this.parity * SET_PLANES * PLANE;
|
|
1810
|
-
const out = src ? new Uint8ClampedArray(src) : new Uint8ClampedArray(
|
|
1810
|
+
const out = src ? new Uint8ClampedArray(src) : new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * 4);
|
|
1811
1811
|
const w = Math.min(WET_TILE, this.width - tx * WET_TILE);
|
|
1812
1812
|
const h = Math.min(WET_TILE, this.height - ty * WET_TILE);
|
|
1813
1813
|
const changed = shadeTile(
|
|
@@ -1836,11 +1836,11 @@ var WetWorld = (_class = class {
|
|
|
1836
1836
|
const tk = this.tileKeyOf(key);
|
|
1837
1837
|
const out = this.shadeSlot(key, _nullishCoalesce(_optionalChain([lane, 'access', _24 => _24.base, 'access', _25 => _25.tiles, 'access', _26 => _26.get, 'call', _27 => _27(tk), 'optionalAccess', _28 => _28.data]), () => ( null)), "bake-all");
|
|
1838
1838
|
if (!out) continue;
|
|
1839
|
-
const t =
|
|
1839
|
+
const t = _chunkO7LUD7MHcjs.finishTile.call(void 0, out, 4, 0);
|
|
1840
1840
|
if (t) tiles.set(tk, t);
|
|
1841
1841
|
else tiles.delete(tk);
|
|
1842
1842
|
}
|
|
1843
|
-
return new (0,
|
|
1843
|
+
return new (0, _chunkO7LUD7MHcjs.TiledSurface)(4, tiles, 0);
|
|
1844
1844
|
}
|
|
1845
1845
|
// --- Reading -------------------------------------------------------------------
|
|
1846
1846
|
/**
|
|
@@ -1949,7 +1949,7 @@ var WetWorld = (_class = class {
|
|
|
1949
1949
|
const tk = this.tileKeyOf(key);
|
|
1950
1950
|
const src = _nullishCoalesce(_optionalChain([lane, 'access', _41 => _41.base, 'access', _42 => _42.tiles, 'access', _43 => _43.get, 'call', _44 => _44(tk), 'optionalAccess', _45 => _45.data]), () => ( null));
|
|
1951
1951
|
const out = this.shadeSlot(key, src, "display");
|
|
1952
|
-
const tile = out ?
|
|
1952
|
+
const tile = out ? _chunkO7LUD7MHcjs.finishTile.call(void 0, out, 4, 0) : _nullishCoalesce(lane.base.tiles.get(tk), () => ( null));
|
|
1953
1953
|
lane.shaded.set(tk, { stamp: lane.stamp, tile: _nullishCoalesce(tile, () => ( { data: new Uint8ClampedArray(0), uniform: 0 })) });
|
|
1954
1954
|
lane.shadedVersion++;
|
|
1955
1955
|
lane.urgent.delete(tk);
|
|
@@ -1966,7 +1966,7 @@ var WetWorld = (_class = class {
|
|
|
1966
1966
|
if (tile.data.length === 0) tiles.delete(tk);
|
|
1967
1967
|
else tiles.set(tk, tile);
|
|
1968
1968
|
}
|
|
1969
|
-
lane.display = new (0,
|
|
1969
|
+
lane.display = new (0, _chunkO7LUD7MHcjs.TiledSurface)(4, tiles, 0);
|
|
1970
1970
|
lane.displayKey = displayKey;
|
|
1971
1971
|
return { surface: lane.display, changed, pending: stale.length - done };
|
|
1972
1972
|
}
|
|
@@ -1981,7 +1981,7 @@ var WetWorld = (_class = class {
|
|
|
1981
1981
|
const slot = this.slotOf(lane.index * perLane + ty * tilesX + tx);
|
|
1982
1982
|
if (slot < 0) return null;
|
|
1983
1983
|
const cur = this.slotBase(slot) + this.parity * SET_PLANES * PLANE;
|
|
1984
|
-
const out = new Uint8ClampedArray(
|
|
1984
|
+
const out = new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * 4);
|
|
1985
1985
|
let any = false;
|
|
1986
1986
|
for (let y = 0; y < WET_TILE; y++) {
|
|
1987
1987
|
for (let x = 0; x < WET_TILE; x++) {
|
|
@@ -1990,7 +1990,7 @@ var WetWorld = (_class = class {
|
|
|
1990
1990
|
const sw = this.f32[cur + P_SW * PLANE + c];
|
|
1991
1991
|
const a = Math.min(1, rho * 2.5) * 0.7 + Math.min(1, sw * 4) * 0.2;
|
|
1992
1992
|
if (a <= 4e-3) continue;
|
|
1993
|
-
const i = (y *
|
|
1993
|
+
const i = (y * _chunkO7LUD7MHcjs.TILE + x) * 4;
|
|
1994
1994
|
out[i] = 40;
|
|
1995
1995
|
out[i + 1] = 120;
|
|
1996
1996
|
out[i + 2] = 255;
|
|
@@ -2167,7 +2167,7 @@ var WetWorld = (_class = class {
|
|
|
2167
2167
|
const changed = [];
|
|
2168
2168
|
stale.forEach((key, i) => {
|
|
2169
2169
|
const tk = this.tileKeyOf(key);
|
|
2170
|
-
const tile =
|
|
2170
|
+
const tile = _chunkO7LUD7MHcjs.finishTile.call(void 0, new Uint8ClampedArray(tiles[i]), 4, 0);
|
|
2171
2171
|
lane.shaded.set(tk, { stamp: lane.stamp, tile: _nullishCoalesce(tile, () => ( { data: new Uint8ClampedArray(0), uniform: 0 })) });
|
|
2172
2172
|
lane.urgent.delete(tk);
|
|
2173
2173
|
const [tx, ty] = this.tileXY(key);
|
|
@@ -3191,4 +3191,4 @@ function pointerStrokeSamples(e, toPoint) {
|
|
|
3191
3191
|
|
|
3192
3192
|
|
|
3193
3193
|
exports.createPigmentTools = createPigmentTools; exports.WET_TILE = WET_TILE; exports.SLOT_SIDE = SLOT_SIDE; exports.PLANE = PLANE; exports.PLANE_BYTES = PLANE_BYTES; exports.SET_PLANES = SET_PLANES; exports.P_RHO = P_RHO; exports.P_UX = P_UX; exports.P_UY = P_UY; exports.P_SW = P_SW; exports.P_P0 = P_P0; exports.P_EDGE = P_EDGE; exports.P_D0 = P_D0; exports.P_H = P_H; exports.P_FX = P_FX; exports.P_FY = P_FY; exports.SLOT_PLANES = SLOT_PLANES; exports.SLOT_BYTES = SLOT_BYTES; exports.PIGMENT_CHANNELS = PIGMENT_CHANNELS; exports.EX = EX; exports.EY = EY; exports.OPP = OPP; exports.W9 = W9; exports.DRY_EPS = DRY_EPS; exports.U_MAX = U_MAX; exports.STRIP = STRIP; exports.MAX_BATCH = MAX_BATCH; exports.FREE_INTERVAL = FREE_INTERVAL; exports.FLAG_ALIVE = FLAG_ALIVE; exports.FLAG_LEFT = FLAG_LEFT; exports.FLAG_RIGHT = FLAG_RIGHT; exports.FLAG_TOP = FLAG_TOP; exports.FLAG_BOTTOM = FLAG_BOTTOM; exports.FLAG_WET = FLAG_WET; exports.PARAM_FLOATS = PARAM_FLOATS; exports.PARAM = PARAM; exports.DEFAULT_WET_PARAMS = DEFAULT_WET_PARAMS; exports.WET_PARAM_KEYS = WET_PARAM_KEYS; exports.DEFAULT_WET_PAPER = DEFAULT_WET_PAPER; exports.FLAT = FLAT; exports.normalizeWetParams = normalizeWetParams; exports.normalizeTilt = normalizeTilt; exports.latticeViscosity = latticeViscosity; exports.PAPER_CAPACITY = PAPER_CAPACITY; exports.MAX_TILT_ACCEL = MAX_TILT_ACCEL; exports.packWetParams = packWetParams; exports.edgeBits = edgeBits; exports.PIGMENT_UNIT = PIGMENT_UNIT; exports.HIDE = HIDE; exports.BODY_SCATTER = BODY_SCATTER; exports.dexp = dexp; exports.dlog = dlog; exports.dpow = dpow; exports.SRGB_TO_LINEAR = SRGB_TO_LINEAR; exports.srgbByteToLinear = srgbByteToLinear; exports.linearToSrgb8 = linearToSrgb8; exports.pigmentOf = pigmentOf; exports.expNeg = expNeg; exports.filmReflectance = filmReflectance; exports.pigmentColor = pigmentColor; exports.filmPixel = filmPixel; exports.pixelPigment = pixelPigment; exports.shadeTile = shadeTile; exports.stepSlotTs = stepSlotTs; exports.loadWetKernel = loadWetKernel; exports.canShareMemory = canShareMemory; exports.wetSimdSupported = wetSimdSupported; exports.wetSupport = wetSupport; exports.WetWorkerPool = WetWorkerPool; exports.MAX_WET_LANES = MAX_WET_LANES; exports.MAX_WET_SLOTS = MAX_WET_SLOTS; exports.WetWorldError = WetWorldError; exports.WetWorld = WetWorld; exports.WET_FLOW_KINDS = WET_FLOW_KINDS; exports.DEFAULT_FLOW = DEFAULT_FLOW; exports.dsincos = dsincos; exports.normalizeFlow = normalizeFlow; exports.flowField = flowField; exports.WetMedium = WetMedium; exports.WGSL_STEP = WGSL_STEP; exports.WGSL_HALO = WGSL_HALO; exports.WGSL_SHADE = WGSL_SHADE; exports.findWebGpu = findWebGpu; exports.createWetGpuEngine = createWetGpuEngine; exports.wetGpuSupport = wetGpuSupport; exports.WetGpuEngine = WetGpuEngine; exports.pointerPressure = pointerPressure; exports.pointerStrokeSample = pointerStrokeSample; exports.pointerStrokeSamples = pointerStrokeSamples;
|
|
3194
|
-
//# sourceMappingURL=chunk-
|
|
3194
|
+
//# sourceMappingURL=chunk-F2Y4E4GU.cjs.map
|