@pixerate/editor 0.260.0 → 0.261.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/paint-editor/controller.d.cts +17 -0
- package/dist/paint-editor/controller.d.ts +17 -0
- package/dist/paint-editor/index.cjs +223 -84
- package/dist/paint-editor/index.d.cts +1 -0
- package/dist/paint-editor/index.d.ts +1 -0
- package/dist/paint-editor/index.js +140 -1
- package/dist/paint-editor/path-samples.d.cts +19 -0
- package/dist/paint-editor/path-samples.d.ts +19 -0
- package/dist/paint-editor/ui.d.cts +6 -0
- package/dist/paint-editor/ui.d.ts +6 -0
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +2 -0
- package/skills/pixerate-paint-sketch-to-finish/SKILL.md +5 -1
|
@@ -26,6 +26,7 @@ import type { ColorScheme } from '../color/dual.cjs';
|
|
|
26
26
|
import { type PaintCanvas, type PaintDocumentState, type PaintLayer } from './document.cjs';
|
|
27
27
|
import { type ImageEncoder, type ImageFormat } from './encode.cjs';
|
|
28
28
|
import type { PenPoint } from './engine.cjs';
|
|
29
|
+
import { type PathSampleOptions } from './path-samples.cjs';
|
|
29
30
|
import type { Hand } from './input.cjs';
|
|
30
31
|
import { type PaperSettings } from './paper.cjs';
|
|
31
32
|
import { type ViewLayer } from './render.cjs';
|
|
@@ -945,6 +946,22 @@ export declare class PaintEditorController {
|
|
|
945
946
|
paintStroke(init: PaintStrokeInit & {
|
|
946
947
|
points: readonly PenPoint[];
|
|
947
948
|
}): PaintStrokeResult;
|
|
949
|
+
/**
|
|
950
|
+
* Brushes vector path data (SVG `d`, document pixels) with the active brush, or `brushId` /
|
|
951
|
+
* `brush`, as if drawn by hand: one recorded stroke per subpath, sampled every `spacing` px
|
|
952
|
+
* with an optional `pressure` profile along each. All of it is one undo step. A given `seed`
|
|
953
|
+
* seeds the first subpath; the next ones take the following seeds.
|
|
954
|
+
*/
|
|
955
|
+
strokePath(init: Omit<PaintStrokeInit, 'start' | 'copies' | 'load'> & PathSampleOptions & {
|
|
956
|
+
path: string;
|
|
957
|
+
}): {
|
|
958
|
+
layerId: string;
|
|
959
|
+
bounds: RasterRect | null;
|
|
960
|
+
dabs: number;
|
|
961
|
+
strokeIds: string[];
|
|
962
|
+
mixerLoad?: MixerLoad;
|
|
963
|
+
wet?: boolean;
|
|
964
|
+
};
|
|
948
965
|
/** Checks stroke samples (finite x and y, pressure 0..1) and returns them; throws a sentence naming the bad point. */
|
|
949
966
|
checkPoints(points: readonly PenPoint[]): PenPoint[];
|
|
950
967
|
/** Every recorded stroke, oldest first. */
|
|
@@ -26,6 +26,7 @@ import type { ColorScheme } from '../color/dual.js';
|
|
|
26
26
|
import { type PaintCanvas, type PaintDocumentState, type PaintLayer } from './document.js';
|
|
27
27
|
import { type ImageEncoder, type ImageFormat } from './encode.js';
|
|
28
28
|
import type { PenPoint } from './engine.js';
|
|
29
|
+
import { type PathSampleOptions } from './path-samples.js';
|
|
29
30
|
import type { Hand } from './input.js';
|
|
30
31
|
import { type PaperSettings } from './paper.js';
|
|
31
32
|
import { type ViewLayer } from './render.js';
|
|
@@ -945,6 +946,22 @@ export declare class PaintEditorController {
|
|
|
945
946
|
paintStroke(init: PaintStrokeInit & {
|
|
946
947
|
points: readonly PenPoint[];
|
|
947
948
|
}): PaintStrokeResult;
|
|
949
|
+
/**
|
|
950
|
+
* Brushes vector path data (SVG `d`, document pixels) with the active brush, or `brushId` /
|
|
951
|
+
* `brush`, as if drawn by hand: one recorded stroke per subpath, sampled every `spacing` px
|
|
952
|
+
* with an optional `pressure` profile along each. All of it is one undo step. A given `seed`
|
|
953
|
+
* seeds the first subpath; the next ones take the following seeds.
|
|
954
|
+
*/
|
|
955
|
+
strokePath(init: Omit<PaintStrokeInit, 'start' | 'copies' | 'load'> & PathSampleOptions & {
|
|
956
|
+
path: string;
|
|
957
|
+
}): {
|
|
958
|
+
layerId: string;
|
|
959
|
+
bounds: RasterRect | null;
|
|
960
|
+
dabs: number;
|
|
961
|
+
strokeIds: string[];
|
|
962
|
+
mixerLoad?: MixerLoad;
|
|
963
|
+
wet?: boolean;
|
|
964
|
+
};
|
|
948
965
|
/** Checks stroke samples (finite x and y, pressure 0..1) and returns them; throws a sentence naming the bad point. */
|
|
949
966
|
checkPoints(points: readonly PenPoint[]): PenPoint[];
|
|
950
967
|
/** Every recorded stroke, oldest first. */
|