@pixerate/editor 0.137.0 → 0.138.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/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.cjs +57 -57
- package/dist/animation-editor/index.d.cts +3 -3
- package/dist/animation-editor/index.d.ts +3 -3
- package/dist/animation-editor/index.js +4 -4
- package/dist/{arrange-CKXK_hf7.d.cts → arrange-j_mLiFMO.d.cts} +1 -1
- package/dist/{arrange-BUREmgD9.d.ts → arrange-q5HQvnnB.d.ts} +1 -1
- package/dist/{bezier-CZ2AhjID.d.cts → bezier-CUaH8hcK.d.cts} +1 -1
- package/dist/{bezier-Dywv3Bw8.d.ts → bezier-DPmdGwgR.d.ts} +1 -1
- package/dist/{brushTypes-C7N3EBK7.d.cts → brushTypes-MX5UVs_m.d.cts} +27 -2
- package/dist/{brushTypes-C7N3EBK7.d.ts → brushTypes-MX5UVs_m.d.ts} +27 -2
- package/dist/{brushes-DJmUbIgz.d.ts → brushes-B1ABdDAs.d.ts} +2 -108
- package/dist/{brushes-CnvZSYYU.d.cts → brushes-DnIdJYxN.d.cts} +2 -108
- package/dist/{brushstrokeRender-IMFY3FF6.cjs → brushstrokeRender-PP6NTF6M.cjs} +52 -24
- package/dist/brushstrokeRender-PP6NTF6M.cjs.map +1 -0
- package/dist/{brushstrokeRender-2FAXA3XC.js → brushstrokeRender-QGEYJ4OZ.js} +40 -12
- package/dist/brushstrokeRender-QGEYJ4OZ.js.map +1 -0
- package/dist/{builtins-Cc-bH-3U.d.cts → builtins-BakDiKWf.d.cts} +3 -2
- package/dist/{builtins-ZU1GJnUA.d.ts → builtins-CE33vyv2.d.ts} +3 -2
- package/dist/canvas/index.cjs +16 -9
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +56 -11
- package/dist/canvas/index.d.ts +56 -11
- package/dist/canvas/index.js +10 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-QBWEH3IM.cjs → chunk-3T5O225T.cjs} +391 -76
- package/dist/chunk-3T5O225T.cjs.map +1 -0
- package/dist/{chunk-PRSRYHQD.cjs → chunk-7MN75BXI.cjs} +36 -36
- package/dist/{chunk-PRSRYHQD.cjs.map → chunk-7MN75BXI.cjs.map} +1 -1
- package/dist/{chunk-EQQMGO42.js → chunk-C2J7GOMJ.js} +18 -5
- package/dist/chunk-C2J7GOMJ.js.map +1 -0
- package/dist/{chunk-2XS6LTUP.cjs → chunk-C46AZEBE.cjs} +104 -339
- package/dist/chunk-C46AZEBE.cjs.map +1 -0
- package/dist/{chunk-XN2NBLV5.cjs → chunk-CM3LJPR3.cjs} +82 -82
- package/dist/{chunk-XN2NBLV5.cjs.map → chunk-CM3LJPR3.cjs.map} +1 -1
- package/dist/{chunk-HUO3TI4C.js → chunk-CPSMARTX.js} +6 -241
- package/dist/chunk-CPSMARTX.js.map +1 -0
- package/dist/{chunk-KEENUAFN.cjs → chunk-DLLUOVQX.cjs} +18 -5
- package/dist/chunk-DLLUOVQX.cjs.map +1 -0
- package/dist/{chunk-LSXXAJG3.js → chunk-J7DSKTKB.js} +5 -4
- package/dist/chunk-J7DSKTKB.js.map +1 -0
- package/dist/{chunk-6S6362D2.js → chunk-OV7253FC.js} +2 -2
- package/dist/{chunk-5FSRTP6E.js → chunk-PQFVLOMR.js} +319 -4
- package/dist/chunk-PQFVLOMR.js.map +1 -0
- package/dist/{chunk-OIBIRXRG.js → chunk-PSPLRQL6.js} +2 -2
- package/dist/{chunk-SYT2TLQF.js → chunk-QBARQGSG.js} +2 -2
- package/dist/{chunk-5OOIUXNJ.cjs → chunk-SXOTFV3V.cjs} +6 -6
- package/dist/{chunk-5OOIUXNJ.cjs.map → chunk-SXOTFV3V.cjs.map} +1 -1
- package/dist/{chunk-DFSZO2B5.cjs → chunk-UFL5N4DK.cjs} +5 -4
- package/dist/chunk-UFL5N4DK.cjs.map +1 -0
- package/dist/{chunk-3D77LOBM.js → chunk-V45ZTW4R.js} +3 -3
- package/dist/{chunk-TLCTTQFF.cjs → chunk-VEHVXRJU.cjs} +17 -17
- package/dist/{chunk-TLCTTQFF.cjs.map → chunk-VEHVXRJU.cjs.map} +1 -1
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +3 -3
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/index.js +1 -1
- package/dist/{export-DwnZ_hvQ.d.ts → export-BwFRiItd.d.ts} +4 -4
- package/dist/{export-CyJdfP_Z.d.cts → export-DuN3dpCg.d.cts} +4 -4
- package/dist/{blending-NgF3qo3d.d.ts → grain-COgYMMHv.d.ts} +58 -1
- package/dist/{blending-D7jCmjO6.d.cts → grain-GCt_O2kv.d.cts} +58 -1
- package/dist/image-editor/index.cjs +695 -677
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +11 -11
- package/dist/image-editor/index.d.ts +11 -11
- package/dist/image-editor/index.js +23 -5
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-a1KAW-qs.d.ts → opentype-T7bkbR2D.d.ts} +1 -1
- package/dist/{opentype-KR_jj6b_.d.cts → opentype-n99lqxEZ.d.cts} +1 -1
- package/dist/paint/index.cjs +21 -3
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +72 -7
- package/dist/paint/index.d.ts +72 -7
- package/dist/paint/index.js +20 -2
- package/dist/paint-editor/index.cjs +171 -171
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +75 -29
- package/dist/paint-editor/index.d.ts +75 -29
- package/dist/paint-editor/index.js +12 -12
- package/dist/{pathfinder-BHS4vQNm.d.cts → pathfinder-CQlldanv.d.cts} +2 -2
- package/dist/{pathfinder-BVvTIBMo.d.ts → pathfinder-D-V6JLSw.d.ts} +2 -2
- package/dist/{rand-Cw9VLrVC.d.cts → rand-D7nfeD1p.d.cts} +18 -2
- package/dist/{rand-8xbUb6ur.d.ts → rand-DJGxSq9d.d.ts} +18 -2
- package/dist/{svg-CSz3mzkw.d.ts → svg-CnDCpIy9.d.ts} +1 -1
- package/dist/{svg-DTb40ICU.d.cts → svg-DPJMUSNt.d.cts} +1 -1
- package/dist/vector/index.cjs +944 -944
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/vector/index.js +4 -4
- package/dist/{warp-DTOp0lON.d.cts → warp-C7rMWUgW.d.cts} +1 -1
- package/dist/{warp-pd7hrH4T.d.ts → warp-Doasjpyr.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +12 -5
- package/dist/brushstrokeRender-2FAXA3XC.js.map +0 -1
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +0 -1
- package/dist/chunk-2XS6LTUP.cjs.map +0 -1
- package/dist/chunk-5FSRTP6E.js.map +0 -1
- package/dist/chunk-DFSZO2B5.cjs.map +0 -1
- package/dist/chunk-EQQMGO42.js.map +0 -1
- package/dist/chunk-HUO3TI4C.js.map +0 -1
- package/dist/chunk-KEENUAFN.cjs.map +0 -1
- package/dist/chunk-LSXXAJG3.js.map +0 -1
- package/dist/chunk-QBWEH3IM.cjs.map +0 -1
- /package/dist/{chunk-6S6362D2.js.map → chunk-OV7253FC.js.map} +0 -0
- /package/dist/{chunk-OIBIRXRG.js.map → chunk-PSPLRQL6.js.map} +0 -0
- /package/dist/{chunk-SYT2TLQF.js.map → chunk-QBARQGSG.js.map} +0 -0
- /package/dist/{chunk-3D77LOBM.js.map → chunk-V45ZTW4R.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -17,87 +17,19 @@
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var _chunkQBWEH3IMcjs = require('./chunk-QBWEH3IM.cjs');
|
|
21
20
|
|
|
22
21
|
|
|
23
22
|
|
|
23
|
+
var _chunk3T5O225Tcjs = require('./chunk-3T5O225T.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var _chunkO7LUD7MHcjs = require('./chunk-O7LUD7MH.cjs');
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
function seedFromString(text) {
|
|
33
|
-
let h = 2166136261;
|
|
34
|
-
for (let i = 0; i < text.length; i++) {
|
|
35
|
-
h ^= text.charCodeAt(i);
|
|
36
|
-
h = Math.imul(h, 16777619);
|
|
37
|
-
}
|
|
38
|
-
return _chunkQBWEH3IMcjs.mix32.call(void 0, h >>> 0);
|
|
39
|
-
}
|
|
40
|
-
var smooth = (t) => t * t * (3 - 2 * t);
|
|
41
|
-
var Lattice = class {
|
|
42
|
-
constructor(px, py, salt) {
|
|
43
|
-
this.px = px;
|
|
44
|
-
this.py = py;
|
|
45
|
-
this.values = new Float32Array(px * py);
|
|
46
|
-
for (let j = 0; j < py; j++) for (let i = 0; i < px; i++) this.values[j * px + i] = _chunkQBWEH3IMcjs.hash2.call(void 0, i, j, salt);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
/** Value noise at (x, y) in lattice cells; wraps every `px` / `py` cells. */
|
|
52
|
-
at(x, y) {
|
|
53
|
-
const { px, py } = this;
|
|
54
|
-
const x0 = Math.floor(x);
|
|
55
|
-
const y0 = Math.floor(y);
|
|
56
|
-
const tx = smooth(x - x0);
|
|
57
|
-
const ty = smooth(y - y0);
|
|
58
|
-
const i0 = (x0 % px + px) % px;
|
|
59
|
-
const j0 = (y0 % py + py) % py;
|
|
60
|
-
const i1 = (i0 + 1) % px;
|
|
61
|
-
const j1 = (j0 + 1) % py;
|
|
62
|
-
const v = this.values;
|
|
63
|
-
const a = v[j0 * px + i0] + (v[j0 * px + i1] - v[j0 * px + i0]) * tx;
|
|
64
|
-
const b = v[j1 * px + i0] + (v[j1 * px + i1] - v[j1 * px + i0]) * tx;
|
|
65
|
-
return a + (b - a) * ty;
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
var TileableNoise = (_class = class {
|
|
69
|
-
constructor(size, cellsX, cellsY, octaves, salt) {;_class.prototype.__init.call(this);
|
|
70
|
-
this.size = size;
|
|
71
|
-
let cx = Math.max(1, Math.round(cellsX));
|
|
72
|
-
let cy = Math.max(1, Math.round(cellsY));
|
|
73
|
-
for (let o = 0; o < octaves; o++) {
|
|
74
|
-
this.octaves.push(new Lattice(cx, cy, salt + o * 7919 | 0));
|
|
75
|
-
cx *= 2;
|
|
76
|
-
cy *= 2;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
__init() {this.octaves = []}
|
|
81
|
-
/** Fractal noise at pixel (x, y). */
|
|
82
|
-
at(x, y) {
|
|
83
|
-
let sum = 0;
|
|
84
|
-
let amp = 1;
|
|
85
|
-
let norm = 0;
|
|
86
|
-
const u = x / this.size;
|
|
87
|
-
const v = y / this.size;
|
|
88
|
-
for (const l of this.octaves) {
|
|
89
|
-
sum += l.at(u * l.px, v * l.py) * amp;
|
|
90
|
-
norm += amp;
|
|
91
|
-
amp *= 0.5;
|
|
92
|
-
}
|
|
93
|
-
return norm > 0 ? sum / norm : 0.5;
|
|
94
|
-
}
|
|
95
|
-
}, _class);
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
var _chunkO7LUD7MHcjs = require('./chunk-O7LUD7MH.cjs');
|
|
96
30
|
|
|
97
31
|
// src/paint-editor/paper.ts
|
|
98
|
-
var GRAIN_PATTERNS = ["smooth", "cold-pressed", "hot-pressed", "rough", "vellum", "laid", "ingres", "sanded", "canvas", "linen", "gesso"];
|
|
99
32
|
var PAPER_FAMILIES = ["watercolor", "drawing", "pastel", "canvas", "panel", "smooth"];
|
|
100
|
-
var GRAIN_TILE = 256;
|
|
101
33
|
var unit = (v, d) => typeof v === "number" && Number.isFinite(v) ? Math.min(1, Math.max(0, v)) : d;
|
|
102
34
|
var clampNum = (v, lo, hi, d) => typeof v === "number" && Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : d;
|
|
103
35
|
var HEX = /^#[0-9a-f]{6}$/i;
|
|
@@ -154,7 +86,7 @@ function normalizePaper(raw = {}, base) {
|
|
|
154
86
|
preset: typeof r.preset === "string" && r.preset ? r.preset : b.preset,
|
|
155
87
|
name: typeof r.name === "string" && r.name.trim() ? r.name.trim() : b.name,
|
|
156
88
|
family: PAPER_FAMILIES.includes(r.family) ? r.family : b.family,
|
|
157
|
-
pattern: GRAIN_PATTERNS.includes(r.pattern) ? r.pattern : b.pattern,
|
|
89
|
+
pattern: _chunk3T5O225Tcjs.GRAIN_PATTERNS.includes(r.pattern) ? r.pattern : b.pattern,
|
|
158
90
|
seed: typeof r.seed === "number" && Number.isFinite(r.seed) ? Math.round(Math.abs(r.seed)) % 2147483647 : b.seed,
|
|
159
91
|
color: typeof r.color === "string" && HEX.test(r.color) ? r.color.toLowerCase() : b.color,
|
|
160
92
|
scale: clampNum(r.scale, 0.25, 8, b.scale),
|
|
@@ -169,170 +101,11 @@ function normalizePaper(raw = {}, base) {
|
|
|
169
101
|
...unit(r.metallic, _nullishCoalesce(b.metallic, () => ( 0))) > 0 ? { metallic: unit(r.metallic, _nullishCoalesce(b.metallic, () => ( 0))) } : {}
|
|
170
102
|
};
|
|
171
103
|
}
|
|
172
|
-
var clamp01 = (v) => v < 0 ? 0 : v > 1 ? 1 : v;
|
|
173
|
-
function patternHeights(pattern, n, seed) {
|
|
174
|
-
const out = new Float32Array(n * n);
|
|
175
|
-
const salt = Math.imul(seed | 0, 2654435761) + 17;
|
|
176
|
-
if (pattern === "smooth") return out.fill(1);
|
|
177
|
-
const noise = (cx, cy, oct, s = 0) => new TileableNoise(n, cx, cy, oct, salt + s);
|
|
178
|
-
const k = n / GRAIN_TILE;
|
|
179
|
-
switch (pattern) {
|
|
180
|
-
case "cold-pressed": {
|
|
181
|
-
const base = noise(20 * k, 20 * k, 4);
|
|
182
|
-
const fine = noise(64 * k, 64 * k, 2, 3);
|
|
183
|
-
for (let y = 0; y < n; y++)
|
|
184
|
-
for (let x = 0; x < n; x++) out[y * n + x] = clamp01((base.at(x, y) - 0.5) * 1.8 + 0.5 + (fine.at(x, y) - 0.5) * 0.5 + (_chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt) - 0.5) * 0.12);
|
|
185
|
-
break;
|
|
186
|
-
}
|
|
187
|
-
case "hot-pressed": {
|
|
188
|
-
const base = noise(40 * k, 40 * k, 3);
|
|
189
|
-
for (let y = 0; y < n; y++) for (let x = 0; x < n; x++) out[y * n + x] = clamp01((base.at(x, y) - 0.5) * 1.1 + 0.6 + (_chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt) - 0.5) * 0.08);
|
|
190
|
-
break;
|
|
191
|
-
}
|
|
192
|
-
case "rough": {
|
|
193
|
-
const base = noise(10 * k, 10 * k, 5);
|
|
194
|
-
const blot = noise(28 * k, 28 * k, 2, 5);
|
|
195
|
-
for (let y = 0; y < n; y++)
|
|
196
|
-
for (let x = 0; x < n; x++) out[y * n + x] = clamp01((base.at(x, y) - 0.5) * 2.4 + 0.5 + (blot.at(x, y) - 0.5) * 0.7 + (_chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt) - 0.5) * 0.15);
|
|
197
|
-
break;
|
|
198
|
-
}
|
|
199
|
-
case "vellum": {
|
|
200
|
-
const base = noise(40 * k, 40 * k, 3);
|
|
201
|
-
for (let y = 0; y < n; y++) for (let x = 0; x < n; x++) out[y * n + x] = clamp01((base.at(x, y) - 0.5) * 1.6 + 0.55 + (_chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt) - 0.5) * 0.2);
|
|
202
|
-
break;
|
|
203
|
-
}
|
|
204
|
-
case "laid": {
|
|
205
|
-
const pulp = noise(32 * k, 32 * k, 3);
|
|
206
|
-
const chain = n / 8;
|
|
207
|
-
for (let y = 0; y < n; y++) {
|
|
208
|
-
const laid = 0.5 + 0.5 * Math.cos(2 * Math.PI * y / 4);
|
|
209
|
-
for (let x = 0; x < n; x++) {
|
|
210
|
-
const c = Math.abs((x + 0.5) % chain - chain / 2) / (chain / 2);
|
|
211
|
-
const chainLine = c > 0.94 ? -0.35 : 0;
|
|
212
|
-
out[y * n + x] = clamp01(0.3 + 0.5 * laid + chainLine + (pulp.at(x, y) - 0.5) * 0.6);
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
break;
|
|
216
|
-
}
|
|
217
|
-
case "ingres": {
|
|
218
|
-
const fibres = noise(64 * k, 12 * k, 3);
|
|
219
|
-
const base = noise(16 * k, 16 * k, 3, 7);
|
|
220
|
-
for (let y = 0; y < n; y++)
|
|
221
|
-
for (let x = 0; x < n; x++) {
|
|
222
|
-
const g = _chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt ^ 85);
|
|
223
|
-
out[y * n + x] = clamp01((fibres.at(x, y) - 0.5) * 1.5 + (base.at(x, y) - 0.5) * 0.7 + 0.55 + (g < 0.1 ? -0.3 : 0));
|
|
224
|
-
}
|
|
225
|
-
break;
|
|
226
|
-
}
|
|
227
|
-
case "sanded": {
|
|
228
|
-
const grit = noise(96 * k, 96 * k, 2);
|
|
229
|
-
for (let y = 0; y < n; y++)
|
|
230
|
-
for (let x = 0; x < n; x++) {
|
|
231
|
-
const h = _chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt);
|
|
232
|
-
out[y * n + x] = clamp01((grit.at(x, y) - 0.5) * 2.4 + 0.5 + (h - 0.5) * 0.7);
|
|
233
|
-
}
|
|
234
|
-
break;
|
|
235
|
-
}
|
|
236
|
-
case "canvas":
|
|
237
|
-
case "linen": {
|
|
238
|
-
const period = (pattern === "canvas" ? 8 : 5) * k;
|
|
239
|
-
const threads = Math.max(2, 2 * Math.round(n / period / 2));
|
|
240
|
-
const p = n / threads;
|
|
241
|
-
const slub = noise(threads, threads, 2, 11);
|
|
242
|
-
for (let y = 0; y < n; y++)
|
|
243
|
-
for (let x = 0; x < n; x++) {
|
|
244
|
-
const fx = (x + 0.5) / p;
|
|
245
|
-
const fy = (y + 0.5) / p;
|
|
246
|
-
const cx = Math.floor(fx);
|
|
247
|
-
const cy = Math.floor(fy);
|
|
248
|
-
const warp = Math.sin(Math.PI * (fx - cx));
|
|
249
|
-
const weft = Math.sin(Math.PI * (fy - cy));
|
|
250
|
-
const top = (cx + cy) % 2 === 0 ? warp : weft;
|
|
251
|
-
const irregular = pattern === "linen" ? (slub.at(x, y) - 0.5) * 0.5 : 0;
|
|
252
|
-
out[y * n + x] = clamp01(0.2 + 0.7 * top + irregular + (_chunkQBWEH3IMcjs.hash2.call(void 0, x, y, salt) - 0.5) * 0.15);
|
|
253
|
-
}
|
|
254
|
-
break;
|
|
255
|
-
}
|
|
256
|
-
case "gesso": {
|
|
257
|
-
const streaks = noise(2 * k, 28 * k, 3);
|
|
258
|
-
const tooth = noise(64 * k, 64 * k, 2, 13);
|
|
259
|
-
for (let y = 0; y < n; y++)
|
|
260
|
-
for (let x = 0; x < n; x++) out[y * n + x] = clamp01((streaks.at(x, y) - 0.5) * 1.8 + (tooth.at(x, y) - 0.5) * 0.9 + 0.55);
|
|
261
|
-
break;
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
return out;
|
|
265
|
-
}
|
|
266
|
-
var rawCache = /* @__PURE__ */ new Map();
|
|
267
|
-
function grainHeights(pattern, seed, size = GRAIN_TILE) {
|
|
268
|
-
const key = `${pattern}:${seed}:${size}`;
|
|
269
|
-
let h = rawCache.get(key);
|
|
270
|
-
if (!h) {
|
|
271
|
-
h = patternHeights(pattern, size, seed);
|
|
272
|
-
if (rawCache.size > 32) rawCache.delete(rawCache.keys().next().value);
|
|
273
|
-
rawCache.set(key, h);
|
|
274
|
-
}
|
|
275
|
-
return h;
|
|
276
|
-
}
|
|
277
|
-
var PaperGrain = (_class2 = class {
|
|
278
|
-
__init2() {this.size = GRAIN_TILE}
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
constructor(paper, media = "dry") {;_class2.prototype.__init2.call(this);
|
|
284
|
-
const raw = grainHeights(paper.pattern, paper.seed);
|
|
285
|
-
const t = paper[media];
|
|
286
|
-
this.flat = paper.pattern === "smooth";
|
|
287
|
-
if (t.contrast === 1 && !t.invert) this.heights = raw;
|
|
288
|
-
else {
|
|
289
|
-
const out = new Float32Array(raw.length);
|
|
290
|
-
for (let i = 0; i < raw.length; i++) {
|
|
291
|
-
const v = clamp01((raw[i] - 0.5) * t.contrast + 0.5);
|
|
292
|
-
out[i] = t.invert ? 1 - v : v;
|
|
293
|
-
}
|
|
294
|
-
this.heights = out;
|
|
295
|
-
}
|
|
296
|
-
this.scale = paper.scale;
|
|
297
|
-
this.mirror = paper.tiling === "mirror";
|
|
298
|
-
}
|
|
299
|
-
/** Tile cell index for a coordinate in grain pixels (mirrored on odd tiles when mirroring). */
|
|
300
|
-
wrap(v) {
|
|
301
|
-
const n = this.size;
|
|
302
|
-
if (!this.mirror) return (v % n + n) % n;
|
|
303
|
-
const p = (v % (2 * n) + 2 * n) % (2 * n);
|
|
304
|
-
return p < n ? p : 2 * n - 1 - p;
|
|
305
|
-
}
|
|
306
|
-
/** Height 0..1 at document position (x, y). */
|
|
307
|
-
at(x, y) {
|
|
308
|
-
const u = x / this.scale - 0.5;
|
|
309
|
-
const v = y / this.scale - 0.5;
|
|
310
|
-
const x0 = Math.floor(u);
|
|
311
|
-
const y0 = Math.floor(v);
|
|
312
|
-
const fx = u - x0;
|
|
313
|
-
const fy = v - y0;
|
|
314
|
-
const n = this.size;
|
|
315
|
-
const h = this.heights;
|
|
316
|
-
const a = this.wrap(x0);
|
|
317
|
-
const b = this.wrap(x0 + 1);
|
|
318
|
-
const c = this.wrap(y0) * n;
|
|
319
|
-
const d = this.wrap(y0 + 1) * n;
|
|
320
|
-
const top = h[c + a] + (h[c + b] - h[c + a]) * fx;
|
|
321
|
-
const bot = h[d + a] + (h[d + b] - h[d + a]) * fx;
|
|
322
|
-
return top + (bot - top) * fy;
|
|
323
|
-
}
|
|
324
|
-
}, _class2);
|
|
325
|
-
function grainCatch(h, depth, pressure) {
|
|
326
|
-
if (depth <= 0) return 1;
|
|
327
|
-
const t = depth * (0.75 - 0.65 * Math.min(1, Math.max(0, pressure)));
|
|
328
|
-
const u = clamp01((h - t + 0.18) / 0.36);
|
|
329
|
-
return 1 - depth + depth * u * u * (3 - 2 * u);
|
|
330
|
-
}
|
|
331
104
|
function hexToRgb8(hex) {
|
|
332
105
|
const n = parseInt(hex.slice(1, 7), 16);
|
|
333
106
|
return [n >> 16 & 255, n >> 8 & 255, n & 255];
|
|
334
107
|
}
|
|
335
|
-
function renderPaper(paper, rect, grain = new PaperGrain(paper), light) {
|
|
108
|
+
function renderPaper(paper, rect, grain = new (0, _chunk3T5O225Tcjs.PaperGrain)(paper), light) {
|
|
336
109
|
const [r, g, b] = hexToRgb8(paper.color);
|
|
337
110
|
const out = new Uint8ClampedArray(rect.width * rect.height * 4);
|
|
338
111
|
const shade = grain.flat ? 0 : paper.shading * 0.16;
|
|
@@ -397,12 +170,12 @@ function tiltToOrientation(tiltX, tiltY) {
|
|
|
397
170
|
return { altitude: Math.atan(1 / r), azimuth };
|
|
398
171
|
}
|
|
399
172
|
var pressureOf = (p) => typeof p.pressure === "number" && Number.isFinite(p.pressure) ? Math.min(1, Math.max(0, p.pressure)) : 1;
|
|
400
|
-
var PenSmoother = (
|
|
401
|
-
|
|
402
|
-
|
|
173
|
+
var PenSmoother = (_class = class {
|
|
174
|
+
__init() {this.pos = null}
|
|
175
|
+
__init2() {this.pressure = null}
|
|
403
176
|
|
|
404
177
|
|
|
405
|
-
constructor(position, pressure) {;
|
|
178
|
+
constructor(position, pressure) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);
|
|
406
179
|
this.a = 1 - Math.min(0.95, Math.max(0, position));
|
|
407
180
|
this.ap = 1 - Math.min(0.95, Math.max(0, pressure));
|
|
408
181
|
}
|
|
@@ -421,11 +194,11 @@ var PenSmoother = (_class3 = class {
|
|
|
421
194
|
get position() {
|
|
422
195
|
return this.pos;
|
|
423
196
|
}
|
|
424
|
-
},
|
|
197
|
+
}, _class);
|
|
425
198
|
var IDENTITY_COPY = { map: (p) => p, linear: [1, 0, 0, 1] };
|
|
426
199
|
var FULL_SPEED = 2.5;
|
|
427
|
-
var PenDabWalker = (
|
|
428
|
-
constructor(brush, seed = 0, linear = [1, 0, 0, 1]) {;
|
|
200
|
+
var PenDabWalker = (_class2 = class {
|
|
201
|
+
constructor(brush, seed = 0, linear = [1, 0, 0, 1]) {;_class2.prototype.__init3.call(this);_class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this);_class2.prototype.__init7.call(this);_class2.prototype.__init8.call(this);_class2.prototype.__init9.call(this);_class2.prototype.__init10.call(this);_class2.prototype.__init11.call(this);
|
|
429
202
|
this.brush = brush;
|
|
430
203
|
this.seed = seed;
|
|
431
204
|
this.linear = linear;
|
|
@@ -433,15 +206,15 @@ var PenDabWalker = (_class4 = class {
|
|
|
433
206
|
|
|
434
207
|
|
|
435
208
|
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
209
|
+
__init3() {this.last = null}
|
|
210
|
+
__init4() {this.nextAt = 0}
|
|
211
|
+
__init5() {this.pendingFirst = null}
|
|
212
|
+
__init6() {this.index = 0}
|
|
213
|
+
__init7() {this.dir = 0}
|
|
214
|
+
__init8() {this.lastT = null}
|
|
215
|
+
__init9() {this.firstT = null}
|
|
216
|
+
__init10() {this.speed = null}
|
|
217
|
+
__init11() {this.travelled = 0}
|
|
445
218
|
sample(p) {
|
|
446
219
|
const o = penOrientation(p);
|
|
447
220
|
let speed = null;
|
|
@@ -494,22 +267,22 @@ var PenDabWalker = (_class4 = class {
|
|
|
494
267
|
const i = this.index++;
|
|
495
268
|
const seed = this.seed;
|
|
496
269
|
let diameter = this.diameter(s);
|
|
497
|
-
if (dyn.sizeJitter) diameter *= Math.max(0.05, 1 + dyn.sizeJitter * randSigned(seed, i, 1 /* Size */));
|
|
270
|
+
if (dyn.sizeJitter) diameter *= Math.max(0.05, 1 + dyn.sizeJitter * _chunk3T5O225Tcjs.randSigned.call(void 0, seed, i, 1 /* Size */));
|
|
498
271
|
const base = tip.angle * Math.PI / 180;
|
|
499
272
|
let angle;
|
|
500
273
|
if (rotation === "stroke") angle = this.dir + base;
|
|
501
274
|
else if (rotation === "barrel" && s.twist !== null) angle = this.mapAngle(base - s.twist * Math.PI / 180);
|
|
502
275
|
else if (dyn.tiltRoundness > 0 && s.lean > 0.02) angle = this.mapAngle(base - s.azimuth);
|
|
503
276
|
else angle = this.mapAngle(base);
|
|
504
|
-
if (dyn.angleJitter) angle += dyn.angleJitter * Math.PI * randSigned(seed, i, 2 /* Angle */);
|
|
277
|
+
if (dyn.angleJitter) angle += dyn.angleJitter * Math.PI * _chunk3T5O225Tcjs.randSigned.call(void 0, seed, i, 2 /* Angle */);
|
|
505
278
|
let opacity = tip.pressureOpacity ? s.pressure : 1;
|
|
506
279
|
opacity *= 1 - dyn.tiltOpacity * s.lean * 0.8;
|
|
507
280
|
if (s.speed !== null && dyn.velocityOpacity) opacity *= Math.max(0, 1 + dyn.velocityOpacity * (Math.min(1, s.speed / FULL_SPEED) - 0.5));
|
|
508
|
-
if (dyn.opacityJitter) opacity *= 1 - dyn.opacityJitter * (randSigned(seed, i, 3 /* Opacity */) * 0.5 + 0.5);
|
|
281
|
+
if (dyn.opacityJitter) opacity *= 1 - dyn.opacityJitter * (_chunk3T5O225Tcjs.randSigned.call(void 0, seed, i, 3 /* Opacity */) * 0.5 + 0.5);
|
|
509
282
|
const flow = tip.flow * (1 - dyn.pressureFlow + dyn.pressureFlow * s.pressure);
|
|
510
283
|
let { x, y } = s;
|
|
511
284
|
if (dyn.scatter) {
|
|
512
|
-
const off = dyn.scatter * diameter * randSigned(seed, i, 4 /* Scatter */);
|
|
285
|
+
const off = dyn.scatter * diameter * _chunk3T5O225Tcjs.randSigned.call(void 0, seed, i, 4 /* Scatter */);
|
|
513
286
|
x += Math.sin(this.dir) * off;
|
|
514
287
|
y += Math.cos(this.dir) * off;
|
|
515
288
|
}
|
|
@@ -575,7 +348,7 @@ var PenDabWalker = (_class4 = class {
|
|
|
575
348
|
this.pendingFirst = null;
|
|
576
349
|
}
|
|
577
350
|
}
|
|
578
|
-
},
|
|
351
|
+
}, _class2);
|
|
579
352
|
function lerpAngle(a, b, t) {
|
|
580
353
|
let d = b - a;
|
|
581
354
|
while (d > Math.PI) d -= 2 * Math.PI;
|
|
@@ -588,8 +361,8 @@ function lerpDegrees(a, b, t) {
|
|
|
588
361
|
while (d < -180) d += 360;
|
|
589
362
|
return a + d * t;
|
|
590
363
|
}
|
|
591
|
-
var DryStroke = (
|
|
592
|
-
constructor(brush, options) {;
|
|
364
|
+
var DryStroke = (_class3 = class {
|
|
365
|
+
constructor(brush, options) {;_class3.prototype.__init12.call(this);_class3.prototype.__init13.call(this);_class3.prototype.__init14.call(this);_class3.prototype.__init15.call(this);_class3.prototype.__init16.call(this);
|
|
593
366
|
this.brush = brush;
|
|
594
367
|
this.options = options;
|
|
595
368
|
this.smoother = new PenSmoother(brush.tip.smoothing, brush.pressureSmoothing);
|
|
@@ -599,15 +372,15 @@ var DryStroke = (_class5 = class {
|
|
|
599
372
|
}
|
|
600
373
|
|
|
601
374
|
|
|
602
|
-
|
|
603
|
-
|
|
375
|
+
__init12() {this.coverage = new (0, _chunk3T5O225Tcjs.CoverageMap)()}
|
|
376
|
+
__init13() {this.dabCount = 0}
|
|
604
377
|
|
|
605
378
|
|
|
606
379
|
|
|
607
380
|
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
381
|
+
__init14() {this.buf = new Float32Array(0)}
|
|
382
|
+
__init15() {this.lastRaw = null}
|
|
383
|
+
__init16() {this.lastFed = null}
|
|
611
384
|
/** Feeds raw pen samples; returns the document rectangles the new dabs touched. */
|
|
612
385
|
push(points) {
|
|
613
386
|
const dabs = [];
|
|
@@ -633,16 +406,16 @@ var DryStroke = (_class5 = class {
|
|
|
633
406
|
const hardness = this.brush.tip.hardness;
|
|
634
407
|
const grain = this.options.grain;
|
|
635
408
|
for (const d of dabs) {
|
|
636
|
-
const rect =
|
|
409
|
+
const rect = _chunk3T5O225Tcjs.dabRect.call(void 0, d, hardness);
|
|
637
410
|
const n = rect.width * rect.height;
|
|
638
411
|
if (this.buf.length < n) this.buf = new Float32Array(n);
|
|
639
412
|
const vals = this.buf.subarray(0, n);
|
|
640
|
-
|
|
413
|
+
_chunk3T5O225Tcjs.rasterizeDab.call(void 0, d, hardness, rect, vals);
|
|
641
414
|
if (this.depth > 0 && grain) {
|
|
642
415
|
for (let yy = 0, k = 0; yy < rect.height; yy++) {
|
|
643
416
|
const y = rect.y + yy + 0.5;
|
|
644
417
|
for (let xx = 0; xx < rect.width; xx++, k++) {
|
|
645
|
-
if (vals[k] > 0) vals[k] *= grainCatch(grain.at(rect.x + xx + 0.5, y), this.depth, d.pressure);
|
|
418
|
+
if (vals[k] > 0) vals[k] *= _chunk3T5O225Tcjs.grainCatch.call(void 0, grain.at(rect.x + xx + 0.5, y), this.depth, d.pressure);
|
|
646
419
|
}
|
|
647
420
|
}
|
|
648
421
|
}
|
|
@@ -652,7 +425,7 @@ var DryStroke = (_class5 = class {
|
|
|
652
425
|
}
|
|
653
426
|
return rects;
|
|
654
427
|
}
|
|
655
|
-
},
|
|
428
|
+
}, _class3);
|
|
656
429
|
function mixerTip(brush) {
|
|
657
430
|
return { ...brush.tip, smoothing: 0, pressureSize: brush.tip.pressureSize };
|
|
658
431
|
}
|
|
@@ -715,14 +488,14 @@ function stampCoverage(kind, u, v, t) {
|
|
|
715
488
|
}
|
|
716
489
|
case "splat": {
|
|
717
490
|
let rr = 0.55;
|
|
718
|
-
for (let k = 1; k <= 3; k++) rr += 0.08 * Math.sin(a * (k + 2) +
|
|
491
|
+
for (let k = 1; k <= 3; k++) rr += 0.08 * Math.sin(a * (k + 2) + _chunk3T5O225Tcjs.hash2.call(void 0, k, 1, t) * 6.28) / k;
|
|
719
492
|
let c = edge(rr - r);
|
|
720
493
|
for (let k = 0; k < 4; k++) {
|
|
721
|
-
const ang =
|
|
722
|
-
const dist = 0.72 + 0.2 *
|
|
494
|
+
const ang = _chunk3T5O225Tcjs.hash2.call(void 0, k, 7, t) * Math.PI * 2;
|
|
495
|
+
const dist = 0.72 + 0.2 * _chunk3T5O225Tcjs.hash2.call(void 0, k, 9, t);
|
|
723
496
|
const dx = u - Math.cos(ang) * dist;
|
|
724
497
|
const dy = v - Math.sin(ang) * dist;
|
|
725
|
-
c = Math.max(c, edge(0.08 + 0.06 *
|
|
498
|
+
c = Math.max(c, edge(0.08 + 0.06 * _chunk3T5O225Tcjs.hash2.call(void 0, k, 11, t) - Math.hypot(dx, dy)));
|
|
726
499
|
}
|
|
727
500
|
return c;
|
|
728
501
|
}
|
|
@@ -760,7 +533,7 @@ function drawSticker(medium, s) {
|
|
|
760
533
|
c /= 4;
|
|
761
534
|
if (c <= 0) continue;
|
|
762
535
|
cov[p] = c;
|
|
763
|
-
const shade = 1 + 0.12 * (-(u + v) / 2) + 0.06 * (
|
|
536
|
+
const shade = 1 + 0.12 * (-(u + v) / 2) + 0.06 * (_chunk3T5O225Tcjs.hash2.call(void 0, px, rect.y + yy, s.seed) - 0.5);
|
|
764
537
|
field[p * 3] = Math.min(1, Math.max(0, r * shade));
|
|
765
538
|
field[p * 3 + 1] = Math.min(1, Math.max(0, g * shade));
|
|
766
539
|
field[p * 3 + 2] = Math.min(1, Math.max(0, b * shade));
|
|
@@ -771,15 +544,15 @@ function drawSticker(medium, s) {
|
|
|
771
544
|
}
|
|
772
545
|
function jitterColor(hex, amount, seed, i) {
|
|
773
546
|
const [r, g, b] = hexRgb(hex);
|
|
774
|
-
const l = (
|
|
775
|
-
const h = (
|
|
547
|
+
const l = (_chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 61) - 0.5) * amount * 0.6;
|
|
548
|
+
const h = (_chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 63) - 0.5) * amount;
|
|
776
549
|
const m = (r + g + b) / 3;
|
|
777
550
|
const rot = (c0, c1) => c0 + (c1 - c0) * h;
|
|
778
551
|
const out = [rot(r, g), rot(g, b), rot(b, r)].map((c) => Math.min(1, Math.max(0, c + l + (c - m) * 0)));
|
|
779
552
|
return "#" + out.map((c) => Math.round(c * 255).toString(16).padStart(2, "0")).join("");
|
|
780
553
|
}
|
|
781
|
-
var StickerSpray = (
|
|
782
|
-
constructor(init) {;
|
|
554
|
+
var StickerSpray = (_class4 = class {
|
|
555
|
+
constructor(init) {;_class4.prototype.__init17.call(this);_class4.prototype.__init18.call(this);_class4.prototype.__init19.call(this);_class4.prototype.__init20.call(this);
|
|
783
556
|
this.init = init;
|
|
784
557
|
const b = init.brush;
|
|
785
558
|
this.smoother = new PenSmoother(b.tip.smoothing, b.pressureSmoothing);
|
|
@@ -787,18 +560,18 @@ var StickerSpray = (_class6 = class {
|
|
|
787
560
|
const spacing = Math.max(0.05, 1 / Math.max(0.05, b.sticker.density * 4));
|
|
788
561
|
const walk = { ...b, tip: { ...b.tip, spacing }, dynamics: { ...b.dynamics, scatter: 0, sizeJitter: 0, angleJitter: 0 } };
|
|
789
562
|
this.walkers = this.copies.map((c, i) => new PenDabWalker(walk, init.seed + i * 7919 | 0, c.linear));
|
|
790
|
-
this.medium = new (0,
|
|
563
|
+
this.medium = new (0, _chunk3T5O225Tcjs.TileMedium)(init.target, {});
|
|
791
564
|
this.next = init.nextId;
|
|
792
565
|
}
|
|
793
566
|
|
|
794
|
-
|
|
795
|
-
|
|
567
|
+
__init17() {this.dabCount = 0}
|
|
568
|
+
__init18() {this.stickers = []}
|
|
796
569
|
|
|
797
570
|
|
|
798
571
|
|
|
799
572
|
|
|
800
|
-
|
|
801
|
-
|
|
573
|
+
__init19() {this.lastRaw = null}
|
|
574
|
+
__init20() {this.lastFed = null}
|
|
802
575
|
|
|
803
576
|
push(points) {
|
|
804
577
|
const rects = [];
|
|
@@ -830,21 +603,21 @@ var StickerSpray = (_class6 = class {
|
|
|
830
603
|
const st = this.init.brush.sticker;
|
|
831
604
|
const i = this.next;
|
|
832
605
|
const seed = this.init.seed;
|
|
833
|
-
const size = d.radius * 2 * (1 - st.sizeJitter * 0.7 *
|
|
606
|
+
const size = d.radius * 2 * (1 - st.sizeJitter * 0.7 * _chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 51));
|
|
834
607
|
const off = st.scatter * d.radius * 2;
|
|
835
|
-
const a =
|
|
836
|
-
const dist =
|
|
608
|
+
const a = _chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 53) * Math.PI * 2;
|
|
609
|
+
const dist = _chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 55) * off;
|
|
837
610
|
const base = this.colorAt(d, Math.cos(a) * dist, Math.sin(a) * dist);
|
|
838
611
|
const sticker = {
|
|
839
612
|
id: `st${this.next++}`,
|
|
840
|
-
stamp: _nullishCoalesce(st.stamps[Math.floor(
|
|
613
|
+
stamp: _nullishCoalesce(st.stamps[Math.floor(_chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 57) * st.stamps.length)], () => ( "dot")),
|
|
841
614
|
x: Math.round((d.x + Math.cos(a) * dist) * 100) / 100,
|
|
842
615
|
y: Math.round((d.y + Math.sin(a) * dist) * 100) / 100,
|
|
843
616
|
size: Math.max(2, Math.round(size * 10) / 10),
|
|
844
|
-
rotation: Math.round((-d.angle * 180 / Math.PI + (
|
|
617
|
+
rotation: Math.round((-d.angle * 180 / Math.PI + (_chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 59) * 2 - 1) * 180 * st.rotationJitter) * 10) / 10,
|
|
845
618
|
color: st.colorJitter > 0 ? jitterColor(base.color, st.colorJitter, seed, i) : base.color,
|
|
846
619
|
opacity: Math.round(Math.min(1, d.opacity * this.init.brush.tip.opacity * base.alpha) * 1e3) / 1e3,
|
|
847
|
-
seed: Math.floor(
|
|
620
|
+
seed: Math.floor(_chunk3T5O225Tcjs.rand01.call(void 0, seed, i, 65) * 1e9)
|
|
848
621
|
};
|
|
849
622
|
this.stickers.push(sticker);
|
|
850
623
|
rects.push(drawSticker(this.medium, sticker));
|
|
@@ -855,13 +628,13 @@ var StickerSpray = (_class6 = class {
|
|
|
855
628
|
colorAt(d, dx, dy) {
|
|
856
629
|
const g = this.init.paint;
|
|
857
630
|
if (!g) return { color: this.init.color, alpha: 1 };
|
|
858
|
-
this.sampler ??= new (0,
|
|
631
|
+
this.sampler ??= new (0, _chunk3T5O225Tcjs.PaintGradientSampler)(g, this.init.seed);
|
|
859
632
|
const s = g.map.by === "across-tip" ? this.sampler.sample(((dx * Math.sin(d.direction) + dy * Math.cos(d.direction)) / Math.max(0.5, d.radius) + 1) / 2) : this.sampler.dab(d);
|
|
860
633
|
return { color: "#" + s.rgb.map((c) => Math.round(Math.min(1, Math.max(0, c)) * 255).toString(16).padStart(2, "0")).join(""), alpha: s.alpha };
|
|
861
634
|
}
|
|
862
|
-
},
|
|
635
|
+
}, _class4);
|
|
863
636
|
function renderStickers(stickers, target) {
|
|
864
|
-
const medium = new (0,
|
|
637
|
+
const medium = new (0, _chunk3T5O225Tcjs.TileMedium)(target, {});
|
|
865
638
|
for (const s of stickers) drawSticker(medium, s);
|
|
866
639
|
}
|
|
867
640
|
function normalizeStickerUpdate(u) {
|
|
@@ -917,12 +690,12 @@ function stickerSurface(stickers) {
|
|
|
917
690
|
|
|
918
691
|
// src/paint-editor/procedural.ts
|
|
919
692
|
var STEP_PX = 1.5;
|
|
920
|
-
var MarkStroke = (
|
|
921
|
-
constructor(brush, options) {;
|
|
693
|
+
var MarkStroke = (_class5 = class {
|
|
694
|
+
constructor(brush, options) {;_class5.prototype.__init21.call(this);_class5.prototype.__init22.call(this);_class5.prototype.__init23.call(this);_class5.prototype.__init24.call(this);_class5.prototype.__init25.call(this);_class5.prototype.__init26.call(this);_class5.prototype.__init27.call(this);
|
|
922
695
|
this.brush = brush;
|
|
923
696
|
this.options = options;
|
|
924
|
-
this.sampler = options.paint ? new (0,
|
|
925
|
-
this.tipTable = _optionalChain([this, 'access', _5 => _5.sampler, 'optionalAccess', _6 => _6.acrossTip]) ? this.sampler.tipTable(
|
|
697
|
+
this.sampler = options.paint ? new (0, _chunk3T5O225Tcjs.PaintGradientSampler)(options.paint, _nullishCoalesce(options.seed, () => ( 0))) : null;
|
|
698
|
+
this.tipTable = _optionalChain([this, 'access', _5 => _5.sampler, 'optionalAccess', _6 => _6.acrossTip]) ? this.sampler.tipTable(_chunk3T5O225Tcjs.TIP_GRADIENT_STEPS) : null;
|
|
926
699
|
this.smoother = new PenSmoother(brush.tip.smoothing, brush.pressureSmoothing);
|
|
927
700
|
this.copies = _optionalChain([options, 'access', _7 => _7.copies, 'optionalAccess', _8 => _8.length]) ? options.copies : [IDENTITY_COPY];
|
|
928
701
|
this.seed = _nullishCoalesce(options.seed, () => ( 0));
|
|
@@ -932,21 +705,21 @@ var MarkStroke = (_class7 = class {
|
|
|
932
705
|
}
|
|
933
706
|
|
|
934
707
|
|
|
935
|
-
|
|
936
|
-
|
|
708
|
+
__init21() {this.coverage = new (0, _chunk3T5O225Tcjs.CoverageMap)()}
|
|
709
|
+
__init22() {this.dabCount = 0}
|
|
937
710
|
|
|
938
711
|
|
|
939
712
|
|
|
940
713
|
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
714
|
+
__init23() {this.buf = new Float32Array(0)}
|
|
715
|
+
__init24() {this.lastRaw = null}
|
|
716
|
+
__init25() {this.lastFed = null}
|
|
944
717
|
|
|
945
718
|
|
|
946
719
|
|
|
947
720
|
/** The pen dab the marks being made belong to, and its gradient colour. */
|
|
948
|
-
|
|
949
|
-
|
|
721
|
+
__init26() {this.pen = null}
|
|
722
|
+
__init27() {this.penColor = { rgb: [0, 0, 0], alpha: 1 }}
|
|
950
723
|
push(points) {
|
|
951
724
|
const rects = [];
|
|
952
725
|
for (const raw of points) {
|
|
@@ -994,16 +767,16 @@ var MarkStroke = (_class7 = class {
|
|
|
994
767
|
if (!(r > 0.05) || !(alpha > 0)) return;
|
|
995
768
|
const dab = { x, y, radius: Math.max(0.5, r), alpha: Math.min(1, alpha), opacity: Math.min(1, opacity), angle: 0, roundness: 1 };
|
|
996
769
|
const hardness = this.brush.tip.hardness;
|
|
997
|
-
const rect =
|
|
770
|
+
const rect = _chunk3T5O225Tcjs.dabRect.call(void 0, dab, hardness);
|
|
998
771
|
const n = rect.width * rect.height;
|
|
999
772
|
if (n <= 0) return;
|
|
1000
773
|
if (this.buf.length < n) this.buf = new Float32Array(n);
|
|
1001
774
|
const vals = this.buf.subarray(0, n);
|
|
1002
|
-
|
|
775
|
+
_chunk3T5O225Tcjs.rasterizeDab.call(void 0, dab, hardness, rect, vals);
|
|
1003
776
|
const grain = this.options.grain;
|
|
1004
777
|
if (this.depth > 0 && grain) {
|
|
1005
778
|
for (let yy = 0, k = 0; yy < rect.height; yy++)
|
|
1006
|
-
for (let xx = 0; xx < rect.width; xx++, k++) if (vals[k] > 0) vals[k] *= grainCatch(grain.at(rect.x + xx + 0.5, rect.y + yy + 0.5), this.depth, pressure);
|
|
779
|
+
for (let xx = 0; xx < rect.width; xx++, k++) if (vals[k] > 0) vals[k] *= _chunk3T5O225Tcjs.grainCatch.call(void 0, grain.at(rect.x + xx + 0.5, rect.y + yy + 0.5), this.depth, pressure);
|
|
1007
780
|
}
|
|
1008
781
|
const color = this.markColor(x, y);
|
|
1009
782
|
if (color && color.alpha < 1) for (let k = 0; k < n; k++) vals[k] *= color.alpha;
|
|
@@ -1018,7 +791,7 @@ var MarkStroke = (_class7 = class {
|
|
|
1018
791
|
const n = Math.max(1, Math.ceil(len / step));
|
|
1019
792
|
for (let i = 1; i <= n; i++) this.mark(x0 + (x1 - x0) * i / n, y0 + (y1 - y0) * i / n, r, alpha, opacity, pressure, rects);
|
|
1020
793
|
}
|
|
1021
|
-
},
|
|
794
|
+
}, _class5);
|
|
1022
795
|
var PARTICLE_KINDS = ["string", "spring", "orbit", "flow"];
|
|
1023
796
|
var PARTICLE_RENDERS = ["dot", "line", "sequence"];
|
|
1024
797
|
var DEFAULT_PARTICLE = { kind: "spring", render: "line", count: 12, size: 0.08, spread: 0.5, stiffness: 0.4, damping: 0.25, speed: 0.5, gravity: 0, life: 0.5, interval: 0.3 };
|
|
@@ -1046,7 +819,7 @@ function curl(x, y, seed) {
|
|
|
1046
819
|
const fy = v - y0;
|
|
1047
820
|
const sx = fx * fx * (3 - 2 * fx);
|
|
1048
821
|
const sy = fy * fy * (3 - 2 * fy);
|
|
1049
|
-
const h = (a2, b2) =>
|
|
822
|
+
const h = (a2, b2) => _chunk3T5O225Tcjs.rand01.call(void 0, seed, a2 * 73856093 + b2 * 19349663, 41);
|
|
1050
823
|
const a = h(x0, y0);
|
|
1051
824
|
const b = h(x0 + 1, y0);
|
|
1052
825
|
const c = h(x0, y0 + 1);
|
|
@@ -1056,12 +829,12 @@ function curl(x, y, seed) {
|
|
|
1056
829
|
const e = 0.01;
|
|
1057
830
|
return [(n(x, y + e) - n(x, y - e)) / (2 * e), -(n(x + e, y) - n(x - e, y)) / (2 * e)];
|
|
1058
831
|
}
|
|
1059
|
-
var ParticleStroke = (
|
|
832
|
+
var ParticleStroke = (_class6 = class extends MarkStroke {
|
|
1060
833
|
|
|
1061
834
|
|
|
1062
|
-
|
|
835
|
+
__init28() {this.spawn = 0}
|
|
1063
836
|
constructor(brush, options) {
|
|
1064
|
-
super(brush, options);
|
|
837
|
+
super(brush, options);_class6.prototype.__init28.call(this);;
|
|
1065
838
|
this.s = brush.particle;
|
|
1066
839
|
this.sets = this.copies.map(() => []);
|
|
1067
840
|
}
|
|
@@ -1070,11 +843,11 @@ var ParticleStroke = (_class8 = class extends MarkStroke {
|
|
|
1070
843
|
const list = this.sets[copy];
|
|
1071
844
|
const size = Math.max(1, d.radius * 2);
|
|
1072
845
|
for (let i = 0; i < (s.kind === "flow" ? 0 : s.count); i++) {
|
|
1073
|
-
const r =
|
|
1074
|
-
const a =
|
|
846
|
+
const r = _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 3 + copy) * s.spread * size * 0.5;
|
|
847
|
+
const a = _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 5 + copy) * Math.PI * 2;
|
|
1075
848
|
const ox = Math.cos(a) * r;
|
|
1076
849
|
const oy = Math.sin(a) * r;
|
|
1077
|
-
const p = { x: d.x + ox, y: d.y + oy, vx: 0, vy: 0, ox, oy, k: 0.6 + 0.8 *
|
|
850
|
+
const p = { x: d.x + ox, y: d.y + oy, vx: 0, vy: 0, ox, oy, k: 0.6 + 0.8 * _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 7), phase: a, age: 0, run: 0, bead: 0, alive: true };
|
|
1078
851
|
if (s.kind === "string") p.strand = Array.from({ length: 6 }, () => ({ x: d.x + ox, y: d.y + oy, vx: 0, vy: 0 }));
|
|
1079
852
|
if (s.kind === "orbit") {
|
|
1080
853
|
p.ox = Math.max(1, r + size * 0.15);
|
|
@@ -1099,8 +872,8 @@ var ParticleStroke = (_class8 = class extends MarkStroke {
|
|
|
1099
872
|
while (this.spawn >= 1) {
|
|
1100
873
|
this.spawn -= 1;
|
|
1101
874
|
const i = this.dabCount + list.length * 31 + Math.floor(d.index);
|
|
1102
|
-
const a =
|
|
1103
|
-
const r =
|
|
875
|
+
const a = _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 11 + copy) * Math.PI * 2;
|
|
876
|
+
const r = _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 13 + copy) * s.spread * size * 0.5;
|
|
1104
877
|
list.push({ x: d.x + Math.cos(a) * r, y: d.y + Math.sin(a) * r, vx: 0, vy: 0, ox: 0, oy: 0, k: 1, phase: a, age: 0, run: 0, bead: 0, alive: true });
|
|
1105
878
|
}
|
|
1106
879
|
}
|
|
@@ -1135,7 +908,7 @@ var ParticleStroke = (_class8 = class extends MarkStroke {
|
|
|
1135
908
|
break;
|
|
1136
909
|
}
|
|
1137
910
|
case "orbit": {
|
|
1138
|
-
p.phase += (0.05 + 0.3 * s.speed) * (i % 2 ? -1 : 1) * (0.7 + 0.6 *
|
|
911
|
+
p.phase += (0.05 + 0.3 * s.speed) * (i % 2 ? -1 : 1) * (0.7 + 0.6 * _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 17));
|
|
1139
912
|
p.x = d.x + Math.cos(p.phase) * p.ox;
|
|
1140
913
|
p.y = d.y + Math.sin(p.phase) * p.ox + g * p.ox;
|
|
1141
914
|
break;
|
|
@@ -1173,7 +946,7 @@ var ParticleStroke = (_class8 = class extends MarkStroke {
|
|
|
1173
946
|
}
|
|
1174
947
|
if (s.kind === "flow" && list.length > 512) this.sets[copy] = list.filter((p) => p.alive);
|
|
1175
948
|
}
|
|
1176
|
-
},
|
|
949
|
+
}, _class6);
|
|
1177
950
|
var DEFAULT_BRISTLE = { count: 32, stiffness: 0.5, splay: 0.5, thickness: 0.06, load: 0.6, jitter: 0.4 };
|
|
1178
951
|
function normalizeBristle(raw = {}, base = DEFAULT_BRISTLE) {
|
|
1179
952
|
return {
|
|
@@ -1194,16 +967,16 @@ var BristleStroke = class extends MarkStroke {
|
|
|
1194
967
|
const s = this.s;
|
|
1195
968
|
this.tufts = this.copies.map(
|
|
1196
969
|
(_, c) => Array.from({ length: s.count }, (_2, i) => {
|
|
1197
|
-
const a =
|
|
1198
|
-
const r = Math.sqrt(
|
|
970
|
+
const a = _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 21 + c) * Math.PI * 2;
|
|
971
|
+
const r = Math.sqrt(_chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 23 + c));
|
|
1199
972
|
return {
|
|
1200
973
|
u: Math.cos(a) * r,
|
|
1201
974
|
v: Math.sin(a) * r,
|
|
1202
975
|
x: 0,
|
|
1203
976
|
y: 0,
|
|
1204
|
-
paint: 1 - s.jitter * 0.4 *
|
|
1205
|
-
thirst: 1 + s.jitter * (
|
|
1206
|
-
w: 1 + s.jitter * 0.6 * (
|
|
977
|
+
paint: 1 - s.jitter * 0.4 * _chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 25 + c),
|
|
978
|
+
thirst: 1 + s.jitter * (_chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 27 + c) * 2 - 1),
|
|
979
|
+
w: 1 + s.jitter * 0.6 * (_chunk3T5O225Tcjs.rand01.call(void 0, this.seed, i, 29 + c) - 0.5),
|
|
1207
980
|
started: false
|
|
1208
981
|
};
|
|
1209
982
|
})
|
|
@@ -1402,12 +1175,12 @@ function normalizePaintBrush(raw = {}, base) {
|
|
|
1402
1175
|
if (rb.dirty !== void 0) mixerIn.cleanEachStroke = !rb.dirty;
|
|
1403
1176
|
if (rb.mixing !== void 0) mixerIn.mixing = rb.mixing;
|
|
1404
1177
|
}
|
|
1405
|
-
const mixer =
|
|
1178
|
+
const mixer = _chunk3T5O225Tcjs.normalizeMixer.call(void 0, mixerIn);
|
|
1406
1179
|
let behavior = normalizeBehavior(rb, b.behavior);
|
|
1407
1180
|
if (engine === "mixer") behavior = { ...behavior, pickup: mixer.wet, mix: mixer.mix, dirty: !mixer.cleanEachStroke, mixing: mixer.mixing };
|
|
1408
1181
|
let paint = _nullishCoalesce(b.paint, () => ( null));
|
|
1409
1182
|
if (raw.paint !== void 0) {
|
|
1410
|
-
const p =
|
|
1183
|
+
const p = _chunk3T5O225Tcjs.readPaintSource.call(void 0, raw.paint);
|
|
1411
1184
|
paint = p && p.type === "gradient" ? p : null;
|
|
1412
1185
|
} else if (rb.multicolor !== void 0) {
|
|
1413
1186
|
const mc = normalizeMultiColor(rb.multicolor, _nullishCoalesce(paintToMultiColor(paint), () => ( DEFAULT_MULTI_COLOR)));
|
|
@@ -1419,7 +1192,7 @@ function normalizePaintBrush(raw = {}, base) {
|
|
|
1419
1192
|
name: typeof raw.name === "string" && raw.name.trim() ? raw.name.trim().slice(0, 80) : b.name,
|
|
1420
1193
|
category: PAINT_BRUSH_CATEGORIES.includes(raw.category) ? raw.category : b.category,
|
|
1421
1194
|
engine,
|
|
1422
|
-
tip:
|
|
1195
|
+
tip: _chunk3T5O225Tcjs.normalizeBrush.call(void 0, { ...b.tip, ..._nullishCoalesce(raw.tip, () => ( {})) }),
|
|
1423
1196
|
grain: unit4(raw.grain, b.grain),
|
|
1424
1197
|
pressureSmoothing: range(raw.pressureSmoothing, 0, 0.95, b.pressureSmoothing),
|
|
1425
1198
|
rotation: BRUSH_ROTATIONS.includes(raw.rotation) ? raw.rotation : b.rotation,
|
|
@@ -1427,8 +1200,8 @@ function normalizePaintBrush(raw = {}, base) {
|
|
|
1427
1200
|
mixer,
|
|
1428
1201
|
loadsColor: typeof raw.loadsColor === "boolean" ? raw.loadsColor : b.loadsColor,
|
|
1429
1202
|
behavior,
|
|
1430
|
-
blender:
|
|
1431
|
-
smudge:
|
|
1203
|
+
blender: _chunk3T5O225Tcjs.normalizeBlender.call(void 0, _nullishCoalesce(raw.blender, () => ( {})), b.blender),
|
|
1204
|
+
smudge: _chunk3T5O225Tcjs.normalizeSmudge.call(void 0, _nullishCoalesce(raw.smudge, () => ( {})), b.smudge),
|
|
1432
1205
|
wet: normalizeWetBrush(_nullishCoalesce(raw.wet, () => ( {})), _nullishCoalesce(b.wet, () => ( DEFAULT_WET_BRUSH))),
|
|
1433
1206
|
impasto: normalizeImpasto(_nullishCoalesce(raw.impasto, () => ( {})), _nullishCoalesce(b.impasto, () => ( DEFAULT_IMPASTO))),
|
|
1434
1207
|
particle: normalizeParticle(_nullishCoalesce(raw.particle, () => ( {})), _nullishCoalesce(b.particle, () => ( DEFAULT_PARTICLE))),
|
|
@@ -1443,16 +1216,16 @@ var BASE_BRUSH = {
|
|
|
1443
1216
|
name: "Round",
|
|
1444
1217
|
category: "custom",
|
|
1445
1218
|
engine: "dab",
|
|
1446
|
-
tip: { ...
|
|
1219
|
+
tip: { ..._chunk3T5O225Tcjs.DEFAULT_BRUSH },
|
|
1447
1220
|
grain: 0,
|
|
1448
1221
|
pressureSmoothing: 0,
|
|
1449
1222
|
rotation: "fixed",
|
|
1450
1223
|
dynamics: { ...DEFAULT_DYNAMICS },
|
|
1451
|
-
mixer: { ...
|
|
1224
|
+
mixer: { ..._chunk3T5O225Tcjs.DEFAULT_MIXER },
|
|
1452
1225
|
loadsColor: true,
|
|
1453
1226
|
behavior: { ...DEFAULT_BEHAVIOR, multicolor: { ...DEFAULT_MULTI_COLOR, colors: [] } },
|
|
1454
|
-
blender: { ...
|
|
1455
|
-
smudge: { ...
|
|
1227
|
+
blender: { ..._chunk3T5O225Tcjs.DEFAULT_BLENDER },
|
|
1228
|
+
smudge: { ..._chunk3T5O225Tcjs.DEFAULT_SMUDGE },
|
|
1456
1229
|
wet: { ...DEFAULT_WET_BRUSH },
|
|
1457
1230
|
impasto: { ...DEFAULT_IMPASTO },
|
|
1458
1231
|
particle: { ...DEFAULT_PARTICLE },
|
|
@@ -2064,13 +1837,5 @@ function parseBrushLibrary(raw, problems = []) {
|
|
|
2064
1837
|
|
|
2065
1838
|
|
|
2066
1839
|
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
exports.randSigned = randSigned; exports.seedFromString = seedFromString; exports.TileableNoise = TileableNoise; exports.GRAIN_PATTERNS = GRAIN_PATTERNS; exports.PAPER_FAMILIES = PAPER_FAMILIES; exports.GRAIN_TILE = GRAIN_TILE; exports.PAPER_LIBRARY = PAPER_LIBRARY; exports.DEFAULT_PAPER = DEFAULT_PAPER; exports.paperPreset = paperPreset; exports.clonePaper = clonePaper; exports.normalizePaper = normalizePaper; exports.grainHeights = grainHeights; exports.PaperGrain = PaperGrain; exports.grainCatch = grainCatch; exports.hexToRgb8 = hexToRgb8; exports.renderPaper = renderPaper; exports.penOrientation = penOrientation; exports.tiltToOrientation = tiltToOrientation; exports.PenSmoother = PenSmoother; exports.IDENTITY_COPY = IDENTITY_COPY; exports.PenDabWalker = PenDabWalker; exports.DryStroke = DryStroke; exports.mixerTip = mixerTip; exports.toStrokePoint = toStrokePoint; exports.STAMP_KINDS = STAMP_KINDS; exports.DEFAULT_STICKER = DEFAULT_STICKER; exports.normalizeStickerSettings = normalizeStickerSettings; exports.stampCoverage = stampCoverage; exports.stickerRect = stickerRect; exports.drawSticker = drawSticker; exports.StickerSpray = StickerSpray; exports.renderStickers = renderStickers; exports.normalizeStickerUpdate = normalizeStickerUpdate; exports.stickerSurface = stickerSurface; exports.PARTICLE_KINDS = PARTICLE_KINDS; exports.PARTICLE_RENDERS = PARTICLE_RENDERS; exports.DEFAULT_PARTICLE = DEFAULT_PARTICLE; exports.normalizeParticle = normalizeParticle; exports.ParticleStroke = ParticleStroke; exports.DEFAULT_BRISTLE = DEFAULT_BRISTLE; exports.normalizeBristle = normalizeBristle; exports.BristleStroke = BristleStroke; exports.PAINT_BRUSH_ENGINES = PAINT_BRUSH_ENGINES; exports.PAINT_BRUSH_CATEGORIES = PAINT_BRUSH_CATEGORIES; exports.WET_TOOLS = WET_TOOLS; exports.WET_MEDIA = WET_MEDIA; exports.DEFAULT_WET_BRUSH = DEFAULT_WET_BRUSH; exports.normalizeWetBrush = normalizeWetBrush; exports.IMPASTO_TOOLS = IMPASTO_TOOLS; exports.DEFAULT_IMPASTO = DEFAULT_IMPASTO; exports.normalizeImpasto = normalizeImpasto; exports.MULTI_COLOR_MODES = MULTI_COLOR_MODES; exports.DEFAULT_MULTI_COLOR = DEFAULT_MULTI_COLOR; exports.DEFAULT_BEHAVIOR = DEFAULT_BEHAVIOR; exports.BRUSH_ROTATIONS = BRUSH_ROTATIONS; exports.DEFAULT_DYNAMICS = DEFAULT_DYNAMICS; exports.normalizeDynamics = normalizeDynamics; exports.BRUSH_ID = BRUSH_ID; exports.normalizeMultiColor = normalizeMultiColor; exports.normalizeBehavior = normalizeBehavior; exports.isWetCapable = isWetCapable; exports.isWetBrush = isWetBrush; exports.usesPaintExchange = usesPaintExchange; exports.brushTakesPaint = brushTakesPaint; exports.paintToMultiColor = paintToMultiColor; exports.multiColorToPaint = multiColorToPaint; exports.normalizePaintBrush = normalizePaintBrush; exports.BUILTIN_BRUSHES = BUILTIN_BRUSHES; exports.DEFAULT_BRUSH_ID = DEFAULT_BRUSH_ID; exports.brushToJSON = brushToJSON; exports.parseBrushLibrary = parseBrushLibrary;
|
|
2076
|
-
//# sourceMappingURL=chunk-2XS6LTUP.cjs.map
|
|
1840
|
+
exports.PAPER_FAMILIES = PAPER_FAMILIES; exports.PAPER_LIBRARY = PAPER_LIBRARY; exports.DEFAULT_PAPER = DEFAULT_PAPER; exports.paperPreset = paperPreset; exports.clonePaper = clonePaper; exports.normalizePaper = normalizePaper; exports.hexToRgb8 = hexToRgb8; exports.renderPaper = renderPaper; exports.penOrientation = penOrientation; exports.tiltToOrientation = tiltToOrientation; exports.PenSmoother = PenSmoother; exports.IDENTITY_COPY = IDENTITY_COPY; exports.PenDabWalker = PenDabWalker; exports.DryStroke = DryStroke; exports.mixerTip = mixerTip; exports.toStrokePoint = toStrokePoint; exports.STAMP_KINDS = STAMP_KINDS; exports.DEFAULT_STICKER = DEFAULT_STICKER; exports.normalizeStickerSettings = normalizeStickerSettings; exports.stampCoverage = stampCoverage; exports.stickerRect = stickerRect; exports.drawSticker = drawSticker; exports.StickerSpray = StickerSpray; exports.renderStickers = renderStickers; exports.normalizeStickerUpdate = normalizeStickerUpdate; exports.stickerSurface = stickerSurface; exports.PARTICLE_KINDS = PARTICLE_KINDS; exports.PARTICLE_RENDERS = PARTICLE_RENDERS; exports.DEFAULT_PARTICLE = DEFAULT_PARTICLE; exports.normalizeParticle = normalizeParticle; exports.ParticleStroke = ParticleStroke; exports.DEFAULT_BRISTLE = DEFAULT_BRISTLE; exports.normalizeBristle = normalizeBristle; exports.BristleStroke = BristleStroke; exports.PAINT_BRUSH_ENGINES = PAINT_BRUSH_ENGINES; exports.PAINT_BRUSH_CATEGORIES = PAINT_BRUSH_CATEGORIES; exports.WET_TOOLS = WET_TOOLS; exports.WET_MEDIA = WET_MEDIA; exports.DEFAULT_WET_BRUSH = DEFAULT_WET_BRUSH; exports.normalizeWetBrush = normalizeWetBrush; exports.IMPASTO_TOOLS = IMPASTO_TOOLS; exports.DEFAULT_IMPASTO = DEFAULT_IMPASTO; exports.normalizeImpasto = normalizeImpasto; exports.MULTI_COLOR_MODES = MULTI_COLOR_MODES; exports.DEFAULT_MULTI_COLOR = DEFAULT_MULTI_COLOR; exports.DEFAULT_BEHAVIOR = DEFAULT_BEHAVIOR; exports.BRUSH_ROTATIONS = BRUSH_ROTATIONS; exports.DEFAULT_DYNAMICS = DEFAULT_DYNAMICS; exports.normalizeDynamics = normalizeDynamics; exports.BRUSH_ID = BRUSH_ID; exports.normalizeMultiColor = normalizeMultiColor; exports.normalizeBehavior = normalizeBehavior; exports.isWetCapable = isWetCapable; exports.isWetBrush = isWetBrush; exports.usesPaintExchange = usesPaintExchange; exports.brushTakesPaint = brushTakesPaint; exports.paintToMultiColor = paintToMultiColor; exports.multiColorToPaint = multiColorToPaint; exports.normalizePaintBrush = normalizePaintBrush; exports.BUILTIN_BRUSHES = BUILTIN_BRUSHES; exports.DEFAULT_BRUSH_ID = DEFAULT_BRUSH_ID; exports.brushToJSON = brushToJSON; exports.parseBrushLibrary = parseBrushLibrary;
|
|
1841
|
+
//# sourceMappingURL=chunk-C46AZEBE.cjs.map
|