@pixerate/editor 0.272.1 → 0.274.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-2A5IKZMU.js +557 -0
- package/dist/chunk-YH6SKC7P.cjs +557 -0
- package/dist/paint-editor/collaboration.d.cts +6 -1
- package/dist/paint-editor/collaboration.d.ts +6 -1
- package/dist/paint-editor/controller.d.cts +117 -0
- package/dist/paint-editor/controller.d.ts +117 -0
- package/dist/paint-editor/document.d.cts +1 -1
- package/dist/paint-editor/document.d.ts +1 -1
- package/dist/paint-editor/evolution-tools.d.cts +48 -0
- package/dist/paint-editor/evolution-tools.d.ts +48 -0
- package/dist/paint-editor/evolution.d.cts +175 -0
- package/dist/paint-editor/evolution.d.ts +175 -0
- package/dist/paint-editor/index.cjs +8500 -7258
- package/dist/paint-editor/index.d.cts +3 -0
- package/dist/paint-editor/index.d.ts +3 -0
- package/dist/paint-editor/index.js +8481 -7239
- package/dist/paint-editor/presence.d.cts +5 -1
- package/dist/paint-editor/presence.d.ts +5 -1
- package/dist/paint-editor/ui.d.cts +7 -2
- package/dist/paint-editor/ui.d.ts +7 -2
- package/dist/raster/fill.d.cts +85 -0
- package/dist/raster/fill.d.ts +85 -0
- package/dist/raster/index.cjs +9 -1
- package/dist/raster/index.d.cts +1 -0
- package/dist/raster/index.d.ts +1 -0
- package/dist/raster/index.js +8 -0
- package/package.json +1 -1
- package/skills/README.md +1 -0
- package/skills/pixerate-brushes/SKILL.md +3 -0
- package/skills/pixerate-paint-editor/SKILL.md +55 -96
- package/skills/pixerate-paint-editor/references/brush-facets.md +3 -0
- package/skills/pixerate-paint-editor/references/evolution.md +27 -0
- package/skills/pixerate-paint-editor/references/mutation.md +25 -0
- package/skills/pixerate-paint-editor/references/oils.md +8 -1
- package/skills/pixerate-paint-editor/references/smart-inks.md +51 -0
- package/skills/pixerate-paint-mutation/SKILL.md +76 -0
- package/skills/pixerate-paint-mutation/evals/decline-unanswered.json +58 -0
- package/skills/pixerate-paint-mutation/evals/dry-ink-answer.json +74 -0
- package/skills/pixerate-paint-mutation/evals/wet-wash-answer.json +76 -0
- package/skills/pixerate-paint-oil-impasto/SKILL.md +2 -1
- package/skills/pixerate-paint-sketch-to-finish/SKILL.md +16 -5
- package/skills/pixerate-paint-sketch-to-finish/evals/flats-under-ink.json +2 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PresenceStore, type PresenceActor, type PresenceActorInfo, type PresenceClock, type PresenceState } from '../animation/presence.cjs';
|
|
2
2
|
import type { MixerLoad } from '../paint/mixer.cjs';
|
|
3
3
|
import type { RasterRect } from '../raster/surface.cjs';
|
|
4
|
-
import { type FillLayerOptions, type PaintEditorController, type PaintStrokeInit, type ReplayOptions } from './controller.cjs';
|
|
4
|
+
import { type FillLayerOptions, type FillRegionOptions, type PaintEditorController, type PaintStrokeInit, type ReplayOptions } from './controller.cjs';
|
|
5
5
|
import type { PenPoint } from './engine.cjs';
|
|
6
6
|
export type PaintPresenceActor = PresenceActor;
|
|
7
7
|
export type PaintPresenceState = PresenceState;
|
|
@@ -35,6 +35,10 @@ export type PaintAgentCommand = {
|
|
|
35
35
|
kind: 'fill';
|
|
36
36
|
fill: FillLayerOptions;
|
|
37
37
|
note?: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'fill-region';
|
|
40
|
+
fill: FillRegionOptions;
|
|
41
|
+
note?: string;
|
|
38
42
|
} | {
|
|
39
43
|
kind: 'replay';
|
|
40
44
|
replay: ReplayOptions;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PresenceStore, type PresenceActor, type PresenceActorInfo, type PresenceClock, type PresenceState } from '../animation/presence.js';
|
|
2
2
|
import type { MixerLoad } from '../paint/mixer.js';
|
|
3
3
|
import type { RasterRect } from '../raster/surface.js';
|
|
4
|
-
import { type FillLayerOptions, type PaintEditorController, type PaintStrokeInit, type ReplayOptions } from './controller.js';
|
|
4
|
+
import { type FillLayerOptions, type FillRegionOptions, type PaintEditorController, type PaintStrokeInit, type ReplayOptions } from './controller.js';
|
|
5
5
|
import type { PenPoint } from './engine.js';
|
|
6
6
|
export type PaintPresenceActor = PresenceActor;
|
|
7
7
|
export type PaintPresenceState = PresenceState;
|
|
@@ -35,6 +35,10 @@ export type PaintAgentCommand = {
|
|
|
35
35
|
kind: 'fill';
|
|
36
36
|
fill: FillLayerOptions;
|
|
37
37
|
note?: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'fill-region';
|
|
40
|
+
fill: FillRegionOptions;
|
|
41
|
+
note?: string;
|
|
38
42
|
} | {
|
|
39
43
|
kind: 'replay';
|
|
40
44
|
replay: ReplayOptions;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { MixerLoad } from '../paint/exchange.cjs';
|
|
12
12
|
import { type BlendModeInfo } from '../raster/blend.cjs';
|
|
13
13
|
import type { ImpastoTool, WetMediumKind, WetTool } from './brushes.cjs';
|
|
14
|
-
import type { PaintEditorController } from './controller.cjs';
|
|
14
|
+
import type { FillRegionOptions, PaintEditorController } from './controller.cjs';
|
|
15
15
|
import type { PenPoint } from './engine.cjs';
|
|
16
16
|
import { type Point2 } from './guides.cjs';
|
|
17
17
|
import { type StencilInput } from './stencils.cjs';
|
|
@@ -35,7 +35,7 @@ export interface PaintPointerEvent extends PointerSample {
|
|
|
35
35
|
getCoalescedEvents?(): PaintPointerEvent[];
|
|
36
36
|
getPredictedEvents?(): PaintPointerEvent[];
|
|
37
37
|
}
|
|
38
|
-
export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate' | 'sticker' | 'stroke';
|
|
38
|
+
export type PaintTool = 'brush' | 'fill' | 'eyedropper' | 'pan' | 'rotate' | 'sticker' | 'stroke';
|
|
39
39
|
export declare const PAINT_TOOLS: ReadonlyArray<{
|
|
40
40
|
id: PaintTool;
|
|
41
41
|
label: string;
|
|
@@ -52,6 +52,8 @@ export declare class PaintGesture {
|
|
|
52
52
|
private readonly controller;
|
|
53
53
|
private readonly box;
|
|
54
54
|
tool: PaintTool;
|
|
55
|
+
/** Options the Fill tool (`tool === 'fill'`) passes to `fillRegion` (click to fill; drag horizontally to adjust tolerance). */
|
|
56
|
+
fillOptions: Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
55
57
|
/** The last refusal (a hidden or locked layer), for the editor to show. */
|
|
56
58
|
error: string | null;
|
|
57
59
|
/** The predicted tail of the current stroke in document pixels (draw it as a thin preview). */
|
|
@@ -82,6 +84,7 @@ export declare class PaintGesture {
|
|
|
82
84
|
*/
|
|
83
85
|
private stickerDown;
|
|
84
86
|
private pick;
|
|
87
|
+
private fillDown;
|
|
85
88
|
move(e: PaintPointerEvent): void;
|
|
86
89
|
up(e: PaintPointerEvent): void;
|
|
87
90
|
cancel(): void;
|
|
@@ -260,6 +263,8 @@ export declare const PATH_STROKE_TAPERS: ReadonlyArray<{
|
|
|
260
263
|
export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
261
264
|
/** The sticker panel's sliders for the selected sticker. */
|
|
262
265
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
266
|
+
/** The evolution panel's mutation sliders (`0..1`). */
|
|
267
|
+
export declare const EVOLUTION_SLIDERS: readonly SliderControl[];
|
|
263
268
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
264
269
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
265
270
|
width: number;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import type { MixerLoad } from '../paint/exchange.js';
|
|
12
12
|
import { type BlendModeInfo } from '../raster/blend.js';
|
|
13
13
|
import type { ImpastoTool, WetMediumKind, WetTool } from './brushes.js';
|
|
14
|
-
import type { PaintEditorController } from './controller.js';
|
|
14
|
+
import type { FillRegionOptions, PaintEditorController } from './controller.js';
|
|
15
15
|
import type { PenPoint } from './engine.js';
|
|
16
16
|
import { type Point2 } from './guides.js';
|
|
17
17
|
import { type StencilInput } from './stencils.js';
|
|
@@ -35,7 +35,7 @@ export interface PaintPointerEvent extends PointerSample {
|
|
|
35
35
|
getCoalescedEvents?(): PaintPointerEvent[];
|
|
36
36
|
getPredictedEvents?(): PaintPointerEvent[];
|
|
37
37
|
}
|
|
38
|
-
export type PaintTool = 'brush' | 'eyedropper' | 'pan' | 'rotate' | 'sticker' | 'stroke';
|
|
38
|
+
export type PaintTool = 'brush' | 'fill' | 'eyedropper' | 'pan' | 'rotate' | 'sticker' | 'stroke';
|
|
39
39
|
export declare const PAINT_TOOLS: ReadonlyArray<{
|
|
40
40
|
id: PaintTool;
|
|
41
41
|
label: string;
|
|
@@ -52,6 +52,8 @@ export declare class PaintGesture {
|
|
|
52
52
|
private readonly controller;
|
|
53
53
|
private readonly box;
|
|
54
54
|
tool: PaintTool;
|
|
55
|
+
/** Options the Fill tool (`tool === 'fill'`) passes to `fillRegion` (click to fill; drag horizontally to adjust tolerance). */
|
|
56
|
+
fillOptions: Omit<FillRegionOptions, 'x' | 'y' | 'points'>;
|
|
55
57
|
/** The last refusal (a hidden or locked layer), for the editor to show. */
|
|
56
58
|
error: string | null;
|
|
57
59
|
/** The predicted tail of the current stroke in document pixels (draw it as a thin preview). */
|
|
@@ -82,6 +84,7 @@ export declare class PaintGesture {
|
|
|
82
84
|
*/
|
|
83
85
|
private stickerDown;
|
|
84
86
|
private pick;
|
|
87
|
+
private fillDown;
|
|
85
88
|
move(e: PaintPointerEvent): void;
|
|
86
89
|
up(e: PaintPointerEvent): void;
|
|
87
90
|
cancel(): void;
|
|
@@ -260,6 +263,8 @@ export declare const PATH_STROKE_TAPERS: ReadonlyArray<{
|
|
|
260
263
|
export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
261
264
|
/** The sticker panel's sliders for the selected sticker. */
|
|
262
265
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
266
|
+
/** The evolution panel's mutation sliders (`0..1`). */
|
|
267
|
+
export declare const EVOLUTION_SLIDERS: readonly SliderControl[];
|
|
263
268
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
264
269
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
265
270
|
width: number;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { RasterRect } from './surface.cjs';
|
|
2
|
+
export interface FillRegionPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export interface FillRegionSummary {
|
|
7
|
+
point: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
bounds: RasterRect | null;
|
|
12
|
+
pixelCount: number;
|
|
13
|
+
leaked: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FillRegionMaskOptions {
|
|
16
|
+
/** Seed points in pixel coordinates. */
|
|
17
|
+
points: ReadonlyArray<FillRegionPoint>;
|
|
18
|
+
/** Per-channel RGBA tolerance 0..255 (default 32). */
|
|
19
|
+
tolerance?: number;
|
|
20
|
+
/** Close gaps in line art up to this width in pixels, 0..32 (default 0). */
|
|
21
|
+
closeGap?: number;
|
|
22
|
+
/** Expand (> 0, bleed under lines) or contract (< 0) the filled region in pixels, -16..16 (default 0). */
|
|
23
|
+
expand?: number;
|
|
24
|
+
/** Soften 1 px boundary edges (default true). */
|
|
25
|
+
antialias?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface FillRegionMaskResult {
|
|
28
|
+
/** Per-pixel coverage 0..1 (`width * height`). */
|
|
29
|
+
mask: Float32Array;
|
|
30
|
+
/** Bounding box of all filled pixels, or null if nothing was filled. */
|
|
31
|
+
bounds: RasterRect | null;
|
|
32
|
+
/** Total number of filled pixels (`mask[i] > 0`). */
|
|
33
|
+
pixelCount: number;
|
|
34
|
+
/** True when the filled region touches the canvas edge (`x === 0`, `y === 0`, `x === width - 1`, or `y === height - 1`). */
|
|
35
|
+
leaked: boolean;
|
|
36
|
+
/** Per-seed summary in the order `points` were given. */
|
|
37
|
+
regions: FillRegionSummary[];
|
|
38
|
+
}
|
|
39
|
+
export interface UnfilledRegion {
|
|
40
|
+
/** Interior seed point guaranteed to lie inside the region (deepest interior point / pole of inaccessibility). */
|
|
41
|
+
point: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
/** Area-weighted centroid rounded to integer pixel coordinates. */
|
|
46
|
+
centroid: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
50
|
+
/** Tight bounding box of the region. */
|
|
51
|
+
bounds: RasterRect;
|
|
52
|
+
/** Area of the region in pixels. */
|
|
53
|
+
pixelCount: number;
|
|
54
|
+
/** True when the region touches the canvas edge. */
|
|
55
|
+
touchesEdge: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface FindUnfilledRegionsMaskOptions {
|
|
58
|
+
/** Optional target layer RGBA (`width * height * 4`). Pixels already painted on the target layer count as filled. */
|
|
59
|
+
target?: Uint8ClampedArray | Uint8Array;
|
|
60
|
+
/** Alpha/colour threshold 0..255 above which a reference pixel is treated as a barrier (default 32). */
|
|
61
|
+
tolerance?: number;
|
|
62
|
+
/** Close gaps in line art up to this width in pixels, 0..32 (default 0). */
|
|
63
|
+
closeGap?: number;
|
|
64
|
+
/** Ignore regions smaller than this many pixels (default 16). */
|
|
65
|
+
minArea?: number;
|
|
66
|
+
/** Include regions that touch the canvas border (default false: only enclosed shapes). */
|
|
67
|
+
includeEdge?: boolean;
|
|
68
|
+
/** Maximum number of regions to return, sorted largest first (default 100). */
|
|
69
|
+
maxRegions?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Exact 2D squared Euclidean distance transform (Felzenszwalb & Huttenlocher, O(w * h)).
|
|
73
|
+
* Returns for each pixel the squared distance `(dx^2 + dy^2)` to the nearest `0` in `binary`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function squaredDistanceTransform(binary: Uint8Array, w: number, h: number): Float64Array;
|
|
76
|
+
/**
|
|
77
|
+
* Flood-fills one or more seed points against a reference RGBA buffer (`width * height * 4`),
|
|
78
|
+
* closing line-art gaps up to `closeGap` px and expanding/contracting the filled mask by `expand` px.
|
|
79
|
+
*/
|
|
80
|
+
export declare function fillRegionMask(reference: Uint8ClampedArray | Uint8Array, width: number, height: number, options: FillRegionMaskOptions): FillRegionMaskResult;
|
|
81
|
+
/**
|
|
82
|
+
* Finds enclosed unfilled regions in a reference RGBA buffer (`width * height * 4`),
|
|
83
|
+
* closing gaps up to `closeGap` px and excluding areas already painted on `options.target`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function findUnfilledRegionsMask(reference: Uint8ClampedArray | Uint8Array, width: number, height: number, options?: FindUnfilledRegionsMaskOptions): UnfilledRegion[];
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import type { RasterRect } from './surface.js';
|
|
2
|
+
export interface FillRegionPoint {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
}
|
|
6
|
+
export interface FillRegionSummary {
|
|
7
|
+
point: {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
bounds: RasterRect | null;
|
|
12
|
+
pixelCount: number;
|
|
13
|
+
leaked: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FillRegionMaskOptions {
|
|
16
|
+
/** Seed points in pixel coordinates. */
|
|
17
|
+
points: ReadonlyArray<FillRegionPoint>;
|
|
18
|
+
/** Per-channel RGBA tolerance 0..255 (default 32). */
|
|
19
|
+
tolerance?: number;
|
|
20
|
+
/** Close gaps in line art up to this width in pixels, 0..32 (default 0). */
|
|
21
|
+
closeGap?: number;
|
|
22
|
+
/** Expand (> 0, bleed under lines) or contract (< 0) the filled region in pixels, -16..16 (default 0). */
|
|
23
|
+
expand?: number;
|
|
24
|
+
/** Soften 1 px boundary edges (default true). */
|
|
25
|
+
antialias?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface FillRegionMaskResult {
|
|
28
|
+
/** Per-pixel coverage 0..1 (`width * height`). */
|
|
29
|
+
mask: Float32Array;
|
|
30
|
+
/** Bounding box of all filled pixels, or null if nothing was filled. */
|
|
31
|
+
bounds: RasterRect | null;
|
|
32
|
+
/** Total number of filled pixels (`mask[i] > 0`). */
|
|
33
|
+
pixelCount: number;
|
|
34
|
+
/** True when the filled region touches the canvas edge (`x === 0`, `y === 0`, `x === width - 1`, or `y === height - 1`). */
|
|
35
|
+
leaked: boolean;
|
|
36
|
+
/** Per-seed summary in the order `points` were given. */
|
|
37
|
+
regions: FillRegionSummary[];
|
|
38
|
+
}
|
|
39
|
+
export interface UnfilledRegion {
|
|
40
|
+
/** Interior seed point guaranteed to lie inside the region (deepest interior point / pole of inaccessibility). */
|
|
41
|
+
point: {
|
|
42
|
+
x: number;
|
|
43
|
+
y: number;
|
|
44
|
+
};
|
|
45
|
+
/** Area-weighted centroid rounded to integer pixel coordinates. */
|
|
46
|
+
centroid: {
|
|
47
|
+
x: number;
|
|
48
|
+
y: number;
|
|
49
|
+
};
|
|
50
|
+
/** Tight bounding box of the region. */
|
|
51
|
+
bounds: RasterRect;
|
|
52
|
+
/** Area of the region in pixels. */
|
|
53
|
+
pixelCount: number;
|
|
54
|
+
/** True when the region touches the canvas edge. */
|
|
55
|
+
touchesEdge: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface FindUnfilledRegionsMaskOptions {
|
|
58
|
+
/** Optional target layer RGBA (`width * height * 4`). Pixels already painted on the target layer count as filled. */
|
|
59
|
+
target?: Uint8ClampedArray | Uint8Array;
|
|
60
|
+
/** Alpha/colour threshold 0..255 above which a reference pixel is treated as a barrier (default 32). */
|
|
61
|
+
tolerance?: number;
|
|
62
|
+
/** Close gaps in line art up to this width in pixels, 0..32 (default 0). */
|
|
63
|
+
closeGap?: number;
|
|
64
|
+
/** Ignore regions smaller than this many pixels (default 16). */
|
|
65
|
+
minArea?: number;
|
|
66
|
+
/** Include regions that touch the canvas border (default false: only enclosed shapes). */
|
|
67
|
+
includeEdge?: boolean;
|
|
68
|
+
/** Maximum number of regions to return, sorted largest first (default 100). */
|
|
69
|
+
maxRegions?: number;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Exact 2D squared Euclidean distance transform (Felzenszwalb & Huttenlocher, O(w * h)).
|
|
73
|
+
* Returns for each pixel the squared distance `(dx^2 + dy^2)` to the nearest `0` in `binary`.
|
|
74
|
+
*/
|
|
75
|
+
export declare function squaredDistanceTransform(binary: Uint8Array, w: number, h: number): Float64Array;
|
|
76
|
+
/**
|
|
77
|
+
* Flood-fills one or more seed points against a reference RGBA buffer (`width * height * 4`),
|
|
78
|
+
* closing line-art gaps up to `closeGap` px and expanding/contracting the filled mask by `expand` px.
|
|
79
|
+
*/
|
|
80
|
+
export declare function fillRegionMask(reference: Uint8ClampedArray | Uint8Array, width: number, height: number, options: FillRegionMaskOptions): FillRegionMaskResult;
|
|
81
|
+
/**
|
|
82
|
+
* Finds enclosed unfilled regions in a reference RGBA buffer (`width * height * 4`),
|
|
83
|
+
* closing gaps up to `closeGap` px and excluding areas already painted on `options.target`.
|
|
84
|
+
*/
|
|
85
|
+
export declare function findUnfilledRegionsMask(reference: Uint8ClampedArray | Uint8Array, width: number, height: number, options?: FindUnfilledRegionsMaskOptions): UnfilledRegion[];
|
package/dist/raster/index.cjs
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
+
var _chunkYH6SKC7Pcjs = require('../chunk-YH6SKC7P.cjs');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
5
10
|
|
|
6
11
|
|
|
7
12
|
|
|
@@ -528,4 +533,7 @@ function drawSurfaceToViewport(ctx, surface, mapping, view, options) {
|
|
|
528
533
|
|
|
529
534
|
|
|
530
535
|
|
|
531
|
-
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
exports.BIT_DEPTHS = _chunk2VX55NFMcjs.BIT_DEPTHS; exports.BLEND_MODES = _chunk2VX55NFMcjs.BLEND_MODES; exports.CURVE_LUT_SIZE = _chunkPVJMTLPJcjs.CURVE_LUT_SIZE; exports.DEFAULT_GLOBAL_LIGHT = _chunkPVJMTLPJcjs.DEFAULT_GLOBAL_LIGHT; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DeepCompositor = _chunkPVJMTLPJcjs.DeepCompositor; exports.INTERPOLATIONS = _chunkPVJMTLPJcjs.INTERPOLATIONS; exports.LAYER_EFFECT_KINDS = _chunkPVJMTLPJcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = _chunkPVJMTLPJcjs.LAYER_EFFECT_MENU; exports.LayerEffectError = _chunkPVJMTLPJcjs.LayerEffectError; exports.MAX_EFFECT_REACH = _chunkPVJMTLPJcjs.MAX_EFFECT_REACH; exports.MAX_TRANSFORM_PIXELS = _chunkPVJMTLPJcjs.MAX_TRANSFORM_PIXELS; exports.PAINTERLY_BLEND_MODES = _chunk2VX55NFMcjs.PAINTERLY_BLEND_MODES; exports.PatternPlacement = _chunkPVJMTLPJcjs.PatternPlacement; exports.PatternTile = _chunkPVJMTLPJcjs.PatternTile; exports.RasterCompositor = _chunkPVJMTLPJcjs.RasterCompositor; exports.SHADOW_AMBIENT = _chunk2VX55NFMcjs.SHADOW_AMBIENT; exports.STROKE_CHAMFER_MAX = _chunkPVJMTLPJcjs.STROKE_CHAMFER_MAX; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.SurfaceViewportRenderer = SurfaceViewportRenderer; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkPVJMTLPJcjs.TransformTooLargeError; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeEffectItems = _chunkPVJMTLPJcjs.activeEffectItems; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.applyEdgeAmbient = _chunkPVJMTLPJcjs.applyEdgeAmbient; exports.base64ToBytes = _chunkW5M3J7PVcjs.base64ToBytes; exports.blendChannel = _chunk2VX55NFMcjs.blendChannel; exports.blendImageData = _chunk2VX55NFMcjs.blendImageData; exports.blendLum = _chunk2VX55NFMcjs.blendLum; exports.blendPixel = _chunk2VX55NFMcjs.blendPixel; exports.blendRgb = _chunk2VX55NFMcjs.blendRgb; exports.blendTile = _chunkPVJMTLPJcjs.blendTile; exports.buildEffectMaps = _chunkPVJMTLPJcjs.buildEffectMaps; exports.builtinPattern = _chunkPVJMTLPJcjs.builtinPattern; exports.builtinPatternIds = _chunkPVJMTLPJcjs.builtinPatternIds; exports.bytesToBase64 = _chunkW5M3J7PVcjs.bytesToBase64; exports.canvasCompositeOperation = _chunk2VX55NFMcjs.canvasCompositeOperation; exports.changedTiles = _chunkPVJMTLPJcjs.changedTiles; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.compositeLayerEffects = _chunkPVJMTLPJcjs.compositeLayerEffects; exports.compositeSurfaceOver = _chunkPVJMTLPJcjs.compositeSurfaceOver; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contourLut = _chunkPVJMTLPJcjs.contourLut; exports.convertSurfaceDepth = _chunk2VX55NFMcjs.convertSurfaceDepth; exports.curveLut = _chunkPVJMTLPJcjs.curveLut; exports.decodePng = _chunkW5M3J7PVcjs.decodePng; exports.deepBytes = _chunk2VX55NFMcjs.deepBytes; exports.deepTile = _chunk2VX55NFMcjs.deepTile; exports.defaultEffectGradient = _chunkPVJMTLPJcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkPVJMTLPJcjs.defaultLayerEffect; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthOf = _chunk2VX55NFMcjs.depthOf; exports.drawSurfaceToViewport = drawSurfaceToViewport; exports.effectColorHex = _chunkPVJMTLPJcjs.effectColorHex; exports.effectControlChange = _chunkPVJMTLPJcjs.effectControlChange; exports.effectFillColors = _chunkPVJMTLPJcjs.effectFillColors; exports.effectReach = _chunkPVJMTLPJcjs.effectReach; exports.effectsAreLocal = _chunkPVJMTLPJcjs.effectsAreLocal; exports.effectsFingerprint = _chunkPVJMTLPJcjs.effectsFingerprint; exports.effectsMargin = _chunkPVJMTLPJcjs.effectsMargin; exports.effectsScale = _chunkPVJMTLPJcjs.effectsScale; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodePng = _chunkW5M3J7PVcjs.encodePng; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.fillRegionMask = _chunkYH6SKC7Pcjs.fillRegionMask; exports.findLayer = _chunkPVJMTLPJcjs.findLayer; exports.findUnfilledRegionsMask = _chunkYH6SKC7Pcjs.findUnfilledRegionsMask; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.flattenLayers = _chunkPVJMTLPJcjs.flattenLayers; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.gradientT = _chunkPVJMTLPJcjs.gradientT; exports.hasActiveEffects = _chunkPVJMTLPJcjs.hasActiveEffects; exports.hashNoise = _chunkPVJMTLPJcjs.hashNoise; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertLayer = _chunkPVJMTLPJcjs.insertLayer; exports.isBitDepth = _chunk2VX55NFMcjs.isBitDepth; exports.isBlendMode = _chunk2VX55NFMcjs.isBlendMode; exports.isInterpolation = _chunkPVJMTLPJcjs.isInterpolation; exports.isLayerEffectKind = _chunkPVJMTLPJcjs.isLayerEffectKind; exports.isLayerLocked = _chunkPVJMTLPJcjs.isLayerLocked; exports.isPainterlyBlendMode = _chunk2VX55NFMcjs.isPainterlyBlendMode; exports.isPng = _chunkW5M3J7PVcjs.isPng; exports.isSeparableBlendMode = _chunk2VX55NFMcjs.isSeparableBlendMode; exports.keepDeepSamples = _chunk2VX55NFMcjs.keepDeepSamples; exports.keysWeight = _chunkPVJMTLPJcjs.keysWeight; exports.layerEffectControls = _chunkPVJMTLPJcjs.layerEffectControls; exports.layerEffectFields = _chunkPVJMTLPJcjs.layerEffectFields; exports.layerEffectLabel = _chunkPVJMTLPJcjs.layerEffectLabel; exports.layerEffectsBadge = _chunkPVJMTLPJcjs.layerEffectsBadge; exports.layerEffectsPanel = _chunkPVJMTLPJcjs.layerEffectsPanel; exports.mapLayer = _chunkPVJMTLPJcjs.mapLayer; exports.mergeLayerEffect = _chunkPVJMTLPJcjs.mergeLayerEffect; exports.mixPigment8 = _chunk2VX55NFMcjs.mixPigment8; exports.mixPigmentRgb = _chunk2VX55NFMcjs.mixPigmentRgb; exports.newEffectId = _chunkPVJMTLPJcjs.newEffectId; exports.normalizeBlendMode = _chunk2VX55NFMcjs.normalizeBlendMode; exports.normalizeLayerEffects = _chunkPVJMTLPJcjs.normalizeLayerEffects; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.parseDataUrl = _chunkW5M3J7PVcjs.parseDataUrl; exports.parseEffectColor = _chunkPVJMTLPJcjs.parseEffectColor; exports.patchEffectMaps = _chunkPVJMTLPJcjs.patchEffectMaps; exports.pigment8 = _chunk2VX55NFMcjs.pigment8; exports.pngDataUrl = _chunkW5M3J7PVcjs.pngDataUrl; exports.proxyOf = _chunk2VX55NFMcjs.proxyOf; exports.readDeepRegion = _chunk2VX55NFMcjs.readDeepRegion; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.reduceSurface = _chunkPVJMTLPJcjs.reduceSurface; exports.renderLayerEffects = _chunkPVJMTLPJcjs.renderLayerEffects; exports.scaleLayerEffect = _chunkPVJMTLPJcjs.scaleLayerEffect; exports.screenToWorld = screenToWorld; exports.setLum = _chunk2VX55NFMcjs.setLum; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.squaredDistanceTransform = _chunkYH6SKC7Pcjs.squaredDistanceTransform; exports.srgbDecode = _chunk2VX55NFMcjs.srgbDecode; exports.srgbEncode = _chunk2VX55NFMcjs.srgbEncode; exports.standardBlendMode = _chunk2VX55NFMcjs.standardBlendMode; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunk2VX55NFMcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunk2VX55NFMcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfaceMipLevel = surfaceMipLevel; exports.surfaceResolutionForZoom = surfaceResolutionForZoom; exports.surfaceToWorld = surfaceToWorld; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunk2VX55NFMcjs.tileSamples; exports.tileSamples16 = _chunk2VX55NFMcjs.tileSamples16; exports.tileSamples32 = _chunk2VX55NFMcjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.to16From32 = _chunk2VX55NFMcjs.to16From32; exports.to16From8 = _chunk2VX55NFMcjs.to16From8; exports.to32From16 = _chunk2VX55NFMcjs.to32From16; exports.to32From8 = _chunk2VX55NFMcjs.to32From8; exports.to8From16 = _chunk2VX55NFMcjs.to8From16; exports.to8From32 = _chunk2VX55NFMcjs.to8From32; exports.transformSurface = _chunkPVJMTLPJcjs.transformSurface; exports.transformedBounds = _chunkPVJMTLPJcjs.transformedBounds; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.validateEffectGradient = _chunkPVJMTLPJcjs.validateEffectGradient; exports.validateLayerEffect = _chunkPVJMTLPJcjs.validateLayerEffect; exports.validateLayerEffects = _chunkPVJMTLPJcjs.validateLayerEffects; exports.visibleSurfaceRect = visibleSurfaceRect; exports.visibleWorldRect = visibleWorldRect; exports.warpSurface = _chunkPVJMTLPJcjs.warpSurface; exports.workingToSamples = _chunkPVJMTLPJcjs.workingToSamples; exports.worldRectToSurface = worldRectToSurface; exports.worldToSurface = worldToSurface; exports.writeDeepRegion = _chunk2VX55NFMcjs.writeDeepRegion; exports.writeRegion = _chunk474IQG74cjs.writeRegion;
|
package/dist/raster/index.d.cts
CHANGED
|
@@ -23,3 +23,4 @@ export { activeEffectItems, buildEffectMaps, compositeLayerEffects, contourLut,
|
|
|
23
23
|
export { encodePng, decodePng, isPng, bytesToBase64, base64ToBytes, parseDataUrl, pngDataUrl, type DecodedPng } from './png.cjs';
|
|
24
24
|
export { inflate, inflateRaw, deflate, deflateRaw, adler32, ZlibError } from './zlib.cjs';
|
|
25
25
|
export * from './viewport.cjs';
|
|
26
|
+
export * from './fill.cjs';
|
package/dist/raster/index.d.ts
CHANGED
|
@@ -23,3 +23,4 @@ export { activeEffectItems, buildEffectMaps, compositeLayerEffects, contourLut,
|
|
|
23
23
|
export { encodePng, decodePng, isPng, bytesToBase64, base64ToBytes, parseDataUrl, pngDataUrl, type DecodedPng } from './png.js';
|
|
24
24
|
export { inflate, inflateRaw, deflate, deflateRaw, adler32, ZlibError } from './zlib.js';
|
|
25
25
|
export * from './viewport.js';
|
|
26
|
+
export * from './fill.js';
|
package/dist/raster/index.js
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fillRegionMask,
|
|
3
|
+
findUnfilledRegionsMask,
|
|
4
|
+
squaredDistanceTransform
|
|
5
|
+
} from "../chunk-2A5IKZMU.js";
|
|
1
6
|
import {
|
|
2
7
|
CURVE_LUT_SIZE,
|
|
3
8
|
DEFAULT_GLOBAL_LIGHT,
|
|
@@ -441,7 +446,9 @@ export {
|
|
|
441
446
|
emptySurface,
|
|
442
447
|
encodePng,
|
|
443
448
|
fillRect,
|
|
449
|
+
fillRegionMask,
|
|
444
450
|
findLayer,
|
|
451
|
+
findUnfilledRegionsMask,
|
|
445
452
|
finishTile,
|
|
446
453
|
flattenLayers,
|
|
447
454
|
gaussianBlur,
|
|
@@ -489,6 +496,7 @@ export {
|
|
|
489
496
|
screenToWorld,
|
|
490
497
|
setLum,
|
|
491
498
|
solidSurface,
|
|
499
|
+
squaredDistanceTransform,
|
|
492
500
|
srgbDecode,
|
|
493
501
|
srgbEncode,
|
|
494
502
|
standardBlendMode,
|
package/package.json
CHANGED
package/skills/README.md
CHANGED
|
@@ -52,6 +52,7 @@ request like "clean up this export" finds it.
|
|
|
52
52
|
| [`pixerate-paint-watercolour`](pixerate-paint-watercolour/SKILL.md) | Paint (`pixerate-paint-editor`) | Watercolour paper, light to dark with the paper's white kept, wet-in-wet and wet-on-dry washes, drying before glazing, steering the water. |
|
|
53
53
|
| [`pixerate-paint-oil-impasto`](pixerate-paint-oil-impasto/SKILL.md) | Paint (`pixerate-paint-editor`) | A toned ground, thin block-in to thick paint, pigment mixing, impasto relief and its light. |
|
|
54
54
|
| [`pixerate-paint-sketch-to-finish`](pixerate-paint-sketch-to-finish/SKILL.md) | Paint (`pixerate-paint-editor`) | Sketch, ink, flats under the lines, clipped shading and light, one named layer per pass. |
|
|
55
|
+
| [`pixerate-paint-mutation`](pixerate-paint-mutation/SKILL.md) | Paint (`pixerate-paint-editor`) | Claiming a user's mutation stroke (`read_mutation`) so it fades away, reading the local crop and canvas preview, and painting an answer back (`answer_mutation`) or keeping it (`decline_mutation`). |
|
|
55
56
|
| [`pixerate-brushes-design`](pixerate-brushes-design/SKILL.md) | Brushes (`pixerate-brushes`) | From a description to a saved brush: the nearest preset, only the facets that change, checked for the host that will use it, previewed. |
|
|
56
57
|
| [`pixerate-video-social-cut`](pixerate-video-social-cut/SKILL.md) | Video (`pixerate-video-editor`) | Vertical or square reframes that fill the frame, the hook first, platform lengths, titles in the safe area. |
|
|
57
58
|
| [`pixerate-video-colour-grade`](pixerate-video-colour-grade/SKILL.md) | Video (`pixerate-video-editor`) | Correct and match shots, then one look on an adjustment clip; LUTs at moderate strength with skin protected. |
|
|
@@ -20,6 +20,9 @@ built-in presets (read-only) and the user's brushes, shared by every editor that
|
|
|
20
20
|
| Dynamics | Pen feel: pressure to size and opacity, smoothing, tilt, velocity, jitter (`sizeJitter`, `angleJitter` for rotation, `opacityJitter`, `scatter`), rotation, `count` (dabs per spacing step, each jittered) and `flip` (mirror dabs at random: `x`, `y`, `xy`). |
|
|
21
21
|
| Behaviour | `surface` `dry`, `wet` (`wet` settings) or `thick` (`thick` impasto settings); paper `grain`; `exchange` (pick-up and mix; a `reservoir` makes a Mixer Brush); tool `strength`. |
|
|
22
22
|
| Light | Light the brush gives off (`amount`), plus suggested layer `spill` and `glow`. |
|
|
23
|
+
| Fluorescence | UV-fluorescent ink (`amount` 0..1, `invisible` true for invisible ink that only appears under the paint editor's UV blacklight; preset `uv-marker`). |
|
|
24
|
+
| Thermochromic | Heat-reactive ink (`hotColor` `#rrggbb`, `threshold` 0.05..0.95) that shifts colour where the paint editor's heat brush warms the canvas (preset `thermo-ink`). |
|
|
25
|
+
| Iridescence | Structural thin-film interference (`thickness` 100..1000 nm, `pressureToThickness` 0..1, `ior` 1.2..2.0) whose hue shifts with light and view tilt (`scarab-lacquer`, `soap-film`, `pearl-glaze`). |
|
|
23
26
|
| Ghost | On wet paint (`behaviour.surface: "wet"`): `linger` (0.5..60 s before the brush's own colour fades away) and `smear` (0..1, how much it lifts and drags the paint it crosses). Presets `ghost-wash`, `ghost-gouache`, `ghost-oil` and `invisible-ink`. |
|
|
24
27
|
| Motion | Animation after painting (live effect paint, particle `waveSpeed`). |
|
|
25
28
|
| Colour | A `default` colour, a `palette` of up to 16, `own` (always its own colour). Each is a hex or `rgba()` colour, a light / dark pair `{ light, dark }`, a gradient or effect paint. A gradient default is always painted; a solid or light / dark default becomes the editor's colour when the brush is chosen (unless the user locked theirs), resolved for the colour scheme. Canvas strokes and vector brushstrokes take it too, when they are given no colour. Canvas and vector have the same lock (`canvas.setColorLocked`, `vector.setColorLocked`), and a canvas colour taken from a light / dark default follows the scheme like the paint editor's; vector strokes already made keep theirs. |
|