@pixerate/editor 0.108.0 → 0.109.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation/index.cjs +5 -5
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.js +9 -9
- package/dist/animation-editor/index.cjs +59 -59
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +2 -1
- package/dist/animation-editor/index.d.ts +2 -1
- package/dist/animation-editor/index.js +29 -29
- package/dist/canvas/index.cjs +27 -27
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.js +11 -11
- package/dist/{chunk-2FGRTYJN.cjs → chunk-477UVMNR.cjs} +3 -3
- package/dist/{chunk-2FGRTYJN.cjs.map → chunk-477UVMNR.cjs.map} +1 -1
- package/dist/{chunk-T3QZ6S47.cjs → chunk-AZTZRLDI.cjs} +40 -2
- package/dist/chunk-AZTZRLDI.cjs.map +1 -0
- package/dist/{chunk-HUQ7EHVI.js → chunk-BLWCAQCW.js} +723 -1975
- package/dist/chunk-BLWCAQCW.js.map +1 -0
- package/dist/{chunk-G4BIYE6R.js → chunk-CFMWALBM.js} +39 -1
- package/dist/chunk-CFMWALBM.js.map +1 -0
- package/dist/{chunk-FRD3FUXI.cjs → chunk-D37BX2ZA.cjs} +2081 -460
- package/dist/chunk-D37BX2ZA.cjs.map +1 -0
- package/dist/chunk-JLYX4V57.cjs +2001 -0
- package/dist/chunk-JLYX4V57.cjs.map +1 -0
- package/dist/chunk-KB2YBCVS.js +2001 -0
- package/dist/chunk-KB2YBCVS.js.map +1 -0
- package/dist/{chunk-SOROZ2BF.js → chunk-RE77QYUF.js} +1938 -317
- package/dist/chunk-RE77QYUF.js.map +1 -0
- package/dist/{chunk-UTEVPQTS.cjs → chunk-W3GXSUSQ.cjs} +746 -1998
- package/dist/chunk-W3GXSUSQ.cjs.map +1 -0
- package/dist/{chunk-JK6M6V7G.js → chunk-Z3YWVUWT.js} +4 -4
- package/dist/{export-a9bnF7Cl.d.ts → export-BLPLaE6Z.d.ts} +417 -16
- package/dist/{export-JGWQEPJn.d.cts → export-DSUc4fQD.d.cts} +417 -16
- package/dist/image-editor/index.cjs +1527 -1001
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +73 -9
- package/dist/image-editor/index.d.ts +73 -9
- package/dist/image-editor/index.js +814 -288
- package/dist/image-editor/index.js.map +1 -1
- package/dist/paint-editor/index.cjs +56 -53
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +5 -2
- package/dist/paint-editor/index.d.ts +5 -2
- package/dist/paint-editor/index.js +6 -3
- package/dist/paint-editor/index.js.map +1 -1
- package/dist/raster/index.cjs +4 -2
- package/dist/raster/index.cjs.map +1 -1
- package/dist/raster/index.d.cts +3 -129
- package/dist/raster/index.d.ts +3 -129
- package/dist/raster/index.js +3 -1
- package/dist/{compositor-D92URMlm.d.cts → render-C-fO_mes.d.cts} +135 -1
- package/dist/{compositor-Kt_M4ruo.d.ts → render-OLIMk_v0.d.ts} +135 -1
- package/dist/{svg-SseJTIrA.d.ts → svg-D_cfkhlB.d.cts} +3 -629
- package/dist/{svg-ClVIG4T7.d.cts → svg-wIaKLrU0.d.ts} +3 -629
- package/dist/types-DtL_qLFz.d.ts +630 -0
- package/dist/types-DyQq-WPY.d.cts +630 -0
- package/dist/vector/index.cjs +563 -563
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +4 -2
- package/dist/vector/index.d.ts +4 -2
- package/dist/vector/index.js +69 -69
- package/dist/video-editor/index.cjs +3 -3
- package/dist/video-editor/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-DWGZUSES.cjs +0 -694
- package/dist/chunk-DWGZUSES.cjs.map +0 -1
- package/dist/chunk-FRD3FUXI.cjs.map +0 -1
- package/dist/chunk-G4BIYE6R.js.map +0 -1
- package/dist/chunk-HUQ7EHVI.js.map +0 -1
- package/dist/chunk-KKREERP2.js +0 -694
- package/dist/chunk-KKREERP2.js.map +0 -1
- package/dist/chunk-SOROZ2BF.js.map +0 -1
- package/dist/chunk-T3QZ6S47.cjs.map +0 -1
- package/dist/chunk-UTEVPQTS.cjs.map +0 -1
- /package/dist/{chunk-JK6M6V7G.js.map → chunk-Z3YWVUWT.js.map} +0 -0
|
@@ -1809,6 +1809,43 @@ function paintFill(dst, m, f, frame, env, mode, opacity) {
|
|
|
1809
1809
|
else if (f.type === "gradient") paintGradient(dst, m, f.gradient, f.gradient.align ? frame : env.canvas, env, mode, opacity);
|
|
1810
1810
|
else paintPattern(dst, m, f, env, mode, opacity);
|
|
1811
1811
|
}
|
|
1812
|
+
function effectFillColors(fill2, rect, frame, canvas, anchor, ctx) {
|
|
1813
|
+
const n = rect.width * rect.height;
|
|
1814
|
+
const out = new Float32Array(n * 4);
|
|
1815
|
+
const c = [0, 0, 0, 1];
|
|
1816
|
+
const { x: rx, y: ry, width: w } = rect;
|
|
1817
|
+
if (fill2.type === "color") {
|
|
1818
|
+
const [r, g, b] = rgbOf(fill2.color);
|
|
1819
|
+
for (let i = 0; i < n * 4; i += 4) {
|
|
1820
|
+
out[i] = r;
|
|
1821
|
+
out[i + 1] = g;
|
|
1822
|
+
out[i + 2] = b;
|
|
1823
|
+
out[i + 3] = 1;
|
|
1824
|
+
}
|
|
1825
|
+
return out;
|
|
1826
|
+
}
|
|
1827
|
+
if (fill2.type === "gradient") {
|
|
1828
|
+
const gr = fill2.gradient;
|
|
1829
|
+
const f = gr.align ? frame : canvas;
|
|
1830
|
+
const prepared = new PreparedGradient(gr);
|
|
1831
|
+
const [angle, scale, offset] = gradientLayout(gr.style, gr.angle, gr.scale, gr.offset, f);
|
|
1832
|
+
for (let i = 0; i < n; i++) {
|
|
1833
|
+
prepared.sample(gradientT(gr.style, angle, scale, gr.reverse, offset, f, rx + i % w + 0.5, ry + Math.floor(i / w) + 0.5), c);
|
|
1834
|
+
out.set(c, i * 4);
|
|
1835
|
+
}
|
|
1836
|
+
return out;
|
|
1837
|
+
}
|
|
1838
|
+
const tile = ctx.pattern(fill2.patternId);
|
|
1839
|
+
if (!tile) return out;
|
|
1840
|
+
const place = new PatternPlacement(anchor, fill2.link ?? true, fill2.phase ?? { x: 0, y: 0 }, fill2.scale, fill2.angle ?? 0);
|
|
1841
|
+
const uv = [0, 0];
|
|
1842
|
+
for (let i = 0; i < n; i++) {
|
|
1843
|
+
place.map(rx + i % w + 0.5, ry + Math.floor(i / w) + 0.5, uv);
|
|
1844
|
+
tile.sample(uv[0], uv[1], c);
|
|
1845
|
+
out.set(c, i * 4);
|
|
1846
|
+
}
|
|
1847
|
+
return out;
|
|
1848
|
+
}
|
|
1812
1849
|
function paintGlow(dst, m, g, env) {
|
|
1813
1850
|
if (g.fill.type === "color") return paintColor(dst, m, g.fill.color, g.blend, g.opacity);
|
|
1814
1851
|
const prepared = new PreparedGradient(g.fill.gradient);
|
|
@@ -4623,6 +4660,7 @@ export {
|
|
|
4623
4660
|
buildEffectMaps,
|
|
4624
4661
|
patchEffectMaps,
|
|
4625
4662
|
gradientT,
|
|
4663
|
+
effectFillColors,
|
|
4626
4664
|
compositeLayerEffects,
|
|
4627
4665
|
renderLayerEffects,
|
|
4628
4666
|
blendTile,
|
|
@@ -4652,4 +4690,4 @@ export {
|
|
|
4652
4690
|
parseDataUrl,
|
|
4653
4691
|
pngDataUrl
|
|
4654
4692
|
};
|
|
4655
|
-
//# sourceMappingURL=chunk-
|
|
4693
|
+
//# sourceMappingURL=chunk-CFMWALBM.js.map
|