@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
|
@@ -7,7 +7,7 @@ var _chunkSFCPGMCTcjs = require('../chunk-SFCPGMCT.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkCM3LJPR3cjs = require('../chunk-CM3LJPR3.cjs');
|
|
11
11
|
require('../chunk-2YQONY6G.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
@@ -54,7 +54,7 @@ var _chunkCOAMRKVIcjs = require('../chunk-COAMRKVI.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
var _chunkEGFUVXKKcjs = require('../chunk-EGFUVXKK.cjs');
|
|
57
|
-
require('../chunk-
|
|
57
|
+
require('../chunk-SXOTFV3V.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -119,25 +119,25 @@ require('../chunk-5OOIUXNJ.cjs');
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
|
|
122
|
+
var _chunkC46AZEBEcjs = require('../chunk-C46AZEBE.cjs');
|
|
123
|
+
require('../chunk-Q6OUXEK3.cjs');
|
|
124
|
+
require('../chunk-BJTCSLF6.cjs');
|
|
125
|
+
require('../chunk-IZ4WRXZA.cjs');
|
|
122
126
|
|
|
123
127
|
|
|
124
128
|
|
|
125
129
|
|
|
126
130
|
|
|
131
|
+
var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
|
|
132
|
+
require('../chunk-RIWPYSKU.cjs');
|
|
127
133
|
|
|
128
134
|
|
|
129
135
|
|
|
130
|
-
var _chunk2XS6LTUPcjs = require('../chunk-2XS6LTUP.cjs');
|
|
131
|
-
require('../chunk-Q6OUXEK3.cjs');
|
|
132
|
-
require('../chunk-BJTCSLF6.cjs');
|
|
133
|
-
require('../chunk-IZ4WRXZA.cjs');
|
|
134
136
|
|
|
135
137
|
|
|
136
138
|
|
|
137
139
|
|
|
138
140
|
|
|
139
|
-
var _chunkJODTP4DPcjs = require('../chunk-JODTP4DP.cjs');
|
|
140
|
-
require('../chunk-RIWPYSKU.cjs');
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
@@ -189,7 +189,7 @@ require('../chunk-RIWPYSKU.cjs');
|
|
|
189
189
|
|
|
190
190
|
|
|
191
191
|
|
|
192
|
-
var
|
|
192
|
+
var _chunk3T5O225Tcjs = require('../chunk-3T5O225T.cjs');
|
|
193
193
|
require('../chunk-SYPFUL5B.cjs');
|
|
194
194
|
|
|
195
195
|
|
|
@@ -258,7 +258,7 @@ function normalizeCanvas(raw) {
|
|
|
258
258
|
function createPaintDocument(options = {}) {
|
|
259
259
|
const canvas = normalizeCanvas({ width: _nullishCoalesce(options.width, () => ( 2048)), height: _nullishCoalesce(options.height, () => ( 1536)), dpi: options.dpi });
|
|
260
260
|
const layer = createPaintLayer("Layer 1");
|
|
261
|
-
return { canvas, paper:
|
|
261
|
+
return { canvas, paper: _chunkC46AZEBEcjs.normalizePaper.call(void 0, _nullishCoalesce(options.paper, () => ( {}))), layers: [layer], activeLayerId: layer.id, strokes: [] };
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
// src/paint-editor/dab-stroke.ts
|
|
@@ -302,7 +302,7 @@ function multiColorForDab(mc, palette, index, seed, mixing) {
|
|
|
302
302
|
const n = palette.length;
|
|
303
303
|
if (mc.order === "random") {
|
|
304
304
|
const run = Math.floor(index / mc.length);
|
|
305
|
-
return [...palette[Math.min(n - 1, Math.floor(
|
|
305
|
+
return [...palette[Math.min(n - 1, Math.floor(_chunk3T5O225Tcjs.rand01.call(void 0, seed, run, 11) * n))]];
|
|
306
306
|
}
|
|
307
307
|
const f = index / mc.length % n;
|
|
308
308
|
const i = Math.floor(f);
|
|
@@ -312,24 +312,24 @@ var PaintDabStroke = (_class = class {
|
|
|
312
312
|
constructor(brush, options) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);_class.prototype.__init3.call(this);_class.prototype.__init4.call(this);_class.prototype.__init5.call(this);_class.prototype.__init6.call(this);_class.prototype.__init7.call(this);_class.prototype.__init8.call(this);_class.prototype.__init9.call(this);_class.prototype.__init10.call(this);
|
|
313
313
|
this.brush = brush;
|
|
314
314
|
this.options = options;
|
|
315
|
-
this.smoother = new (0,
|
|
316
|
-
this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [
|
|
315
|
+
this.smoother = new (0, _chunkC46AZEBEcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
|
|
316
|
+
this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [_chunkC46AZEBEcjs.IDENTITY_COPY];
|
|
317
317
|
const exchanging = brush.engine === "mixer" || brush.engine === "dab";
|
|
318
|
-
const rates = brush.engine === "mixer" ?
|
|
318
|
+
const rates = brush.engine === "mixer" ? _chunk3T5O225Tcjs.mixerRates.call(void 0, brush.mixer) : _chunk3T5O225Tcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, 1, brush.behavior.mixing);
|
|
319
319
|
this.mixing = brush.engine === "mixer" ? brush.mixer.mixing : brush.behavior.mixing;
|
|
320
320
|
this.states = this.copies.map((c, i) => ({
|
|
321
|
-
walker: new (0,
|
|
322
|
-
exchange: exchanging ? new (0,
|
|
323
|
-
smudge: brush.engine === "smudge" ? new (0,
|
|
321
|
+
walker: new (0, _chunkC46AZEBEcjs.PenDabWalker)(brush, (_nullishCoalesce(options.seed, () => ( 0))) + i * 7919 | 0, c.linear),
|
|
322
|
+
exchange: exchanging ? new (0, _chunk3T5O225Tcjs.PaintExchange)(rates, options.load) : null,
|
|
323
|
+
smudge: brush.engine === "smudge" ? new (0, _chunk3T5O225Tcjs.SmudgeTip)(brush.smudge, brush.tip.size * (1 + brush.dynamics.tiltSize * 1.5)) : null
|
|
324
324
|
}));
|
|
325
|
-
this.medium = new (0,
|
|
325
|
+
this.medium = new (0, _chunk3T5O225Tcjs.TileMedium)(options.target, brush.engine === "dab" ? { blend: brush.tip.blend } : {});
|
|
326
326
|
this.depth = options.grain && !options.grain.flat ? Math.min(1, Math.max(0, options.paperDepth * brush.grain)) : 0;
|
|
327
|
-
this.coverage = brush.engine === "dab" ? new (0,
|
|
328
|
-
this.sampler = exchanging && options.paint ? new (0,
|
|
327
|
+
this.coverage = brush.engine === "dab" ? new (0, _chunk3T5O225Tcjs.CoverageMap)() : null;
|
|
328
|
+
this.sampler = exchanging && options.paint ? new (0, _chunk3T5O225Tcjs.PaintGradientSampler)(options.paint, _nullishCoalesce(options.seed, () => ( 0))) : null;
|
|
329
329
|
const table = _optionalChain([this, 'access', _4 => _4.sampler, 'optionalAccess', _5 => _5.acrossTip]) ? this.sampler.tipTable(GRADIENT_STEPS) : null;
|
|
330
330
|
this.gradient = table ? table.map((e) => e.rgb) : null;
|
|
331
331
|
this.gradientAlpha = table && table.some((e) => e.alpha < 1) ? table.map((e) => e.alpha) : null;
|
|
332
|
-
this.scratch = brush.engine === "blender" ?
|
|
332
|
+
this.scratch = brush.engine === "blender" ? _chunk3T5O225Tcjs.createBlenderScratch.call(void 0, ) : null;
|
|
333
333
|
}
|
|
334
334
|
|
|
335
335
|
|
|
@@ -388,7 +388,7 @@ var PaintDabStroke = (_class = class {
|
|
|
388
388
|
}
|
|
389
389
|
paintDabs(copy, dabs, rects) {
|
|
390
390
|
for (const d of dabs) {
|
|
391
|
-
const rect =
|
|
391
|
+
const rect = _chunk3T5O225Tcjs.dabRect.call(void 0, d, this.brush.tip.hardness);
|
|
392
392
|
if (rect.width <= 0 || rect.height <= 0) continue;
|
|
393
393
|
this.dab(copy, d, rect);
|
|
394
394
|
rects.push(rect);
|
|
@@ -404,13 +404,13 @@ var PaintDabStroke = (_class = class {
|
|
|
404
404
|
}
|
|
405
405
|
const tip = this.tip.subarray(0, n);
|
|
406
406
|
tip.fill(0);
|
|
407
|
-
|
|
407
|
+
_chunk3T5O225Tcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.brush.tip.hardness, rect, tip);
|
|
408
408
|
if (!(this.depth > 0 && this.options.grain)) return { tip, cov: tip };
|
|
409
409
|
const cov = this.cov.subarray(0, n);
|
|
410
410
|
const grain = this.options.grain;
|
|
411
411
|
for (let yy = 0, k = 0; yy < rect.height; yy++) {
|
|
412
412
|
const y = rect.y + yy + 0.5;
|
|
413
|
-
for (let xx = 0; xx < rect.width; xx++, k++) cov[k] = tip[k] > 0 ? tip[k] *
|
|
413
|
+
for (let xx = 0; xx < rect.width; xx++, k++) cov[k] = tip[k] > 0 ? tip[k] * _chunk3T5O225Tcjs.grainCatch.call(void 0, grain.at(rect.x + xx + 0.5, y), this.depth, d.pressure) : 0;
|
|
414
414
|
}
|
|
415
415
|
return { tip, cov };
|
|
416
416
|
}
|
|
@@ -419,7 +419,7 @@ var PaintDabStroke = (_class = class {
|
|
|
419
419
|
const { tip, cov } = this.rasterize(d, rect);
|
|
420
420
|
const st = this.states[copy];
|
|
421
421
|
if (brush.engine === "blender") {
|
|
422
|
-
|
|
422
|
+
_chunk3T5O225Tcjs.blenderDab.call(void 0, this.medium, rect, cov, d.opacity * d.alpha * brush.tip.opacity, d.radius, brush.blender, this.scratch);
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
425
|
if (brush.engine === "smudge") {
|
|
@@ -658,19 +658,19 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
658
658
|
constructor(init) {;_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);_class3.prototype.__init17.call(this);_class3.prototype.__init18.call(this);_class3.prototype.__init19.call(this);_class3.prototype.__init20.call(this);
|
|
659
659
|
this.init = init;
|
|
660
660
|
const b = init.brush;
|
|
661
|
-
this.smoother = new (0,
|
|
662
|
-
const copies = init.copies.length ? init.copies : [
|
|
661
|
+
this.smoother = new (0, _chunkC46AZEBEcjs.PenSmoother)(b.tip.smoothing, b.pressureSmoothing);
|
|
662
|
+
const copies = init.copies.length ? init.copies : [_chunkC46AZEBEcjs.IDENTITY_COPY];
|
|
663
663
|
this.copies = copies;
|
|
664
|
-
const rates =
|
|
664
|
+
const rates = _chunk3T5O225Tcjs.exchangeRates.call(void 0, b.behavior.pickup, b.behavior.mix, 1, b.behavior.mixing);
|
|
665
665
|
this.states = copies.map((c, i) => ({
|
|
666
|
-
walker: new (0,
|
|
667
|
-
exchange: new (0,
|
|
668
|
-
smudge: b.impasto.tool === "knife" ? new (0,
|
|
666
|
+
walker: new (0, _chunkC46AZEBEcjs.PenDabWalker)(b, init.seed + i * 7919 | 0, c.linear),
|
|
667
|
+
exchange: new (0, _chunk3T5O225Tcjs.PaintExchange)(rates, init.load),
|
|
668
|
+
smudge: b.impasto.tool === "knife" ? new (0, _chunk3T5O225Tcjs.SmudgeTip)({ strength: 0.85, length: 0.6 + 0.38 * b.impasto.drag, mixing: b.behavior.mixing }, b.tip.size * 1.2) : null,
|
|
669
669
|
carried: null,
|
|
670
670
|
amount: 1
|
|
671
671
|
}));
|
|
672
|
-
this.medium = new (0,
|
|
673
|
-
this.sampler = init.paint ? new (0,
|
|
672
|
+
this.medium = new (0, _chunk3T5O225Tcjs.TileMedium)(init.target, {});
|
|
673
|
+
this.sampler = init.paint ? new (0, _chunk3T5O225Tcjs.PaintGradientSampler)(init.paint.map.by === "across-tip" ? { ...init.paint, map: { by: "distance", length: 300, repeat: "mirror" } } : init.paint, init.seed) : null;
|
|
674
674
|
}
|
|
675
675
|
|
|
676
676
|
__init12() {this.dabCount = 0}
|
|
@@ -766,7 +766,7 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
766
766
|
}
|
|
767
767
|
applyDabs(copy, dabs, rects) {
|
|
768
768
|
for (const d of dabs) {
|
|
769
|
-
const rect =
|
|
769
|
+
const rect = _chunk3T5O225Tcjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
|
|
770
770
|
if (rect.width <= 0 || rect.height <= 0) continue;
|
|
771
771
|
this.dab(copy, d, rect);
|
|
772
772
|
rects.push(rect);
|
|
@@ -781,7 +781,7 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
781
781
|
const n = rect.width * rect.height;
|
|
782
782
|
if (this.tip.length < n) this.tip = new Float32Array(n);
|
|
783
783
|
const tip = this.tip.subarray(0, n);
|
|
784
|
-
|
|
784
|
+
_chunk3T5O225Tcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, b.tip.hardness, rect, tip);
|
|
785
785
|
const sel = this.init.target.selection;
|
|
786
786
|
if (sel) {
|
|
787
787
|
for (let yy = 0, p = 0; yy < rect.height; yy++)
|
|
@@ -835,7 +835,7 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
835
835
|
const full = 255 * thick * k;
|
|
836
836
|
switch (im.tool) {
|
|
837
837
|
case "brush": {
|
|
838
|
-
const ridge = 0.6 + 0.4 * Math.sin(u * 9 +
|
|
838
|
+
const ridge = 0.6 + 0.4 * Math.sin(u * 9 + _chunk3T5O225Tcjs.hash2.call(void 0, Math.round(u * 6), 3, seed) * 6.28) + 0.15 * (_chunk3T5O225Tcjs.hash2.call(void 0, lx, ly, seed) - 0.5);
|
|
839
839
|
const target = full * c * ridge;
|
|
840
840
|
h = Math.max(h0 * (1 - 0.25 * c * im.drag), Math.min(255, h0 * 0.35 + target));
|
|
841
841
|
break;
|
|
@@ -851,7 +851,7 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
851
851
|
break;
|
|
852
852
|
}
|
|
853
853
|
case "roller": {
|
|
854
|
-
const stipple = 0.75 + 0.5 *
|
|
854
|
+
const stipple = 0.75 + 0.5 * _chunk3T5O225Tcjs.hash2.call(void 0, lx >> 1, ly >> 1, seed);
|
|
855
855
|
h = h0 + (Math.min(255, full * 0.6 * stipple) - h0) * Math.min(1, c * 1.5);
|
|
856
856
|
break;
|
|
857
857
|
}
|
|
@@ -961,7 +961,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
961
961
|
this.layerId = init.layerId;
|
|
962
962
|
this.base = init.surface;
|
|
963
963
|
this.live = new Map(this.base.tiles);
|
|
964
|
-
this.copies = init.copies.length ? init.copies : [
|
|
964
|
+
this.copies = init.copies.length ? init.copies : [_chunkC46AZEBEcjs.IDENTITY_COPY];
|
|
965
965
|
const brush = init.brush;
|
|
966
966
|
if (init.wet) this.wetDriver = init.wet.driver;
|
|
967
967
|
this.apply = {
|
|
@@ -976,11 +976,11 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
976
976
|
};
|
|
977
977
|
if (this.wetDriver) {
|
|
978
978
|
} else if (init.sticker) {
|
|
979
|
-
this.stickerSpray = new (0,
|
|
979
|
+
this.stickerSpray = new (0, _chunkC46AZEBEcjs.StickerSpray)({ brush, target: this.tileTarget(), color: init.colorHex, seed: init.seed, copies: this.copies, nextId: init.sticker.nextId, paint: _nullishCoalesce(init.paint, () => ( null)) });
|
|
980
980
|
} else if (init.thick) {
|
|
981
981
|
const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
|
|
982
982
|
this.thickDriver = new ThickStrokeDriver({ brush, target: this.tileTarget(), channels: init.thick.channels, color: rgb(init.color), load: init.mixerLoad, seed: init.seed, copies: this.copies, paint: _nullishCoalesce(init.paint, () => ( null)) });
|
|
983
|
-
} else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" ||
|
|
983
|
+
} else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" || _chunkC46AZEBEcjs.usesPaintExchange.call(void 0, brush, Boolean(init.paint))) {
|
|
984
984
|
const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
|
|
985
985
|
this.wet = new PaintDabStroke(brush, {
|
|
986
986
|
target: this.tileTarget(),
|
|
@@ -995,7 +995,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
995
995
|
});
|
|
996
996
|
} else {
|
|
997
997
|
const opts = { grain: init.grain, paperDepth: init.paperDepth, seed: init.seed, copies: this.copies, paint: _nullishCoalesce(init.paint, () => ( null)) };
|
|
998
|
-
this.dry = brush.engine === "particle" ? new (0,
|
|
998
|
+
this.dry = brush.engine === "particle" ? new (0, _chunkC46AZEBEcjs.ParticleStroke)(brush, opts) : brush.engine === "bristle" ? new (0, _chunkC46AZEBEcjs.BristleStroke)(brush, opts) : new (0, _chunkC46AZEBEcjs.DryStroke)(brush, opts);
|
|
999
999
|
}
|
|
1000
1000
|
}
|
|
1001
1001
|
|
|
@@ -1085,7 +1085,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
1085
1085
|
const changed = d.dabCount > 0;
|
|
1086
1086
|
this.result = { layerId: this.layerId, bounds: changed ? d.bounds : null, dabs: d.dabCount, strokeId: null, wet: true };
|
|
1087
1087
|
const carried = d.load;
|
|
1088
|
-
if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried :
|
|
1088
|
+
if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunk3T5O225Tcjs.cleanMixer.call(void 0, carried);
|
|
1089
1089
|
this.host.commit(this, changed ? this.init.wet.surface() : null, false);
|
|
1090
1090
|
}
|
|
1091
1091
|
update(rects) {
|
|
@@ -1111,7 +1111,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
1111
1111
|
const src = _nullishCoalesce(_optionalChain([this, 'access', _27 => _27.base, 'access', _28 => _28.tiles, 'access', _29 => _29.get, 'call', _30 => _30(key), 'optionalAccess', _31 => _31.data]), () => ( defaultTile(this.base)));
|
|
1112
1112
|
const prev = this.touched.has(key) ? _optionalChain([this, 'access', _32 => _32.live, 'access', _33 => _33.get, 'call', _34 => _34(key), 'optionalAccess', _35 => _35.data]) : void 0;
|
|
1113
1113
|
this.touched.add(key);
|
|
1114
|
-
const data =
|
|
1114
|
+
const data = _chunk3T5O225Tcjs.applyStrokeToTile.call(void 0, this.dry.coverage, src, ch, tx, ty, this.apply, prev ? { into: prev, region: r } : {});
|
|
1115
1115
|
this.live.set(key, { data, uniform: null });
|
|
1116
1116
|
}
|
|
1117
1117
|
this.host.update(this.layerId, new (0, _chunkO7LUD7MHcjs.TiledSurface)(ch, new Map(this.live), this.base.defaultValue), rects);
|
|
@@ -1146,7 +1146,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
1146
1146
|
const dabs = this.dry ? this.dry.dabCount : this.thickDriver ? this.thickDriver.dabCount : this.stickerSpray ? this.stickerSpray.dabCount : this.wet.dabCount;
|
|
1147
1147
|
this.result = { layerId: this.layerId, bounds: changed ? this.bounds : null, dabs, strokeId: null };
|
|
1148
1148
|
const carried = _nullishCoalesce(_optionalChain([this, 'access', _36 => _36.wet, 'optionalAccess', _37 => _37.load]), () => ( _optionalChain([this, 'access', _38 => _38.thickDriver, 'optionalAccess', _39 => _39.load])));
|
|
1149
|
-
if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried :
|
|
1149
|
+
if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunk3T5O225Tcjs.cleanMixer.call(void 0, carried);
|
|
1150
1150
|
this.host.commit(this, surface, false);
|
|
1151
1151
|
return this.result;
|
|
1152
1152
|
}
|
|
@@ -1159,15 +1159,15 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
1159
1159
|
}, _class4);
|
|
1160
1160
|
function mixerLoadForStroke(brush, current, color) {
|
|
1161
1161
|
if (!brush.loadsColor) return { reservoir: null, amount: 0, pickup: brush.mixer.cleanEachStroke ? null : current.pickup };
|
|
1162
|
-
if (brush.mixer.loadEachStroke || !current.reservoir) return
|
|
1162
|
+
if (brush.mixer.loadEachStroke || !current.reservoir) return _chunk3T5O225Tcjs.loadMixer.call(void 0, current, color);
|
|
1163
1163
|
return current;
|
|
1164
1164
|
}
|
|
1165
1165
|
function brushLoadForStroke(brush, current, color) {
|
|
1166
1166
|
if (brush.engine === "mixer") return mixerLoadForStroke(brush, current, color);
|
|
1167
1167
|
if (brush.engine === "impasto") return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
|
|
1168
|
-
if (brush.engine === "wet") return brush.wet.tool === "paint" ? { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null } :
|
|
1169
|
-
if (
|
|
1170
|
-
return
|
|
1168
|
+
if (brush.engine === "wet") return brush.wet.tool === "paint" ? { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null } : _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD;
|
|
1169
|
+
if (_chunkC46AZEBEcjs.usesPaintExchange.call(void 0, brush)) return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
|
|
1170
|
+
return _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD;
|
|
1171
1171
|
}
|
|
1172
1172
|
|
|
1173
1173
|
// src/paint-editor/stencils.ts
|
|
@@ -1423,7 +1423,7 @@ function normalizeBrushStroke(raw) {
|
|
|
1423
1423
|
const out = {
|
|
1424
1424
|
id: r.id,
|
|
1425
1425
|
layerId: r.layerId,
|
|
1426
|
-
brush:
|
|
1426
|
+
brush: _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, _nullishCoalesce(r.brush, () => ( {}))),
|
|
1427
1427
|
color: typeof r.color === "string" && /^#[0-9a-f]{6}$/i.test(r.color) ? r.color.toLowerCase() : "#000000",
|
|
1428
1428
|
points,
|
|
1429
1429
|
seed: finite2(r.seed) ? r.seed | 0 : 0
|
|
@@ -1442,7 +1442,7 @@ function normalizeBrushStroke(raw) {
|
|
|
1442
1442
|
}
|
|
1443
1443
|
if (st.length) out.stencils = st;
|
|
1444
1444
|
}
|
|
1445
|
-
const paint =
|
|
1445
|
+
const paint = _chunk3T5O225Tcjs.readPaintSource.call(void 0, r.paint);
|
|
1446
1446
|
if (paint && paint.type === "gradient") out.paint = paint;
|
|
1447
1447
|
if (Array.isArray(r.steps) && r.steps.length === points.length && r.steps.every((v) => Number.isInteger(v) && v >= 0)) out.steps = [...r.steps];
|
|
1448
1448
|
return out;
|
|
@@ -1479,9 +1479,9 @@ function varyStroke(stroke, m, v) {
|
|
|
1479
1479
|
if (ps !== 1) q.pressure = Math.min(1, Math.max(0, (_nullishCoalesce(p.pressure, () => ( 1))) * ps));
|
|
1480
1480
|
return q;
|
|
1481
1481
|
});
|
|
1482
|
-
const brush = s !== 1 ?
|
|
1482
|
+
const brush = s !== 1 ? _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { ...stroke.brush, tip: { ...stroke.brush.tip, size: stroke.brush.tip.size * s } }) : stroke.brush;
|
|
1483
1483
|
const out = { ...stroke, brush, points };
|
|
1484
|
-
if (stroke.paint && s !== 1) out.paint =
|
|
1484
|
+
if (stroke.paint && s !== 1) out.paint = _chunk3T5O225Tcjs.scalePaintGradient.call(void 0, stroke.paint, s);
|
|
1485
1485
|
if (_optionalChain([stroke, 'access', _57 => _57.copies, 'optionalAccess', _58 => _58.length])) {
|
|
1486
1486
|
const inv = invertAffine(m);
|
|
1487
1487
|
out.copies = stroke.copies.map((c) => composeAffine(m, composeAffine(c, inv)));
|
|
@@ -1513,7 +1513,7 @@ function paperGrain(paper) {
|
|
|
1513
1513
|
const key = JSON.stringify([paper.pattern, paper.seed, paper.scale, paper.tiling, paper.dry]);
|
|
1514
1514
|
let g = grainCache.get(key);
|
|
1515
1515
|
if (!g) {
|
|
1516
|
-
g = new (0,
|
|
1516
|
+
g = new (0, _chunk3T5O225Tcjs.PaperGrain)(paper, "dry");
|
|
1517
1517
|
if (grainCache.size > 16) grainCache.delete(grainCache.keys().next().value);
|
|
1518
1518
|
grainCache.set(key, g);
|
|
1519
1519
|
}
|
|
@@ -1523,7 +1523,7 @@ function paperTile(paper, r, light) {
|
|
|
1523
1523
|
const key = `${paperKey(paper, light)}|${r.x},${r.y},${r.width},${r.height}`;
|
|
1524
1524
|
let t = tileCache.get(key);
|
|
1525
1525
|
if (!t) {
|
|
1526
|
-
t =
|
|
1526
|
+
t = _chunkC46AZEBEcjs.renderPaper.call(void 0, paper, r, paperGrain(paper), light);
|
|
1527
1527
|
if (tileCache.size > 512) tileCache.delete(tileCache.keys().next().value);
|
|
1528
1528
|
tileCache.set(key, t);
|
|
1529
1529
|
}
|
|
@@ -1627,11 +1627,11 @@ function header(state, options) {
|
|
|
1627
1627
|
return out;
|
|
1628
1628
|
}
|
|
1629
1629
|
function serializePaintDocument(state, options = {}) {
|
|
1630
|
-
const { layers, assets } =
|
|
1630
|
+
const { layers, assets } = _chunkCM3LJPR3cjs.serializeLayers.call(void 0, state.layers);
|
|
1631
1631
|
return { ...header(state, options), layers, assets };
|
|
1632
1632
|
}
|
|
1633
1633
|
async function serializePaintDocumentExternal(state, store, options = {}) {
|
|
1634
|
-
const { layers, assets } = await
|
|
1634
|
+
const { layers, assets } = await _chunkCM3LJPR3cjs.serializeLayersExternal.call(void 0, state.layers, store);
|
|
1635
1635
|
return { ...header(state, options), layers, assets };
|
|
1636
1636
|
}
|
|
1637
1637
|
function paintLayersOnly(layers, problems) {
|
|
@@ -1666,9 +1666,9 @@ function deserializePaintDocument(raw) {
|
|
|
1666
1666
|
}
|
|
1667
1667
|
const problems = [];
|
|
1668
1668
|
const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
|
|
1669
|
-
const paper =
|
|
1669
|
+
const paper = _chunkC46AZEBEcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
|
|
1670
1670
|
const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
|
|
1671
|
-
const layers = paintLayersOnly(
|
|
1671
|
+
const layers = paintLayersOnly(_chunkCM3LJPR3cjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
|
|
1672
1672
|
const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
|
|
1673
1673
|
const activeLayerId = wanted && _chunkAEAAN4ADcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkAEAAN4ADcjs.flattenLayers.call(void 0, layers), 'access', _70 => _70.filter, 'call', _71 => _71((l) => l.type === "pixel"), 'access', _72 => _72.pop, 'call', _73 => _73(), 'optionalAccess', _74 => _74.id]), () => ( null));
|
|
1674
1674
|
const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
|
|
@@ -1682,7 +1682,7 @@ async function deserializePaintDocumentAsync(raw, store) {
|
|
|
1682
1682
|
if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
|
|
1683
1683
|
const r = raw;
|
|
1684
1684
|
const problems = [];
|
|
1685
|
-
const assets = await
|
|
1685
|
+
const assets = await _chunkCM3LJPR3cjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
|
|
1686
1686
|
const loaded = deserializePaintDocument({ ...r, assets });
|
|
1687
1687
|
return { ...loaded, problems: [...problems, ...loaded.problems] };
|
|
1688
1688
|
}
|
|
@@ -1765,7 +1765,7 @@ function pointerToPenPoint(e, x, y, view) {
|
|
|
1765
1765
|
const p = { x, y, pressure: samplePressure(e) };
|
|
1766
1766
|
if (typeof e.timeStamp === "number" && Number.isFinite(e.timeStamp)) p.t = e.timeStamp;
|
|
1767
1767
|
if (e.pointerType !== "pen") return p;
|
|
1768
|
-
const o =
|
|
1768
|
+
const o = _chunkC46AZEBEcjs.penOrientation.call(void 0, {
|
|
1769
1769
|
x,
|
|
1770
1770
|
y,
|
|
1771
1771
|
altitude: typeof e.altitudeAngle === "number" ? e.altitudeAngle : void 0,
|
|
@@ -1838,13 +1838,13 @@ function union2(a, b) {
|
|
|
1838
1838
|
return { x, y, width: Math.max(a.x + a.width, b.x + b.width) - x, height: Math.max(a.y + a.height, b.y + b.height) - y };
|
|
1839
1839
|
}
|
|
1840
1840
|
function wetPaperInput(paper) {
|
|
1841
|
-
const grain = new (0,
|
|
1841
|
+
const grain = new (0, _chunk3T5O225Tcjs.PaperGrain)(paper, "wet");
|
|
1842
1842
|
const flat = grain.flat;
|
|
1843
1843
|
return {
|
|
1844
1844
|
absorption: paper.absorption,
|
|
1845
1845
|
permeability: paper.permeability,
|
|
1846
1846
|
roughness: flat ? 0 : paper.roughness,
|
|
1847
|
-
color:
|
|
1847
|
+
color: _chunkC46AZEBEcjs.hexToRgb8.call(void 0, paper.color),
|
|
1848
1848
|
heightAt: flat ? () => 0.5 : (x, y) => grain.at(x, y)
|
|
1849
1849
|
};
|
|
1850
1850
|
}
|
|
@@ -1852,8 +1852,8 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1852
1852
|
constructor(init) {;_class5.prototype.__init35.call(this);_class5.prototype.__init36.call(this);_class5.prototype.__init37.call(this);_class5.prototype.__init38.call(this);_class5.prototype.__init39.call(this);_class5.prototype.__init40.call(this);_class5.prototype.__init41.call(this);_class5.prototype.__init42.call(this);_class5.prototype.__init43.call(this);_class5.prototype.__init44.call(this);_class5.prototype.__init45.call(this);_class5.prototype.__init46.call(this);
|
|
1853
1853
|
this.init = init;
|
|
1854
1854
|
const brush = init.brush;
|
|
1855
|
-
this.smoother = new (0,
|
|
1856
|
-
const copies = init.copies.length ? init.copies : [
|
|
1855
|
+
this.smoother = new (0, _chunkC46AZEBEcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
|
|
1856
|
+
const copies = init.copies.length ? init.copies : [_chunkC46AZEBEcjs.IDENTITY_COPY];
|
|
1857
1857
|
const wet = brush.wet;
|
|
1858
1858
|
const spacing = Math.max(0.02, brush.tip.spacing);
|
|
1859
1859
|
const perDab = Math.min(1, spacing * 1.2);
|
|
@@ -1863,16 +1863,16 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1863
1863
|
mass: STROKE_MASS * wet.pigment * (1 - 0.6 * thin) * perDab,
|
|
1864
1864
|
body: wet.body * (1 - thin)
|
|
1865
1865
|
});
|
|
1866
|
-
const rates =
|
|
1866
|
+
const rates = _chunk3T5O225Tcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, wet.load, brush.behavior.mixing);
|
|
1867
1867
|
this.states = copies.map((c, i) => ({
|
|
1868
|
-
walker: new (0,
|
|
1869
|
-
exchange: wet.tool === "paint" ? new (0,
|
|
1868
|
+
walker: new (0, _chunkC46AZEBEcjs.PenDabWalker)(brush, init.seed + i * 7919 | 0, c.linear),
|
|
1869
|
+
exchange: wet.tool === "paint" ? new (0, _chunk3T5O225Tcjs.PaintExchange)(rates, init.load) : null,
|
|
1870
1870
|
last: null
|
|
1871
1871
|
}));
|
|
1872
1872
|
this.copies = copies;
|
|
1873
1873
|
this.depth = init.grain && !init.grain.flat ? Math.min(1, Math.max(0, init.paperDepth * brush.grain)) : 0;
|
|
1874
1874
|
const g = _nullishCoalesce(init.paint, () => ( null));
|
|
1875
|
-
this.sampler = g ? new (0,
|
|
1875
|
+
this.sampler = g ? new (0, _chunk3T5O225Tcjs.PaintGradientSampler)(g.map.by === "across-tip" ? { ...g, map: { by: "distance", length: 300, repeat: "mirror" } } : g, init.seed) : null;
|
|
1876
1876
|
}
|
|
1877
1877
|
|
|
1878
1878
|
__init35() {this.dabCount = 0}
|
|
@@ -1944,7 +1944,7 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1944
1944
|
}
|
|
1945
1945
|
applyDabs(copy, dabs, rects) {
|
|
1946
1946
|
for (const d of dabs) {
|
|
1947
|
-
const rect =
|
|
1947
|
+
const rect = _chunk3T5O225Tcjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
|
|
1948
1948
|
if (rect.width <= 0 || rect.height <= 0) continue;
|
|
1949
1949
|
this.dab(copy, d, rect);
|
|
1950
1950
|
rects.push(rect);
|
|
@@ -1961,7 +1961,7 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1961
1961
|
const tip = this.tip.subarray(0, n);
|
|
1962
1962
|
const cov = this.cov.subarray(0, n);
|
|
1963
1963
|
tip.fill(0);
|
|
1964
|
-
|
|
1964
|
+
_chunk3T5O225Tcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.init.brush.tip.hardness, rect, tip);
|
|
1965
1965
|
const grain = this.depth > 0 ? this.init.grain : null;
|
|
1966
1966
|
const mask = this.init.mask;
|
|
1967
1967
|
for (let yy = 0, k = 0; yy < rect.height; yy++) {
|
|
@@ -1972,7 +1972,7 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1972
1972
|
tip[k] *= mx >= 0 && my >= 0 && mx < mask.width && my < mask.height ? mask.data[my * mask.width + mx] / 255 : 0;
|
|
1973
1973
|
}
|
|
1974
1974
|
let v = tip[k];
|
|
1975
|
-
if (v > 0 && grain) v *=
|
|
1975
|
+
if (v > 0 && grain) v *= _chunk3T5O225Tcjs.grainCatch.call(void 0, grain.at(rect.x + xx + 0.5, rect.y + yy + 0.5), this.depth, d.pressure);
|
|
1976
1976
|
tip[k] = Math.round(tip[k] * COVERAGE_STEPS) / COVERAGE_STEPS;
|
|
1977
1977
|
cov[k] = Math.round(v * COVERAGE_STEPS) / COVERAGE_STEPS;
|
|
1978
1978
|
}
|
|
@@ -2431,7 +2431,7 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2431
2431
|
}
|
|
2432
2432
|
}, _class6);
|
|
2433
2433
|
function wetPigmentOf(hex, body) {
|
|
2434
|
-
const [r, g, b] =
|
|
2434
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, hex);
|
|
2435
2435
|
return Array.from(_chunkF2Y4E4GUcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
|
|
2436
2436
|
}
|
|
2437
2437
|
|
|
@@ -2445,7 +2445,7 @@ function paintWetTestStroke(brush, paper, color, width, height) {
|
|
|
2445
2445
|
const w = thumbWorld;
|
|
2446
2446
|
if (w.hasLane("thumb")) w.removeLane("thumb");
|
|
2447
2447
|
w.ensureLane("thumb");
|
|
2448
|
-
const [r, g, b] =
|
|
2448
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, color);
|
|
2449
2449
|
if (brush.wet.tool !== "paint" && brush.wet.tool !== "water") {
|
|
2450
2450
|
const half = Math.ceil(height / 2);
|
|
2451
2451
|
w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkF2Y4E4GUcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
|
|
@@ -2456,12 +2456,12 @@ function paintWetTestStroke(brush, paper, color, width, height) {
|
|
|
2456
2456
|
laneId: "thumb",
|
|
2457
2457
|
brush,
|
|
2458
2458
|
color: [r / 255, g / 255, b / 255],
|
|
2459
|
-
load: brushLoadForStroke(brush,
|
|
2459
|
+
load: brushLoadForStroke(brush, _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
|
|
2460
2460
|
grain: paperGrain(paper),
|
|
2461
2461
|
paperDepth: paper.depth,
|
|
2462
|
-
paperColor:
|
|
2462
|
+
paperColor: _chunkC46AZEBEcjs.hexToRgb8.call(void 0, paper.color),
|
|
2463
2463
|
seed: 7,
|
|
2464
|
-
copies: [
|
|
2464
|
+
copies: [_chunkC46AZEBEcjs.IDENTITY_COPY]
|
|
2465
2465
|
});
|
|
2466
2466
|
driver.push(thumbnailStroke(width, height));
|
|
2467
2467
|
driver.finish();
|
|
@@ -2481,7 +2481,7 @@ function thumbnailStroke(width, height) {
|
|
|
2481
2481
|
return pts;
|
|
2482
2482
|
}
|
|
2483
2483
|
function paintTestStroke(surface, brush, paper, color, width, height) {
|
|
2484
|
-
const [r, g, b] =
|
|
2484
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, color);
|
|
2485
2485
|
let result = surface;
|
|
2486
2486
|
let thick = null;
|
|
2487
2487
|
const session = new PaintStrokeSession(
|
|
@@ -2500,14 +2500,14 @@ function paintTestStroke(surface, brush, paper, color, width, height) {
|
|
|
2500
2500
|
lockTransparency: false,
|
|
2501
2501
|
brush,
|
|
2502
2502
|
color: [r, g, b, 255],
|
|
2503
|
-
background: [...
|
|
2503
|
+
background: [..._chunkC46AZEBEcjs.hexToRgb8.call(void 0, paper.color), 255],
|
|
2504
2504
|
grain: paperGrain(paper),
|
|
2505
2505
|
paperDepth: paper.depth,
|
|
2506
2506
|
seed: 7,
|
|
2507
2507
|
colorHex: color,
|
|
2508
2508
|
affineCopies: [],
|
|
2509
|
-
copies: [
|
|
2510
|
-
mixerLoad: brushLoadForStroke(brush,
|
|
2509
|
+
copies: [_chunkC46AZEBEcjs.IDENTITY_COPY],
|
|
2510
|
+
mixerLoad: brushLoadForStroke(brush, _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
|
|
2511
2511
|
thick: brush.engine === "impasto" ? { channels: emptyThickChannels() } : void 0,
|
|
2512
2512
|
sticker: brush.engine === "sticker" ? { nextId: 1 } : void 0
|
|
2513
2513
|
}
|
|
@@ -2520,8 +2520,8 @@ function renderBrushThumbnail(brush, options) {
|
|
|
2520
2520
|
const width = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.width, () => ( 160)))));
|
|
2521
2521
|
const height = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.height, () => ( 48)))));
|
|
2522
2522
|
const maxSize = height * 0.42;
|
|
2523
|
-
const b = brush.tip.size > maxSize ?
|
|
2524
|
-
const rgba = [...
|
|
2523
|
+
const b = brush.tip.size > maxSize ? _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: maxSize } }, brush) : brush;
|
|
2524
|
+
const rgba = [..._chunkC46AZEBEcjs.hexToRgb8.call(void 0, options.color), 255];
|
|
2525
2525
|
let surface = _chunkO7LUD7MHcjs.emptySurface.call(void 0, 4);
|
|
2526
2526
|
if (b.engine === "eraser") {
|
|
2527
2527
|
surface = _chunkO7LUD7MHcjs.fillRect.call(void 0, surface, { x: 0, y: 0, width, height }, rgba);
|
|
@@ -2825,8 +2825,8 @@ function colorHarmony(base, kind, options = {}) {
|
|
|
2825
2825
|
function readSwatch(raw) {
|
|
2826
2826
|
if (!raw || typeof raw !== "object") return null;
|
|
2827
2827
|
const r = raw;
|
|
2828
|
-
const g =
|
|
2829
|
-
const color = typeof r.color === "string" && /^#[0-9a-f]{6}$/i.test(r.color) ? r.color.toLowerCase() : _optionalChain([g, 'optionalAccess', _139 => _139.type]) === "gradient" ?
|
|
2828
|
+
const g = _chunk3T5O225Tcjs.readPaintSource.call(void 0, r.paint);
|
|
2829
|
+
const color = typeof r.color === "string" && /^#[0-9a-f]{6}$/i.test(r.color) ? r.color.toLowerCase() : _optionalChain([g, 'optionalAccess', _139 => _139.type]) === "gradient" ? _chunk3T5O225Tcjs.paintSourceColor.call(void 0, g) : null;
|
|
2830
2830
|
if (!color) return null;
|
|
2831
2831
|
const out = { color };
|
|
2832
2832
|
if (typeof r.name === "string" && r.name.trim()) out.name = r.name.trim().slice(0, 80);
|
|
@@ -2849,7 +2849,7 @@ var DEFAULT_SWATCHES = [
|
|
|
2849
2849
|
// src/paint-editor/mixing-pad.ts
|
|
2850
2850
|
var MIXING_PAD_WIDTH = 360;
|
|
2851
2851
|
var MIXING_PAD_HEIGHT = 220;
|
|
2852
|
-
var PAD_PAINT =
|
|
2852
|
+
var PAD_PAINT = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, {
|
|
2853
2853
|
id: "pad-paint",
|
|
2854
2854
|
name: "Pad paint",
|
|
2855
2855
|
category: "mixer",
|
|
@@ -2857,7 +2857,7 @@ var PAD_PAINT = _chunk2XS6LTUPcjs.normalizePaintBrush.call(void 0, {
|
|
|
2857
2857
|
tip: { size: 28, hardness: 0.75, spacing: 0.1, opacity: 1, flow: 0.7, pressureSize: false, pressureOpacity: false },
|
|
2858
2858
|
mixer: { wet: 0.45, load: 1, mix: 0.4, loadEachStroke: true, cleanEachStroke: true, mixing: "pigment" }
|
|
2859
2859
|
});
|
|
2860
|
-
var PAD_KNIFE =
|
|
2860
|
+
var PAD_KNIFE = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, {
|
|
2861
2861
|
id: "pad-knife",
|
|
2862
2862
|
name: "Palette knife",
|
|
2863
2863
|
category: "smudge",
|
|
@@ -2867,7 +2867,7 @@ var PAD_KNIFE = _chunk2XS6LTUPcjs.normalizePaintBrush.call(void 0, {
|
|
|
2867
2867
|
// A knife drags streaks of paint and folds them into each other, mixing them as pigment.
|
|
2868
2868
|
smudge: { strength: 0.6, length: 0.8, mixing: "pigment" }
|
|
2869
2869
|
});
|
|
2870
|
-
var PAD_BLOB =
|
|
2870
|
+
var PAD_BLOB = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, {
|
|
2871
2871
|
id: "pad-blob",
|
|
2872
2872
|
name: "Pad blob",
|
|
2873
2873
|
category: "custom",
|
|
@@ -2889,12 +2889,12 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2889
2889
|
}
|
|
2890
2890
|
}
|
|
2891
2891
|
let brush = options.tool === "knife" ? PAD_KNIFE : PAD_PAINT;
|
|
2892
|
-
if (options.size !== void 0) brush =
|
|
2892
|
+
if (options.size !== void 0) brush = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: options.size } }, brush);
|
|
2893
2893
|
return this.run(brush, points, options.color);
|
|
2894
2894
|
}
|
|
2895
2895
|
/** Paints `points` with `brush` in `color` on the pad. */
|
|
2896
2896
|
run(brush, points, color) {
|
|
2897
|
-
const [r, g, b] =
|
|
2897
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, color);
|
|
2898
2898
|
let result = null;
|
|
2899
2899
|
const session = new PaintStrokeSession(
|
|
2900
2900
|
{ update: () => {
|
|
@@ -2912,8 +2912,8 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2912
2912
|
seed: 1,
|
|
2913
2913
|
colorHex: color,
|
|
2914
2914
|
affineCopies: [],
|
|
2915
|
-
copies: [
|
|
2916
|
-
mixerLoad: brushLoadForStroke(brush,
|
|
2915
|
+
copies: [_chunkC46AZEBEcjs.IDENTITY_COPY],
|
|
2916
|
+
mixerLoad: brushLoadForStroke(brush, _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255])
|
|
2917
2917
|
}
|
|
2918
2918
|
);
|
|
2919
2919
|
session.push(points);
|
|
@@ -2988,10 +2988,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2988
2988
|
const off = used.length === 1 ? 0 : 0.45 * R;
|
|
2989
2989
|
const x = Math.min(cx + R - r, Math.max(cx - R + r, cx + Math.cos(a) * off));
|
|
2990
2990
|
const y = Math.min(cy + R - r, Math.max(cy - R + r, cy + Math.sin(a) * off));
|
|
2991
|
-
const blob =
|
|
2991
|
+
const blob = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: Math.max(2, 2 * r) } }, PAD_BLOB);
|
|
2992
2992
|
this.run(blob, [{ x, y }], p.color.toLowerCase());
|
|
2993
2993
|
});
|
|
2994
|
-
const knife =
|
|
2994
|
+
const knife = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_KNIFE.tip, size: Math.max(12, R * 0.5) } }, PAD_KNIFE);
|
|
2995
2995
|
for (let k = 0; k < passes; k++) {
|
|
2996
2996
|
const stir = [];
|
|
2997
2997
|
const turns = 1.6;
|
|
@@ -3003,10 +3003,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
3003
3003
|
this.run(knife, stir, "#000000");
|
|
3004
3004
|
}
|
|
3005
3005
|
const mixed = _chunkO7LUD7MHcjs.mixPigments.call(void 0,
|
|
3006
|
-
paints.map((p) =>
|
|
3006
|
+
paints.map((p) => _chunkC46AZEBEcjs.hexToRgb8.call(void 0, p.color).map((v) => v / 255)),
|
|
3007
3007
|
paints.map((p) => p.parts)
|
|
3008
3008
|
);
|
|
3009
|
-
const core =
|
|
3009
|
+
const core = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: R * 1.1, hardness: 0.55 } }, PAD_BLOB);
|
|
3010
3010
|
const hex = "#" + mixed.map((v) => Math.round(v * 255).toString(16).padStart(2, "0")).join("");
|
|
3011
3011
|
this.run(core, [{ x: cx, y: cy }], hex);
|
|
3012
3012
|
return { color: this.pick(cx, cy, 2), bounds };
|
|
@@ -3363,7 +3363,7 @@ function parseColor(value, what = "color") {
|
|
|
3363
3363
|
return value.trim().toLowerCase();
|
|
3364
3364
|
}
|
|
3365
3365
|
function rgbaOf(hex) {
|
|
3366
|
-
const [r, g, b] =
|
|
3366
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, hex);
|
|
3367
3367
|
return [r, g, b, 255];
|
|
3368
3368
|
}
|
|
3369
3369
|
function rgbToHex(r, g, b) {
|
|
@@ -3391,7 +3391,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3391
3391
|
__init76() {this.secondaryColor = "#ffffff"}
|
|
3392
3392
|
/** Gradient paint chosen with `setPaint` (`null`: the paint colour). */
|
|
3393
3393
|
__init77() {this.gradient = null}
|
|
3394
|
-
__init78() {this.mixerLoad =
|
|
3394
|
+
__init78() {this.mixerLoad = _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD}
|
|
3395
3395
|
__init79() {this.view = { ...DEFAULT_VIEW, pan: { ...DEFAULT_VIEW.pan } }}
|
|
3396
3396
|
|
|
3397
3397
|
|
|
@@ -3432,9 +3432,9 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3432
3432
|
constructor(options = {}) {;_class10.prototype.__init72.call(this);_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);_class10.prototype.__init79.call(this);_class10.prototype.__init80.call(this);_class10.prototype.__init81.call(this);_class10.prototype.__init82.call(this);_class10.prototype.__init83.call(this);_class10.prototype.__init84.call(this);_class10.prototype.__init85.call(this);_class10.prototype.__init86.call(this);_class10.prototype.__init87.call(this);_class10.prototype.__init88.call(this);_class10.prototype.__init89.call(this);_class10.prototype.__init90.call(this);_class10.prototype.__init91.call(this);_class10.prototype.__init92.call(this);_class10.prototype.__init93.call(this);_class10.prototype.__init94.call(this);_class10.prototype.__init95.call(this);_class10.prototype.__init96.call(this);_class10.prototype.__init97.call(this);_class10.prototype.__init98.call(this);_class10.prototype.__init99.call(this);_class10.prototype.__init100.call(this);_class10.prototype.__init101.call(this);_class10.prototype.__init102.call(this);_class10.prototype.__init103.call(this);_class10.prototype.__init104.call(this);_class10.prototype.__init105.call(this);_class10.prototype.__init106.call(this);_class10.prototype.__init107.call(this);_class10.prototype.__init108.call(this);
|
|
3433
3433
|
this.historyLimit = Math.max(1, _nullishCoalesce(options.historyLimit, () => ( 200)));
|
|
3434
3434
|
this.doc = createPaintDocument({ width: options.width, height: options.height, dpi: options.dpi, paper: this.resolvePaper(options.paper) });
|
|
3435
|
-
this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) =>
|
|
3436
|
-
const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => (
|
|
3437
|
-
this.brush =
|
|
3435
|
+
this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) => _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { ...b, builtin: false }));
|
|
3436
|
+
const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => ( _chunkC46AZEBEcjs.DEFAULT_BRUSH_ID))), () => ( this.findBrush(_chunkC46AZEBEcjs.DEFAULT_BRUSH_ID)));
|
|
3437
|
+
this.brush = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, start);
|
|
3438
3438
|
this.color = options.color ? parseColor(options.color) : "#1f2937";
|
|
3439
3439
|
this.hand = options.hand === "left" ? "left" : "right";
|
|
3440
3440
|
this.encodeImage = options.encodeImage;
|
|
@@ -3481,7 +3481,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3481
3481
|
this.cached = {
|
|
3482
3482
|
document: this.doc,
|
|
3483
3483
|
brush: this.brush,
|
|
3484
|
-
brushes: this.library ??= [...
|
|
3484
|
+
brushes: this.library ??= [..._chunkC46AZEBEcjs.BUILTIN_BRUSHES, ...this.userBrushes],
|
|
3485
3485
|
color: this.color,
|
|
3486
3486
|
secondaryColor: this.secondaryColor,
|
|
3487
3487
|
paint: _nullishCoalesce(this.gradient, () => ( { type: "color", color: this.color })),
|
|
@@ -3648,7 +3648,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3648
3648
|
// --- Canvas and paper ----------------------------------------------------------
|
|
3649
3649
|
resolvePaper(paper) {
|
|
3650
3650
|
if (typeof paper === "string") {
|
|
3651
|
-
const p =
|
|
3651
|
+
const p = _chunkC46AZEBEcjs.paperPreset.call(void 0, paper);
|
|
3652
3652
|
if (!p) throw new PaintEditorError(`Unknown paper "${paper}". Call list_papers for the ids.`);
|
|
3653
3653
|
return p;
|
|
3654
3654
|
}
|
|
@@ -3693,19 +3693,19 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3693
3693
|
this.requireIdle("changing the paper");
|
|
3694
3694
|
let base = this.doc.paper;
|
|
3695
3695
|
if (update.preset !== void 0 && update.preset !== this.doc.paper.preset) {
|
|
3696
|
-
const p =
|
|
3696
|
+
const p = _chunkC46AZEBEcjs.paperPreset.call(void 0, update.preset);
|
|
3697
3697
|
if (!p) throw new PaintEditorError(`Unknown paper "${update.preset}". Call list_papers for the ids.`);
|
|
3698
3698
|
base = p;
|
|
3699
3699
|
}
|
|
3700
3700
|
const { preset: _p, ...rest } = update;
|
|
3701
3701
|
if (rest.color !== void 0) parseColor(rest.color, "paper color");
|
|
3702
|
-
const paper =
|
|
3702
|
+
const paper = _chunkC46AZEBEcjs.normalizePaper.call(void 0, { ...rest, preset: base.preset }, base);
|
|
3703
3703
|
const changedKeys = Object.keys(rest).filter((k) => k !== "name");
|
|
3704
3704
|
if (changedKeys.length && update.preset === void 0) paper.preset = base.preset;
|
|
3705
3705
|
if (this.wet.world) this.beginWetOp();
|
|
3706
3706
|
this.commit("Paper", { ...this.doc, paper });
|
|
3707
3707
|
this.wet.paperChanged();
|
|
3708
|
-
return
|
|
3708
|
+
return _chunkC46AZEBEcjs.clonePaper.call(void 0, paper);
|
|
3709
3709
|
}
|
|
3710
3710
|
// --- Layers --------------------------------------------------------------------
|
|
3711
3711
|
getLayer(id) {
|
|
@@ -3930,13 +3930,13 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3930
3930
|
if (!_chunkO7LUD7MHcjs.isBlendMode.call(void 0, blend)) throw new PaintEditorError(`Unknown blend mode "${blend}".`);
|
|
3931
3931
|
const { width, height } = this.doc.canvas;
|
|
3932
3932
|
const rect = { x: 0, y: 0, width, height };
|
|
3933
|
-
const coverage = new (0,
|
|
3933
|
+
const coverage = new (0, _chunk3T5O225Tcjs.CoverageMap)();
|
|
3934
3934
|
const depth = grainAmount * this.doc.paper.depth;
|
|
3935
3935
|
const grain = depth > 0 ? paperGrain(this.doc.paper) : null;
|
|
3936
3936
|
for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, rect)) {
|
|
3937
3937
|
const r = { x: tx * _chunkO7LUD7MHcjs.TILE, y: ty * _chunkO7LUD7MHcjs.TILE, width: Math.min(_chunkO7LUD7MHcjs.TILE, width - tx * _chunkO7LUD7MHcjs.TILE), height: Math.min(_chunkO7LUD7MHcjs.TILE, height - ty * _chunkO7LUD7MHcjs.TILE) };
|
|
3938
3938
|
const vals = new Float32Array(r.width * r.height);
|
|
3939
|
-
for (let y = 0, k = 0; y < r.height; y++) for (let x = 0; x < r.width; x++, k++) vals[k] = grain ?
|
|
3939
|
+
for (let y = 0, k = 0; y < r.height; y++) for (let x = 0; x < r.width; x++, k++) vals[k] = grain ? _chunk3T5O225Tcjs.grainCatch.call(void 0, grain.at(r.x + x + 0.5, r.y + y + 0.5), depth, pressure) : 1;
|
|
3940
3940
|
coverage.accumulate(r, vals, 1);
|
|
3941
3941
|
}
|
|
3942
3942
|
const apply = {
|
|
@@ -3959,7 +3959,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3959
3959
|
for (const { tx, ty } of _chunkO7LUD7MHcjs.tilesInRect.call(void 0, { x: rect.x - l.offset.x, y: rect.y - l.offset.y, width: rect.width, height: rect.height })) {
|
|
3960
3960
|
const key = _chunkO7LUD7MHcjs.tileKey.call(void 0, tx, ty);
|
|
3961
3961
|
const src = _nullishCoalesce(_optionalChain([base, 'access', _199 => _199.tiles, 'access', _200 => _200.get, 'call', _201 => _201(key), 'optionalAccess', _202 => _202.data]), () => ( new Uint8ClampedArray(_chunkO7LUD7MHcjs.TILE * _chunkO7LUD7MHcjs.TILE * 4)));
|
|
3962
|
-
const tile = _chunkO7LUD7MHcjs.finishTile.call(void 0,
|
|
3962
|
+
const tile = _chunkO7LUD7MHcjs.finishTile.call(void 0, _chunk3T5O225Tcjs.applyStrokeToTile.call(void 0, coverage, src, 4, tx, ty, apply), 4, 0);
|
|
3963
3963
|
if (tile) tiles.set(key, tile);
|
|
3964
3964
|
else tiles.delete(key);
|
|
3965
3965
|
}
|
|
@@ -4218,12 +4218,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4218
4218
|
}
|
|
4219
4219
|
// --- Brushes -------------------------------------------------------------------
|
|
4220
4220
|
findBrush(id) {
|
|
4221
|
-
return _nullishCoalesce(
|
|
4221
|
+
return _nullishCoalesce(_chunkC46AZEBEcjs.BUILTIN_BRUSHES.find((b) => b.id === id), () => ( this.userBrushes.find((b) => b.id === id)));
|
|
4222
4222
|
}
|
|
4223
4223
|
/** A library brush by id (`undefined` when unknown). */
|
|
4224
4224
|
getBrush(id) {
|
|
4225
4225
|
const b = this.findBrush(id);
|
|
4226
|
-
return b ?
|
|
4226
|
+
return b ? _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, b, b) : void 0;
|
|
4227
4227
|
}
|
|
4228
4228
|
requireBrush(id) {
|
|
4229
4229
|
const b = this.findBrush(id);
|
|
@@ -4238,7 +4238,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4238
4238
|
const { id, ...changes } = update;
|
|
4239
4239
|
const base = id !== void 0 ? this.requireBrush(id) : this.brush;
|
|
4240
4240
|
if (changes.paint !== void 0 && changes.paint !== null) this.readStrokePaint(changes.paint);
|
|
4241
|
-
const next =
|
|
4241
|
+
const next = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { ...changes, id: base.id }, base);
|
|
4242
4242
|
if (base.builtin && !Object.keys(changes).length) next.builtin = true;
|
|
4243
4243
|
else delete next.builtin;
|
|
4244
4244
|
this.brush = next;
|
|
@@ -4247,10 +4247,10 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4247
4247
|
}
|
|
4248
4248
|
/** Saves the active brush (or `brush`) into the user library under `id` / `name`. */
|
|
4249
4249
|
saveBrush(options) {
|
|
4250
|
-
if (!
|
|
4251
|
-
if (
|
|
4252
|
-
const source = options.brush ?
|
|
4253
|
-
const saved =
|
|
4250
|
+
if (!_chunkC46AZEBEcjs.BRUSH_ID.test(options.id)) throw new PaintEditorError(`Brush id "${options.id}" is invalid; use lowercase letters, digits and dashes (e.g. "my-pencil").`);
|
|
4251
|
+
if (_chunkC46AZEBEcjs.BUILTIN_BRUSHES.some((b) => b.id === options.id)) throw new PaintEditorError(`"${options.id}" is a built-in brush; save under another id.`);
|
|
4252
|
+
const source = options.brush ? _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, options.brush, this.brush) : this.brush;
|
|
4253
|
+
const saved = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { ...source, id: options.id, name: _nullishCoalesce(options.name, () => ( source.name)) });
|
|
4254
4254
|
delete saved.builtin;
|
|
4255
4255
|
const i = this.userBrushes.findIndex((b) => b.id === options.id);
|
|
4256
4256
|
if (i >= 0) this.userBrushes[i] = saved;
|
|
@@ -4260,7 +4260,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4260
4260
|
return saved;
|
|
4261
4261
|
}
|
|
4262
4262
|
removeBrush(id) {
|
|
4263
|
-
if (
|
|
4263
|
+
if (_chunkC46AZEBEcjs.BUILTIN_BRUSHES.some((b) => b.id === id)) throw new PaintEditorError(`"${id}" is a built-in brush and cannot be removed.`);
|
|
4264
4264
|
const i = this.userBrushes.findIndex((b) => b.id === id);
|
|
4265
4265
|
if (i < 0) throw new PaintEditorError(`Unknown brush "${id}". Call list_brushes for the ids.`);
|
|
4266
4266
|
this.userBrushes.splice(i, 1);
|
|
@@ -4269,12 +4269,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4269
4269
|
}
|
|
4270
4270
|
/** The user's saved brushes. */
|
|
4271
4271
|
getUserBrushes() {
|
|
4272
|
-
return this.userBrushes.map((b) =>
|
|
4272
|
+
return this.userBrushes.map((b) => _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, b, b));
|
|
4273
4273
|
}
|
|
4274
4274
|
/** A brush library file of the given brushes (default: the user's brushes). */
|
|
4275
4275
|
exportBrushes(ids) {
|
|
4276
4276
|
const list = ids ? ids.map((id) => this.requireBrush(id)) : this.userBrushes;
|
|
4277
|
-
return { format: "pixerate-brushes", version: 1, brushes: list.map(
|
|
4277
|
+
return { format: "pixerate-brushes", version: 1, brushes: list.map(_chunkC46AZEBEcjs.brushToJSON) };
|
|
4278
4278
|
}
|
|
4279
4279
|
/**
|
|
4280
4280
|
* Adds the brushes of a library file to the user library. A brush whose id is taken is skipped
|
|
@@ -4284,14 +4284,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4284
4284
|
const problems = [];
|
|
4285
4285
|
let list;
|
|
4286
4286
|
try {
|
|
4287
|
-
list =
|
|
4287
|
+
list = _chunkC46AZEBEcjs.parseBrushLibrary.call(void 0, file, problems);
|
|
4288
4288
|
} catch (e) {
|
|
4289
4289
|
throw new PaintEditorError(e.message);
|
|
4290
4290
|
}
|
|
4291
4291
|
const added = [];
|
|
4292
4292
|
const skipped = [];
|
|
4293
4293
|
for (const b of list) {
|
|
4294
|
-
if (
|
|
4294
|
+
if (_chunkC46AZEBEcjs.BUILTIN_BRUSHES.some((x) => x.id === b.id)) {
|
|
4295
4295
|
skipped.push(b.id);
|
|
4296
4296
|
problems.push(`"${b.id}" is a built-in brush id; rename it to import it.`);
|
|
4297
4297
|
continue;
|
|
@@ -4333,9 +4333,9 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4333
4333
|
setPaint(paint) {
|
|
4334
4334
|
let p;
|
|
4335
4335
|
try {
|
|
4336
|
-
p =
|
|
4336
|
+
p = _chunk3T5O225Tcjs.parsePaintSource.call(void 0, paint);
|
|
4337
4337
|
} catch (e) {
|
|
4338
|
-
if (e instanceof
|
|
4338
|
+
if (e instanceof _chunk3T5O225Tcjs.PaintSourceError) throw new PaintEditorError(e.message);
|
|
4339
4339
|
throw e;
|
|
4340
4340
|
}
|
|
4341
4341
|
if (p.type === "color") {
|
|
@@ -4352,19 +4352,19 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4352
4352
|
* brush's gradient, else the editor's gradient paint. Erasers, blenders and smudges take none.
|
|
4353
4353
|
*/
|
|
4354
4354
|
strokeGradient(init, brush, color) {
|
|
4355
|
-
if (!
|
|
4355
|
+
if (!_chunkC46AZEBEcjs.brushTakesPaint.call(void 0, brush)) return null;
|
|
4356
4356
|
let g = null;
|
|
4357
4357
|
if (init.paint !== void 0) {
|
|
4358
4358
|
const p = this.readStrokePaint(init.paint);
|
|
4359
4359
|
g = p.type === "gradient" ? p : null;
|
|
4360
4360
|
} else g = _nullishCoalesce(brush.paint, () => ( (init.color === void 0 ? this.gradient : null)));
|
|
4361
|
-
return g ?
|
|
4361
|
+
return g ? _chunk3T5O225Tcjs.resolvePaintGradient.call(void 0, g, { paint: color, secondary: this.secondaryColor }) : null;
|
|
4362
4362
|
}
|
|
4363
4363
|
readStrokePaint(raw) {
|
|
4364
4364
|
try {
|
|
4365
|
-
return
|
|
4365
|
+
return _chunk3T5O225Tcjs.parsePaintSource.call(void 0, raw);
|
|
4366
4366
|
} catch (e) {
|
|
4367
|
-
if (e instanceof
|
|
4367
|
+
if (e instanceof _chunk3T5O225Tcjs.PaintSourceError) throw new PaintEditorError(e.message);
|
|
4368
4368
|
throw e;
|
|
4369
4369
|
}
|
|
4370
4370
|
}
|
|
@@ -4395,14 +4395,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4395
4395
|
// --- Mixer Brush ---------------------------------------------------------------
|
|
4396
4396
|
/** Fills the Mixer Brush reservoir with a colour (default the editor colour). */
|
|
4397
4397
|
loadMixerBrush(color) {
|
|
4398
|
-
const [r, g, b] =
|
|
4399
|
-
this.mixerLoad =
|
|
4398
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, color === void 0 ? this.color : parseColor(color));
|
|
4399
|
+
this.mixerLoad = _chunk3T5O225Tcjs.loadMixer.call(void 0, this.mixerLoad, [r / 255, g / 255, b / 255]);
|
|
4400
4400
|
this.emit([]);
|
|
4401
4401
|
return this.mixerLoad;
|
|
4402
4402
|
}
|
|
4403
4403
|
/** Empties the pickup well (and with `emptyReservoir` the loaded paint too). */
|
|
4404
4404
|
cleanMixerBrush(emptyReservoir = false) {
|
|
4405
|
-
this.mixerLoad = emptyReservoir ?
|
|
4405
|
+
this.mixerLoad = emptyReservoir ? _chunk3T5O225Tcjs.EMPTY_MIXER_LOAD : _chunk3T5O225Tcjs.cleanMixer.call(void 0, this.mixerLoad);
|
|
4406
4406
|
this.emit([]);
|
|
4407
4407
|
return this.mixerLoad;
|
|
4408
4408
|
}
|
|
@@ -4425,7 +4425,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4425
4425
|
// --- Strokes -------------------------------------------------------------------
|
|
4426
4426
|
strokeBrush(init) {
|
|
4427
4427
|
let brush = init.brushId !== void 0 ? this.requireBrush(init.brushId) : this.brush;
|
|
4428
|
-
if (init.brush) brush =
|
|
4428
|
+
if (init.brush) brush = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { ...init.brush, id: brush.id }, brush);
|
|
4429
4429
|
return brush;
|
|
4430
4430
|
}
|
|
4431
4431
|
/**
|
|
@@ -4465,7 +4465,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4465
4465
|
throw new PaintEditorError(`Layer "${layer.name}" is a sticker layer (its pixels are drawn from its stickers); paint on another layer (add_layer).`);
|
|
4466
4466
|
}
|
|
4467
4467
|
let wet;
|
|
4468
|
-
if (
|
|
4468
|
+
if (_chunkC46AZEBEcjs.isWetBrush.call(void 0, brush)) {
|
|
4469
4469
|
this.requireWetIdle("painting");
|
|
4470
4470
|
if (layer.offset.x || layer.offset.y) {
|
|
4471
4471
|
const moved = { ...layer, surface: _chunkO7LUD7MHcjs.translateSurface.call(void 0, layer.surface, layer.offset.x, layer.offset.y), offset: { x: 0, y: 0 } };
|
|
@@ -4480,10 +4480,10 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4480
4480
|
const world = this.wet.ensureLane(layer.id, brush.wet.medium);
|
|
4481
4481
|
const id = layer.id;
|
|
4482
4482
|
const wetColor = init.color === void 0 ? this.color : parseColor(init.color);
|
|
4483
|
-
const [r, g, b] =
|
|
4483
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, wetColor);
|
|
4484
4484
|
const wetGradient = this.strokeGradient(init, brush, wetColor);
|
|
4485
4485
|
const load = _nullishCoalesce(init.load, () => ( brushLoadForStroke(brush, this.mixerLoad, [r / 255, g / 255, b / 255])));
|
|
4486
|
-
const seedW = _nullishCoalesce(init.seed, () => (
|
|
4486
|
+
const seedW = _nullishCoalesce(init.seed, () => ( _chunk3T5O225Tcjs.mix32.call(void 0, this.seedCounter * 2654435761 >>> 0) & 2147483647));
|
|
4487
4487
|
const copiesW = (_nullishCoalesce(init.copies, () => ( this.strokeCopies()))).filter((m) => m.some((v, i) => v !== IDENTITY_AFFINE[i]));
|
|
4488
4488
|
const driver = new WetStrokeDriver({
|
|
4489
4489
|
world,
|
|
@@ -4493,7 +4493,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4493
4493
|
load,
|
|
4494
4494
|
grain: paperGrain(doc.paper),
|
|
4495
4495
|
paperDepth: doc.paper.depth,
|
|
4496
|
-
paperColor:
|
|
4496
|
+
paperColor: _chunkC46AZEBEcjs.hexToRgb8.call(void 0, doc.paper.color),
|
|
4497
4497
|
seed: seedW,
|
|
4498
4498
|
copies: [IDENTITY_AFFINE, ...copiesW].map(affineCopy),
|
|
4499
4499
|
mask: init.maskStencils ? this.stencilSelection(init.maskStencils) : init.stencils !== false ? this.stencilSelection() : null,
|
|
@@ -4516,7 +4516,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4516
4516
|
const selection = init.maskStencils ? this.stencilSelection(init.maskStencils) : useStencils ? this.stencilSelection() : null;
|
|
4517
4517
|
const inputFilter = snapper || stencilSnapper ? (p) => stencilSnapper ? stencilSnapper.snap(snapper ? snapper.snap(p) : p) : snapper.snap(p) : void 0;
|
|
4518
4518
|
const rgba = rgbaOf(color);
|
|
4519
|
-
const seed = _nullishCoalesce(init.seed, () => (
|
|
4519
|
+
const seed = _nullishCoalesce(init.seed, () => ( _chunk3T5O225Tcjs.mix32.call(void 0, this.seedCounter++ * 2654435761 >>> 0) & 2147483647));
|
|
4520
4520
|
const copies = (_nullishCoalesce(init.copies, () => ( this.strokeCopies()))).filter((m) => m.some((v, i) => v !== IDENTITY_AFFINE[i]));
|
|
4521
4521
|
const session = new PaintStrokeSession(host, {
|
|
4522
4522
|
layerId: layer.id,
|
|
@@ -4550,7 +4550,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4550
4550
|
const stroke = {
|
|
4551
4551
|
id: `s${this.strokeCounter++}`,
|
|
4552
4552
|
layerId: session.layerId,
|
|
4553
|
-
brush:
|
|
4553
|
+
brush: _chunkC46AZEBEcjs.brushToJSON.call(void 0, init.brush),
|
|
4554
4554
|
color: init.colorHex,
|
|
4555
4555
|
points: session.points.map((p) => ({ ...p })),
|
|
4556
4556
|
seed: init.seed
|
|
@@ -4742,13 +4742,13 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4742
4742
|
let brush = v.brush;
|
|
4743
4743
|
if (options.brushId !== void 0) {
|
|
4744
4744
|
const b = this.requireBrush(options.brushId);
|
|
4745
|
-
brush =
|
|
4745
|
+
brush = _chunkC46AZEBEcjs.normalizePaintBrush.call(void 0, { tip: { ...b.tip, size: b.tip.size * (v.brush.tip.size / s.brush.tip.size) } }, b);
|
|
4746
4746
|
}
|
|
4747
4747
|
const layerId = _nullishCoalesce(options.layerId, () => ( s.layerId));
|
|
4748
4748
|
if (!_chunkAEAAN4ADcjs.findLayer.call(void 0, doc.layers, layerId)) throw new PaintEditorError(`Stroke "${s.id}" was painted on layer "${layerId}", which no longer exists; pass layerId to replay it elsewhere.`);
|
|
4749
4749
|
let load = s.load;
|
|
4750
4750
|
if (load && options.color !== void 0 && load.reservoir) {
|
|
4751
|
-
const [r, g, b] =
|
|
4751
|
+
const [r, g, b] = _chunkC46AZEBEcjs.hexToRgb8.call(void 0, options.color);
|
|
4752
4752
|
load = { ...load, reservoir: [r / 255, g / 255, b / 255] };
|
|
4753
4753
|
}
|
|
4754
4754
|
const paint = v.paint && options.color === void 0 ? { paint: v.paint } : {};
|
|
@@ -5205,7 +5205,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5205
5205
|
const stickers = {};
|
|
5206
5206
|
for (const [id, list] of Object.entries(ext.stickers)) {
|
|
5207
5207
|
if (!_chunkAEAAN4ADcjs.findLayer.call(void 0, state.layers, id) || !Array.isArray(list)) continue;
|
|
5208
|
-
const ok = list.filter((x) => x && typeof x.id === "string" &&
|
|
5208
|
+
const ok = list.filter((x) => x && typeof x.id === "string" && _chunkC46AZEBEcjs.STAMP_KINDS.includes(x.stamp) && Number.isFinite(x.x) && Number.isFinite(x.y) && x.size > 0);
|
|
5209
5209
|
if (ok.length !== list.length) problems.push(`Some stickers of layer "${id}" could not be read; they were dropped.`);
|
|
5210
5210
|
stickers[id] = ok.map((x) => ({ ...x }));
|
|
5211
5211
|
}
|
|
@@ -5346,7 +5346,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5346
5346
|
return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
|
|
5347
5347
|
});
|
|
5348
5348
|
const layers = toStandard(dried);
|
|
5349
|
-
const result =
|
|
5349
|
+
const result = _chunkCM3LJPR3cjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
|
|
5350
5350
|
for (const [mode, names] of changed) {
|
|
5351
5351
|
const label = _nullishCoalesce(_optionalChain([_chunkO7LUD7MHcjs.BLEND_MODES, 'access', _268 => _268.find, 'call', _269 => _269((m) => m.id === mode), 'optionalAccess', _270 => _270.label]), () => ( mode));
|
|
5352
5352
|
const std = _nullishCoalesce(_optionalChain([_chunkO7LUD7MHcjs.BLEND_MODES, 'access', _271 => _271.find, 'call', _272 => _272((m) => m.id === _chunkO7LUD7MHcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _273 => _273.label]), () => ( _chunkO7LUD7MHcjs.standardBlendMode.call(void 0, mode)));
|
|
@@ -5597,7 +5597,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5597
5597
|
/** Replaces a layer's stickers and redraws its pixels from them (one undo step). */
|
|
5598
5598
|
commitStickers(label, layer, stickers) {
|
|
5599
5599
|
if (_chunkAEAAN4ADcjs.isLayerLocked.call(void 0, layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
|
|
5600
|
-
const surface =
|
|
5600
|
+
const surface = _chunkC46AZEBEcjs.stickerSurface.call(void 0, stickers);
|
|
5601
5601
|
const doc = { ...this.doc, layers: _chunkAEAAN4ADcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [layer.id]: stickers } };
|
|
5602
5602
|
this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }));
|
|
5603
5603
|
}
|
|
@@ -5608,7 +5608,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5608
5608
|
if (i < 0) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
|
|
5609
5609
|
let u;
|
|
5610
5610
|
try {
|
|
5611
|
-
u =
|
|
5611
|
+
u = _chunkC46AZEBEcjs.normalizeStickerUpdate.call(void 0, update);
|
|
5612
5612
|
} catch (e) {
|
|
5613
5613
|
throw new PaintEditorError(e.message);
|
|
5614
5614
|
}
|
|
@@ -5709,7 +5709,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5709
5709
|
}
|
|
5710
5710
|
makeSwatch(color, name) {
|
|
5711
5711
|
const p = typeof color === "string" ? { type: "color", color: parseColor(color) } : this.readStrokePaint(color);
|
|
5712
|
-
const out = { color:
|
|
5712
|
+
const out = { color: _chunk3T5O225Tcjs.paintSourceColor.call(void 0, p, { paint: this.color, secondary: this.secondaryColor }) };
|
|
5713
5713
|
if (_optionalChain([name, 'optionalAccess', _292 => _292.trim, 'call', _293 => _293()])) out.name = name.trim();
|
|
5714
5714
|
if (p.type === "gradient") out.paint = p;
|
|
5715
5715
|
return out;
|
|
@@ -6075,7 +6075,7 @@ function createPaintStickerTools(c) {
|
|
|
6075
6075
|
properties: {
|
|
6076
6076
|
layerId: LAYER_ID,
|
|
6077
6077
|
id: { type: "string", description: "Sticker id from list_stickers." },
|
|
6078
|
-
stamp: { type: "string", enum: [...
|
|
6078
|
+
stamp: { type: "string", enum: [..._chunkC46AZEBEcjs.STAMP_KINDS], description: "Another stamp." },
|
|
6079
6079
|
x: { type: "number", description: "Centre x in document pixels." },
|
|
6080
6080
|
y: { type: "number", description: "Centre y in document pixels." },
|
|
6081
6081
|
size: { type: "number", minimum: 2, maximum: 2048, description: "Diameter in pixels." },
|
|
@@ -6372,7 +6372,7 @@ function createPaintGuideTools(c) {
|
|
|
6372
6372
|
type: "object",
|
|
6373
6373
|
properties: {
|
|
6374
6374
|
color: { ...COLOR, description: "A colour #rrggbb." },
|
|
6375
|
-
paint: { ...
|
|
6375
|
+
paint: { ..._chunk3T5O225Tcjs.PAINT_SOURCE_JSON_SCHEMA, description: "Gradient paint (or a colour) for the swatch, instead of color." },
|
|
6376
6376
|
name: { type: "string", minLength: 1, description: "Optional name." }
|
|
6377
6377
|
},
|
|
6378
6378
|
additionalProperties: false
|
|
@@ -6877,7 +6877,7 @@ var TIP = {
|
|
|
6877
6877
|
type: "object",
|
|
6878
6878
|
description: "The tip (the shared brush engine). Missing fields keep their current values.",
|
|
6879
6879
|
properties: {
|
|
6880
|
-
size: { type: "number", minimum: 1, maximum:
|
|
6880
|
+
size: { type: "number", minimum: 1, maximum: _chunk3T5O225Tcjs.MAX_BRUSH_SIZE, description: "Diameter in document pixels." },
|
|
6881
6881
|
hardness: { type: "number", minimum: 0, maximum: 1, description: "Edge hardness, 0 (soft) .. 1 (hard)." },
|
|
6882
6882
|
spacing: { type: "number", minimum: 0.01, maximum: 10, description: "Dab spacing as a fraction of the diameter (0.05 is smooth, 1 is dotted)." },
|
|
6883
6883
|
angle: { type: "number", minimum: -360, maximum: 360, description: "Tip angle in degrees, counter-clockwise; with rotation stroke or barrel it is added to the stroke direction or pen rotation." },
|
|
@@ -6922,11 +6922,11 @@ var MIXER = {
|
|
|
6922
6922
|
mix: { type: "number", minimum: 0, maximum: 1, description: "Mix ratio: how far each dab's paint moves from the reservoir towards the picked-up colour." },
|
|
6923
6923
|
loadEachStroke: { type: "boolean", description: "Refill the reservoir with the colour before each stroke." },
|
|
6924
6924
|
cleanEachStroke: { type: "boolean", description: "Empty the pickup well after each stroke." },
|
|
6925
|
-
mixing: { type: "string", enum: [...
|
|
6925
|
+
mixing: { type: "string", enum: [..._chunk3T5O225Tcjs.MIXING_MODELS], description: "rgb: RGB averages. pigment: mixes like paint (Kubelka-Munk)." }
|
|
6926
6926
|
},
|
|
6927
6927
|
additionalProperties: false
|
|
6928
6928
|
};
|
|
6929
|
-
var MIXING = { type: "string", enum: [...
|
|
6929
|
+
var MIXING = { type: "string", enum: [..._chunk3T5O225Tcjs.MIXING_MODELS], description: "pigment: mixes like paint (Kubelka-Munk, blue and yellow make green); rgb: straight RGB averages." };
|
|
6930
6930
|
var BEHAVIOR = {
|
|
6931
6931
|
type: "object",
|
|
6932
6932
|
description: "How the brush handles paint on the canvas (dab and mixer engines; on a mixer brush pickup, mix, dirty and mixing are its mixer wet, mix, !cleanEachStroke and mixing). Missing fields keep their current values.",
|
|
@@ -6939,7 +6939,7 @@ var BEHAVIOR = {
|
|
|
6939
6939
|
type: "object",
|
|
6940
6940
|
description: "Multi-coloured brush (the older form of paint, the brush's own gradient: tip is across-tip, dab is distance in dabs or random). Read back from paint when it has a multi-colour equivalent. Missing fields keep their current values.",
|
|
6941
6941
|
properties: {
|
|
6942
|
-
mode: { type: "string", enum: [...
|
|
6942
|
+
mode: { type: "string", enum: [..._chunkC46AZEBEcjs.MULTI_COLOR_MODES], description: "off; tip: the colours lie side by side across the tip (stripes along the stroke, like a brush loaded with several paints); dab: the colour changes along the stroke." },
|
|
6943
6943
|
colors: { type: "array", maxItems: 8, items: { ...COLOR2 }, description: "2..8 colours #rrggbb; fewer than 2 uses the paint colour and the secondary colour." },
|
|
6944
6944
|
order: { type: "string", enum: ["sequence", "random"], description: "dab mode: sequence runs through the colours in order, blending between them; random picks one per run of dabs (seeded)." },
|
|
6945
6945
|
length: { type: "integer", minimum: 1, maximum: 500, description: "dab mode: dabs per colour (default 12)." },
|
|
@@ -6952,7 +6952,7 @@ var BEHAVIOR = {
|
|
|
6952
6952
|
};
|
|
6953
6953
|
var BRUSH_PAINT = {
|
|
6954
6954
|
description: `The brush's own gradient paint, used instead of the editor's paint (null: the editor's paint). It is what the multi-colour settings became; stops may be "paint" / "secondary" for the editor's two colours.`,
|
|
6955
|
-
anyOf: [
|
|
6955
|
+
anyOf: [_chunk3T5O225Tcjs.PAINT_GRADIENT_JSON_SCHEMA, { type: "null", description: "No gradient of its own: the editor's paint." }]
|
|
6956
6956
|
};
|
|
6957
6957
|
var BLENDER = {
|
|
6958
6958
|
type: "object",
|
|
@@ -6980,10 +6980,10 @@ var WET_BRUSH = {
|
|
|
6980
6980
|
properties: {
|
|
6981
6981
|
tool: {
|
|
6982
6982
|
type: "string",
|
|
6983
|
-
enum: [...
|
|
6983
|
+
enum: [..._chunkC46AZEBEcjs.WET_TOOLS],
|
|
6984
6984
|
description: "paint: water and pigment (picks up and mixes wet paint by behavior.pickup / mix); water: clear water (with rewet it lifts dried paint); dry: a hair dryer, takes water; blow: pushes the water along the stroke; blend: evens out wet pigment; smudge: drags wet paint; blot: a tissue, takes wet paint up (erase wet)."
|
|
6985
6985
|
},
|
|
6986
|
-
medium: { type: "string", enum: [...
|
|
6986
|
+
medium: { type: "string", enum: [..._chunkC46AZEBEcjs.WET_MEDIA], description: "The medium: watercolor, gouache or oil. A layer takes the medium's wet settings the first time it holds wet paint (oil: thick, barely flows, stays wet long and blends into the wet paint it meets)." },
|
|
6987
6987
|
load: { type: "number", minimum: 0, maximum: 1, description: "Paint loading: 1 never runs out; lower, the brush runs dry along a long stroke (each stroke reloads)." },
|
|
6988
6988
|
thinner: { type: "number", minimum: 0, maximum: 1, description: "Thinner (water or solvent): more transparent, runnier paint." },
|
|
6989
6989
|
water: { type: "number", minimum: 0, maximum: 1, description: "Wetness: water laid per stroke, 0.2 a damp brush .. 1 a dripping one." },
|
|
@@ -7000,7 +7000,7 @@ var IMPASTO_BRUSH = {
|
|
|
7000
7000
|
properties: {
|
|
7001
7001
|
tool: {
|
|
7002
7002
|
type: "string",
|
|
7003
|
-
enum: [...
|
|
7003
|
+
enum: [..._chunkC46AZEBEcjs.IMPASTO_TOOLS],
|
|
7004
7004
|
description: "brush: thick paint with bristle ridges along the stroke; tube: blobs squeezed from the tube; knife: a palette knife that scrapes the relief flat and smears the paint; roller: a flat stippled band; gloop: a thick, glossy, rounded bead."
|
|
7005
7005
|
},
|
|
7006
7006
|
thickness: { type: "number", minimum: 0, maximum: 1, description: "How far the paint stands up." },
|
|
@@ -7016,8 +7016,8 @@ var PARTICLE_BRUSH = {
|
|
|
7016
7016
|
type: "object",
|
|
7017
7017
|
description: "Particle engine settings (procedural brushes). Missing fields keep their current values.",
|
|
7018
7018
|
properties: {
|
|
7019
|
-
kind: { type: "string", enum: [...
|
|
7020
|
-
render: { type: "string", enum: [...
|
|
7019
|
+
kind: { type: "string", enum: [..._chunkC46AZEBEcjs.PARTICLE_KINDS], description: "string: strands of masses on springs dragged behind the pen (hair, fur, wet string); spring: particles on springs to the pen, overshooting and wobbling; orbit: particles circling the pen (curls); flow: particles thrown off the pen into a swirling flow until they fade." },
|
|
7020
|
+
render: { type: "string", enum: [..._chunkC46AZEBEcjs.PARTICLE_RENDERS], description: "dot: a mark at each step; line: each particle draws a continuous line; sequence: beads spaced along each path." },
|
|
7021
7021
|
count: { type: "integer", minimum: 1, maximum: 64, description: "Particles (flow: how many are thrown per tip of travel)." },
|
|
7022
7022
|
size: { type: "number", minimum: 0, maximum: 1, description: "Mark size as a fraction of the tip size." },
|
|
7023
7023
|
spread: { type: "number", minimum: 0, maximum: 1, description: "How far apart the particles start, as a fraction of the tip size." },
|
|
@@ -7047,7 +7047,7 @@ var STICKER_BRUSH = {
|
|
|
7047
7047
|
type: "object",
|
|
7048
7048
|
description: "Sticker engine settings: stamps sprayed along the stroke as editable stickers. Missing fields keep their current values.",
|
|
7049
7049
|
properties: {
|
|
7050
|
-
stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [...
|
|
7050
|
+
stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [..._chunkC46AZEBEcjs.STAMP_KINDS], description: "A stamp." }, description: "The stamps to spray (one picked at random per sticker)." },
|
|
7051
7051
|
density: { type: "number", minimum: 0, maximum: 1, description: "Stickers per distance travelled." },
|
|
7052
7052
|
sizeJitter: { type: "number", minimum: 0, maximum: 1, description: "Random size change." },
|
|
7053
7053
|
rotationJitter: { type: "number", minimum: 0, maximum: 1, description: "Random turn as a fraction of \xB1180\xB0." },
|
|
@@ -7058,16 +7058,16 @@ var STICKER_BRUSH = {
|
|
|
7058
7058
|
};
|
|
7059
7059
|
var BRUSH_FIELDS = {
|
|
7060
7060
|
name: { type: "string", minLength: 1, maxLength: 80, description: "Display name." },
|
|
7061
|
-
category: { type: "string", enum: [...
|
|
7061
|
+
category: { type: "string", enum: [..._chunkC46AZEBEcjs.PAINT_BRUSH_CATEGORIES], description: "Library category." },
|
|
7062
7062
|
engine: {
|
|
7063
7063
|
type: "string",
|
|
7064
|
-
enum: [...
|
|
7064
|
+
enum: [..._chunkC46AZEBEcjs.PAINT_BRUSH_ENGINES],
|
|
7065
7065
|
description: "dab: paints dabs (with behavior.pickup or gradient paint it paints dab by dab, lifting and mixing paint); eraser: removes paint; mixer: the Mixer Brush (a reservoir plus picked-up paint); blender: mixes the colours under and near the tip; smudge: drags paint along the stroke; wet: watercolour, gouache, oil and the wet tools on a simulated wet layer (see wet); impasto: thick paint with relief (see impasto); particle: procedural particle brushes (see particle); bristle: a tuft of bristles that bend and splay (see bristle); sticker: sprays editable sticker stamps (see sticker)."
|
|
7066
7066
|
},
|
|
7067
7067
|
tip: TIP,
|
|
7068
7068
|
grain: { type: "number", minimum: 0, maximum: 1, description: "Paper grain response: 0 ignores the grain, 1 catches only its peaks at light pressure (pencil, pastel, charcoal). Multiplied by the paper depth." },
|
|
7069
7069
|
pressureSmoothing: { type: "number", minimum: 0, maximum: 0.95, description: "Pressure smoothing, separate from the tip position smoothing." },
|
|
7070
|
-
rotation: { type: "string", enum: [...
|
|
7070
|
+
rotation: { type: "string", enum: [..._chunkC46AZEBEcjs.BRUSH_ROTATIONS], description: "What turns the tip: fixed (tip.angle), stroke (follows the direction of travel) or barrel (the pen barrel rotation, twist)." },
|
|
7071
7071
|
dynamics: DYNAMICS,
|
|
7072
7072
|
mixer: MIXER,
|
|
7073
7073
|
loadsColor: { type: "boolean", description: "Mixer engine: load the colour each stroke (false for a mixer that only moves paint)." },
|
|
@@ -7117,7 +7117,7 @@ function brushSummary(b) {
|
|
|
7117
7117
|
size: b.tip.size,
|
|
7118
7118
|
grain: b.grain,
|
|
7119
7119
|
rotation: b.rotation,
|
|
7120
|
-
wetCapable:
|
|
7120
|
+
wetCapable: _chunkC46AZEBEcjs.isWetCapable.call(void 0, b),
|
|
7121
7121
|
pickup: b.behavior.pickup,
|
|
7122
7122
|
dirty: b.behavior.dirty,
|
|
7123
7123
|
multicolor: b.behavior.multicolor.mode,
|
|
@@ -7209,9 +7209,9 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7209
7209
|
inputSchema: EMPTY3,
|
|
7210
7210
|
annotations: { title: "List papers", ...READ6 },
|
|
7211
7211
|
handler: () => ({
|
|
7212
|
-
papers:
|
|
7213
|
-
families: [...
|
|
7214
|
-
patterns: [...
|
|
7212
|
+
papers: _chunkC46AZEBEcjs.PAPER_LIBRARY.map((p) => ({ id: p.preset, name: p.name, family: p.family, pattern: p.pattern, color: p.color, depth: p.depth, absorption: p.absorption, permeability: p.permeability, roughness: p.roughness })),
|
|
7213
|
+
families: [..._chunkC46AZEBEcjs.PAPER_FAMILIES],
|
|
7214
|
+
patterns: [..._chunk3T5O225Tcjs.GRAIN_PATTERNS]
|
|
7215
7215
|
})
|
|
7216
7216
|
});
|
|
7217
7217
|
add({
|
|
@@ -7242,7 +7242,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7242
7242
|
depth: { type: "number", minimum: 0, maximum: 1, description: "Grain depth 0..1 (0: brushes ignore the grain)." },
|
|
7243
7243
|
scale: { type: "number", minimum: 0.25, maximum: 8, description: "Grain scale: 1 natural, 2 twice as coarse." },
|
|
7244
7244
|
seed: { type: "integer", minimum: 0, description: "Grain seed: another sheet of the same paper." },
|
|
7245
|
-
pattern: { type: "string", enum: [...
|
|
7245
|
+
pattern: { type: "string", enum: [..._chunk3T5O225Tcjs.GRAIN_PATTERNS], description: "Grain pattern." },
|
|
7246
7246
|
tiling: { type: "string", enum: ["repeat", "mirror"], description: "How the grain tile repeats (mirror hides seams)." },
|
|
7247
7247
|
shading: { type: "number", minimum: 0, maximum: 1, description: "How much the grain shades the paper colour." },
|
|
7248
7248
|
dry: { ...tuning, description: "Height map tuning for dry media." },
|
|
@@ -7432,10 +7432,10 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7432
7432
|
annotations: { title: "Get a brush", ...READ6 },
|
|
7433
7433
|
handler: ({ id }) => {
|
|
7434
7434
|
const st = c.getState();
|
|
7435
|
-
if (id === void 0) return { ...
|
|
7435
|
+
if (id === void 0) return { ..._chunkC46AZEBEcjs.brushToJSON.call(void 0, st.brush), strokePaint: _nullishCoalesce(st.brush.paint, () => ( st.paint)) };
|
|
7436
7436
|
const b = c.getBrush(id);
|
|
7437
7437
|
if (!b) throw new Error(`Unknown brush "${id}". Call list_brushes for the ids.`);
|
|
7438
|
-
return { ...
|
|
7438
|
+
return { ..._chunkC46AZEBEcjs.brushToJSON.call(void 0, b), builtin: Boolean(b.builtin), strokePaint: _nullishCoalesce(b.paint, () => ( st.paint)) };
|
|
7439
7439
|
}
|
|
7440
7440
|
});
|
|
7441
7441
|
add({
|
|
@@ -7444,7 +7444,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7444
7444
|
description: "Chooses the active brush (id) and / or changes its settings; strokes without a brush use it. Editor state, not an undo step. Changes stay on the active brush until save_brush stores them. Returns the active brush.",
|
|
7445
7445
|
inputSchema: { type: "object", properties: { id: { type: "string", description: "Brush id from list_brushes to start from." }, ...BRUSH_FIELDS }, additionalProperties: false },
|
|
7446
7446
|
annotations: { title: "Set the brush", ...SET4 },
|
|
7447
|
-
handler: (a) =>
|
|
7447
|
+
handler: (a) => _chunkC46AZEBEcjs.brushToJSON.call(void 0, c.setBrush(a))
|
|
7448
7448
|
});
|
|
7449
7449
|
add({
|
|
7450
7450
|
name: "save_brush",
|
|
@@ -7460,7 +7460,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7460
7460
|
additionalProperties: false
|
|
7461
7461
|
},
|
|
7462
7462
|
annotations: { title: "Save a brush", ...SET4 },
|
|
7463
|
-
handler: ({ id, name }) =>
|
|
7463
|
+
handler: ({ id, name }) => _chunkC46AZEBEcjs.brushToJSON.call(void 0, c.saveBrush({ id, name }))
|
|
7464
7464
|
});
|
|
7465
7465
|
add({
|
|
7466
7466
|
name: "remove_brush",
|
|
@@ -7547,7 +7547,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7547
7547
|
name: "set_paint",
|
|
7548
7548
|
title: "Set the paint (colour or gradient)",
|
|
7549
7549
|
description: 'Sets what strokes paint with: one colour, or gradient paint that changes colour as the stroke goes. Gradient paint: 2..16 stops sorted by offset (#rrggbb, or "paint" / "secondary" for the two editor colours), space pigment (default: mixes like paint) / oklab / srgb, and map: distance (default: the colour changes as the stroke is dragged out, 300 px then mirrored back), pressure, tilt, velocity, direction, time, across-tip or random. Every stroking brush samples it per dab (dab, mixer, watercolour and gouache, oil and impasto, particle, bristle, sticker); erasers, blenders and smudges ignore it, and a brush with its own gradient (get_brush paint) paints that instead. set_color goes back to one colour. Editor state, not an undo step. Returns paint, color and secondaryColor.',
|
|
7550
|
-
inputSchema: { type: "object", properties: { paint:
|
|
7550
|
+
inputSchema: { type: "object", properties: { paint: _chunk3T5O225Tcjs.PAINT_SOURCE_JSON_SCHEMA }, required: ["paint"], additionalProperties: false },
|
|
7551
7551
|
annotations: { title: "Set the paint (colour or gradient)", ...SET4 },
|
|
7552
7552
|
handler: ({ paint }) => {
|
|
7553
7553
|
const p = c.setPaint(paint);
|
|
@@ -7608,7 +7608,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7608
7608
|
brushId: { type: "string", description: "Brush id from list_brushes (default the active brush)." },
|
|
7609
7609
|
brush: { type: "object", description: "Brush changes for this stroke only.", properties: BRUSH_FIELDS, additionalProperties: false },
|
|
7610
7610
|
color: { ...COLOR2, description: "Paint colour #rrggbb (default the paint colour)." },
|
|
7611
|
-
paint: { ...
|
|
7611
|
+
paint: { ..._chunk3T5O225Tcjs.PAINT_SOURCE_JSON_SCHEMA, description: "What this stroke paints with instead of the editor's paint: a colour, or gradient paint that changes colour as the stroke goes (by distance, pressure, tilt, speed, direction, time, across the tip or at random). Wins over the brush's own gradient." },
|
|
7612
7612
|
seed: { type: "integer", minimum: 0, description: "Jitter seed (default a new one); the same seed and points give the same marks." },
|
|
7613
7613
|
snapToPerspective: { type: "boolean", description: "Snap the points to the perspective guide, as a pen stroke would (default false)." }
|
|
7614
7614
|
},
|
|
@@ -8847,5 +8847,5 @@ function createPaintEffectsToolProvider(controller, options = {}) {
|
|
|
8847
8847
|
|
|
8848
8848
|
|
|
8849
8849
|
|
|
8850
|
-
exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkO7LUD7MHcjs.BLEND_MODES; exports.BRUSH_ID = _chunk2XS6LTUPcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunk2XS6LTUPcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunk2XS6LTUPcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunk2XS6LTUPcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunk2XS6LTUPcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunk2XS6LTUPcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunk2XS6LTUPcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunk2XS6LTUPcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkF2Y4E4GUcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunk2XS6LTUPcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunk2XS6LTUPcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunkQBWEH3IMcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkQBWEH3IMcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunk2XS6LTUPcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunk2XS6LTUPcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunk2XS6LTUPcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunk2XS6LTUPcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkF2Y4E4GUcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunk2XS6LTUPcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunk2XS6LTUPcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunk2XS6LTUPcjs.GRAIN_TILE; exports.HARMONY_KINDS = HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunk2XS6LTUPcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunk2XS6LTUPcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkQBWEH3IMcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = _chunk2XS6LTUPcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkO7LUD7MHcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunk2XS6LTUPcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunk2XS6LTUPcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkQBWEH3IMcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_GRADIENT_FULL_SPEED = _chunkQBWEH3IMcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkQBWEH3IMcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkQBWEH3IMcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkQBWEH3IMcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkQBWEH3IMcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkQBWEH3IMcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_EFFECT_BLENDS = PAPER_EFFECT_BLENDS; exports.PAPER_EFFECT_NODE_ID = PAPER_EFFECT_NODE_ID; exports.PAPER_FAMILIES = _chunk2XS6LTUPcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunk2XS6LTUPcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunk2XS6LTUPcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunk2XS6LTUPcjs.PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintEffectsRenderer = PaintEffectsRenderer; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkQBWEH3IMcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunkQBWEH3IMcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunk2XS6LTUPcjs.PaperGrain; exports.ParticleStroke = _chunk2XS6LTUPcjs.ParticleStroke; exports.PenDabWalker = _chunk2XS6LTUPcjs.PenDabWalker; exports.PenSmoother = _chunk2XS6LTUPcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunk2XS6LTUPcjs.STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = _chunk2XS6LTUPcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunk2XS6LTUPcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkF2Y4E4GUcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunk2XS6LTUPcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkF2Y4E4GUcjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = _chunk2XS6LTUPcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunkQBWEH3IMcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunk2XS6LTUPcjs.brushTakesPaint; exports.brushToJSON = _chunk2XS6LTUPcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunk2XS6LTUPcjs.clonePaper; exports.colorHarmony = colorHarmony; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintEffectsToolProvider = createPaintEffectsToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = _chunk2XS6LTUPcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunk2XS6LTUPcjs.grainCatch; exports.grainHeights = _chunk2XS6LTUPcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunkQBWEH3IMcjs.hash2; exports.hexToPaintRgb = _chunkQBWEH3IMcjs.hexToPaintRgb; exports.hexToRgb8 = _chunk2XS6LTUPcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkO7LUD7MHcjs.isBlendMode; exports.isGradientPaint = _chunkQBWEH3IMcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkO7LUD7MHcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunk2XS6LTUPcjs.isWetBrush; exports.isWetCapable = _chunk2XS6LTUPcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunkQBWEH3IMcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunk2XS6LTUPcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunk2XS6LTUPcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunk2XS6LTUPcjs.normalizeBehavior; exports.normalizeBristle = _chunk2XS6LTUPcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunk2XS6LTUPcjs.normalizeDynamics; exports.normalizeFlow = _chunkF2Y4E4GUcjs.normalizeFlow; exports.normalizeHexColor = _chunkQBWEH3IMcjs.normalizeHexColor; exports.normalizeImpasto = _chunk2XS6LTUPcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunk2XS6LTUPcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunk2XS6LTUPcjs.normalizePaintBrush; exports.normalizePaper = _chunk2XS6LTUPcjs.normalizePaper; exports.normalizeParticle = _chunk2XS6LTUPcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunk2XS6LTUPcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunk2XS6LTUPcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunk2XS6LTUPcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkF2Y4E4GUcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunkQBWEH3IMcjs.paintGradientMappingFor; exports.paintSourceColor = _chunkQBWEH3IMcjs.paintSourceColor; exports.paintSourceCss = _chunkQBWEH3IMcjs.paintSourceCss; exports.paintToMultiColor = _chunk2XS6LTUPcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunk2XS6LTUPcjs.paperPreset; exports.parseBrushLibrary = _chunk2XS6LTUPcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunkQBWEH3IMcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunk2XS6LTUPcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunkQBWEH3IMcjs.rand01; exports.randSigned = _chunk2XS6LTUPcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunkQBWEH3IMcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunkQBWEH3IMcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunk2XS6LTUPcjs.renderPaper; exports.renderStickers = _chunk2XS6LTUPcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunkQBWEH3IMcjs.resolvePaintGradient; exports.reversePaintGradient = _chunkQBWEH3IMcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunkQBWEH3IMcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunk2XS6LTUPcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunkQBWEH3IMcjs.solidPaint; exports.stampCoverage = _chunk2XS6LTUPcjs.stampCoverage; exports.standardBlendMode = _chunkO7LUD7MHcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunk2XS6LTUPcjs.stickerRect; exports.stickerSurface = _chunk2XS6LTUPcjs.stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = _chunk2XS6LTUPcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunk2XS6LTUPcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.updatePaintGradientStop = _chunkQBWEH3IMcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunk2XS6LTUPcjs.usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetEngineSummary = wetEngineSummary; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkF2Y4E4GUcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = wheelToHue;
|
|
8850
|
+
exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkO7LUD7MHcjs.BLEND_MODES; exports.BRUSH_ID = _chunkC46AZEBEcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunkC46AZEBEcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunkC46AZEBEcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunkC46AZEBEcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunkC46AZEBEcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunkC46AZEBEcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunkC46AZEBEcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunkC46AZEBEcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkF2Y4E4GUcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunkC46AZEBEcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunkC46AZEBEcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunk3T5O225Tcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunk3T5O225Tcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunkC46AZEBEcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunkC46AZEBEcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunkC46AZEBEcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunkC46AZEBEcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkF2Y4E4GUcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunkC46AZEBEcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunk3T5O225Tcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunk3T5O225Tcjs.GRAIN_TILE; exports.HARMONY_KINDS = HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunkC46AZEBEcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunkC46AZEBEcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunk3T5O225Tcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = _chunkC46AZEBEcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkO7LUD7MHcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunkC46AZEBEcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunkC46AZEBEcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunk3T5O225Tcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_GRADIENT_FULL_SPEED = _chunk3T5O225Tcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunk3T5O225Tcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunk3T5O225Tcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunk3T5O225Tcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunk3T5O225Tcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunk3T5O225Tcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunk3T5O225Tcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunk3T5O225Tcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunk3T5O225Tcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunk3T5O225Tcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunk3T5O225Tcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_EFFECT_BLENDS = PAPER_EFFECT_BLENDS; exports.PAPER_EFFECT_NODE_ID = PAPER_EFFECT_NODE_ID; exports.PAPER_FAMILIES = _chunkC46AZEBEcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunkC46AZEBEcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunkC46AZEBEcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunkC46AZEBEcjs.PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintEffectsRenderer = PaintEffectsRenderer; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunk3T5O225Tcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunk3T5O225Tcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunk3T5O225Tcjs.PaperGrain; exports.ParticleStroke = _chunkC46AZEBEcjs.ParticleStroke; exports.PenDabWalker = _chunkC46AZEBEcjs.PenDabWalker; exports.PenSmoother = _chunkC46AZEBEcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunkC46AZEBEcjs.STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = _chunkC46AZEBEcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunk3T5O225Tcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkF2Y4E4GUcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunkC46AZEBEcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkF2Y4E4GUcjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = _chunkC46AZEBEcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunk3T5O225Tcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunkC46AZEBEcjs.brushTakesPaint; exports.brushToJSON = _chunkC46AZEBEcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunkC46AZEBEcjs.clonePaper; exports.colorHarmony = colorHarmony; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintEffectsToolProvider = createPaintEffectsToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = _chunkC46AZEBEcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunk3T5O225Tcjs.grainCatch; exports.grainHeights = _chunk3T5O225Tcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunk3T5O225Tcjs.hash2; exports.hexToPaintRgb = _chunk3T5O225Tcjs.hexToPaintRgb; exports.hexToRgb8 = _chunkC46AZEBEcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkO7LUD7MHcjs.isBlendMode; exports.isGradientPaint = _chunk3T5O225Tcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkO7LUD7MHcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunkC46AZEBEcjs.isWetBrush; exports.isWetCapable = _chunkC46AZEBEcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunk3T5O225Tcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunkC46AZEBEcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunkC46AZEBEcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunkC46AZEBEcjs.normalizeBehavior; exports.normalizeBristle = _chunkC46AZEBEcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunkC46AZEBEcjs.normalizeDynamics; exports.normalizeFlow = _chunkF2Y4E4GUcjs.normalizeFlow; exports.normalizeHexColor = _chunk3T5O225Tcjs.normalizeHexColor; exports.normalizeImpasto = _chunkC46AZEBEcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunkC46AZEBEcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunkC46AZEBEcjs.normalizePaintBrush; exports.normalizePaper = _chunkC46AZEBEcjs.normalizePaper; exports.normalizeParticle = _chunkC46AZEBEcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunkC46AZEBEcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunkC46AZEBEcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunkC46AZEBEcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkF2Y4E4GUcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunk3T5O225Tcjs.paintGradientMappingFor; exports.paintSourceColor = _chunk3T5O225Tcjs.paintSourceColor; exports.paintSourceCss = _chunk3T5O225Tcjs.paintSourceCss; exports.paintToMultiColor = _chunkC46AZEBEcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunkC46AZEBEcjs.paperPreset; exports.parseBrushLibrary = _chunkC46AZEBEcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunk3T5O225Tcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunkC46AZEBEcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunk3T5O225Tcjs.rand01; exports.randSigned = _chunk3T5O225Tcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunk3T5O225Tcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunk3T5O225Tcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunkC46AZEBEcjs.renderPaper; exports.renderStickers = _chunkC46AZEBEcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunk3T5O225Tcjs.resolvePaintGradient; exports.reversePaintGradient = _chunk3T5O225Tcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunk3T5O225Tcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunk3T5O225Tcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunk3T5O225Tcjs.solidPaint; exports.stampCoverage = _chunkC46AZEBEcjs.stampCoverage; exports.standardBlendMode = _chunkO7LUD7MHcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunkC46AZEBEcjs.stickerRect; exports.stickerSurface = _chunkC46AZEBEcjs.stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = _chunkC46AZEBEcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunkC46AZEBEcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.updatePaintGradientStop = _chunk3T5O225Tcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunkC46AZEBEcjs.usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetEngineSummary = wetEngineSummary; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkF2Y4E4GUcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = wheelToHue;
|
|
8851
8851
|
//# sourceMappingURL=index.cjs.map
|