@pixerate/editor 0.116.0 → 0.117.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZYZGEILO.cjs → chunk-2J3LS7JZ.cjs} +203 -203
- package/dist/{chunk-ZYZGEILO.cjs.map → chunk-2J3LS7JZ.cjs.map} +1 -1
- package/dist/{chunk-TFOPHZ3U.cjs → chunk-7ISPWEJA.cjs} +302 -5
- package/dist/chunk-7ISPWEJA.cjs.map +1 -0
- package/dist/{chunk-2UT4GXYA.cjs → chunk-BYAWOAST.cjs} +109 -41
- package/dist/chunk-BYAWOAST.cjs.map +1 -0
- package/dist/{chunk-PAOWHJ5O.cjs → chunk-EBSYZRSW.cjs} +217 -400
- package/dist/chunk-EBSYZRSW.cjs.map +1 -0
- package/dist/{chunk-XK5LZKBD.js → chunk-HKDTM6VC.js} +298 -1
- package/dist/chunk-HKDTM6VC.js.map +1 -0
- package/dist/{chunk-D53VQGEJ.js → chunk-IVSNUXW7.js} +79 -2
- package/dist/chunk-IVSNUXW7.js.map +1 -0
- package/dist/{chunk-ARQ7PQ6Q.js → chunk-JHXMNOMF.js} +71 -3
- package/dist/chunk-JHXMNOMF.js.map +1 -0
- package/dist/{chunk-HOCPSFGA.cjs → chunk-L2T6EJ5S.cjs} +154 -77
- package/dist/chunk-L2T6EJ5S.cjs.map +1 -0
- package/dist/{chunk-SEBYNBHW.js → chunk-R2JE6SA7.js} +9 -9
- package/dist/{chunk-D53KSJUV.js → chunk-VD2UDVF7.js} +100 -283
- package/dist/chunk-VD2UDVF7.js.map +1 -0
- package/dist/{export-BXxSGBCq.d.cts → export-DMOuzgZZ.d.cts} +8 -3
- package/dist/{export-Dm44YUvS.d.ts → export-Dul1SbPv.d.ts} +8 -3
- package/dist/{flow-COCB42TP.d.cts → flow-4-OC-UkQ.d.cts} +22 -1
- package/dist/{flow-BMtHAmg4.d.ts → flow-Cb7lkPm8.d.ts} +22 -1
- package/dist/image-editor/index.cjs +1112 -1024
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +6 -6
- package/dist/image-editor/index.d.ts +6 -6
- package/dist/image-editor/index.js +124 -36
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint/index.cjs +8 -4
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +2 -2
- package/dist/paint/index.d.ts +2 -2
- package/dist/paint/index.js +7 -3
- package/dist/paint-editor/index.cjs +242 -242
- package/dist/paint-editor/index.d.cts +4 -4
- package/dist/paint-editor/index.d.ts +4 -4
- package/dist/paint-editor/index.js +4 -4
- package/dist/raster/index.cjs +6 -4
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.d.cts +2 -2
- package/dist/raster/index.d.ts +2 -2
- package/dist/raster/index.js +27 -25
- package/dist/{render-CrmHOgpo.d.ts → render-B05K68_h.d.ts} +9 -1
- package/dist/{render-B1K_OoLy.d.cts → render-DnAbIKcs.d.cts} +9 -1
- package/dist/vector/index.cjs +11272 -10183
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +135 -1
- package/dist/vector/index.d.ts +135 -1
- package/dist/vector/index.js +11179 -10090
- package/dist/vector/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-2UT4GXYA.cjs.map +0 -1
- package/dist/chunk-ARQ7PQ6Q.js.map +0 -1
- package/dist/chunk-D53KSJUV.js.map +0 -1
- package/dist/chunk-D53VQGEJ.js.map +0 -1
- package/dist/chunk-HOCPSFGA.cjs.map +0 -1
- package/dist/chunk-PAOWHJ5O.cjs.map +0 -1
- package/dist/chunk-TFOPHZ3U.cjs.map +0 -1
- package/dist/chunk-XK5LZKBD.js.map +0 -1
- /package/dist/{chunk-SEBYNBHW.js.map → chunk-R2JE6SA7.js.map} +0 -0
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
var _chunk7ISPWEJAcjs = require('./chunk-7ISPWEJA.cjs');
|
|
16
19
|
|
|
17
20
|
// src/paint/brush.ts
|
|
18
21
|
var DEFAULT_BRUSH = {
|
|
@@ -225,41 +228,41 @@ function rasterizeDab(d, hardness, rect, out) {
|
|
|
225
228
|
}
|
|
226
229
|
}
|
|
227
230
|
}
|
|
228
|
-
var TILE_PIXELS =
|
|
231
|
+
var TILE_PIXELS = _chunk7ISPWEJAcjs.TILE * _chunk7ISPWEJAcjs.TILE;
|
|
229
232
|
var CoverageMap = (_class2 = class {constructor() { _class2.prototype.__init4.call(this);_class2.prototype.__init5.call(this);_class2.prototype.__init6.call(this); }
|
|
230
233
|
__init4() {this.tiles = /* @__PURE__ */ new Map()}
|
|
231
234
|
__init5() {this.bounds = null}
|
|
232
235
|
__init6() {this.dirty = /* @__PURE__ */ new Set()}
|
|
233
236
|
get(x, y) {
|
|
234
|
-
const tx = Math.floor(x /
|
|
235
|
-
const ty = Math.floor(y /
|
|
236
|
-
const t = this.tiles.get(
|
|
237
|
-
return t ? t[(y - ty *
|
|
237
|
+
const tx = Math.floor(x / _chunk7ISPWEJAcjs.TILE);
|
|
238
|
+
const ty = Math.floor(y / _chunk7ISPWEJAcjs.TILE);
|
|
239
|
+
const t = this.tiles.get(_chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty));
|
|
240
|
+
return t ? t[(y - ty * _chunk7ISPWEJAcjs.TILE) * _chunk7ISPWEJAcjs.TILE + (x - tx * _chunk7ISPWEJAcjs.TILE)] : 0;
|
|
238
241
|
}
|
|
239
242
|
/** Builds up `vals` (over `rect`) with flow towards `ceil`: `c ← c + v·(ceil − c)`. */
|
|
240
243
|
accumulate(rect, vals, ceil) {
|
|
241
244
|
if (rect.width <= 0 || rect.height <= 0) return;
|
|
242
245
|
const w = rect.width;
|
|
243
|
-
const tx0 = Math.floor(rect.x /
|
|
244
|
-
const ty0 = Math.floor(rect.y /
|
|
245
|
-
const tx1 = Math.floor((rect.x + rect.width - 1) /
|
|
246
|
-
const ty1 = Math.floor((rect.y + rect.height - 1) /
|
|
246
|
+
const tx0 = Math.floor(rect.x / _chunk7ISPWEJAcjs.TILE);
|
|
247
|
+
const ty0 = Math.floor(rect.y / _chunk7ISPWEJAcjs.TILE);
|
|
248
|
+
const tx1 = Math.floor((rect.x + rect.width - 1) / _chunk7ISPWEJAcjs.TILE);
|
|
249
|
+
const ty1 = Math.floor((rect.y + rect.height - 1) / _chunk7ISPWEJAcjs.TILE);
|
|
247
250
|
let touched = false;
|
|
248
251
|
for (let ty = ty0; ty <= ty1; ty++) {
|
|
249
252
|
for (let tx = tx0; tx <= tx1; tx++) {
|
|
250
|
-
const x0 = Math.max(rect.x, tx *
|
|
251
|
-
const y0 = Math.max(rect.y, ty *
|
|
252
|
-
const x1 = Math.min(rect.x + rect.width, tx *
|
|
253
|
-
const y1 = Math.min(rect.y + rect.height, ty *
|
|
253
|
+
const x0 = Math.max(rect.x, tx * _chunk7ISPWEJAcjs.TILE);
|
|
254
|
+
const y0 = Math.max(rect.y, ty * _chunk7ISPWEJAcjs.TILE);
|
|
255
|
+
const x1 = Math.min(rect.x + rect.width, tx * _chunk7ISPWEJAcjs.TILE + _chunk7ISPWEJAcjs.TILE);
|
|
256
|
+
const y1 = Math.min(rect.y + rect.height, ty * _chunk7ISPWEJAcjs.TILE + _chunk7ISPWEJAcjs.TILE);
|
|
254
257
|
let tile;
|
|
255
258
|
for (let y = y0; y < y1; y++) {
|
|
256
259
|
const row = (y - rect.y) * w;
|
|
257
|
-
const trow = (y - ty *
|
|
260
|
+
const trow = (y - ty * _chunk7ISPWEJAcjs.TILE) * _chunk7ISPWEJAcjs.TILE;
|
|
258
261
|
for (let x = x0; x < x1; x++) {
|
|
259
262
|
const v = vals[row + (x - rect.x)];
|
|
260
263
|
if (v <= 0) continue;
|
|
261
264
|
if (!tile) {
|
|
262
|
-
const key =
|
|
265
|
+
const key = _chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty);
|
|
263
266
|
tile = this.tiles.get(key);
|
|
264
267
|
if (!tile) {
|
|
265
268
|
tile = new Float32Array(TILE_PIXELS);
|
|
@@ -268,7 +271,7 @@ var CoverageMap = (_class2 = class {constructor() { _class2.prototype.__init4.ca
|
|
|
268
271
|
this.dirty.add(key);
|
|
269
272
|
touched = true;
|
|
270
273
|
}
|
|
271
|
-
const ti = trow + (x - tx *
|
|
274
|
+
const ti = trow + (x - tx * _chunk7ISPWEJAcjs.TILE);
|
|
272
275
|
const c = tile[ti];
|
|
273
276
|
if (ceil > c) tile[ti] = c + v * (ceil - c);
|
|
274
277
|
}
|
|
@@ -340,35 +343,35 @@ var StrokeCoverage = (_class3 = class {
|
|
|
340
343
|
}, _class3);
|
|
341
344
|
function applyStrokeToTile(coverage, tileData, channels, tx, ty, s, options = {}) {
|
|
342
345
|
const out = options.into ? new Uint8ClampedArray(options.into) : new Uint8ClampedArray(tileData);
|
|
343
|
-
const ox = tx *
|
|
344
|
-
const oy = ty *
|
|
346
|
+
const ox = tx * _chunk7ISPWEJAcjs.TILE + s.offset.x;
|
|
347
|
+
const oy = ty * _chunk7ISPWEJAcjs.TILE + s.offset.y;
|
|
345
348
|
let x0 = 0;
|
|
346
349
|
let y0 = 0;
|
|
347
|
-
let x1 =
|
|
348
|
-
let y1 =
|
|
350
|
+
let x1 = _chunk7ISPWEJAcjs.TILE;
|
|
351
|
+
let y1 = _chunk7ISPWEJAcjs.TILE;
|
|
349
352
|
if (options.region) {
|
|
350
353
|
const r = options.region;
|
|
351
354
|
x0 = Math.max(0, Math.floor(r.x) - ox);
|
|
352
355
|
y0 = Math.max(0, Math.floor(r.y) - oy);
|
|
353
|
-
x1 = Math.min(
|
|
354
|
-
y1 = Math.min(
|
|
356
|
+
x1 = Math.min(_chunk7ISPWEJAcjs.TILE, Math.ceil(r.x + r.width) - ox);
|
|
357
|
+
y1 = Math.min(_chunk7ISPWEJAcjs.TILE, Math.ceil(r.y + r.height) - oy);
|
|
355
358
|
if (x1 <= x0 || y1 <= y0) return out;
|
|
356
359
|
if (options.into) {
|
|
357
|
-
for (let y = y0; y < y1; y++) out.set(tileData.subarray((y *
|
|
360
|
+
for (let y = y0; y < y1; y++) out.set(tileData.subarray((y * _chunk7ISPWEJAcjs.TILE + x0) * channels, (y * _chunk7ISPWEJAcjs.TILE + x1) * channels), (y * _chunk7ISPWEJAcjs.TILE + x0) * channels);
|
|
358
361
|
}
|
|
359
362
|
}
|
|
360
363
|
const sel = s.selection;
|
|
361
364
|
const cb = [0, 0, 0, 0];
|
|
362
365
|
const cs = [s.color[0] / 255, s.color[1] / 255, s.color[2] / 255, s.color[3] / 255];
|
|
363
366
|
const bg = [s.background[0] / 255, s.background[1] / 255, s.background[2] / 255, s.background[3] / 255];
|
|
364
|
-
const aligned = s.offset.x %
|
|
365
|
-
const covTile = aligned ? coverage.tiles.get(
|
|
367
|
+
const aligned = s.offset.x % _chunk7ISPWEJAcjs.TILE === 0 && s.offset.y % _chunk7ISPWEJAcjs.TILE === 0;
|
|
368
|
+
const covTile = aligned ? coverage.tiles.get(_chunk7ISPWEJAcjs.tileKey.call(void 0, Math.floor(ox / _chunk7ISPWEJAcjs.TILE), Math.floor(oy / _chunk7ISPWEJAcjs.TILE))) : void 0;
|
|
366
369
|
if (aligned && !covTile) return out;
|
|
367
370
|
for (let y = y0; y < y1; y++) {
|
|
368
371
|
const dy = oy + y;
|
|
369
372
|
for (let x = x0; x < x1; x++) {
|
|
370
373
|
const dx = ox + x;
|
|
371
|
-
const c = covTile ? covTile[y *
|
|
374
|
+
const c = covTile ? covTile[y * _chunk7ISPWEJAcjs.TILE + x] : coverage.get(dx, dy);
|
|
372
375
|
if (c <= 0) continue;
|
|
373
376
|
let k = c * s.opacity;
|
|
374
377
|
if (sel) {
|
|
@@ -377,7 +380,7 @@ function applyStrokeToTile(coverage, tileData, channels, tx, ty, s, options = {}
|
|
|
377
380
|
}
|
|
378
381
|
if (k > 1) k = 1;
|
|
379
382
|
if (k <= 0) continue;
|
|
380
|
-
const p = y *
|
|
383
|
+
const p = y * _chunk7ISPWEJAcjs.TILE + x;
|
|
381
384
|
if (channels === 1) {
|
|
382
385
|
const target = s.mode === "erase" ? s.background[0] : s.color[0];
|
|
383
386
|
out[p] = Math.round(out[p] + (target - out[p]) * k);
|
|
@@ -395,7 +398,7 @@ function applyStrokeToTile(coverage, tileData, channels, tx, ty, s, options = {}
|
|
|
395
398
|
const as = src[3] * k;
|
|
396
399
|
if (!(as > 0)) continue;
|
|
397
400
|
const ao = as + out[i + 3] / 255 * (1 - as);
|
|
398
|
-
|
|
401
|
+
_chunk7ISPWEJAcjs.mixPigment8.call(void 0, out[i], out[i + 1], out[i + 2], bytes[0], bytes[1], bytes[2], as / ao, cb);
|
|
399
402
|
out[i] = Math.round(cb[0] * 255);
|
|
400
403
|
out[i + 1] = Math.round(cb[1] * 255);
|
|
401
404
|
out[i + 2] = Math.round(cb[2] * 255);
|
|
@@ -403,7 +406,7 @@ function applyStrokeToTile(coverage, tileData, channels, tx, ty, s, options = {}
|
|
|
403
406
|
continue;
|
|
404
407
|
}
|
|
405
408
|
for (let ch = 0; ch < 4; ch++) cb[ch] = out[i + ch] / 255;
|
|
406
|
-
const o =
|
|
409
|
+
const o = _chunk7ISPWEJAcjs.blendPixel.call(void 0, s.blend, cb, src, k);
|
|
407
410
|
out[i] = Math.round(o[0] * 255);
|
|
408
411
|
out[i + 1] = Math.round(o[1] * 255);
|
|
409
412
|
out[i + 2] = Math.round(o[2] * 255);
|
|
@@ -412,8 +415,81 @@ function applyStrokeToTile(coverage, tileData, channels, tx, ty, s, options = {}
|
|
|
412
415
|
}
|
|
413
416
|
return out;
|
|
414
417
|
}
|
|
418
|
+
function applyStrokeToDeepTile(coverage, samples, tx, ty, s, options = {}) {
|
|
419
|
+
const linear = samples instanceof Float32Array;
|
|
420
|
+
const scale = linear ? 1 : 65535;
|
|
421
|
+
const out = (_nullishCoalesce(options.into, () => ( samples))).slice();
|
|
422
|
+
const ox = tx * _chunk7ISPWEJAcjs.TILE + s.offset.x;
|
|
423
|
+
const oy = ty * _chunk7ISPWEJAcjs.TILE + s.offset.y;
|
|
424
|
+
let x0 = 0;
|
|
425
|
+
let y0 = 0;
|
|
426
|
+
let x1 = _chunk7ISPWEJAcjs.TILE;
|
|
427
|
+
let y1 = _chunk7ISPWEJAcjs.TILE;
|
|
428
|
+
if (options.region) {
|
|
429
|
+
const r = options.region;
|
|
430
|
+
x0 = Math.max(0, Math.floor(r.x) - ox);
|
|
431
|
+
y0 = Math.max(0, Math.floor(r.y) - oy);
|
|
432
|
+
x1 = Math.min(_chunk7ISPWEJAcjs.TILE, Math.ceil(r.x + r.width) - ox);
|
|
433
|
+
y1 = Math.min(_chunk7ISPWEJAcjs.TILE, Math.ceil(r.y + r.height) - oy);
|
|
434
|
+
if (x1 <= x0 || y1 <= y0) return out;
|
|
435
|
+
if (options.into) for (let y = y0; y < y1; y++) out.set(samples.subarray((y * _chunk7ISPWEJAcjs.TILE + x0) * 4, (y * _chunk7ISPWEJAcjs.TILE + x1) * 4), (y * _chunk7ISPWEJAcjs.TILE + x0) * 4);
|
|
436
|
+
}
|
|
437
|
+
const colour = (c) => {
|
|
438
|
+
const v = [c[0] / 255, c[1] / 255, c[2] / 255, c[3] / 255];
|
|
439
|
+
if (linear) for (let k = 0; k < 3; k++) v[k] = _chunk7ISPWEJAcjs.srgbDecode.call(void 0, v[k]);
|
|
440
|
+
return v;
|
|
441
|
+
};
|
|
442
|
+
const src = colour(s.mode === "erase" ? s.background : s.color);
|
|
443
|
+
const sel = s.selection;
|
|
444
|
+
const cb = [0, 0, 0, 0];
|
|
445
|
+
const mix = [0, 0, 0];
|
|
446
|
+
const encCb = [0, 0, 0];
|
|
447
|
+
const encSrc = linear ? [_chunk7ISPWEJAcjs.srgbEncode.call(void 0, src[0]), _chunk7ISPWEJAcjs.srgbEncode.call(void 0, src[1]), _chunk7ISPWEJAcjs.srgbEncode.call(void 0, src[2])] : src;
|
|
448
|
+
const put = (i, v) => {
|
|
449
|
+
out[i] = linear ? v : v <= 0 ? 0 : v >= 1 ? 65535 : Math.round(v * 65535);
|
|
450
|
+
};
|
|
451
|
+
for (let y = y0; y < y1; y++) {
|
|
452
|
+
const dy = oy + y;
|
|
453
|
+
for (let x = x0; x < x1; x++) {
|
|
454
|
+
const dx = ox + x;
|
|
455
|
+
const c = coverage.get(dx, dy);
|
|
456
|
+
if (c <= 0) continue;
|
|
457
|
+
let k = c * s.opacity;
|
|
458
|
+
if (sel) {
|
|
459
|
+
if (dx < 0 || dy < 0 || dx >= sel.width || dy >= sel.height) continue;
|
|
460
|
+
k *= sel.data[dy * sel.width + dx] / 255;
|
|
461
|
+
}
|
|
462
|
+
if (k > 1) k = 1;
|
|
463
|
+
if (k <= 0) continue;
|
|
464
|
+
const i = (y * _chunk7ISPWEJAcjs.TILE + x) * 4;
|
|
465
|
+
if (s.mode === "erase" && !s.lockTransparency) {
|
|
466
|
+
put(i + 3, out[i + 3] / scale * (1 - k));
|
|
467
|
+
if (out[i + 3] === 0) out[i] = out[i + 1] = out[i + 2] = 0;
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
if (s.lockTransparency && out[i + 3] === 0) continue;
|
|
471
|
+
for (let ch = 0; ch < 4; ch++) cb[ch] = out[i + ch] / scale;
|
|
472
|
+
if (s.blend === "pigment") {
|
|
473
|
+
const as = src[3] * k;
|
|
474
|
+
if (!(as > 0)) continue;
|
|
475
|
+
const ao = as + cb[3] * (1 - as);
|
|
476
|
+
for (let ch = 0; ch < 3; ch++) encCb[ch] = linear ? _chunk7ISPWEJAcjs.srgbEncode.call(void 0, cb[ch]) : cb[ch];
|
|
477
|
+
_chunk7ISPWEJAcjs.mixPigmentRgb.call(void 0, encCb, encSrc, as / ao, mix);
|
|
478
|
+
for (let ch = 0; ch < 3; ch++) put(i + ch, linear ? _chunk7ISPWEJAcjs.srgbDecode.call(void 0, mix[ch]) : mix[ch]);
|
|
479
|
+
if (!s.lockTransparency) put(i + 3, ao);
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
const o = _chunk7ISPWEJAcjs.blendPixel.call(void 0, s.blend, cb, src, k);
|
|
483
|
+
put(i, o[0]);
|
|
484
|
+
put(i + 1, o[1]);
|
|
485
|
+
put(i + 2, o[2]);
|
|
486
|
+
if (!s.lockTransparency) put(i + 3, o[3]);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
return out;
|
|
490
|
+
}
|
|
415
491
|
function coverageTileCoord(key) {
|
|
416
|
-
return
|
|
492
|
+
return _chunk7ISPWEJAcjs.tileCoord.call(void 0, key);
|
|
417
493
|
}
|
|
418
494
|
|
|
419
495
|
// src/paint/exchange.ts
|
|
@@ -430,7 +506,7 @@ var PaintExchange = (_class4 = class {
|
|
|
430
506
|
this.reservoir = load.reservoir ? [load.reservoir[0], load.reservoir[1], load.reservoir[2]] : null;
|
|
431
507
|
this.amount = this.reservoir ? Math.min(1, Math.max(0, load.amount)) : 0;
|
|
432
508
|
this.well = load.pickup ? [load.pickup[0], load.pickup[1], load.pickup[2]] : null;
|
|
433
|
-
this.pig = rates.mixing === "pigment" ? { res:
|
|
509
|
+
this.pig = rates.mixing === "pigment" ? { res: _chunk7ISPWEJAcjs.createPigment.call(void 0, _nullishCoalesce(this.reservoir, () => ( [0, 0, 0]))), well: _chunk7ISPWEJAcjs.createPigment.call(void 0, _nullishCoalesce(this.well, () => ( [0, 0, 0]))), paint: _chunk7ISPWEJAcjs.createPigment.call(void 0, [0, 0, 0]), canvas: _chunk7ISPWEJAcjs.createPigment.call(void 0, [0, 0, 0]) } : null;
|
|
434
510
|
}
|
|
435
511
|
|
|
436
512
|
|
|
@@ -460,21 +536,21 @@ var PaintExchange = (_class4 = class {
|
|
|
460
536
|
this.reservoir[1] = g;
|
|
461
537
|
this.reservoir[2] = b;
|
|
462
538
|
}
|
|
463
|
-
if (this.pig)
|
|
539
|
+
if (this.pig) _chunk7ISPWEJAcjs.setPigmentColor.call(void 0, this.pig.res, r, g, b);
|
|
464
540
|
}
|
|
465
541
|
/** `a` mixed `t` of the way to `b` into `this.out`, by the mixing model. */
|
|
466
542
|
mix(a, pa, b, pb, t) {
|
|
467
543
|
const o = this.out;
|
|
468
|
-
if (pa && pb)
|
|
544
|
+
if (pa && pb) _chunk7ISPWEJAcjs.lerpPigmentInto.call(void 0, pa, pb, t, o, 0);
|
|
469
545
|
else for (let c = 0; c < 3; c++) o[c] = a[c] + (b[c] - a[c]) * t;
|
|
470
546
|
return o;
|
|
471
547
|
}
|
|
472
548
|
/** `a` mixed `t` of the way to `b` (sRGB 0..1) by the mixing model, into `out`. */
|
|
473
549
|
mixColors(a, b, t, out) {
|
|
474
550
|
if (this.pig) {
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
551
|
+
_chunk7ISPWEJAcjs.setPigmentColor.call(void 0, this.pig.canvas, a[0], a[1], a[2]);
|
|
552
|
+
_chunk7ISPWEJAcjs.setPigmentColor.call(void 0, this.pig.paint, b[0], b[1], b[2]);
|
|
553
|
+
_chunk7ISPWEJAcjs.lerpPigmentInto.call(void 0, this.pig.canvas, this.pig.paint, t, out, 0);
|
|
478
554
|
} else for (let c = 0; c < 3; c++) out[c] = a[c] + (b[c] - a[c]) * t;
|
|
479
555
|
return out;
|
|
480
556
|
}
|
|
@@ -484,11 +560,11 @@ var PaintExchange = (_class4 = class {
|
|
|
484
560
|
const pig = this.pig;
|
|
485
561
|
if (!this.well) this.well = [sample.rgb[0], sample.rgb[1], sample.rgb[2]];
|
|
486
562
|
else {
|
|
487
|
-
if (pig)
|
|
563
|
+
if (pig) _chunk7ISPWEJAcjs.setPigmentColor.call(void 0, pig.canvas, sample.rgb[0], sample.rgb[1], sample.rgb[2]);
|
|
488
564
|
const o = this.mix(this.well, _nullishCoalesce(_optionalChain([pig, 'optionalAccess', _3 => _3.well]), () => ( null)), sample.rgb, _nullishCoalesce(_optionalChain([pig, 'optionalAccess', _4 => _4.canvas]), () => ( null)), this.rates.pickup * sample.contact);
|
|
489
565
|
this.well = [o[0], o[1], o[2]];
|
|
490
566
|
}
|
|
491
|
-
if (pig)
|
|
567
|
+
if (pig) _chunk7ISPWEJAcjs.setPigmentColor.call(void 0, pig.well, this.well[0], this.well[1], this.well[2]);
|
|
492
568
|
}
|
|
493
569
|
/**
|
|
494
570
|
* 2. The dab's paint: the reservoir mixed with the well, written to `out`. Returns the total
|
|
@@ -513,7 +589,7 @@ var PaintExchange = (_class4 = class {
|
|
|
513
589
|
out[1] = c[1];
|
|
514
590
|
out[2] = c[2];
|
|
515
591
|
}
|
|
516
|
-
if (pig)
|
|
592
|
+
if (pig) _chunk7ISPWEJAcjs.setPigmentColor.call(void 0, pig.paint, out[0], out[1], out[2]);
|
|
517
593
|
return total;
|
|
518
594
|
}
|
|
519
595
|
/** 3. The reservoir drains. */
|
|
@@ -533,8 +609,8 @@ var TileMedium = (_class5 = class {
|
|
|
533
609
|
__init13() {this.ty = NaN}
|
|
534
610
|
__init14() {this.tile = null}
|
|
535
611
|
__init15() {this.writable = false}
|
|
536
|
-
__init16() {this.canvasPig =
|
|
537
|
-
__init17() {this.paintPig =
|
|
612
|
+
__init16() {this.canvasPig = _chunk7ISPWEJAcjs.createPigment.call(void 0, [0, 0, 0])}
|
|
613
|
+
__init17() {this.paintPig = _chunk7ISPWEJAcjs.createPigment.call(void 0, [0, 0, 0])}
|
|
538
614
|
__init18() {this.paintKey = -1}
|
|
539
615
|
__init19() {this.cb = [0, 0, 0, 0]}
|
|
540
616
|
__init20() {this.src = [0, 0, 0, 1]}
|
|
@@ -551,15 +627,15 @@ var TileMedium = (_class5 = class {
|
|
|
551
627
|
const t = this.target;
|
|
552
628
|
const lx = dx - t.offset.x;
|
|
553
629
|
const ly = dy - t.offset.y;
|
|
554
|
-
const tx = Math.floor(lx /
|
|
555
|
-
const ty = Math.floor(ly /
|
|
630
|
+
const tx = Math.floor(lx / _chunk7ISPWEJAcjs.TILE);
|
|
631
|
+
const ty = Math.floor(ly / _chunk7ISPWEJAcjs.TILE);
|
|
556
632
|
if (tx !== this.tx || ty !== this.ty || write && !this.writable) {
|
|
557
633
|
this.tx = tx;
|
|
558
634
|
this.ty = ty;
|
|
559
635
|
this.tile = write ? t.writeTile(tx, ty) : t.readTile(tx, ty);
|
|
560
636
|
this.writable = write;
|
|
561
637
|
}
|
|
562
|
-
return this.tile ? ((ly - ty *
|
|
638
|
+
return this.tile ? ((ly - ty * _chunk7ISPWEJAcjs.TILE) * _chunk7ISPWEJAcjs.TILE + (lx - tx * _chunk7ISPWEJAcjs.TILE)) * 4 : -1;
|
|
563
639
|
}
|
|
564
640
|
/** The tile `locate` last found. */
|
|
565
641
|
get pixels() {
|
|
@@ -639,7 +715,7 @@ var TileMedium = (_class5 = class {
|
|
|
639
715
|
src[0] = pr;
|
|
640
716
|
src[1] = pg;
|
|
641
717
|
src[2] = pb;
|
|
642
|
-
const r =
|
|
718
|
+
const r = _chunk7ISPWEJAcjs.blendPixel.call(void 0, blend, cb, src, k);
|
|
643
719
|
px[i] = Math.round(r[0] * 255);
|
|
644
720
|
px[i + 1] = Math.round(r[1] * 255);
|
|
645
721
|
px[i + 2] = Math.round(r[2] * 255);
|
|
@@ -654,23 +730,23 @@ var TileMedium = (_class5 = class {
|
|
|
654
730
|
o[1] = pg;
|
|
655
731
|
o[2] = pb;
|
|
656
732
|
} else if (pigment && field) {
|
|
657
|
-
|
|
733
|
+
_chunk7ISPWEJAcjs.mixPigment8.call(void 0, px[i], px[i + 1], px[i + 2], Math.round(pr * 255), Math.round(pg * 255), Math.round(pb * 255), share, o);
|
|
658
734
|
} else if (pigment) {
|
|
659
735
|
const key = px[i] << 16 | px[i + 1] << 8 | px[i + 2];
|
|
660
736
|
if (key !== lastKey) {
|
|
661
|
-
|
|
737
|
+
_chunk7ISPWEJAcjs.setPigmentColor.call(void 0, this.canvasPig, px[i] / 255, px[i + 1] / 255, px[i + 2] / 255);
|
|
662
738
|
lastKey = key;
|
|
663
739
|
}
|
|
664
740
|
let pp = paintPigment;
|
|
665
741
|
if (!pp) {
|
|
666
742
|
const pkey = Math.round(pr * 255) << 16 | Math.round(pg * 255) << 8 | Math.round(pb * 255);
|
|
667
743
|
if (pkey !== this.paintKey) {
|
|
668
|
-
|
|
744
|
+
_chunk7ISPWEJAcjs.setPigmentColor.call(void 0, this.paintPig, pr, pg, pb);
|
|
669
745
|
this.paintKey = pkey;
|
|
670
746
|
}
|
|
671
747
|
pp = this.paintPig;
|
|
672
748
|
}
|
|
673
|
-
|
|
749
|
+
_chunk7ISPWEJAcjs.lerpPigmentInto.call(void 0, this.canvasPig, pp, share, o, 0);
|
|
674
750
|
} else {
|
|
675
751
|
o[0] = px[i] / 255 + (pr - px[i] / 255) * share;
|
|
676
752
|
o[1] = px[i + 1] / 255 + (pg - px[i + 1] / 255) * share;
|
|
@@ -801,9 +877,9 @@ function blendRadius(settings, radius) {
|
|
|
801
877
|
return Math.max(1, Math.round(settings.distance * 2 * radius));
|
|
802
878
|
}
|
|
803
879
|
function createBlenderScratch() {
|
|
804
|
-
return { sums: new Float64Array(0), mix: { rgb: [0, 0, 0], strength: 1, ks: new Float32Array(
|
|
880
|
+
return { sums: new Float64Array(0), mix: { rgb: [0, 0, 0], strength: 1, ks: new Float32Array(_chunk7ISPWEJAcjs.PIGMENT_BANDS), scatter: 1 }, out: [0, 0, 0] };
|
|
805
881
|
}
|
|
806
|
-
var N =
|
|
882
|
+
var N = _chunk7ISPWEJAcjs.PIGMENT_BANDS;
|
|
807
883
|
function blenderDab(medium, rect, cov, opacity, radius, settings, scratch2) {
|
|
808
884
|
const R = blendRadius(settings, radius);
|
|
809
885
|
const W = rect.width + 2 * R;
|
|
@@ -828,7 +904,7 @@ function blenderDab(medium, rect, cov, opacity, radius, settings, scratch2) {
|
|
|
828
904
|
const a = px[i + 3] / 255;
|
|
829
905
|
if (a > 0) {
|
|
830
906
|
if (pigment) {
|
|
831
|
-
const p =
|
|
907
|
+
const p = _chunk7ISPWEJAcjs.pigment8.call(void 0, px[i], px[i + 1], px[i + 2]);
|
|
832
908
|
const sa = p.scatter * p.strength * a;
|
|
833
909
|
for (let k = 0; k < N; k++) row[k] += sa * p.ks[k];
|
|
834
910
|
row[N] += sa;
|
|
@@ -886,8 +962,8 @@ function blenderDab(medium, rect, cov, opacity, radius, settings, scratch2) {
|
|
|
886
962
|
const sa = sum(N, x1, y1, x2, y2);
|
|
887
963
|
for (let c = 0; c < N; c++) mixPig.ks[c] = sum(c, x1, y1, x2, y2) / sa;
|
|
888
964
|
mixPig.scatter = sa / asum;
|
|
889
|
-
if (a <= 0 || share >= 1)
|
|
890
|
-
else
|
|
965
|
+
if (a <= 0 || share >= 1) _chunk7ISPWEJAcjs.lerpPigmentInto.call(void 0, mixPig, mixPig, 0, out, 0);
|
|
966
|
+
else _chunk7ISPWEJAcjs.lerpPigmentInto.call(void 0, _chunk7ISPWEJAcjs.pigment8.call(void 0, px[i], px[i + 1], px[i + 2]), mixPig, share, out, 0);
|
|
891
967
|
} else {
|
|
892
968
|
for (let c = 0; c < 3; c++) {
|
|
893
969
|
const m = sum(c, x1, y1, x2, y2) / asum;
|
|
@@ -947,7 +1023,7 @@ var SmudgeTip = (_class7 = class {
|
|
|
947
1023
|
mix(a0, a1, a2, b0, b1, b2, t) {
|
|
948
1024
|
const o = this.out;
|
|
949
1025
|
if (this.settings.mixing === "pigment") {
|
|
950
|
-
|
|
1026
|
+
_chunk7ISPWEJAcjs.mixPigment8.call(void 0, Math.round(a0 * 255), Math.round(a1 * 255), Math.round(a2 * 255), Math.round(b0 * 255), Math.round(b1 * 255), Math.round(b2 * 255), t, o);
|
|
951
1027
|
} else {
|
|
952
1028
|
o[0] = a0 + (b0 - a0) * t;
|
|
953
1029
|
o[1] = a1 + (b1 - a1) * t;
|
|
@@ -1079,8 +1155,8 @@ function createPigmentTools() {
|
|
|
1079
1155
|
const rgbs = items.map((item, i) => parseHex(item.color, i));
|
|
1080
1156
|
const total = items.reduce((sum, item) => sum + item.weight, 0);
|
|
1081
1157
|
if (!(total > 0)) throw new Error("Every weight is 0; give at least one colour a weight above 0.");
|
|
1082
|
-
const pigments = rgbs.map((rgb2, i) =>
|
|
1083
|
-
const mixed =
|
|
1158
|
+
const pigments = rgbs.map((rgb2, i) => _chunk7ISPWEJAcjs.createPigment.call(void 0, rgb2, { strength: items[i].strength }));
|
|
1159
|
+
const mixed = _chunk7ISPWEJAcjs.mixPigments.call(void 0, pigments, items.map((item) => item.weight));
|
|
1084
1160
|
const lerp = [0, 1, 2].map((c) => rgbs.reduce((sum, rgb2, i) => sum + rgb2[c] * items[i].weight, 0) / total);
|
|
1085
1161
|
const rgb = args.model === "rgb";
|
|
1086
1162
|
return {
|
|
@@ -2035,7 +2111,7 @@ var WetWorld = (_class8 = class {
|
|
|
2035
2111
|
params: normalizeWetParams(_nullishCoalesce(options.params, () => ( {})), DEFAULT_WET_PARAMS),
|
|
2036
2112
|
flow: _nullishCoalesce(options.flow, () => ( null)),
|
|
2037
2113
|
flowStrength: options.flow ? _nullishCoalesce(options.flowStrength, () => ( 1)) : 0,
|
|
2038
|
-
base: _nullishCoalesce(options.base, () => ( new (0,
|
|
2114
|
+
base: _nullishCoalesce(options.base, () => ( new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, /* @__PURE__ */ new Map(), 0))),
|
|
2039
2115
|
shaded: /* @__PURE__ */ new Map(),
|
|
2040
2116
|
urgent: /* @__PURE__ */ new Set(),
|
|
2041
2117
|
stamp: 1,
|
|
@@ -2189,7 +2265,7 @@ var WetWorld = (_class8 = class {
|
|
|
2189
2265
|
}
|
|
2190
2266
|
tileKeyOf(key) {
|
|
2191
2267
|
const [tx, ty] = this.tileXY(key);
|
|
2192
|
-
return
|
|
2268
|
+
return _chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty);
|
|
2193
2269
|
}
|
|
2194
2270
|
fillPaper(key) {
|
|
2195
2271
|
const [tx, ty] = this.tileXY(key);
|
|
@@ -2456,7 +2532,7 @@ var WetWorld = (_class8 = class {
|
|
|
2456
2532
|
this.refreshHalos();
|
|
2457
2533
|
}
|
|
2458
2534
|
markEdited(lane, x0, y0, x1, y1) {
|
|
2459
|
-
for (let ty = y0 >> 8; ty <= y1 - 1 >> 8; ty++) for (let tx = x0 >> 8; tx <= x1 - 1 >> 8; tx++) lane.urgent.add(
|
|
2535
|
+
for (let ty = y0 >> 8; ty <= y1 - 1 >> 8; ty++) for (let tx = x0 >> 8; tx <= x1 - 1 >> 8; tx++) lane.urgent.add(_chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty));
|
|
2460
2536
|
lane.stamp++;
|
|
2461
2537
|
}
|
|
2462
2538
|
/** Adds water (depth units) at rest. */
|
|
@@ -2635,7 +2711,7 @@ var WetWorld = (_class8 = class {
|
|
|
2635
2711
|
if (!(this.f32[c + P_RHO * PLANE] >= DRY_EPS)) return;
|
|
2636
2712
|
const a = Math.min(1, Math.max(0, amount * w));
|
|
2637
2713
|
if (!(a > 0)) return;
|
|
2638
|
-
const key =
|
|
2714
|
+
const key = _chunk7ISPWEJAcjs.tileKey.call(void 0, x >> 8, y >> 8);
|
|
2639
2715
|
let tile = tiles.get(key);
|
|
2640
2716
|
if (!tile) return;
|
|
2641
2717
|
if (!written.has(key)) {
|
|
@@ -2643,7 +2719,7 @@ var WetWorld = (_class8 = class {
|
|
|
2643
2719
|
tiles.set(key, tile);
|
|
2644
2720
|
written.add(key);
|
|
2645
2721
|
}
|
|
2646
|
-
const i = ((y & 255) *
|
|
2722
|
+
const i = ((y & 255) * _chunk7ISPWEJAcjs.TILE + (x & 255)) * 4;
|
|
2647
2723
|
if (tile.data[i + 3] === 0) return;
|
|
2648
2724
|
pixelPigment(tile.data, i, paper, pig);
|
|
2649
2725
|
if (!(pig[0] > 0 || pig[1] > 0 || pig[2] > 0)) return;
|
|
@@ -2657,11 +2733,11 @@ var WetWorld = (_class8 = class {
|
|
|
2657
2733
|
);
|
|
2658
2734
|
if (written.size) {
|
|
2659
2735
|
for (const key of written) {
|
|
2660
|
-
const t =
|
|
2736
|
+
const t = _chunk7ISPWEJAcjs.finishTile.call(void 0, tiles.get(key).data, 4, 0);
|
|
2661
2737
|
if (t) tiles.set(key, t);
|
|
2662
2738
|
else tiles.delete(key);
|
|
2663
2739
|
}
|
|
2664
|
-
this.setBase(id, new (0,
|
|
2740
|
+
this.setBase(id, new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0));
|
|
2665
2741
|
}
|
|
2666
2742
|
}
|
|
2667
2743
|
/**
|
|
@@ -2721,15 +2797,15 @@ var WetWorld = (_class8 = class {
|
|
|
2721
2797
|
bakeKey(key, all) {
|
|
2722
2798
|
const lane = this.lanes[this.laneIndexOf(key)];
|
|
2723
2799
|
const [tx, ty] = this.tileXY(key);
|
|
2724
|
-
const tk =
|
|
2800
|
+
const tk = _chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty);
|
|
2725
2801
|
const src = _nullishCoalesce(_optionalChain([lane, 'access', _25 => _25.base, 'access', _26 => _26.tiles, 'access', _27 => _27.get, 'call', _28 => _28(tk), 'optionalAccess', _29 => _29.data]), () => ( null));
|
|
2726
2802
|
const out = this.shadeSlot(key, src, all ? "bake-all" : "bake");
|
|
2727
2803
|
if (!out) return false;
|
|
2728
2804
|
const tiles = new Map(lane.base.tiles);
|
|
2729
|
-
const t =
|
|
2805
|
+
const t = _chunk7ISPWEJAcjs.finishTile.call(void 0, out, 4, 0);
|
|
2730
2806
|
if (t) tiles.set(tk, t);
|
|
2731
2807
|
else tiles.delete(tk);
|
|
2732
|
-
this.setBase(lane.id, new (0,
|
|
2808
|
+
this.setBase(lane.id, new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0));
|
|
2733
2809
|
return true;
|
|
2734
2810
|
}
|
|
2735
2811
|
/**
|
|
@@ -2741,7 +2817,7 @@ var WetWorld = (_class8 = class {
|
|
|
2741
2817
|
const [tx, ty] = this.tileXY(key);
|
|
2742
2818
|
const b = this.slotBase(this.slotOf(key));
|
|
2743
2819
|
const cur = b + this.parity * SET_PLANES * PLANE;
|
|
2744
|
-
const out = src ? new Uint8ClampedArray(src) : new Uint8ClampedArray(
|
|
2820
|
+
const out = src ? new Uint8ClampedArray(src) : new Uint8ClampedArray(_chunk7ISPWEJAcjs.TILE * _chunk7ISPWEJAcjs.TILE * 4);
|
|
2745
2821
|
const w = Math.min(WET_TILE, this.width - tx * WET_TILE);
|
|
2746
2822
|
const h = Math.min(WET_TILE, this.height - ty * WET_TILE);
|
|
2747
2823
|
const changed = shadeTile(
|
|
@@ -2770,11 +2846,11 @@ var WetWorld = (_class8 = class {
|
|
|
2770
2846
|
const tk = this.tileKeyOf(key);
|
|
2771
2847
|
const out = this.shadeSlot(key, _nullishCoalesce(_optionalChain([lane, 'access', _30 => _30.base, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(tk), 'optionalAccess', _34 => _34.data]), () => ( null)), "bake-all");
|
|
2772
2848
|
if (!out) continue;
|
|
2773
|
-
const t =
|
|
2849
|
+
const t = _chunk7ISPWEJAcjs.finishTile.call(void 0, out, 4, 0);
|
|
2774
2850
|
if (t) tiles.set(tk, t);
|
|
2775
2851
|
else tiles.delete(tk);
|
|
2776
2852
|
}
|
|
2777
|
-
return new (0,
|
|
2853
|
+
return new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0);
|
|
2778
2854
|
}
|
|
2779
2855
|
// --- Reading -------------------------------------------------------------------
|
|
2780
2856
|
/**
|
|
@@ -2883,7 +2959,7 @@ var WetWorld = (_class8 = class {
|
|
|
2883
2959
|
const tk = this.tileKeyOf(key);
|
|
2884
2960
|
const src = _nullishCoalesce(_optionalChain([lane, 'access', _47 => _47.base, 'access', _48 => _48.tiles, 'access', _49 => _49.get, 'call', _50 => _50(tk), 'optionalAccess', _51 => _51.data]), () => ( null));
|
|
2885
2961
|
const out = this.shadeSlot(key, src, "display");
|
|
2886
|
-
const tile = out ?
|
|
2962
|
+
const tile = out ? _chunk7ISPWEJAcjs.finishTile.call(void 0, out, 4, 0) : _nullishCoalesce(lane.base.tiles.get(tk), () => ( null));
|
|
2887
2963
|
lane.shaded.set(tk, { stamp: lane.stamp, tile: _nullishCoalesce(tile, () => ( { data: new Uint8ClampedArray(0), uniform: 0 })) });
|
|
2888
2964
|
lane.shadedVersion++;
|
|
2889
2965
|
lane.urgent.delete(tk);
|
|
@@ -2900,7 +2976,7 @@ var WetWorld = (_class8 = class {
|
|
|
2900
2976
|
if (tile.data.length === 0) tiles.delete(tk);
|
|
2901
2977
|
else tiles.set(tk, tile);
|
|
2902
2978
|
}
|
|
2903
|
-
lane.display = new (0,
|
|
2979
|
+
lane.display = new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0);
|
|
2904
2980
|
lane.displayKey = displayKey;
|
|
2905
2981
|
return { surface: lane.display, changed, pending: stale.length - done };
|
|
2906
2982
|
}
|
|
@@ -2915,7 +2991,7 @@ var WetWorld = (_class8 = class {
|
|
|
2915
2991
|
const slot = this.slotOf(lane.index * perLane + ty * tilesX + tx);
|
|
2916
2992
|
if (slot < 0) return null;
|
|
2917
2993
|
const cur = this.slotBase(slot) + this.parity * SET_PLANES * PLANE;
|
|
2918
|
-
const out = new Uint8ClampedArray(
|
|
2994
|
+
const out = new Uint8ClampedArray(_chunk7ISPWEJAcjs.TILE * _chunk7ISPWEJAcjs.TILE * 4);
|
|
2919
2995
|
let any = false;
|
|
2920
2996
|
for (let y = 0; y < WET_TILE; y++) {
|
|
2921
2997
|
for (let x = 0; x < WET_TILE; x++) {
|
|
@@ -2924,7 +3000,7 @@ var WetWorld = (_class8 = class {
|
|
|
2924
3000
|
const sw = this.f32[cur + P_SW * PLANE + c];
|
|
2925
3001
|
const a = Math.min(1, rho * 2.5) * 0.7 + Math.min(1, sw * 4) * 0.2;
|
|
2926
3002
|
if (a <= 4e-3) continue;
|
|
2927
|
-
const i = (y *
|
|
3003
|
+
const i = (y * _chunk7ISPWEJAcjs.TILE + x) * 4;
|
|
2928
3004
|
out[i] = 40;
|
|
2929
3005
|
out[i + 1] = 120;
|
|
2930
3006
|
out[i + 2] = 255;
|
|
@@ -3258,5 +3334,6 @@ var WetMedium = (_class9 = class {
|
|
|
3258
3334
|
|
|
3259
3335
|
|
|
3260
3336
|
|
|
3261
|
-
|
|
3262
|
-
|
|
3337
|
+
|
|
3338
|
+
exports.DEFAULT_BRUSH = DEFAULT_BRUSH; exports.MAX_BRUSH_SIZE = MAX_BRUSH_SIZE; exports.normalizeBrush = normalizeBrush; exports.tipShape = tipShape; exports.tipFalloff = tipFalloff; exports.tipReach = tipReach; exports.dabCoverage = dabCoverage; exports.smoothPoints = smoothPoints; exports.DabWalker = DabWalker; exports.walkDabs = walkDabs; exports.dabRect = dabRect; exports.rasterizeDab = rasterizeDab; exports.CoverageMap = CoverageMap; exports.StrokeCoverage = StrokeCoverage; exports.applyStrokeToTile = applyStrokeToTile; exports.applyStrokeToDeepTile = applyStrokeToDeepTile; exports.coverageTileCoord = coverageTileCoord; exports.MIXING_MODELS = MIXING_MODELS; exports.EMPTY_MIXER_LOAD = EMPTY_MIXER_LOAD; exports.MIXER_PICKUP_RATE = MIXER_PICKUP_RATE; exports.MIXER_DRAIN = MIXER_DRAIN; exports.exchangeRates = exchangeRates; exports.PaintExchange = PaintExchange; exports.TileMedium = TileMedium; exports.DEFAULT_MIXER = DEFAULT_MIXER; exports.normalizeMixer = normalizeMixer; exports.mixerRates = mixerRates; exports.loadMixer = loadMixer; exports.cleanMixer = cleanMixer; exports.MixerStroke = MixerStroke; exports.DEFAULT_BLENDER = DEFAULT_BLENDER; exports.DEFAULT_SMUDGE = DEFAULT_SMUDGE; exports.normalizeBlender = normalizeBlender; exports.normalizeSmudge = normalizeSmudge; exports.blendRadius = blendRadius; exports.createBlenderScratch = createBlenderScratch; exports.blenderDab = blenderDab; exports.SmudgeTip = SmudgeTip; exports.createPigmentTools = createPigmentTools; exports.WET_TILE = WET_TILE; exports.SLOT_SIDE = SLOT_SIDE; exports.PLANE = PLANE; exports.PLANE_BYTES = PLANE_BYTES; exports.SET_PLANES = SET_PLANES; exports.P_RHO = P_RHO; exports.P_UX = P_UX; exports.P_UY = P_UY; exports.P_SW = P_SW; exports.P_P0 = P_P0; exports.P_EDGE = P_EDGE; exports.P_D0 = P_D0; exports.P_H = P_H; exports.P_FX = P_FX; exports.P_FY = P_FY; exports.SLOT_PLANES = SLOT_PLANES; exports.SLOT_BYTES = SLOT_BYTES; exports.PIGMENT_CHANNELS = PIGMENT_CHANNELS; exports.EX = EX; exports.EY = EY; exports.OPP = OPP; exports.W9 = W9; exports.DRY_EPS = DRY_EPS; exports.U_MAX = U_MAX; exports.STRIP = STRIP; exports.MAX_BATCH = MAX_BATCH; exports.FREE_INTERVAL = FREE_INTERVAL; exports.FLAG_ALIVE = FLAG_ALIVE; exports.FLAG_LEFT = FLAG_LEFT; exports.FLAG_RIGHT = FLAG_RIGHT; exports.FLAG_TOP = FLAG_TOP; exports.FLAG_BOTTOM = FLAG_BOTTOM; exports.FLAG_WET = FLAG_WET; exports.PARAM_FLOATS = PARAM_FLOATS; exports.PARAM = PARAM; exports.DEFAULT_WET_PARAMS = DEFAULT_WET_PARAMS; exports.WET_PARAM_KEYS = WET_PARAM_KEYS; exports.DEFAULT_WET_PAPER = DEFAULT_WET_PAPER; exports.FLAT = FLAT; exports.normalizeWetParams = normalizeWetParams; exports.normalizeTilt = normalizeTilt; exports.latticeViscosity = latticeViscosity; exports.PAPER_CAPACITY = PAPER_CAPACITY; exports.MAX_TILT_ACCEL = MAX_TILT_ACCEL; exports.packWetParams = packWetParams; exports.edgeBits = edgeBits; exports.PIGMENT_UNIT = PIGMENT_UNIT; exports.HIDE = HIDE; exports.BODY_SCATTER = BODY_SCATTER; exports.dexp = dexp; exports.dlog = dlog; exports.dpow = dpow; exports.SRGB_TO_LINEAR = SRGB_TO_LINEAR; exports.srgbByteToLinear = srgbByteToLinear; exports.linearToSrgb8 = linearToSrgb8; exports.pigmentOf = pigmentOf; exports.expNeg = expNeg; exports.filmReflectance = filmReflectance; exports.pigmentColor = pigmentColor; exports.filmPixel = filmPixel; exports.pixelPigment = pixelPigment; exports.shadeTile = shadeTile; exports.stepSlotTs = stepSlotTs; exports.loadWetKernel = loadWetKernel; exports.canShareMemory = canShareMemory; exports.wetSimdSupported = wetSimdSupported; exports.wetSupport = wetSupport; exports.WetWorkerPool = WetWorkerPool; exports.MAX_WET_LANES = MAX_WET_LANES; exports.MAX_WET_SLOTS = MAX_WET_SLOTS; exports.WetWorldError = WetWorldError; exports.WetWorld = WetWorld; exports.WET_FLOW_KINDS = WET_FLOW_KINDS; exports.DEFAULT_FLOW = DEFAULT_FLOW; exports.dsincos = dsincos; exports.normalizeFlow = normalizeFlow; exports.flowField = flowField; exports.WetMedium = WetMedium;
|
|
3339
|
+
//# sourceMappingURL=chunk-L2T6EJ5S.cjs.map
|