@pixerate/editor 0.267.0 → 0.268.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/animation-editor/index.cjs +62 -62
- package/dist/animation-editor/index.js +6 -6
- package/dist/brushes/index.cjs +198 -72
- package/dist/brushes/index.d.cts +4 -3
- package/dist/brushes/index.d.ts +4 -3
- package/dist/brushes/index.js +136 -10
- package/dist/brushes/library.d.cts +27 -1
- package/dist/brushes/library.d.ts +27 -1
- package/dist/brushes/profiles.d.cts +4 -0
- package/dist/brushes/profiles.d.ts +4 -0
- package/dist/brushes/schema.d.cts +4 -0
- package/dist/brushes/schema.d.ts +4 -0
- package/dist/brushes/sources.d.cts +114 -0
- package/dist/brushes/sources.d.ts +114 -0
- package/dist/brushes/types.d.cts +37 -5
- package/dist/brushes/types.d.ts +37 -5
- package/dist/brushes/ui.d.cts +40 -4
- package/dist/brushes/ui.d.ts +40 -4
- package/dist/{brushstrokeRender-NLFPEBGI.js → brushstrokeRender-A727TTNQ.js} +6 -6
- package/dist/{brushstrokeRender-L7JYRR2R.cjs → brushstrokeRender-WR2N5HHY.cjs} +22 -22
- package/dist/canvas/index.cjs +13 -13
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-J2TNIZ55.cjs → chunk-2WOGXEDX.cjs} +1 -1
- package/dist/{chunk-JGWVZPT6.js → chunk-3XDSNIGF.js} +72 -5
- package/dist/{chunk-EXB2EGBE.cjs → chunk-62MFUHSI.cjs} +16 -16
- package/dist/{chunk-GCVFEPJG.js → chunk-ACTHSQOI.js} +182 -0
- package/dist/{chunk-EF7LZAXQ.js → chunk-BAZMCFVL.js} +1 -1
- package/dist/{chunk-HIO6E7LC.cjs → chunk-BPJSI4NT.cjs} +2 -2
- package/dist/{chunk-XVOP3CGQ.cjs → chunk-EU2ZZA6L.cjs} +393 -62
- package/dist/{chunk-YIC6MAJ2.js → chunk-HFY5LG5J.js} +1 -1
- package/dist/{chunk-7UKFXXWL.js → chunk-HVO6XCI4.js} +1 -1
- package/dist/{chunk-LHPEG5AU.cjs → chunk-J4GXP53R.cjs} +140 -91
- package/dist/{chunk-OKHKA43L.cjs → chunk-JBB3GDBB.cjs} +330 -216
- package/dist/{chunk-AGNUD5BI.js → chunk-KZI3YWKW.js} +351 -20
- package/dist/{chunk-FGJHJIMN.js → chunk-LDOD7VCT.js} +59 -10
- package/dist/{chunk-EYSHTYLG.js → chunk-LETF75CA.js} +1 -1
- package/dist/{chunk-FQPUF2W2.cjs → chunk-NIBFKXMD.cjs} +217 -35
- package/dist/{chunk-G7NHE2VD.cjs → chunk-NPWWSCWT.cjs} +35 -35
- package/dist/{chunk-OSEXT7JL.js → chunk-QNY7BDFP.js} +1 -1
- package/dist/{chunk-PXDIAYB6.cjs → chunk-STLTOISW.cjs} +34 -214
- package/dist/{chunk-4IDUYB45.js → chunk-UVTO3D4E.js} +130 -16
- package/dist/{chunk-TXFWZ5ZJ.js → chunk-W6JDUXP3.js} +4 -184
- package/dist/{chunk-LA5Y4ETA.cjs → chunk-YOVXQHA3.cjs} +23 -23
- package/dist/{chunk-DT4YQUGT.cjs → chunk-YXP6X3SY.cjs} +101 -34
- package/dist/image-editor/adjustment-layers.d.cts +8 -0
- package/dist/image-editor/adjustment-layers.d.ts +8 -0
- package/dist/image-editor/index.cjs +857 -853
- package/dist/image-editor/index.js +30 -26
- package/dist/paint/index.cjs +5 -5
- package/dist/paint/index.js +11 -11
- package/dist/paint-editor/brush-library-tools.d.cts +12 -2
- package/dist/paint-editor/brush-library-tools.d.ts +12 -2
- package/dist/paint-editor/brush-model.d.cts +29 -1
- package/dist/paint-editor/brush-model.d.ts +29 -1
- package/dist/paint-editor/brush-source-art.d.cts +32 -0
- package/dist/paint-editor/brush-source-art.d.ts +32 -0
- package/dist/paint-editor/controller.d.cts +6 -1
- package/dist/paint-editor/controller.d.ts +6 -1
- package/dist/paint-editor/dab-stroke.d.cts +2 -0
- package/dist/paint-editor/dab-stroke.d.ts +2 -0
- package/dist/paint-editor/engine.d.cts +11 -2
- package/dist/paint-editor/engine.d.ts +11 -2
- package/dist/paint-editor/index.cjs +576 -481
- package/dist/paint-editor/index.d.cts +3 -1
- package/dist/paint-editor/index.d.ts +3 -1
- package/dist/paint-editor/index.js +127 -32
- package/dist/paint-editor/stamp-tip.d.cts +8 -5
- package/dist/paint-editor/stamp-tip.d.ts +8 -5
- package/dist/paint-editor/thumbnails.d.cts +6 -0
- package/dist/paint-editor/thumbnails.d.ts +6 -0
- package/dist/paint-editor/tip-grain.d.cts +34 -0
- package/dist/paint-editor/tip-grain.d.ts +34 -0
- package/dist/raster/index.cjs +2 -2
- package/dist/raster/index.js +9 -9
- package/dist/vector/index.cjs +1002 -1002
- package/dist/vector/index.js +7 -7
- package/package.json +110 -1
- package/skills/pixerate-brushes/SKILL.md +35 -8
- package/skills/pixerate-brushes-design/SKILL.md +8 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +6 -0
- package/skills/pixerate-paint-editor/references/brush-facets.md +3 -1
- package/skills/pixerate-paint-sketch-to-finish/SKILL.md +1 -0
|
@@ -39,7 +39,8 @@ import { type PaintGuides, type PerspectiveGuide, type ReferenceImage, type Symm
|
|
|
39
39
|
import { MixingPad, type MixingPadTool, type PadMixOptions } from './mixing-pad.js';
|
|
40
40
|
import { type Stencil, type StencilInput } from './stencils.js';
|
|
41
41
|
import { type Sticker } from './stickers.js';
|
|
42
|
-
import { type StickerRasterizer } from './sticker-art.js';
|
|
42
|
+
import { type StickerArtLookup, type StickerRasterizer } from './sticker-art.js';
|
|
43
|
+
import { BrushSourceArtCache } from './brush-source-art.js';
|
|
43
44
|
import { StickersSlot } from '../stickers/helpers.js';
|
|
44
45
|
import type { StickerProvider, StickerRef } from '../stickers/types.js';
|
|
45
46
|
import { type LightSpill } from './light.js';
|
|
@@ -445,6 +446,10 @@ export declare class PaintEditorController {
|
|
|
445
446
|
/** The sticker library slot (see `setStickersProvider`). */
|
|
446
447
|
readonly stickers: StickersSlot;
|
|
447
448
|
private readonly stickerArt;
|
|
449
|
+
/** Image sources strokes draw with: the brush library's and the open painting's (saved with it). */
|
|
450
|
+
readonly brushSources: BrushSourceArtCache;
|
|
451
|
+
/** Art for stamp tips and tip grain: image sources from `brushSources`, stickers from the sticker library. */
|
|
452
|
+
readonly stampArt: StickerArtLookup;
|
|
448
453
|
private readonly rasterizeSticker;
|
|
449
454
|
private readonly effectsRenderer;
|
|
450
455
|
private paperEffectNodeCache;
|
|
@@ -76,6 +76,8 @@ export declare class PaintDabStroke {
|
|
|
76
76
|
private lastFed;
|
|
77
77
|
/** The stamp tip's shape (dab brushes), or `null` for the round computed tip. */
|
|
78
78
|
private readonly stamp;
|
|
79
|
+
/** The tip's own grain, or `null`. */
|
|
80
|
+
private readonly tipGrain;
|
|
79
81
|
constructor(brush: PaintBrush, options: PaintDabStrokeOptions);
|
|
80
82
|
/** What copy 0's brush carries after the dabs so far (mixer and wet-capable dab brushes). */
|
|
81
83
|
get load(): MixerLoad | null;
|
|
@@ -76,6 +76,8 @@ export declare class PaintDabStroke {
|
|
|
76
76
|
private lastFed;
|
|
77
77
|
/** The stamp tip's shape (dab brushes), or `null` for the round computed tip. */
|
|
78
78
|
private readonly stamp;
|
|
79
|
+
/** The tip's own grain, or `null`. */
|
|
80
|
+
private readonly tipGrain;
|
|
79
81
|
constructor(brush: PaintBrush, options: PaintDabStrokeOptions);
|
|
80
82
|
/** What copy 0's brush carries after the dabs so far (mixer and wet-capable dab brushes). */
|
|
81
83
|
get load(): MixerLoad | null;
|
|
@@ -88,6 +88,8 @@ export interface PenDab extends Dab {
|
|
|
88
88
|
lean: number;
|
|
89
89
|
/** Pen speed (px/ms), or `null` when the samples carry no time. */
|
|
90
90
|
speed: number | null;
|
|
91
|
+
/** Mirrored across the tip's x axis (bit 1) and y axis (bit 2), from `dynamics.flip`; 0 or missing: not mirrored. */
|
|
92
|
+
flip?: number;
|
|
91
93
|
}
|
|
92
94
|
/**
|
|
93
95
|
* Walks pen samples into dabs, incrementally (any chunking gives the same dabs). Dab angles are in
|
|
@@ -115,6 +117,8 @@ export declare class PenDabWalker {
|
|
|
115
117
|
private dab;
|
|
116
118
|
push(p: PenPoint, out: PenDab[]): void;
|
|
117
119
|
finish(out: PenDab[]): void;
|
|
120
|
+
/** The dabs of one spacing step: `dynamics.count` of them, each with its own index and so its own jitter. */
|
|
121
|
+
private lay;
|
|
118
122
|
}
|
|
119
123
|
export interface DryStrokeOptions {
|
|
120
124
|
/** The paper's dry height field, or `null` for no grain. */
|
|
@@ -127,7 +131,10 @@ export interface DryStrokeOptions {
|
|
|
127
131
|
copies?: readonly StrokeCopy[];
|
|
128
132
|
/** Effect paint: each pixel takes its colour (and alpha) from these canvas-sized pixels. */
|
|
129
133
|
effect?: EffectPaintPixels | null;
|
|
130
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* Loaded art for a stamp tip of a sticker or an image source (`brush.stamp`) and for an image
|
|
136
|
+
* tip grain (`brush.tipGrain.source`); without it such a tip paints round, and the grain is left out.
|
|
137
|
+
*/
|
|
131
138
|
stampArt?: StickerArtLookup;
|
|
132
139
|
}
|
|
133
140
|
/**
|
|
@@ -149,13 +156,15 @@ export declare class DryStroke {
|
|
|
149
156
|
private lastFed;
|
|
150
157
|
/** The stamp tip's shape, or `null` for the round computed tip. */
|
|
151
158
|
private readonly stamp;
|
|
159
|
+
/** The tip's own grain, or `null`. */
|
|
160
|
+
private readonly tipGrain;
|
|
152
161
|
constructor(brush: PaintBrush, options: DryStrokeOptions);
|
|
153
162
|
/** Feeds raw pen samples; returns the document rectangles the new dabs touched. */
|
|
154
163
|
push(points: readonly PenPoint[]): RasterRect[];
|
|
155
164
|
/** Ends the stroke: the smoothed path catches up with the last raw sample; a single tap paints one dab. */
|
|
156
165
|
finish(): RasterRect[];
|
|
157
166
|
private paint;
|
|
158
|
-
/** Lays one mark (a dab, or a spray droplet of dab `d`): the round tip or the stamp, the paper grain, effect paint. */
|
|
167
|
+
/** Lays one mark (a dab, or a spray droplet of dab `d`): the round tip or the stamp, the tip grain, the paper grain, effect paint. */
|
|
159
168
|
private mark;
|
|
160
169
|
}
|
|
161
170
|
/** The shared engine's tip for the Mixer Brush engine (it smooths and walks by itself, so smoothing is applied before). */
|
|
@@ -88,6 +88,8 @@ export interface PenDab extends Dab {
|
|
|
88
88
|
lean: number;
|
|
89
89
|
/** Pen speed (px/ms), or `null` when the samples carry no time. */
|
|
90
90
|
speed: number | null;
|
|
91
|
+
/** Mirrored across the tip's x axis (bit 1) and y axis (bit 2), from `dynamics.flip`; 0 or missing: not mirrored. */
|
|
92
|
+
flip?: number;
|
|
91
93
|
}
|
|
92
94
|
/**
|
|
93
95
|
* Walks pen samples into dabs, incrementally (any chunking gives the same dabs). Dab angles are in
|
|
@@ -115,6 +117,8 @@ export declare class PenDabWalker {
|
|
|
115
117
|
private dab;
|
|
116
118
|
push(p: PenPoint, out: PenDab[]): void;
|
|
117
119
|
finish(out: PenDab[]): void;
|
|
120
|
+
/** The dabs of one spacing step: `dynamics.count` of them, each with its own index and so its own jitter. */
|
|
121
|
+
private lay;
|
|
118
122
|
}
|
|
119
123
|
export interface DryStrokeOptions {
|
|
120
124
|
/** The paper's dry height field, or `null` for no grain. */
|
|
@@ -127,7 +131,10 @@ export interface DryStrokeOptions {
|
|
|
127
131
|
copies?: readonly StrokeCopy[];
|
|
128
132
|
/** Effect paint: each pixel takes its colour (and alpha) from these canvas-sized pixels. */
|
|
129
133
|
effect?: EffectPaintPixels | null;
|
|
130
|
-
/**
|
|
134
|
+
/**
|
|
135
|
+
* Loaded art for a stamp tip of a sticker or an image source (`brush.stamp`) and for an image
|
|
136
|
+
* tip grain (`brush.tipGrain.source`); without it such a tip paints round, and the grain is left out.
|
|
137
|
+
*/
|
|
131
138
|
stampArt?: StickerArtLookup;
|
|
132
139
|
}
|
|
133
140
|
/**
|
|
@@ -149,13 +156,15 @@ export declare class DryStroke {
|
|
|
149
156
|
private lastFed;
|
|
150
157
|
/** The stamp tip's shape, or `null` for the round computed tip. */
|
|
151
158
|
private readonly stamp;
|
|
159
|
+
/** The tip's own grain, or `null`. */
|
|
160
|
+
private readonly tipGrain;
|
|
152
161
|
constructor(brush: PaintBrush, options: DryStrokeOptions);
|
|
153
162
|
/** Feeds raw pen samples; returns the document rectangles the new dabs touched. */
|
|
154
163
|
push(points: readonly PenPoint[]): RasterRect[];
|
|
155
164
|
/** Ends the stroke: the smoothed path catches up with the last raw sample; a single tap paints one dab. */
|
|
156
165
|
finish(): RasterRect[];
|
|
157
166
|
private paint;
|
|
158
|
-
/** Lays one mark (a dab, or a spray droplet of dab `d`): the round tip or the stamp, the paper grain, effect paint. */
|
|
167
|
+
/** Lays one mark (a dab, or a spray droplet of dab `d`): the round tip or the stamp, the tip grain, the paper grain, effect paint. */
|
|
159
168
|
private mark;
|
|
160
169
|
}
|
|
161
170
|
/** The shared engine's tip for the Mixer Brush engine (it smooths and walks by itself, so smoothing is applied before). */
|