@pixerate/editor 0.161.0 → 0.162.1
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 +36 -35
- package/dist/agent/index.js +7 -6
- package/dist/animation/index.cjs +5 -4
- package/dist/animation/index.js +4 -3
- package/dist/animation-editor/index.cjs +63 -62
- package/dist/animation-editor/index.js +7 -6
- package/dist/{brushstrokeRender-Q4LI22QV.js → brushstrokeRender-7LXCU7PD.js} +2 -2
- package/dist/{brushstrokeRender-5WANQIG4.cjs → brushstrokeRender-VO4ZTWVA.cjs} +5 -5
- package/dist/canvas/index.cjs +40 -39
- package/dist/canvas/index.js +7 -6
- package/dist/chart/index.cjs +88 -87
- package/dist/chart/index.js +7 -6
- package/dist/{chunk-LQLZHP6F.js → chunk-36OKQDCF.js} +7 -4
- package/dist/{chunk-AKDWAWSY.cjs → chunk-3IHNXRUV.cjs} +45 -45
- package/dist/{chunk-72BGL3I2.js → chunk-3VLOOO3G.js} +1 -1
- package/dist/{chunk-TVO6W2Q6.cjs → chunk-4NGVHHJB.cjs} +17 -17
- package/dist/chunk-4VU4CP7R.js +769 -0
- package/dist/{chunk-MHEXLG3M.cjs → chunk-5AARIS3R.cjs} +37 -37
- package/dist/{chunk-DBIVICAO.js → chunk-7CKPUUN4.js} +1 -1
- package/dist/{chunk-57JLBGJ5.cjs → chunk-7YBDRJXT.cjs} +8 -8
- package/dist/{chunk-KY3FYKP3.js → chunk-BQWGN5WH.js} +1 -1
- package/dist/{chunk-LEUZ4FRC.cjs → chunk-CIPIESX4.cjs} +3 -3
- package/dist/chunk-CJE5MOIS.js +347 -0
- package/dist/{chunk-5QBRAIVK.js → chunk-CX6JLDFC.js} +3 -3
- package/dist/{chunk-R3QY7PPL.js → chunk-DTSTNRPH.js} +1 -1
- package/dist/{chunk-6LUYFHHN.cjs → chunk-EQ46F75O.cjs} +51 -51
- package/dist/{chunk-UKCJ43YL.cjs → chunk-ES3UEVUT.cjs} +130 -898
- package/dist/{chunk-UM3RPYC5.js → chunk-EVPZ5IKN.js} +1 -1
- package/dist/{chunk-XNQ5EFB4.cjs → chunk-EY22AY6R.cjs} +16 -16
- package/dist/chunk-FKUKJ3XA.cjs +347 -0
- package/dist/{chunk-YABNLNY7.js → chunk-GLMP22FT.js} +3 -3
- package/dist/{chunk-SUF6WRXR.cjs → chunk-GTELFJRE.cjs} +2 -2
- package/dist/{chunk-AY65VQSU.js → chunk-H3OEM3Q2.js} +1 -1
- package/dist/{chunk-4YWAEV4W.cjs → chunk-HDGBM7EA.cjs} +26 -26
- package/dist/{chunk-H5XX4KHB.js → chunk-HLOKB7WW.js} +5 -3
- package/dist/{chunk-QMI5HZWA.cjs → chunk-JCXMJUQO.cjs} +5 -5
- package/dist/{chunk-WPPJH6X4.cjs → chunk-LL3H5XUH.cjs} +6 -4
- package/dist/{chunk-4T44CJ5K.cjs → chunk-NA4UVVJ4.cjs} +15 -15
- package/dist/{chunk-Q6PA362P.js → chunk-NO5QQDHZ.js} +2 -2
- package/dist/{chunk-3YDQLQH2.cjs → chunk-PA3IMPPS.cjs} +81 -81
- package/dist/{chunk-WNAAWLZ5.js → chunk-QY4KUDMY.js} +2 -2
- package/dist/{chunk-AA34BA7G.js → chunk-QYZGBVNC.js} +30 -798
- package/dist/chunk-S6X2QRVU.cjs +769 -0
- package/dist/{chunk-6UPGM3JB.js → chunk-SET6KJOP.js} +2 -2
- package/dist/{chunk-GNK7SESQ.cjs → chunk-V7GWZIZK.cjs} +7 -4
- package/dist/{chunk-EYVVIZJ3.cjs → chunk-WTW7QRTS.cjs} +1 -1
- package/dist/{chunk-SSCL7QQ4.js → chunk-XDCFJEU7.js} +2 -2
- package/dist/{chunk-JGKCC5OF.cjs → chunk-YQ5C5BVK.cjs} +10 -9
- package/dist/{chunk-A5UCR2TO.js → chunk-YXKLVD56.js} +10 -9
- package/dist/{chunk-45XXVHVG.js → chunk-ZZGPYNS2.js} +1 -1
- package/dist/color/index.cjs +6 -2
- package/dist/color/index.d.cts +1 -0
- package/dist/color/index.d.ts +1 -0
- package/dist/color/index.js +28 -24
- package/dist/color/suggest.d.cts +12 -0
- package/dist/color/suggest.d.ts +12 -0
- package/dist/effects/index.cjs +37 -13
- package/dist/effects/index.js +29 -5
- package/dist/effects/ui.d.cts +20 -3
- package/dist/effects/ui.d.ts +20 -3
- package/dist/export/index.cjs +6 -5
- package/dist/export/index.js +5 -4
- package/dist/extensions/index.cjs +9 -8
- package/dist/extensions/index.js +8 -7
- package/dist/gradient/index.cjs +28 -26
- package/dist/gradient/index.js +7 -5
- package/dist/image-editor/index.cjs +641 -640
- package/dist/image-editor/index.js +7 -6
- package/dist/index.cjs +15 -14
- package/dist/index.js +9 -8
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.js +1 -1
- package/dist/paint-editor/index.cjs +136 -135
- package/dist/paint-editor/index.js +8 -7
- package/dist/typography/accessibility.d.cts +44 -0
- package/dist/typography/accessibility.d.ts +44 -0
- package/dist/typography/catalog.d.cts +98 -0
- package/dist/typography/catalog.d.ts +98 -0
- package/dist/typography/index.cjs +1099 -0
- package/dist/typography/index.d.cts +16 -0
- package/dist/typography/index.d.ts +16 -0
- package/dist/typography/index.js +1099 -0
- package/dist/typography/metrics.d.cts +31 -0
- package/dist/typography/metrics.d.ts +31 -0
- package/dist/typography/picker.d.cts +132 -0
- package/dist/typography/picker.d.ts +132 -0
- package/dist/typography/registry.d.cts +66 -0
- package/dist/typography/registry.d.ts +66 -0
- package/dist/typography/scale.d.cts +62 -0
- package/dist/typography/scale.d.ts +62 -0
- package/dist/typography/segment.d.cts +26 -0
- package/dist/typography/segment.d.ts +26 -0
- package/dist/typography/stack.d.cts +26 -0
- package/dist/typography/stack.d.ts +26 -0
- package/dist/typography/tools.d.cts +34 -0
- package/dist/typography/tools.d.ts +34 -0
- package/dist/typography/types.d.cts +96 -0
- package/dist/typography/types.d.ts +96 -0
- package/dist/typography/weight.d.cts +13 -0
- package/dist/typography/weight.d.ts +13 -0
- package/dist/vector/index.cjs +951 -950
- package/dist/vector/index.js +6 -5
- package/dist/video-editor/index.cjs +5 -4
- package/dist/video-editor/index.js +4 -3
- package/package.json +13 -3
- package/skills/README.md +1 -0
- package/skills/pixerate-chart/SKILL.md +92 -9
- package/skills/pixerate-paint-editor/SKILL.md +0 -2
- package/skills/pixerate-typography/SKILL.md +91 -0
|
@@ -7,7 +7,7 @@ var _chunk3OSXHLITcjs = require('../chunk-3OSXHLIT.cjs');
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkPA3IMPPScjs = require('../chunk-PA3IMPPS.cjs');
|
|
11
11
|
require('../chunk-A2IS7EHE.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
@@ -43,7 +43,7 @@ require('../chunk-QT26RHKK.cjs');
|
|
|
43
43
|
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
var
|
|
46
|
+
var _chunkV7GWZIZKcjs = require('../chunk-V7GWZIZK.cjs');
|
|
47
47
|
require('../chunk-BROJYMWU.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
@@ -54,7 +54,7 @@ var _chunkJLWLX52Lcjs = require('../chunk-JLWLX52L.cjs');
|
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
var _chunkSWTUM32Hcjs = require('../chunk-SWTUM32H.cjs');
|
|
57
|
-
require('../chunk-
|
|
57
|
+
require('../chunk-JCXMJUQO.cjs');
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
@@ -119,7 +119,7 @@ require('../chunk-QMI5HZWA.cjs');
|
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
|
|
122
|
-
var
|
|
122
|
+
var _chunkYQ5C5BVKcjs = require('../chunk-YQ5C5BVK.cjs');
|
|
123
123
|
require('../chunk-CVFAAZXE.cjs');
|
|
124
124
|
require('../chunk-GF2RBSDM.cjs');
|
|
125
125
|
require('../chunk-NM3G4VQT.cjs');
|
|
@@ -229,14 +229,15 @@ require('../chunk-UWEQ55MY.cjs');
|
|
|
229
229
|
|
|
230
230
|
var _chunkM4MIZPQIcjs = require('../chunk-M4MIZPQI.cjs');
|
|
231
231
|
require('../chunk-2BSBFBOA.cjs');
|
|
232
|
-
require('../chunk-
|
|
232
|
+
require('../chunk-CIPIESX4.cjs');
|
|
233
233
|
require('../chunk-A6QWKBJP.cjs');
|
|
234
234
|
|
|
235
235
|
|
|
236
236
|
|
|
237
237
|
|
|
238
238
|
|
|
239
|
-
var
|
|
239
|
+
var _chunkES3UEVUTcjs = require('../chunk-ES3UEVUT.cjs');
|
|
240
|
+
require('../chunk-S6X2QRVU.cjs');
|
|
240
241
|
require('../chunk-IPJ3TEYR.cjs');
|
|
241
242
|
|
|
242
243
|
// src/paint-editor/document.ts
|
|
@@ -270,7 +271,7 @@ function normalizeCanvas(raw) {
|
|
|
270
271
|
function createPaintDocument(options = {}) {
|
|
271
272
|
const canvas = normalizeCanvas({ width: _nullishCoalesce(options.width, () => ( 2048)), height: _nullishCoalesce(options.height, () => ( 1536)), dpi: options.dpi });
|
|
272
273
|
const layer = createPaintLayer("Layer 1");
|
|
273
|
-
return { canvas, paper:
|
|
274
|
+
return { canvas, paper: _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, _nullishCoalesce(options.paper, () => ( {}))), layers: [layer], activeLayerId: layer.id, strokes: [] };
|
|
274
275
|
}
|
|
275
276
|
|
|
276
277
|
// src/paint-editor/dab-stroke.ts
|
|
@@ -324,13 +325,13 @@ var PaintDabStroke = (_class = class {
|
|
|
324
325
|
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);
|
|
325
326
|
this.brush = brush;
|
|
326
327
|
this.options = options;
|
|
327
|
-
this.smoother = new (0,
|
|
328
|
-
this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [
|
|
328
|
+
this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
|
|
329
|
+
this.copies = _optionalChain([options, 'access', _2 => _2.copies, 'optionalAccess', _3 => _3.length]) ? options.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
|
|
329
330
|
const exchanging = brush.engine === "mixer" || brush.engine === "dab";
|
|
330
331
|
const rates = brush.engine === "mixer" ? _chunkEBDCRTZIcjs.mixerRates.call(void 0, brush.mixer) : _chunkEBDCRTZIcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, 1, brush.behavior.mixing);
|
|
331
332
|
this.mixing = brush.engine === "mixer" ? brush.mixer.mixing : brush.behavior.mixing;
|
|
332
333
|
this.states = this.copies.map((c, i) => ({
|
|
333
|
-
walker: new (0,
|
|
334
|
+
walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(brush, (_nullishCoalesce(options.seed, () => ( 0))) + i * 7919 | 0, c.linear),
|
|
334
335
|
exchange: exchanging ? new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, options.load) : null,
|
|
335
336
|
smudge: brush.engine === "smudge" ? new (0, _chunkEBDCRTZIcjs.SmudgeTip)(brush.smudge, brush.tip.size * (1 + brush.dynamics.tiltSize * 1.5)) : null
|
|
336
337
|
}));
|
|
@@ -607,10 +608,10 @@ function lightTile(color, height, heightAround, material, light) {
|
|
|
607
608
|
const nh = Math.max(0, nx * hx + ny * hy + nz * hz);
|
|
608
609
|
const spec = Math.max(0, Math.pow(nh, shininess) - Math.pow(hz, shininess)) * (0.25 + 0.75 * gloss) * light.relief;
|
|
609
610
|
for (let c = 0; c < 3; c++) {
|
|
610
|
-
const a =
|
|
611
|
+
const a = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR[color[i + c]];
|
|
611
612
|
const tint = metal * a + (1 - metal);
|
|
612
613
|
const v = a * shade * (1 - 0.35 * metal) + spec * tint * (1 + metal);
|
|
613
|
-
out[i + c] =
|
|
614
|
+
out[i + c] = _chunkV7GWZIZKcjs.linearToSrgb8.call(void 0, v);
|
|
614
615
|
}
|
|
615
616
|
}
|
|
616
617
|
}
|
|
@@ -670,12 +671,12 @@ var ThickStrokeDriver = (_class3 = class {
|
|
|
670
671
|
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);
|
|
671
672
|
this.init = init;
|
|
672
673
|
const b = init.brush;
|
|
673
|
-
this.smoother = new (0,
|
|
674
|
-
const copies = init.copies.length ? init.copies : [
|
|
674
|
+
this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(b.tip.smoothing, b.pressureSmoothing);
|
|
675
|
+
const copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
|
|
675
676
|
this.copies = copies;
|
|
676
677
|
const rates = _chunkEBDCRTZIcjs.exchangeRates.call(void 0, b.behavior.pickup, b.behavior.mix, 1, b.behavior.mixing);
|
|
677
678
|
this.states = copies.map((c, i) => ({
|
|
678
|
-
walker: new (0,
|
|
679
|
+
walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(b, init.seed + i * 7919 | 0, c.linear),
|
|
679
680
|
exchange: new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, init.load),
|
|
680
681
|
smudge: b.impasto.tool === "knife" ? new (0, _chunkEBDCRTZIcjs.SmudgeTip)({ strength: 0.85, length: 0.6 + 0.38 * b.impasto.drag, mixing: b.behavior.mixing }, b.tip.size * 1.2) : null,
|
|
681
682
|
carried: null,
|
|
@@ -973,7 +974,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
973
974
|
this.layerId = init.layerId;
|
|
974
975
|
this.base = init.surface;
|
|
975
976
|
this.live = new Map(this.base.tiles);
|
|
976
|
-
this.copies = init.copies.length ? init.copies : [
|
|
977
|
+
this.copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
|
|
977
978
|
const brush = init.brush;
|
|
978
979
|
if (init.wet) this.wetDriver = init.wet.driver;
|
|
979
980
|
this.apply = {
|
|
@@ -988,11 +989,11 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
988
989
|
};
|
|
989
990
|
if (this.wetDriver) {
|
|
990
991
|
} else if (init.sticker) {
|
|
991
|
-
this.stickerSpray = new (0,
|
|
992
|
+
this.stickerSpray = new (0, _chunkYQ5C5BVKcjs.StickerSpray)({ brush, target: this.tileTarget(), color: init.colorHex, seed: init.seed, copies: this.copies, nextId: init.sticker.nextId, paint: _nullishCoalesce(init.paint, () => ( null)) });
|
|
992
993
|
} else if (init.thick) {
|
|
993
994
|
const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
|
|
994
995
|
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)) });
|
|
995
|
-
} else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" ||
|
|
996
|
+
} else if (brush.engine === "mixer" || brush.engine === "blender" || brush.engine === "smudge" || _chunkYQ5C5BVKcjs.usesPaintExchange.call(void 0, brush, Boolean(init.paint))) {
|
|
996
997
|
const rgb = (c) => [c[0] / 255, c[1] / 255, c[2] / 255];
|
|
997
998
|
this.wet = new PaintDabStroke(brush, {
|
|
998
999
|
target: this.tileTarget(),
|
|
@@ -1007,7 +1008,7 @@ var PaintStrokeSession = (_class4 = class {
|
|
|
1007
1008
|
});
|
|
1008
1009
|
} else {
|
|
1009
1010
|
const opts = { grain: init.grain, paperDepth: init.paperDepth, seed: init.seed, copies: this.copies, paint: _nullishCoalesce(init.paint, () => ( null)) };
|
|
1010
|
-
this.dry = brush.engine === "particle" ? new (0,
|
|
1011
|
+
this.dry = brush.engine === "particle" ? new (0, _chunkYQ5C5BVKcjs.ParticleStroke)(brush, opts) : brush.engine === "bristle" ? new (0, _chunkYQ5C5BVKcjs.BristleStroke)(brush, opts) : new (0, _chunkYQ5C5BVKcjs.DryStroke)(brush, opts);
|
|
1011
1012
|
}
|
|
1012
1013
|
}
|
|
1013
1014
|
|
|
@@ -1178,7 +1179,7 @@ function brushLoadForStroke(brush, current, color) {
|
|
|
1178
1179
|
if (brush.engine === "mixer") return mixerLoadForStroke(brush, current, color);
|
|
1179
1180
|
if (brush.engine === "impasto") return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
|
|
1180
1181
|
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 } : _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD;
|
|
1181
|
-
if (
|
|
1182
|
+
if (_chunkYQ5C5BVKcjs.usesPaintExchange.call(void 0, brush)) return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
|
|
1182
1183
|
return _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD;
|
|
1183
1184
|
}
|
|
1184
1185
|
|
|
@@ -1446,7 +1447,7 @@ function normalizeBrushStroke(raw) {
|
|
|
1446
1447
|
const out = {
|
|
1447
1448
|
id: r.id,
|
|
1448
1449
|
layerId: r.layerId,
|
|
1449
|
-
brush:
|
|
1450
|
+
brush: _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, _nullishCoalesce(r.brush, () => ( {}))),
|
|
1450
1451
|
color: typeof r.color === "string" && /^#[0-9a-f]{6}$/i.test(r.color) ? r.color.toLowerCase() : "#000000",
|
|
1451
1452
|
points,
|
|
1452
1453
|
seed: finite2(r.seed) ? r.seed | 0 : 0
|
|
@@ -1502,7 +1503,7 @@ function varyStroke(stroke, m, v) {
|
|
|
1502
1503
|
if (ps !== 1) q.pressure = Math.min(1, Math.max(0, (_nullishCoalesce(p.pressure, () => ( 1))) * ps));
|
|
1503
1504
|
return q;
|
|
1504
1505
|
});
|
|
1505
|
-
const brush = s !== 1 ?
|
|
1506
|
+
const brush = s !== 1 ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...stroke.brush, tip: { ...stroke.brush.tip, size: stroke.brush.tip.size * s } }) : stroke.brush;
|
|
1506
1507
|
const out = { ...stroke, brush, points };
|
|
1507
1508
|
if (stroke.paint && s !== 1) out.paint = _chunkEBDCRTZIcjs.scalePaintGradient.call(void 0, stroke.paint, s);
|
|
1508
1509
|
if (_optionalChain([stroke, 'access', _57 => _57.copies, 'optionalAccess', _58 => _58.length])) {
|
|
@@ -1546,7 +1547,7 @@ function paperTile(paper, r, light) {
|
|
|
1546
1547
|
const key = `${paperKey(paper, light)}|${r.x},${r.y},${r.width},${r.height}`;
|
|
1547
1548
|
let t = tileCache.get(key);
|
|
1548
1549
|
if (!t) {
|
|
1549
|
-
t =
|
|
1550
|
+
t = _chunkYQ5C5BVKcjs.renderPaper.call(void 0, paper, r, paperGrain(paper), light);
|
|
1550
1551
|
if (tileCache.size > 512) tileCache.delete(tileCache.keys().next().value);
|
|
1551
1552
|
tileCache.set(key, t);
|
|
1552
1553
|
}
|
|
@@ -1651,11 +1652,11 @@ function header(state, options) {
|
|
|
1651
1652
|
return out;
|
|
1652
1653
|
}
|
|
1653
1654
|
function serializePaintDocument(state, options = {}) {
|
|
1654
|
-
const { layers, assets } =
|
|
1655
|
+
const { layers, assets } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, state.layers);
|
|
1655
1656
|
return { ...header(state, options), layers, assets };
|
|
1656
1657
|
}
|
|
1657
1658
|
async function serializePaintDocumentExternal(state, store, options = {}) {
|
|
1658
|
-
const { layers, assets } = await
|
|
1659
|
+
const { layers, assets } = await _chunkPA3IMPPScjs.serializeLayersExternal.call(void 0, state.layers, store);
|
|
1659
1660
|
return { ...header(state, options), layers, assets };
|
|
1660
1661
|
}
|
|
1661
1662
|
function paintLayersOnly(layers, problems) {
|
|
@@ -1690,9 +1691,9 @@ function deserializePaintDocument(raw) {
|
|
|
1690
1691
|
}
|
|
1691
1692
|
const problems = [];
|
|
1692
1693
|
const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
|
|
1693
|
-
const paper =
|
|
1694
|
+
const paper = _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, _nullishCoalesce(r.paper, () => ( {})));
|
|
1694
1695
|
const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
|
|
1695
|
-
const layers = paintLayersOnly(
|
|
1696
|
+
const layers = paintLayersOnly(_chunkPA3IMPPScjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
|
|
1696
1697
|
const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
|
|
1697
1698
|
const activeLayerId = wanted && _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkHGTDMKNEcjs.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));
|
|
1698
1699
|
const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
|
|
@@ -1708,7 +1709,7 @@ async function deserializePaintDocumentAsync(raw, store) {
|
|
|
1708
1709
|
if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
|
|
1709
1710
|
const r = raw;
|
|
1710
1711
|
const problems = [];
|
|
1711
|
-
const assets = await
|
|
1712
|
+
const assets = await _chunkPA3IMPPScjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
|
|
1712
1713
|
const loaded = deserializePaintDocument({ ...r, assets });
|
|
1713
1714
|
return { ...loaded, problems: [...problems, ...loaded.problems] };
|
|
1714
1715
|
}
|
|
@@ -1785,13 +1786,13 @@ function viewPenToDocument(view, p) {
|
|
|
1785
1786
|
|
|
1786
1787
|
// src/paint-editor/input.ts
|
|
1787
1788
|
function samplePressure(e) {
|
|
1788
|
-
return
|
|
1789
|
+
return _chunkV7GWZIZKcjs.pointerPressure.call(void 0, e);
|
|
1789
1790
|
}
|
|
1790
1791
|
function pointerToPenPoint(e, x, y, view) {
|
|
1791
1792
|
const p = { x, y, pressure: samplePressure(e) };
|
|
1792
1793
|
if (typeof e.timeStamp === "number" && Number.isFinite(e.timeStamp)) p.t = e.timeStamp;
|
|
1793
1794
|
if (e.pointerType !== "pen") return p;
|
|
1794
|
-
const o =
|
|
1795
|
+
const o = _chunkYQ5C5BVKcjs.penOrientation.call(void 0, {
|
|
1795
1796
|
x,
|
|
1796
1797
|
y,
|
|
1797
1798
|
altitude: typeof e.altitudeAngle === "number" ? e.altitudeAngle : void 0,
|
|
@@ -1855,7 +1856,7 @@ function downloadBytes(bytes, fileName, mimeType) {
|
|
|
1855
1856
|
|
|
1856
1857
|
// src/paint-editor/wet.ts
|
|
1857
1858
|
var STROKE_WATER = 0.9;
|
|
1858
|
-
var STROKE_MASS =
|
|
1859
|
+
var STROKE_MASS = _chunkV7GWZIZKcjs.PIGMENT_UNIT * 2.5;
|
|
1859
1860
|
var COVERAGE_STEPS = 4096;
|
|
1860
1861
|
function union2(a, b) {
|
|
1861
1862
|
if (!a) return { ...b };
|
|
@@ -1870,7 +1871,7 @@ function wetPaperInput(paper) {
|
|
|
1870
1871
|
absorption: paper.absorption,
|
|
1871
1872
|
permeability: paper.permeability,
|
|
1872
1873
|
roughness: flat ? 0 : paper.roughness,
|
|
1873
|
-
color:
|
|
1874
|
+
color: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color),
|
|
1874
1875
|
heightAt: flat ? () => 0.5 : (x, y) => grain.at(x, y)
|
|
1875
1876
|
};
|
|
1876
1877
|
}
|
|
@@ -1878,20 +1879,20 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
1878
1879
|
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);
|
|
1879
1880
|
this.init = init;
|
|
1880
1881
|
const brush = init.brush;
|
|
1881
|
-
this.smoother = new (0,
|
|
1882
|
-
const copies = init.copies.length ? init.copies : [
|
|
1882
|
+
this.smoother = new (0, _chunkYQ5C5BVKcjs.PenSmoother)(brush.tip.smoothing, brush.pressureSmoothing);
|
|
1883
|
+
const copies = init.copies.length ? init.copies : [_chunkYQ5C5BVKcjs.IDENTITY_COPY];
|
|
1883
1884
|
const wet = brush.wet;
|
|
1884
1885
|
const spacing = Math.max(0.02, brush.tip.spacing);
|
|
1885
1886
|
const perDab = Math.min(1, spacing * 1.2);
|
|
1886
1887
|
const thin = wet.thinner;
|
|
1887
|
-
this.medium = new (0,
|
|
1888
|
+
this.medium = new (0, _chunkV7GWZIZKcjs.WetMedium)(init.world, init.laneId, {
|
|
1888
1889
|
water: STROKE_WATER * Math.min(1, wet.water * (1 + thin)) * perDab,
|
|
1889
1890
|
mass: STROKE_MASS * wet.pigment * (1 - 0.6 * thin) * perDab,
|
|
1890
1891
|
body: wet.body * (1 - thin)
|
|
1891
1892
|
});
|
|
1892
1893
|
const rates = _chunkEBDCRTZIcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, wet.load, brush.behavior.mixing);
|
|
1893
1894
|
this.states = copies.map((c, i) => ({
|
|
1894
|
-
walker: new (0,
|
|
1895
|
+
walker: new (0, _chunkYQ5C5BVKcjs.PenDabWalker)(brush, init.seed + i * 7919 | 0, c.linear),
|
|
1895
1896
|
exchange: wet.tool === "paint" ? new (0, _chunkEBDCRTZIcjs.PaintExchange)(rates, init.load) : null,
|
|
1896
1897
|
last: null
|
|
1897
1898
|
}));
|
|
@@ -2058,7 +2059,7 @@ var WetStrokeDriver = (_class5 = class {
|
|
|
2058
2059
|
}, _class5);
|
|
2059
2060
|
var WET_MEDIUM_PARAMS = {
|
|
2060
2061
|
watercolor: {},
|
|
2061
|
-
gouache: { viscosity: 0.45, edgeDarkening: 0.15, granulation: 0.1, bloom: 0.1, bleed: 0.15, pigmentWeight: 0.5 },
|
|
2062
|
+
gouache: { viscosity: 0.45, evaporation: 0.1, edgeDarkening: 0.15, granulation: 0.1, bloom: 0.1, bleed: 0.15, pickup: 0.5, pigmentWeight: 0.5 },
|
|
2062
2063
|
oil: { viscosity: 0.95, evaporation: 0.03, edgeDarkening: 0, granulation: 0, bloom: 0, bleed: 0.08, pickup: 0.6, fixture: 0.02, pigmentWeight: 0.8 }
|
|
2063
2064
|
};
|
|
2064
2065
|
var WET_GPU_MODES = ["auto", "off"];
|
|
@@ -2076,7 +2077,7 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2076
2077
|
|
|
2077
2078
|
|
|
2078
2079
|
__init47() {this.world = null}
|
|
2079
|
-
__init48() {this.tilt = { ...
|
|
2080
|
+
__init48() {this.tilt = { ..._chunkV7GWZIZKcjs.FLAT }}
|
|
2080
2081
|
__init49() {this.settings = /* @__PURE__ */ new Map()}
|
|
2081
2082
|
__init50() {this.paused = false}
|
|
2082
2083
|
/** Wet strokes dry as soon as they end (one undo step with the stroke). */
|
|
@@ -2100,8 +2101,8 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2100
2101
|
/** Starts the GPU engine for the world (once; it may turn out unavailable). */
|
|
2101
2102
|
startGpu() {
|
|
2102
2103
|
if (this.gpuMode === "off" || this.gpu || this.gpuStarting || this.gpuSupport) return;
|
|
2103
|
-
const provider = this.options.gpuProvider === void 0 ?
|
|
2104
|
-
this.gpuStarting =
|
|
2104
|
+
const provider = this.options.gpuProvider === void 0 ? _chunkV7GWZIZKcjs.findWebGpu.call(void 0, ) : this.options.gpuProvider;
|
|
2105
|
+
this.gpuStarting = _chunkV7GWZIZKcjs.createWetGpuEngine.call(void 0, provider).then(({ engine, support }) => {
|
|
2105
2106
|
this.gpuSupport = support;
|
|
2106
2107
|
if (!engine) return;
|
|
2107
2108
|
if (this.gpuMode === "off" || !this.world) {
|
|
@@ -2157,7 +2158,7 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2157
2158
|
this.dropWorld();
|
|
2158
2159
|
}
|
|
2159
2160
|
if (!this.world) {
|
|
2160
|
-
this.world = new (0,
|
|
2161
|
+
this.world = new (0, _chunkV7GWZIZKcjs.WetWorld)(width, height, wetPaperInput(this.host.paper()), { kernel: this.options.kernel, threads: this.options.threads });
|
|
2161
2162
|
this.world.setTilt(this.tilt);
|
|
2162
2163
|
this.world.gpuMinTiles = this.gpuMinTiles;
|
|
2163
2164
|
if (this.gpu) this.world.attachGpu(this.gpu);
|
|
@@ -2187,7 +2188,7 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2187
2188
|
settingsOf(layerId, medium = "watercolor") {
|
|
2188
2189
|
let s = this.settings.get(layerId);
|
|
2189
2190
|
if (!s) {
|
|
2190
|
-
s = { params:
|
|
2191
|
+
s = { params: _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, WET_MEDIUM_PARAMS[medium], _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS), flow: { ..._chunkV7GWZIZKcjs.DEFAULT_FLOW } };
|
|
2191
2192
|
this.settings.set(layerId, s);
|
|
2192
2193
|
}
|
|
2193
2194
|
return s;
|
|
@@ -2200,27 +2201,27 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2200
2201
|
const s = this.settingsOf(layerId, medium);
|
|
2201
2202
|
w.ensureLane(layerId, { params: s.params, base });
|
|
2202
2203
|
const { width, height } = this.host.canvas();
|
|
2203
|
-
if (s.flow.kind !== "none") w.setFlow(layerId,
|
|
2204
|
+
if (s.flow.kind !== "none") w.setFlow(layerId, _chunkV7GWZIZKcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
|
|
2204
2205
|
}
|
|
2205
2206
|
return w;
|
|
2206
2207
|
}
|
|
2207
2208
|
setParams(layerId, update) {
|
|
2208
2209
|
const s = this.settingsOf(layerId);
|
|
2209
|
-
s.params =
|
|
2210
|
+
s.params = _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, update, s.params);
|
|
2210
2211
|
if (_optionalChain([this, 'access', _100 => _100.world, 'optionalAccess', _101 => _101.hasLane, 'call', _102 => _102(layerId)])) this.world.setParams(layerId, s.params);
|
|
2211
2212
|
return { ...s.params };
|
|
2212
2213
|
}
|
|
2213
2214
|
setFlow(layerId, update) {
|
|
2214
2215
|
const s = this.settingsOf(layerId);
|
|
2215
|
-
s.flow =
|
|
2216
|
+
s.flow = _chunkV7GWZIZKcjs.normalizeFlow.call(void 0, update, s.flow);
|
|
2216
2217
|
if (_optionalChain([this, 'access', _103 => _103.world, 'optionalAccess', _104 => _104.hasLane, 'call', _105 => _105(layerId)])) {
|
|
2217
2218
|
const { width, height } = this.host.canvas();
|
|
2218
|
-
this.world.setFlow(layerId,
|
|
2219
|
+
this.world.setFlow(layerId, _chunkV7GWZIZKcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
|
|
2219
2220
|
}
|
|
2220
2221
|
return { ...s.flow };
|
|
2221
2222
|
}
|
|
2222
2223
|
setTilt(update) {
|
|
2223
|
-
this.tilt =
|
|
2224
|
+
this.tilt = _chunkV7GWZIZKcjs.normalizeTilt.call(void 0, update, this.tilt);
|
|
2224
2225
|
_optionalChain([this, 'access', _106 => _106.world, 'optionalAccess', _107 => _107.setTilt, 'call', _108 => _108(this.tilt)]);
|
|
2225
2226
|
return { ...this.tilt };
|
|
2226
2227
|
}
|
|
@@ -2467,8 +2468,8 @@ var PaintWetLayers = (_class6 = class {
|
|
|
2467
2468
|
}
|
|
2468
2469
|
}, _class6);
|
|
2469
2470
|
function wetPigmentOf(hex, body) {
|
|
2470
|
-
const [r, g, b] =
|
|
2471
|
-
return Array.from(
|
|
2471
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, hex);
|
|
2472
|
+
return Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
|
|
2472
2473
|
}
|
|
2473
2474
|
|
|
2474
2475
|
// src/paint-editor/thumbnails.ts
|
|
@@ -2476,16 +2477,16 @@ var thumbWorld = null;
|
|
|
2476
2477
|
function paintWetTestStroke(brush, paper, color, width, height) {
|
|
2477
2478
|
if (!thumbWorld || thumbWorld.width !== width || thumbWorld.height !== height) {
|
|
2478
2479
|
_optionalChain([thumbWorld, 'optionalAccess', _140 => _140.destroy, 'call', _141 => _141()]);
|
|
2479
|
-
thumbWorld = new (0,
|
|
2480
|
+
thumbWorld = new (0, _chunkV7GWZIZKcjs.WetWorld)(width, height, wetPaperInput(paper), { kernel: "typescript", threads: 0 });
|
|
2480
2481
|
} else thumbWorld.setPaper(wetPaperInput(paper));
|
|
2481
2482
|
const w = thumbWorld;
|
|
2482
2483
|
if (w.hasLane("thumb")) w.removeLane("thumb");
|
|
2483
2484
|
w.ensureLane("thumb");
|
|
2484
|
-
const [r, g, b] =
|
|
2485
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
|
|
2485
2486
|
if (brush.wet.tool !== "paint" && brush.wet.tool !== "water") {
|
|
2486
2487
|
const half = Math.ceil(height / 2);
|
|
2487
|
-
w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(
|
|
2488
|
-
w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(
|
|
2488
|
+
w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
|
|
2489
|
+
w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(_chunkV7GWZIZKcjs.pigmentOf.call(void 0, [232 / 255, 196 / 255, 64 / 255], 0), (v) => v * 0.05));
|
|
2489
2490
|
}
|
|
2490
2491
|
const driver = new WetStrokeDriver({
|
|
2491
2492
|
world: w,
|
|
@@ -2495,9 +2496,9 @@ function paintWetTestStroke(brush, paper, color, width, height) {
|
|
|
2495
2496
|
load: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
|
|
2496
2497
|
grain: paperGrain(paper),
|
|
2497
2498
|
paperDepth: paper.depth,
|
|
2498
|
-
paperColor:
|
|
2499
|
+
paperColor: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color),
|
|
2499
2500
|
seed: 7,
|
|
2500
|
-
copies: [
|
|
2501
|
+
copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY]
|
|
2501
2502
|
});
|
|
2502
2503
|
driver.push(thumbnailStroke(width, height));
|
|
2503
2504
|
driver.finish();
|
|
@@ -2517,7 +2518,7 @@ function thumbnailStroke(width, height) {
|
|
|
2517
2518
|
return pts;
|
|
2518
2519
|
}
|
|
2519
2520
|
function paintTestStroke(surface, brush, paper, color, width, height) {
|
|
2520
|
-
const [r, g, b] =
|
|
2521
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
|
|
2521
2522
|
let result = surface;
|
|
2522
2523
|
let thick = null;
|
|
2523
2524
|
const session = new PaintStrokeSession(
|
|
@@ -2536,13 +2537,13 @@ function paintTestStroke(surface, brush, paper, color, width, height) {
|
|
|
2536
2537
|
lockTransparency: false,
|
|
2537
2538
|
brush,
|
|
2538
2539
|
color: [r, g, b, 255],
|
|
2539
|
-
background: [...
|
|
2540
|
+
background: [..._chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, paper.color), 255],
|
|
2540
2541
|
grain: paperGrain(paper),
|
|
2541
2542
|
paperDepth: paper.depth,
|
|
2542
2543
|
seed: 7,
|
|
2543
2544
|
colorHex: color,
|
|
2544
2545
|
affineCopies: [],
|
|
2545
|
-
copies: [
|
|
2546
|
+
copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY],
|
|
2546
2547
|
mixerLoad: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
|
|
2547
2548
|
thick: brush.engine === "impasto" ? { channels: emptyThickChannels() } : void 0,
|
|
2548
2549
|
sticker: brush.engine === "sticker" ? { nextId: 1 } : void 0
|
|
@@ -2556,8 +2557,8 @@ function renderBrushThumbnail(brush, options) {
|
|
|
2556
2557
|
const width = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.width, () => ( 160)))));
|
|
2557
2558
|
const height = Math.max(16, Math.min(512, Math.round(_nullishCoalesce(options.height, () => ( 48)))));
|
|
2558
2559
|
const maxSize = height * 0.42;
|
|
2559
|
-
const b = brush.tip.size > maxSize ?
|
|
2560
|
-
const rgba = [...
|
|
2560
|
+
const b = brush.tip.size > maxSize ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: maxSize } }, brush) : brush;
|
|
2561
|
+
const rgba = [..._chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, options.color), 255];
|
|
2561
2562
|
let surface = _chunkCWM3CUUXcjs.emptySurface.call(void 0, 4);
|
|
2562
2563
|
if (b.engine === "eraser") {
|
|
2563
2564
|
surface = _chunkCWM3CUUXcjs.fillRect.call(void 0, surface, { x: 0, y: 0, width, height }, rgba);
|
|
@@ -2804,7 +2805,7 @@ function hslToRgb(h, s, l) {
|
|
|
2804
2805
|
return hsvToRgb(h, v === 0 ? 0 : c / v, v);
|
|
2805
2806
|
}
|
|
2806
2807
|
function colorHarmony2(base, kind, options = {}) {
|
|
2807
|
-
return
|
|
2808
|
+
return _chunkES3UEVUTcjs.colorHarmony.call(void 0, base, kind, options);
|
|
2808
2809
|
}
|
|
2809
2810
|
function readSwatch(raw) {
|
|
2810
2811
|
if (!raw || typeof raw !== "object") return null;
|
|
@@ -2833,7 +2834,7 @@ var DEFAULT_SWATCHES = [
|
|
|
2833
2834
|
// src/paint-editor/mixing-pad.ts
|
|
2834
2835
|
var MIXING_PAD_WIDTH = 360;
|
|
2835
2836
|
var MIXING_PAD_HEIGHT = 220;
|
|
2836
|
-
var PAD_PAINT =
|
|
2837
|
+
var PAD_PAINT = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
|
|
2837
2838
|
id: "pad-paint",
|
|
2838
2839
|
name: "Pad paint",
|
|
2839
2840
|
category: "mixer",
|
|
@@ -2841,7 +2842,7 @@ var PAD_PAINT = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
|
|
|
2841
2842
|
tip: { size: 28, hardness: 0.75, spacing: 0.1, opacity: 1, flow: 0.7, pressureSize: false, pressureOpacity: false },
|
|
2842
2843
|
mixer: { wet: 0.45, load: 1, mix: 0.4, loadEachStroke: true, cleanEachStroke: true, mixing: "pigment" }
|
|
2843
2844
|
});
|
|
2844
|
-
var PAD_KNIFE =
|
|
2845
|
+
var PAD_KNIFE = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
|
|
2845
2846
|
id: "pad-knife",
|
|
2846
2847
|
name: "Palette knife",
|
|
2847
2848
|
category: "smudge",
|
|
@@ -2851,7 +2852,7 @@ var PAD_KNIFE = _chunkJGKCC5OFcjs.normalizePaintBrush.call(void 0, {
|
|
|
2851
2852
|
// A knife drags streaks of paint and folds them into each other, mixing them as pigment.
|
|
2852
2853
|
smudge: { strength: 0.6, length: 0.8, mixing: "pigment" }
|
|
2853
2854
|
});
|
|
2854
|
-
var PAD_BLOB =
|
|
2855
|
+
var PAD_BLOB = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, {
|
|
2855
2856
|
id: "pad-blob",
|
|
2856
2857
|
name: "Pad blob",
|
|
2857
2858
|
category: "custom",
|
|
@@ -2873,12 +2874,12 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2873
2874
|
}
|
|
2874
2875
|
}
|
|
2875
2876
|
let brush = options.tool === "knife" ? PAD_KNIFE : PAD_PAINT;
|
|
2876
|
-
if (options.size !== void 0) brush =
|
|
2877
|
+
if (options.size !== void 0) brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...brush.tip, size: options.size } }, brush);
|
|
2877
2878
|
return this.run(brush, points, options.color);
|
|
2878
2879
|
}
|
|
2879
2880
|
/** Paints `points` with `brush` in `color` on the pad. */
|
|
2880
2881
|
run(brush, points, color) {
|
|
2881
|
-
const [r, g, b] =
|
|
2882
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color);
|
|
2882
2883
|
let result = null;
|
|
2883
2884
|
const session = new PaintStrokeSession(
|
|
2884
2885
|
{ update: () => {
|
|
@@ -2896,7 +2897,7 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2896
2897
|
seed: 1,
|
|
2897
2898
|
colorHex: color,
|
|
2898
2899
|
affineCopies: [],
|
|
2899
|
-
copies: [
|
|
2900
|
+
copies: [_chunkYQ5C5BVKcjs.IDENTITY_COPY],
|
|
2900
2901
|
mixerLoad: brushLoadForStroke(brush, _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255])
|
|
2901
2902
|
}
|
|
2902
2903
|
);
|
|
@@ -2972,10 +2973,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2972
2973
|
const off = used.length === 1 ? 0 : 0.45 * R;
|
|
2973
2974
|
const x = Math.min(cx + R - r, Math.max(cx - R + r, cx + Math.cos(a) * off));
|
|
2974
2975
|
const y = Math.min(cy + R - r, Math.max(cy - R + r, cy + Math.sin(a) * off));
|
|
2975
|
-
const blob =
|
|
2976
|
+
const blob = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: Math.max(2, 2 * r) } }, PAD_BLOB);
|
|
2976
2977
|
this.run(blob, [{ x, y }], p.color.toLowerCase());
|
|
2977
2978
|
});
|
|
2978
|
-
const knife =
|
|
2979
|
+
const knife = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_KNIFE.tip, size: Math.max(12, R * 0.5) } }, PAD_KNIFE);
|
|
2979
2980
|
for (let k = 0; k < passes; k++) {
|
|
2980
2981
|
const stir = [];
|
|
2981
2982
|
const turns = 1.6;
|
|
@@ -2987,10 +2988,10 @@ var MixingPad = (_class8 = class {constructor() { _class8.prototype.__init65.cal
|
|
|
2987
2988
|
this.run(knife, stir, "#000000");
|
|
2988
2989
|
}
|
|
2989
2990
|
const mixed = _chunkCWM3CUUXcjs.mixPigments.call(void 0,
|
|
2990
|
-
paints.map((p) =>
|
|
2991
|
+
paints.map((p) => _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, p.color).map((v) => v / 255)),
|
|
2991
2992
|
paints.map((p) => p.parts)
|
|
2992
2993
|
);
|
|
2993
|
-
const core =
|
|
2994
|
+
const core = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...PAD_BLOB.tip, size: R * 1.1, hardness: 0.55 } }, PAD_BLOB);
|
|
2994
2995
|
const hex = "#" + mixed.map((v) => Math.round(v * 255).toString(16).padStart(2, "0")).join("");
|
|
2995
2996
|
this.run(core, [{ x: cx, y: cy }], hex);
|
|
2996
2997
|
return { color: this.pick(cx, cy, 2), bounds };
|
|
@@ -3347,7 +3348,7 @@ function parseColor(value, what = "color") {
|
|
|
3347
3348
|
return value.trim().toLowerCase();
|
|
3348
3349
|
}
|
|
3349
3350
|
function rgbaOf(hex) {
|
|
3350
|
-
const [r, g, b] =
|
|
3351
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, hex);
|
|
3351
3352
|
return [r, g, b, 255];
|
|
3352
3353
|
}
|
|
3353
3354
|
function rgbToHex(r, g, b) {
|
|
@@ -3416,9 +3417,9 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3416
3417
|
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);_class10.prototype.__init109.call(this);
|
|
3417
3418
|
this.historyLimit = Math.max(1, _nullishCoalesce(options.historyLimit, () => ( 200)));
|
|
3418
3419
|
this.doc = createPaintDocument({ width: options.width, height: options.height, dpi: options.dpi, paper: this.resolvePaper(options.paper) });
|
|
3419
|
-
this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) =>
|
|
3420
|
-
const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => (
|
|
3421
|
-
this.brush =
|
|
3420
|
+
this.userBrushes = (_nullishCoalesce(options.brushes, () => ( []))).map((b) => _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...b, builtin: false }));
|
|
3421
|
+
const start = _nullishCoalesce(this.findBrush(_nullishCoalesce(options.brushId, () => ( _chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID))), () => ( this.findBrush(_chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID)));
|
|
3422
|
+
this.brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, start);
|
|
3422
3423
|
this.color = options.color ? parseColor(options.color) : "#1f2937";
|
|
3423
3424
|
this.hand = options.hand === "left" ? "left" : "right";
|
|
3424
3425
|
this.encodeImage = options.encodeImage;
|
|
@@ -3465,7 +3466,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3465
3466
|
this.cached = {
|
|
3466
3467
|
document: this.doc,
|
|
3467
3468
|
brush: this.brush,
|
|
3468
|
-
brushes: this.library ??= [...
|
|
3469
|
+
brushes: this.library ??= [..._chunkYQ5C5BVKcjs.BUILTIN_BRUSHES, ...this.userBrushes],
|
|
3469
3470
|
color: this.color,
|
|
3470
3471
|
secondaryColor: this.secondaryColor,
|
|
3471
3472
|
paint: _nullishCoalesce(this.gradient, () => ( { type: "color", color: this.color })),
|
|
@@ -3656,7 +3657,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3656
3657
|
// --- Canvas and paper ----------------------------------------------------------
|
|
3657
3658
|
resolvePaper(paper) {
|
|
3658
3659
|
if (typeof paper === "string") {
|
|
3659
|
-
const p =
|
|
3660
|
+
const p = _chunkYQ5C5BVKcjs.paperPreset.call(void 0, paper);
|
|
3660
3661
|
if (!p) throw new PaintEditorError(`Unknown paper "${paper}". Call list_papers for the ids.`);
|
|
3661
3662
|
return p;
|
|
3662
3663
|
}
|
|
@@ -3749,19 +3750,19 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
3749
3750
|
this.requireIdle("changing the paper");
|
|
3750
3751
|
let base = this.doc.paper;
|
|
3751
3752
|
if (update.preset !== void 0 && update.preset !== this.doc.paper.preset) {
|
|
3752
|
-
const p =
|
|
3753
|
+
const p = _chunkYQ5C5BVKcjs.paperPreset.call(void 0, update.preset);
|
|
3753
3754
|
if (!p) throw new PaintEditorError(`Unknown paper "${update.preset}". Call list_papers for the ids.`);
|
|
3754
3755
|
base = p;
|
|
3755
3756
|
}
|
|
3756
3757
|
const { preset: _p, ...rest } = update;
|
|
3757
3758
|
if (rest.color !== void 0) parseColor(rest.color, "paper color");
|
|
3758
|
-
const paper =
|
|
3759
|
+
const paper = _chunkYQ5C5BVKcjs.normalizePaper.call(void 0, { ...rest, preset: base.preset, offset: _nullishCoalesce(rest.offset, () => ( this.doc.paper.offset)) }, base);
|
|
3759
3760
|
const changedKeys = Object.keys(rest).filter((k) => k !== "name");
|
|
3760
3761
|
if (changedKeys.length && update.preset === void 0) paper.preset = base.preset;
|
|
3761
3762
|
if (this.wet.world) this.beginWetOp();
|
|
3762
3763
|
this.commit("Paper", { ...this.doc, paper });
|
|
3763
3764
|
this.wet.paperChanged();
|
|
3764
|
-
return
|
|
3765
|
+
return _chunkYQ5C5BVKcjs.clonePaper.call(void 0, paper);
|
|
3765
3766
|
}
|
|
3766
3767
|
// --- Layers --------------------------------------------------------------------
|
|
3767
3768
|
getLayer(id) {
|
|
@@ -4274,12 +4275,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4274
4275
|
}
|
|
4275
4276
|
// --- Brushes -------------------------------------------------------------------
|
|
4276
4277
|
findBrush(id) {
|
|
4277
|
-
return _nullishCoalesce(
|
|
4278
|
+
return _nullishCoalesce(_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.find((b) => b.id === id), () => ( this.userBrushes.find((b) => b.id === id)));
|
|
4278
4279
|
}
|
|
4279
4280
|
/** A library brush by id (`undefined` when unknown). */
|
|
4280
4281
|
getBrush(id) {
|
|
4281
4282
|
const b = this.findBrush(id);
|
|
4282
|
-
return b ?
|
|
4283
|
+
return b ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, b, b) : void 0;
|
|
4283
4284
|
}
|
|
4284
4285
|
requireBrush(id) {
|
|
4285
4286
|
const b = this.findBrush(id);
|
|
@@ -4294,7 +4295,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4294
4295
|
const { id, ...changes } = update;
|
|
4295
4296
|
const base = id !== void 0 ? this.requireBrush(id) : this.brush;
|
|
4296
4297
|
if (changes.paint !== void 0 && changes.paint !== null) this.readStrokePaint(changes.paint);
|
|
4297
|
-
const next =
|
|
4298
|
+
const next = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...changes, id: base.id }, base);
|
|
4298
4299
|
if (base.builtin && !Object.keys(changes).length) next.builtin = true;
|
|
4299
4300
|
else delete next.builtin;
|
|
4300
4301
|
this.brush = next;
|
|
@@ -4303,10 +4304,10 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4303
4304
|
}
|
|
4304
4305
|
/** Saves the active brush (or `brush`) into the user library under `id` / `name`. */
|
|
4305
4306
|
saveBrush(options) {
|
|
4306
|
-
if (!
|
|
4307
|
-
if (
|
|
4308
|
-
const source = options.brush ?
|
|
4309
|
-
const saved =
|
|
4307
|
+
if (!_chunkYQ5C5BVKcjs.BRUSH_ID.test(options.id)) throw new PaintEditorError(`Brush id "${options.id}" is invalid; use lowercase letters, digits and dashes (e.g. "my-pencil").`);
|
|
4308
|
+
if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((b) => b.id === options.id)) throw new PaintEditorError(`"${options.id}" is a built-in brush; save under another id.`);
|
|
4309
|
+
const source = options.brush ? _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, options.brush, this.brush) : this.brush;
|
|
4310
|
+
const saved = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...source, id: options.id, name: _nullishCoalesce(options.name, () => ( source.name)) });
|
|
4310
4311
|
delete saved.builtin;
|
|
4311
4312
|
const i = this.userBrushes.findIndex((b) => b.id === options.id);
|
|
4312
4313
|
if (i >= 0) this.userBrushes[i] = saved;
|
|
@@ -4316,7 +4317,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4316
4317
|
return saved;
|
|
4317
4318
|
}
|
|
4318
4319
|
removeBrush(id) {
|
|
4319
|
-
if (
|
|
4320
|
+
if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((b) => b.id === id)) throw new PaintEditorError(`"${id}" is a built-in brush and cannot be removed.`);
|
|
4320
4321
|
const i = this.userBrushes.findIndex((b) => b.id === id);
|
|
4321
4322
|
if (i < 0) throw new PaintEditorError(`Unknown brush "${id}". Call list_brushes for the ids.`);
|
|
4322
4323
|
this.userBrushes.splice(i, 1);
|
|
@@ -4325,12 +4326,12 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4325
4326
|
}
|
|
4326
4327
|
/** The user's saved brushes. */
|
|
4327
4328
|
getUserBrushes() {
|
|
4328
|
-
return this.userBrushes.map((b) =>
|
|
4329
|
+
return this.userBrushes.map((b) => _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, b, b));
|
|
4329
4330
|
}
|
|
4330
4331
|
/** A brush library file of the given brushes (default: the user's brushes). */
|
|
4331
4332
|
exportBrushes(ids) {
|
|
4332
4333
|
const list = ids ? ids.map((id) => this.requireBrush(id)) : this.userBrushes;
|
|
4333
|
-
return { format: "pixerate-brushes", version: 1, brushes: list.map(
|
|
4334
|
+
return { format: "pixerate-brushes", version: 1, brushes: list.map(_chunkYQ5C5BVKcjs.brushToJSON) };
|
|
4334
4335
|
}
|
|
4335
4336
|
/**
|
|
4336
4337
|
* Adds the brushes of a library file to the user library. A brush whose id is taken is skipped
|
|
@@ -4340,14 +4341,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4340
4341
|
const problems = [];
|
|
4341
4342
|
let list;
|
|
4342
4343
|
try {
|
|
4343
|
-
list =
|
|
4344
|
+
list = _chunkYQ5C5BVKcjs.parseBrushLibrary.call(void 0, file, problems);
|
|
4344
4345
|
} catch (e) {
|
|
4345
4346
|
throw new PaintEditorError(e.message);
|
|
4346
4347
|
}
|
|
4347
4348
|
const added = [];
|
|
4348
4349
|
const skipped = [];
|
|
4349
4350
|
for (const b of list) {
|
|
4350
|
-
if (
|
|
4351
|
+
if (_chunkYQ5C5BVKcjs.BUILTIN_BRUSHES.some((x) => x.id === b.id)) {
|
|
4351
4352
|
skipped.push(b.id);
|
|
4352
4353
|
problems.push(`"${b.id}" is a built-in brush id; rename it to import it.`);
|
|
4353
4354
|
continue;
|
|
@@ -4408,7 +4409,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4408
4409
|
* brush's gradient, else the editor's gradient paint. Erasers, blenders and smudges take none.
|
|
4409
4410
|
*/
|
|
4410
4411
|
strokeGradient(init, brush, color) {
|
|
4411
|
-
if (!
|
|
4412
|
+
if (!_chunkYQ5C5BVKcjs.brushTakesPaint.call(void 0, brush)) return null;
|
|
4412
4413
|
let g = null;
|
|
4413
4414
|
if (init.paint !== void 0) {
|
|
4414
4415
|
const p = this.readStrokePaint(init.paint);
|
|
@@ -4454,7 +4455,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4454
4455
|
// --- Mixer Brush ---------------------------------------------------------------
|
|
4455
4456
|
/** Fills the Mixer Brush reservoir with a colour (default the editor colour). */
|
|
4456
4457
|
loadMixerBrush(color) {
|
|
4457
|
-
const [r, g, b] =
|
|
4458
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, color === void 0 ? this.color : parseColor(color));
|
|
4458
4459
|
this.mixerLoad = _chunkEBDCRTZIcjs.loadMixer.call(void 0, this.mixerLoad, [r / 255, g / 255, b / 255]);
|
|
4459
4460
|
this.emit([]);
|
|
4460
4461
|
return this.mixerLoad;
|
|
@@ -4484,7 +4485,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4484
4485
|
// --- Strokes -------------------------------------------------------------------
|
|
4485
4486
|
strokeBrush(init) {
|
|
4486
4487
|
let brush = init.brushId !== void 0 ? this.requireBrush(init.brushId) : this.brush;
|
|
4487
|
-
if (init.brush) brush =
|
|
4488
|
+
if (init.brush) brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { ...init.brush, id: brush.id }, brush);
|
|
4488
4489
|
return brush;
|
|
4489
4490
|
}
|
|
4490
4491
|
/**
|
|
@@ -4524,7 +4525,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4524
4525
|
throw new PaintEditorError(`Layer "${layer.name}" is a sticker layer (its pixels are drawn from its stickers); paint on another layer (add_layer).`);
|
|
4525
4526
|
}
|
|
4526
4527
|
let wet;
|
|
4527
|
-
if (
|
|
4528
|
+
if (_chunkYQ5C5BVKcjs.isWetBrush.call(void 0, brush)) {
|
|
4528
4529
|
this.requireWetIdle("painting");
|
|
4529
4530
|
if (layer.offset.x || layer.offset.y) {
|
|
4530
4531
|
const moved = { ...layer, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, layer.offset.x, layer.offset.y), offset: { x: 0, y: 0 } };
|
|
@@ -4532,14 +4533,14 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4532
4533
|
if (doc !== this.doc) doc = { ...doc, layers: _chunkHGTDMKNEcjs.mapLayer.call(void 0, doc.layers, layer.id, () => moved) };
|
|
4533
4534
|
layer = moved;
|
|
4534
4535
|
}
|
|
4535
|
-
if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >=
|
|
4536
|
-
throw new PaintEditorError(`At most ${
|
|
4536
|
+
if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >= _chunkV7GWZIZKcjs.MAX_WET_LANES) {
|
|
4537
|
+
throw new PaintEditorError(`At most ${_chunkV7GWZIZKcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
|
|
4537
4538
|
}
|
|
4538
4539
|
this.beginWetOp();
|
|
4539
4540
|
const world = this.wet.ensureLane(layer.id, brush.wet.medium);
|
|
4540
4541
|
const id = layer.id;
|
|
4541
4542
|
const wetColor = init.color === void 0 ? this.color : parseColor(init.color);
|
|
4542
|
-
const [r, g, b] =
|
|
4543
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, wetColor);
|
|
4543
4544
|
const wetGradient = this.strokeGradient(init, brush, wetColor);
|
|
4544
4545
|
const load = _nullishCoalesce(init.load, () => ( brushLoadForStroke(brush, this.mixerLoad, [r / 255, g / 255, b / 255])));
|
|
4545
4546
|
const seedW = _nullishCoalesce(init.seed, () => ( _chunkEBDCRTZIcjs.mix32.call(void 0, this.seedCounter * 2654435761 >>> 0) & 2147483647));
|
|
@@ -4552,7 +4553,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4552
4553
|
load,
|
|
4553
4554
|
grain: paperGrain(doc.paper),
|
|
4554
4555
|
paperDepth: doc.paper.depth,
|
|
4555
|
-
paperColor:
|
|
4556
|
+
paperColor: _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, doc.paper.color),
|
|
4556
4557
|
seed: seedW,
|
|
4557
4558
|
copies: [IDENTITY_AFFINE, ...copiesW].map(affineCopy),
|
|
4558
4559
|
mask: init.maskStencils ? this.stencilSelection(init.maskStencils) : init.stencils !== false ? this.stencilSelection() : null,
|
|
@@ -4609,7 +4610,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4609
4610
|
const stroke = {
|
|
4610
4611
|
id: `s${this.strokeCounter++}`,
|
|
4611
4612
|
layerId: session.layerId,
|
|
4612
|
-
brush:
|
|
4613
|
+
brush: _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, init.brush),
|
|
4613
4614
|
color: init.colorHex,
|
|
4614
4615
|
points: session.points.map((p) => ({ ...p })),
|
|
4615
4616
|
seed: init.seed
|
|
@@ -4801,13 +4802,13 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4801
4802
|
let brush = v.brush;
|
|
4802
4803
|
if (options.brushId !== void 0) {
|
|
4803
4804
|
const b = this.requireBrush(options.brushId);
|
|
4804
|
-
brush =
|
|
4805
|
+
brush = _chunkYQ5C5BVKcjs.normalizePaintBrush.call(void 0, { tip: { ...b.tip, size: b.tip.size * (v.brush.tip.size / s.brush.tip.size) } }, b);
|
|
4805
4806
|
}
|
|
4806
4807
|
const layerId = _nullishCoalesce(options.layerId, () => ( s.layerId));
|
|
4807
4808
|
if (!_chunkHGTDMKNEcjs.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.`);
|
|
4808
4809
|
let load = s.load;
|
|
4809
4810
|
if (load && options.color !== void 0 && load.reservoir) {
|
|
4810
|
-
const [r, g, b] =
|
|
4811
|
+
const [r, g, b] = _chunkYQ5C5BVKcjs.hexToRgb8.call(void 0, options.color);
|
|
4811
4812
|
load = { ...load, reservoir: [r / 255, g / 255, b / 255] };
|
|
4812
4813
|
}
|
|
4813
4814
|
const paint = v.paint && options.color === void 0 ? { paint: v.paint } : {};
|
|
@@ -4952,7 +4953,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
4952
4953
|
wetState() {
|
|
4953
4954
|
const st = this.getState().wet;
|
|
4954
4955
|
const backend = this.wet.backend();
|
|
4955
|
-
return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _252 => _252.message]), () => (
|
|
4956
|
+
return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _252 => _252.message]), () => ( _chunkV7GWZIZKcjs.wetSupport.call(void 0, ).message)), engine: this.wet.engineInfo() };
|
|
4956
4957
|
}
|
|
4957
4958
|
/**
|
|
4958
4959
|
* Engine B, the WebGPU accelerator for large wet areas: whether it may run, its state (`off`,
|
|
@@ -5025,7 +5026,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5025
5026
|
const amount = _nullishCoalesce(options.amount, () => ( 1));
|
|
5026
5027
|
if (!(amount > 0 && amount <= 1)) throw new PaintEditorError(`amount ${amount} is out of range; use above 0 up to 1.`);
|
|
5027
5028
|
const rect = _nullishCoalesce(this.checkRect(options.rect), () => ( { x: 0, y: 0, width: this.doc.canvas.width, height: this.doc.canvas.height }));
|
|
5028
|
-
if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >=
|
|
5029
|
+
if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >= _chunkV7GWZIZKcjs.MAX_WET_LANES) throw new PaintEditorError(`At most ${_chunkV7GWZIZKcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
|
|
5029
5030
|
const before = this.doc;
|
|
5030
5031
|
this.beginWetOp();
|
|
5031
5032
|
const world = this.wet.ensureLane(l.id);
|
|
@@ -5221,7 +5222,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5221
5222
|
this.wet.reset();
|
|
5222
5223
|
if (!raw || typeof raw !== "object") return;
|
|
5223
5224
|
const r = raw;
|
|
5224
|
-
this.wet.setTilt(
|
|
5225
|
+
this.wet.setTilt(_chunkV7GWZIZKcjs.normalizeTilt.call(void 0, _nullishCoalesce(r.tilt, () => ( {}))));
|
|
5225
5226
|
if (r.layers && typeof r.layers === "object") {
|
|
5226
5227
|
for (const [id, v] of Object.entries(r.layers)) {
|
|
5227
5228
|
if (!v || typeof v !== "object") {
|
|
@@ -5229,7 +5230,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5229
5230
|
continue;
|
|
5230
5231
|
}
|
|
5231
5232
|
const x = v;
|
|
5232
|
-
this.wet.settings.set(id, { params:
|
|
5233
|
+
this.wet.settings.set(id, { params: _chunkV7GWZIZKcjs.normalizeWetParams.call(void 0, _nullishCoalesce(x.params, () => ( {}))), flow: _chunkV7GWZIZKcjs.normalizeFlow.call(void 0, _nullishCoalesce(x.flow, () => ( {}))) });
|
|
5233
5234
|
}
|
|
5234
5235
|
}
|
|
5235
5236
|
}
|
|
@@ -5265,7 +5266,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5265
5266
|
const stickers = {};
|
|
5266
5267
|
for (const [id, list] of Object.entries(ext.stickers)) {
|
|
5267
5268
|
if (!_chunkHGTDMKNEcjs.findLayer.call(void 0, state.layers, id) || !Array.isArray(list)) continue;
|
|
5268
|
-
const ok = list.filter((x) => x && typeof x.id === "string" &&
|
|
5269
|
+
const ok = list.filter((x) => x && typeof x.id === "string" && _chunkYQ5C5BVKcjs.STAMP_KINDS.includes(x.stamp) && Number.isFinite(x.x) && Number.isFinite(x.y) && x.size > 0);
|
|
5269
5270
|
if (ok.length !== list.length) problems.push(`Some stickers of layer "${id}" could not be read; they were dropped.`);
|
|
5270
5271
|
stickers[id] = ok.map((x) => ({ ...x }));
|
|
5271
5272
|
}
|
|
@@ -5407,7 +5408,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5407
5408
|
return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
|
|
5408
5409
|
});
|
|
5409
5410
|
const layers = toStandard(dried);
|
|
5410
|
-
const result =
|
|
5411
|
+
const result = _chunkPA3IMPPScjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
|
|
5411
5412
|
for (const [mode, names] of changed) {
|
|
5412
5413
|
const label = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _271 => _271.find, 'call', _272 => _272((m) => m.id === mode), 'optionalAccess', _273 => _273.label]), () => ( mode));
|
|
5413
5414
|
const std = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.BLEND_MODES, 'access', _274 => _274.find, 'call', _275 => _275((m) => m.id === _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _276 => _276.label]), () => ( _chunkCWM3CUUXcjs.standardBlendMode.call(void 0, mode)));
|
|
@@ -5658,7 +5659,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5658
5659
|
/** Replaces a layer's stickers and redraws its pixels from them (one undo step). */
|
|
5659
5660
|
commitStickers(label, layer, stickers) {
|
|
5660
5661
|
if (_chunkHGTDMKNEcjs.isLayerLocked.call(void 0, layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
|
|
5661
|
-
const surface =
|
|
5662
|
+
const surface = _chunkYQ5C5BVKcjs.stickerSurface.call(void 0, stickers);
|
|
5662
5663
|
const doc = { ...this.doc, layers: _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [layer.id]: stickers } };
|
|
5663
5664
|
this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }));
|
|
5664
5665
|
}
|
|
@@ -5669,7 +5670,7 @@ var PaintEditorController = (_class10 = class _PaintEditorController {
|
|
|
5669
5670
|
if (i < 0) throw new PaintEditorError(`Layer "${layer.name}" has no sticker "${id}". Call list_stickers for the ids.`);
|
|
5670
5671
|
let u;
|
|
5671
5672
|
try {
|
|
5672
|
-
u =
|
|
5673
|
+
u = _chunkYQ5C5BVKcjs.normalizeStickerUpdate.call(void 0, update);
|
|
5673
5674
|
} catch (e) {
|
|
5674
5675
|
throw new PaintEditorError(e.message);
|
|
5675
5676
|
}
|
|
@@ -6235,7 +6236,7 @@ function createPaintStickerTools(c) {
|
|
|
6235
6236
|
properties: {
|
|
6236
6237
|
layerId: LAYER_ID,
|
|
6237
6238
|
id: { type: "string", description: "Sticker id from list_stickers." },
|
|
6238
|
-
stamp: { type: "string", enum: [...
|
|
6239
|
+
stamp: { type: "string", enum: [..._chunkYQ5C5BVKcjs.STAMP_KINDS], description: "Another stamp." },
|
|
6239
6240
|
x: { type: "number", description: "Centre x in document pixels." },
|
|
6240
6241
|
y: { type: "number", description: "Centre y in document pixels." },
|
|
6241
6242
|
size: { type: "number", minimum: 2, maximum: 2048, description: "Diameter in pixels." },
|
|
@@ -6505,7 +6506,7 @@ function createPaintGuideTools(c) {
|
|
|
6505
6506
|
inputSchema: {
|
|
6506
6507
|
type: "object",
|
|
6507
6508
|
properties: {
|
|
6508
|
-
kind: { type: "string", enum: [...
|
|
6509
|
+
kind: { type: "string", enum: [..._chunkES3UEVUTcjs.HARMONY_KINDS], description: "The harmony." },
|
|
6509
6510
|
color: { ...COLOR2, description: "Base colour #rrggbb (default the paint colour)." },
|
|
6510
6511
|
wheel: { type: "string", enum: ["ryb", "rgb"], description: "ryb (painter\u2019s wheel, default) or rgb." },
|
|
6511
6512
|
spread: { type: "number", minimum: 5, maximum: 90, description: "Analogous and split-complementary spread in degrees (default 30)." }
|
|
@@ -6823,7 +6824,7 @@ function createPaintWetTools(c) {
|
|
|
6823
6824
|
type: "object",
|
|
6824
6825
|
properties: {
|
|
6825
6826
|
layerId: LAYER_ID2,
|
|
6826
|
-
kind: { type: "string", enum: [...
|
|
6827
|
+
kind: { type: "string", enum: [..._chunkV7GWZIZKcjs.WET_FLOW_KINDS], description: "none, linear, swirl, radial or turbulent." },
|
|
6827
6828
|
strength: UNIT("How hard it pushes, 0..1 (1 is about a 25\xB0 tilt; default 0.5)."),
|
|
6828
6829
|
angle: { type: "number", minimum: -360, maximum: 360, description: "linear: direction in degrees clockwise from canvas down (default 0)." },
|
|
6829
6830
|
center: {
|
|
@@ -7099,7 +7100,7 @@ var BEHAVIOR = {
|
|
|
7099
7100
|
type: "object",
|
|
7100
7101
|
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.",
|
|
7101
7102
|
properties: {
|
|
7102
|
-
mode: { type: "string", enum: [...
|
|
7103
|
+
mode: { type: "string", enum: [..._chunkYQ5C5BVKcjs.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." },
|
|
7103
7104
|
colors: { type: "array", maxItems: 8, items: { ...COLOR3 }, description: "2..8 colours #rrggbb; fewer than 2 uses the paint colour and the secondary colour." },
|
|
7104
7105
|
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)." },
|
|
7105
7106
|
length: { type: "integer", minimum: 1, maximum: 500, description: "dab mode: dabs per colour (default 12)." },
|
|
@@ -7140,10 +7141,10 @@ var WET_BRUSH = {
|
|
|
7140
7141
|
properties: {
|
|
7141
7142
|
tool: {
|
|
7142
7143
|
type: "string",
|
|
7143
|
-
enum: [...
|
|
7144
|
+
enum: [..._chunkYQ5C5BVKcjs.WET_TOOLS],
|
|
7144
7145
|
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)."
|
|
7145
7146
|
},
|
|
7146
|
-
medium: { type: "string", enum: [...
|
|
7147
|
+
medium: { type: "string", enum: [..._chunkYQ5C5BVKcjs.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)." },
|
|
7147
7148
|
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)." },
|
|
7148
7149
|
thinner: { type: "number", minimum: 0, maximum: 1, description: "Thinner (water or solvent): more transparent, runnier paint." },
|
|
7149
7150
|
water: { type: "number", minimum: 0, maximum: 1, description: "Wetness: water laid per stroke, 0.2 a damp brush .. 1 a dripping one." },
|
|
@@ -7160,7 +7161,7 @@ var IMPASTO_BRUSH = {
|
|
|
7160
7161
|
properties: {
|
|
7161
7162
|
tool: {
|
|
7162
7163
|
type: "string",
|
|
7163
|
-
enum: [...
|
|
7164
|
+
enum: [..._chunkYQ5C5BVKcjs.IMPASTO_TOOLS],
|
|
7164
7165
|
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."
|
|
7165
7166
|
},
|
|
7166
7167
|
thickness: { type: "number", minimum: 0, maximum: 1, description: "How far the paint stands up." },
|
|
@@ -7176,8 +7177,8 @@ var PARTICLE_BRUSH = {
|
|
|
7176
7177
|
type: "object",
|
|
7177
7178
|
description: "Particle engine settings (procedural brushes). Missing fields keep their current values.",
|
|
7178
7179
|
properties: {
|
|
7179
|
-
kind: { type: "string", enum: [...
|
|
7180
|
-
render: { type: "string", enum: [...
|
|
7180
|
+
kind: { type: "string", enum: [..._chunkYQ5C5BVKcjs.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." },
|
|
7181
|
+
render: { type: "string", enum: [..._chunkYQ5C5BVKcjs.PARTICLE_RENDERS], description: "dot: a mark at each step; line: each particle draws a continuous line; sequence: beads spaced along each path." },
|
|
7181
7182
|
count: { type: "integer", minimum: 1, maximum: 64, description: "Particles (flow: how many are thrown per tip of travel)." },
|
|
7182
7183
|
size: { type: "number", minimum: 0, maximum: 1, description: "Mark size as a fraction of the tip size." },
|
|
7183
7184
|
spread: { type: "number", minimum: 0, maximum: 1, description: "How far apart the particles start, as a fraction of the tip size." },
|
|
@@ -7207,7 +7208,7 @@ var STICKER_BRUSH = {
|
|
|
7207
7208
|
type: "object",
|
|
7208
7209
|
description: "Sticker engine settings: stamps sprayed along the stroke as editable stickers. Missing fields keep their current values.",
|
|
7209
7210
|
properties: {
|
|
7210
|
-
stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [...
|
|
7211
|
+
stamps: { type: "array", minItems: 1, maxItems: 9, items: { type: "string", enum: [..._chunkYQ5C5BVKcjs.STAMP_KINDS], description: "A stamp." }, description: "The stamps to spray (one picked at random per sticker)." },
|
|
7211
7212
|
density: { type: "number", minimum: 0, maximum: 1, description: "Stickers per distance travelled." },
|
|
7212
7213
|
sizeJitter: { type: "number", minimum: 0, maximum: 1, description: "Random size change." },
|
|
7213
7214
|
rotationJitter: { type: "number", minimum: 0, maximum: 1, description: "Random turn as a fraction of \xB1180\xB0." },
|
|
@@ -7218,16 +7219,16 @@ var STICKER_BRUSH = {
|
|
|
7218
7219
|
};
|
|
7219
7220
|
var BRUSH_FIELDS = {
|
|
7220
7221
|
name: { type: "string", minLength: 1, maxLength: 80, description: "Display name." },
|
|
7221
|
-
category: { type: "string", enum: [...
|
|
7222
|
+
category: { type: "string", enum: [..._chunkYQ5C5BVKcjs.PAINT_BRUSH_CATEGORIES], description: "Library category." },
|
|
7222
7223
|
engine: {
|
|
7223
7224
|
type: "string",
|
|
7224
|
-
enum: [...
|
|
7225
|
+
enum: [..._chunkYQ5C5BVKcjs.PAINT_BRUSH_ENGINES],
|
|
7225
7226
|
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)."
|
|
7226
7227
|
},
|
|
7227
7228
|
tip: TIP,
|
|
7228
7229
|
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." },
|
|
7229
7230
|
pressureSmoothing: { type: "number", minimum: 0, maximum: 0.95, description: "Pressure smoothing, separate from the tip position smoothing." },
|
|
7230
|
-
rotation: { type: "string", enum: [...
|
|
7231
|
+
rotation: { type: "string", enum: [..._chunkYQ5C5BVKcjs.BRUSH_ROTATIONS], description: "What turns the tip: fixed (tip.angle), stroke (follows the direction of travel) or barrel (the pen barrel rotation, twist)." },
|
|
7231
7232
|
dynamics: DYNAMICS,
|
|
7232
7233
|
mixer: MIXER,
|
|
7233
7234
|
loadsColor: { type: "boolean", description: "Mixer engine: load the colour each stroke (false for a mixer that only moves paint)." },
|
|
@@ -7277,7 +7278,7 @@ function brushSummary(b) {
|
|
|
7277
7278
|
size: b.tip.size,
|
|
7278
7279
|
grain: b.grain,
|
|
7279
7280
|
rotation: b.rotation,
|
|
7280
|
-
wetCapable:
|
|
7281
|
+
wetCapable: _chunkYQ5C5BVKcjs.isWetCapable.call(void 0, b),
|
|
7281
7282
|
pickup: b.behavior.pickup,
|
|
7282
7283
|
dirty: b.behavior.dirty,
|
|
7283
7284
|
multicolor: b.behavior.multicolor.mode,
|
|
@@ -7383,8 +7384,8 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7383
7384
|
inputSchema: EMPTY3,
|
|
7384
7385
|
annotations: { title: "List papers", ...READ6 },
|
|
7385
7386
|
handler: () => ({
|
|
7386
|
-
papers:
|
|
7387
|
-
families: [...
|
|
7387
|
+
papers: _chunkYQ5C5BVKcjs.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 })),
|
|
7388
|
+
families: [..._chunkYQ5C5BVKcjs.PAPER_FAMILIES],
|
|
7388
7389
|
patterns: [..._chunkEBDCRTZIcjs.GRAIN_PATTERNS]
|
|
7389
7390
|
})
|
|
7390
7391
|
});
|
|
@@ -7606,10 +7607,10 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7606
7607
|
annotations: { title: "Get a brush", ...READ6 },
|
|
7607
7608
|
handler: ({ id }) => {
|
|
7608
7609
|
const st = c.getState();
|
|
7609
|
-
if (id === void 0) return { ...
|
|
7610
|
+
if (id === void 0) return { ..._chunkYQ5C5BVKcjs.brushToJSON.call(void 0, st.brush), strokePaint: _nullishCoalesce(st.brush.paint, () => ( st.paint)) };
|
|
7610
7611
|
const b = c.getBrush(id);
|
|
7611
7612
|
if (!b) throw new Error(`Unknown brush "${id}". Call list_brushes for the ids.`);
|
|
7612
|
-
return { ...
|
|
7613
|
+
return { ..._chunkYQ5C5BVKcjs.brushToJSON.call(void 0, b), builtin: Boolean(b.builtin), strokePaint: _nullishCoalesce(b.paint, () => ( st.paint)) };
|
|
7613
7614
|
}
|
|
7614
7615
|
});
|
|
7615
7616
|
add({
|
|
@@ -7618,7 +7619,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7618
7619
|
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.",
|
|
7619
7620
|
inputSchema: { type: "object", properties: { id: { type: "string", description: "Brush id from list_brushes to start from." }, ...BRUSH_FIELDS }, additionalProperties: false },
|
|
7620
7621
|
annotations: { title: "Set the brush", ...SET4 },
|
|
7621
|
-
handler: (a) =>
|
|
7622
|
+
handler: (a) => _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, c.setBrush(a))
|
|
7622
7623
|
});
|
|
7623
7624
|
add({
|
|
7624
7625
|
name: "save_brush",
|
|
@@ -7634,7 +7635,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
7634
7635
|
additionalProperties: false
|
|
7635
7636
|
},
|
|
7636
7637
|
annotations: { title: "Save a brush", ...SET4 },
|
|
7637
|
-
handler: ({ id, name }) =>
|
|
7638
|
+
handler: ({ id, name }) => _chunkYQ5C5BVKcjs.brushToJSON.call(void 0, c.saveBrush({ id, name }))
|
|
7638
7639
|
});
|
|
7639
7640
|
add({
|
|
7640
7641
|
name: "remove_brush",
|
|
@@ -8002,7 +8003,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
|
|
|
8002
8003
|
tools.push(...createPaintThickTools(c));
|
|
8003
8004
|
tools.push(...createPaintReplayTools(c));
|
|
8004
8005
|
tools.push(...createPaintStickerTools(c));
|
|
8005
|
-
tools.push(...
|
|
8006
|
+
tools.push(..._chunkV7GWZIZKcjs.createPigmentTools.call(void 0, ));
|
|
8006
8007
|
return withPaintPlayback({
|
|
8007
8008
|
id: _nullishCoalesce(options.id, () => ( "paint-editor")),
|
|
8008
8009
|
namespace: options.namespace,
|
|
@@ -8278,7 +8279,7 @@ function renderColorWheel(size, wheel, inner = 0.64) {
|
|
|
8278
8279
|
const dy = y + 0.5 - r;
|
|
8279
8280
|
const d = Math.hypot(dx, dy) / r;
|
|
8280
8281
|
if (d > 1 || d < inner) continue;
|
|
8281
|
-
const [cr, cg, cb] = hsvToRgb(
|
|
8282
|
+
const [cr, cg, cb] = hsvToRgb(_chunkES3UEVUTcjs.wheelToHue.call(void 0, wheelAngle(dx, dy), wheel), 1, 1);
|
|
8282
8283
|
const i = (y * size + x) * 4;
|
|
8283
8284
|
const edge = Math.min(1, (1 - d) * r, (d - inner) * r);
|
|
8284
8285
|
data[i] = cr;
|
|
@@ -8292,7 +8293,7 @@ function renderColorWheel(size, wheel, inner = 0.64) {
|
|
|
8292
8293
|
function wheelPick(dx, dy, wheel, color) {
|
|
8293
8294
|
const [r, g, b] = parseHexColor(color);
|
|
8294
8295
|
const { s, v } = rgbToHsv(r, g, b);
|
|
8295
|
-
const [nr, ng, nb] = hsvToRgb(
|
|
8296
|
+
const [nr, ng, nb] = hsvToRgb(_chunkES3UEVUTcjs.wheelToHue.call(void 0, wheelAngle(dx, dy), wheel), s || 1, v || 1);
|
|
8296
8297
|
return rgbToHexColor(nr, ng, nb);
|
|
8297
8298
|
}
|
|
8298
8299
|
var BLEND_MENU_GROUPS = [
|
|
@@ -9067,4 +9068,4 @@ function createPaintEditorDocument(controller, options = {}) {
|
|
|
9067
9068
|
|
|
9068
9069
|
|
|
9069
9070
|
|
|
9070
|
-
exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BRUSH_ID = _chunkJGKCC5OFcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunkJGKCC5OFcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunkJGKCC5OFcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunkJGKCC5OFcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunkJGKCC5OFcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunkJGKCC5OFcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunkJGKCC5OFcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunkJGKCC5OFcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkGNK7SESQcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunkJGKCC5OFcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunkJGKCC5OFcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunkJGKCC5OFcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunkJGKCC5OFcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunkJGKCC5OFcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunkJGKCC5OFcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkGNK7SESQcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunkJGKCC5OFcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.HARMONY_KINDS = _chunkUKCJ43YLcjs.HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunkJGKCC5OFcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunkJGKCC5OFcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.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 = _chunkJGKCC5OFcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunkJGKCC5OFcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunkJGKCC5OFcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.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 = _chunkJGKCC5OFcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunkJGKCC5OFcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunkJGKCC5OFcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunkJGKCC5OFcjs.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 = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.ParticleStroke = _chunkJGKCC5OFcjs.ParticleStroke; exports.PenDabWalker = _chunkJGKCC5OFcjs.PenDabWalker; exports.PenSmoother = _chunkJGKCC5OFcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunkJGKCC5OFcjs.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 = _chunkJGKCC5OFcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkGNK7SESQcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunkJGKCC5OFcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkGNK7SESQcjs.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 = _chunkJGKCC5OFcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunkJGKCC5OFcjs.brushTakesPaint; exports.brushToJSON = _chunkJGKCC5OFcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunkJGKCC5OFcjs.clonePaper; exports.colorHarmony = colorHarmony2; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorDocument = createPaintEditorDocument; 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 = _chunkJGKCC5OFcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb8 = _chunkJGKCC5OFcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = _chunkUKCJ43YLcjs.hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunkJGKCC5OFcjs.isWetBrush; exports.isWetCapable = _chunkJGKCC5OFcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunkJGKCC5OFcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunkJGKCC5OFcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunkJGKCC5OFcjs.normalizeBehavior; exports.normalizeBristle = _chunkJGKCC5OFcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunkJGKCC5OFcjs.normalizeDynamics; exports.normalizeFlow = _chunkGNK7SESQcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeImpasto = _chunkJGKCC5OFcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunkJGKCC5OFcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunkJGKCC5OFcjs.normalizePaintBrush; exports.normalizePaper = _chunkJGKCC5OFcjs.normalizePaper; exports.normalizeParticle = _chunkJGKCC5OFcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunkJGKCC5OFcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunkJGKCC5OFcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunkJGKCC5OFcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkGNK7SESQcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPlaybackPanel = paintPlaybackPanel; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paintToMultiColor = _chunkJGKCC5OFcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunkJGKCC5OFcjs.paperPreset; exports.parseBrushLibrary = _chunkJGKCC5OFcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunkJGKCC5OFcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.planPaintToolPlayback = planPaintToolPlayback; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunkJGKCC5OFcjs.renderPaper; exports.renderStickers = _chunkJGKCC5OFcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.stampCoverage = _chunkJGKCC5OFcjs.stampCoverage; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunkJGKCC5OFcjs.stickerRect; exports.stickerSurface = _chunkJGKCC5OFcjs.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 = _chunkJGKCC5OFcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunkJGKCC5OFcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.translateStencil = translateStencil; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunkJGKCC5OFcjs.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 = _chunkGNK7SESQcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = _chunkUKCJ43YLcjs.wheelToHue; exports.withPaintPlayback = withPaintPlayback;
|
|
9071
|
+
exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BRUSH_ID = _chunkYQ5C5BVKcjs.BRUSH_ID; exports.BRUSH_ROTATIONS = _chunkYQ5C5BVKcjs.BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = _chunkYQ5C5BVKcjs.BUILTIN_BRUSHES; exports.BristleStroke = _chunkYQ5C5BVKcjs.BristleStroke; exports.DEFAULT_BEHAVIOR = _chunkYQ5C5BVKcjs.DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = _chunkYQ5C5BVKcjs.DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = _chunkYQ5C5BVKcjs.DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = _chunkYQ5C5BVKcjs.DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = _chunkYQ5C5BVKcjs.DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = _chunkYQ5C5BVKcjs.DEFAULT_MULTI_COLOR; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PAPER = _chunkYQ5C5BVKcjs.DEFAULT_PAPER; exports.DEFAULT_PARTICLE = _chunkYQ5C5BVKcjs.DEFAULT_PARTICLE; exports.DEFAULT_STICKER = _chunkYQ5C5BVKcjs.DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = _chunkYQ5C5BVKcjs.DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DryStroke = _chunkYQ5C5BVKcjs.DryStroke; exports.GPU_LEAD = GPU_LEAD; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.HARMONY_KINDS = _chunkES3UEVUTcjs.HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = _chunkYQ5C5BVKcjs.IDENTITY_COPY; exports.IMPASTO_TOOLS = _chunkYQ5C5BVKcjs.IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.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 = _chunkYQ5C5BVKcjs.MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = _chunkYQ5C5BVKcjs.PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = _chunkYQ5C5BVKcjs.PAINT_BRUSH_ENGINES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_EFFECT_PLACES = PAINT_EFFECT_PLACES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.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 = _chunkYQ5C5BVKcjs.PAPER_FAMILIES; exports.PAPER_LIBRARY = _chunkYQ5C5BVKcjs.PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PAPER_TARGET = PAPER_TARGET; exports.PARTICLE_KINDS = _chunkYQ5C5BVKcjs.PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = _chunkYQ5C5BVKcjs.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 = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintPresence = PaintPresence; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.ParticleStroke = _chunkYQ5C5BVKcjs.ParticleStroke; exports.PenDabWalker = _chunkYQ5C5BVKcjs.PenDabWalker; exports.PenSmoother = _chunkYQ5C5BVKcjs.PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = _chunkYQ5C5BVKcjs.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 = _chunkYQ5C5BVKcjs.StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_GPU_MODES = WET_GPU_MODES; exports.WET_GPU_OPTIONS = WET_GPU_OPTIONS; exports.WET_MEDIA = _chunkYQ5C5BVKcjs.WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.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 = _chunkYQ5C5BVKcjs.WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushTakesPaint = _chunkYQ5C5BVKcjs.brushTakesPaint; exports.brushToJSON = _chunkYQ5C5BVKcjs.brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.checkPaintEffectPlace = checkPaintEffectPlace; exports.clonePaper = _chunkYQ5C5BVKcjs.clonePaper; exports.colorHarmony = colorHarmony2; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorDocument = createPaintEditorDocument; 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 = _chunkYQ5C5BVKcjs.drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.effectLayersToJSON = effectLayersToJSON; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb8 = _chunkYQ5C5BVKcjs.hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = _chunkES3UEVUTcjs.hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = _chunkYQ5C5BVKcjs.isWetBrush; exports.isWetCapable = _chunkYQ5C5BVKcjs.isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPixels = mixPixels; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = _chunkYQ5C5BVKcjs.mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.multiColorToPaint = _chunkYQ5C5BVKcjs.multiColorToPaint; exports.newPaintLayerId = newPaintLayerId; exports.nextPaperEffectVersion = nextPaperEffectVersion; exports.normalizeBehavior = _chunkYQ5C5BVKcjs.normalizeBehavior; exports.normalizeBristle = _chunkYQ5C5BVKcjs.normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = _chunkYQ5C5BVKcjs.normalizeDynamics; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeImpasto = _chunkYQ5C5BVKcjs.normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = _chunkYQ5C5BVKcjs.normalizeMultiColor; exports.normalizePaintBrush = _chunkYQ5C5BVKcjs.normalizePaintBrush; exports.normalizePaper = _chunkYQ5C5BVKcjs.normalizePaper; exports.normalizeParticle = _chunkYQ5C5BVKcjs.normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = _chunkYQ5C5BVKcjs.normalizeStickerSettings; exports.normalizeStickerUpdate = _chunkYQ5C5BVKcjs.normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = _chunkYQ5C5BVKcjs.normalizeWetBrush; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.overPixels = overPixels; exports.padSampleRadius = padSampleRadius; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPlaybackPanel = paintPlaybackPanel; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paintToMultiColor = _chunkYQ5C5BVKcjs.paintToMultiColor; exports.paperEffectFromJSON = paperEffectFromJSON; exports.paperEffectToJSON = paperEffectToJSON; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = _chunkYQ5C5BVKcjs.paperPreset; exports.parseBrushLibrary = _chunkYQ5C5BVKcjs.parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = _chunkYQ5C5BVKcjs.penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.planPaintToolPlayback = planPaintToolPlayback; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.readPaintEffectSource = readPaintEffectSource; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPath = readPath; exports.readSwatch = readSwatch; exports.reliefInfo = reliefInfo; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = _chunkYQ5C5BVKcjs.renderPaper; exports.renderStickers = _chunkYQ5C5BVKcjs.renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.stampCoverage = _chunkYQ5C5BVKcjs.stampCoverage; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = _chunkYQ5C5BVKcjs.stickerRect; exports.stickerSurface = _chunkYQ5C5BVKcjs.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 = _chunkYQ5C5BVKcjs.tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = _chunkYQ5C5BVKcjs.toStrokePoint; exports.toggleStamp = toggleStamp; exports.translateStencil = translateStencil; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.usesPaintExchange = _chunkYQ5C5BVKcjs.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 = _chunkV7GWZIZKcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = _chunkES3UEVUTcjs.wheelToHue; exports.withPaintPlayback = withPaintPlayback;
|