@pixerate/editor 0.276.0 → 0.277.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-editor/index.cjs +59 -59
- package/dist/animation-editor/index.js +3 -3
- package/dist/brushes/index.cjs +69 -67
- package/dist/brushes/index.js +6 -4
- package/dist/brushes/patch.d.cts +4 -4
- package/dist/brushes/patch.d.ts +4 -4
- package/dist/brushes/profiles.d.cts +2 -0
- package/dist/brushes/profiles.d.ts +2 -0
- package/dist/brushes/schema.d.cts +1 -0
- package/dist/brushes/schema.d.ts +1 -0
- package/dist/brushes/types.d.cts +10 -0
- package/dist/brushes/types.d.ts +10 -0
- package/dist/{brushstrokeRender-I6MYFCOU.cjs → brushstrokeRender-7HOMKZNO.cjs} +15 -15
- package/dist/{brushstrokeRender-FK3ASUUJ.js → brushstrokeRender-EIK3625T.js} +3 -3
- package/dist/canvas/index.cjs +13 -13
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-U26LUXCJ.cjs → chunk-4NZTK7LM.cjs} +35 -35
- package/dist/{chunk-CVBTJVRN.js → chunk-DWPFGWW5.js} +1 -1
- package/dist/{chunk-XMSH66VU.js → chunk-FNIWHSLI.js} +1 -1
- package/dist/{chunk-QNNZA3V5.cjs → chunk-H3EME3S5.cjs} +2 -2
- package/dist/{chunk-4EM5NGCL.js → chunk-HHX7ST6Z.js} +1 -1
- package/dist/{chunk-Q33V5PEF.cjs → chunk-HRUK5TFW.cjs} +73 -12
- package/dist/{chunk-5HR5CSLC.cjs → chunk-JVFGK3DK.cjs} +69 -58
- package/dist/{chunk-JNMNM3SL.js → chunk-LZE2QZCT.js} +1 -1
- package/dist/{chunk-OS6OG7DN.js → chunk-N4MCWQZ7.js} +1 -1
- package/dist/{chunk-IJ6NSWKM.js → chunk-NJLPW4MM.js} +17 -6
- package/dist/{chunk-OY24XRYF.cjs → chunk-PEQWARCP.cjs} +12 -12
- package/dist/{chunk-XVPQNX7O.js → chunk-PPDUCZZV.js} +66 -5
- package/dist/{chunk-X7XBEX3O.cjs → chunk-QBZEC2JJ.cjs} +86 -86
- package/dist/{chunk-GHYJAMMS.js → chunk-ROURHJYT.js} +1 -1
- package/dist/{chunk-ZIE6EJGR.cjs → chunk-VNF7A2JA.cjs} +23 -23
- package/dist/{chunk-ISCAJBPQ.cjs → chunk-WFSYZO5Z.cjs} +1 -1
- package/dist/image-editor/index.cjs +788 -788
- package/dist/image-editor/index.js +4 -4
- package/dist/paint-editor/brush-model.d.cts +15 -1
- package/dist/paint-editor/brush-model.d.ts +15 -1
- package/dist/paint-editor/controller.d.cts +50 -1
- package/dist/paint-editor/controller.d.ts +50 -1
- package/dist/paint-editor/document.d.cts +8 -1
- package/dist/paint-editor/document.d.ts +8 -1
- package/dist/paint-editor/ferro-tools.d.cts +10 -0
- package/dist/paint-editor/ferro-tools.d.ts +10 -0
- package/dist/paint-editor/ferro.d.cts +134 -0
- package/dist/paint-editor/ferro.d.ts +134 -0
- package/dist/paint-editor/index.cjs +1878 -831
- package/dist/paint-editor/index.d.cts +2 -0
- package/dist/paint-editor/index.d.ts +2 -0
- package/dist/paint-editor/index.js +1184 -137
- package/dist/paint-editor/stroke.d.cts +14 -0
- package/dist/paint-editor/stroke.d.ts +14 -0
- package/dist/paint-editor/thick.d.cts +15 -2
- package/dist/paint-editor/thick.d.ts +15 -2
- package/dist/paint-editor/ui.d.cts +2 -0
- package/dist/paint-editor/ui.d.ts +2 -0
- package/dist/vector/index.cjs +998 -998
- package/dist/vector/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-brushes/SKILL.md +1 -0
- package/skills/pixerate-paint-editor/SKILL.md +11 -29
- package/skills/pixerate-paint-editor/references/brush-facets.md +1 -0
- package/skills/pixerate-paint-editor/references/ferrofluid.md +36 -0
|
@@ -114,6 +114,13 @@ export interface StrokeSessionInit {
|
|
|
114
114
|
thermo?: {
|
|
115
115
|
surface: TiledSurface;
|
|
116
116
|
} | null;
|
|
117
|
+
/**
|
|
118
|
+
* Ferrofluid paint: the layer's ferrofluid channel before the stroke. With it, a twin of the
|
|
119
|
+
* stroke paints the ferrofluid channel as grey (see `ferro.ts`); `ferroChannel()` returns the result.
|
|
120
|
+
*/
|
|
121
|
+
ferro?: {
|
|
122
|
+
surface: TiledSurface;
|
|
123
|
+
} | null;
|
|
117
124
|
}
|
|
118
125
|
export interface PaintStrokeResult {
|
|
119
126
|
layerId: string;
|
|
@@ -148,6 +155,9 @@ export declare class PaintStrokeSession {
|
|
|
148
155
|
/** Light paint: the stroke's twin over the light channel, and what it left there. */
|
|
149
156
|
private readonly lightTwin;
|
|
150
157
|
private lightResult;
|
|
158
|
+
/** Ferrofluid paint: the stroke's twin over the ferrofluid channel, and what it left there. */
|
|
159
|
+
private readonly ferroTwin;
|
|
160
|
+
private ferroResult;
|
|
151
161
|
/** UV-fluorescent ink: the stroke's twin over the fluorescence channel, and what it left there. */
|
|
152
162
|
private readonly fluorTwin;
|
|
153
163
|
private fluorResult;
|
|
@@ -186,6 +196,10 @@ export declare class PaintStrokeSession {
|
|
|
186
196
|
fluorChannel(): TiledSurface | null;
|
|
187
197
|
/** Thermochromic ink: the layer's thermochromic channel after the stroke, or `null` when unchanged. */
|
|
188
198
|
thermoChannel(): TiledSurface | null;
|
|
199
|
+
/** The stroke's twin over the ferrofluid channel: the same marks in grey at the brush's ferro amount (see `ferro.ts`). */
|
|
200
|
+
private makeFerroTwin;
|
|
201
|
+
/** Ferrofluid paint: the layer's ferrofluid channel after the stroke, or `null` when the stroke has no twin or left it unchanged. */
|
|
202
|
+
ferroChannel(): TiledSurface | null;
|
|
189
203
|
private tileTarget;
|
|
190
204
|
get open(): boolean;
|
|
191
205
|
/** Adds raw pen samples (document pixels). */
|
|
@@ -114,6 +114,13 @@ export interface StrokeSessionInit {
|
|
|
114
114
|
thermo?: {
|
|
115
115
|
surface: TiledSurface;
|
|
116
116
|
} | null;
|
|
117
|
+
/**
|
|
118
|
+
* Ferrofluid paint: the layer's ferrofluid channel before the stroke. With it, a twin of the
|
|
119
|
+
* stroke paints the ferrofluid channel as grey (see `ferro.ts`); `ferroChannel()` returns the result.
|
|
120
|
+
*/
|
|
121
|
+
ferro?: {
|
|
122
|
+
surface: TiledSurface;
|
|
123
|
+
} | null;
|
|
117
124
|
}
|
|
118
125
|
export interface PaintStrokeResult {
|
|
119
126
|
layerId: string;
|
|
@@ -148,6 +155,9 @@ export declare class PaintStrokeSession {
|
|
|
148
155
|
/** Light paint: the stroke's twin over the light channel, and what it left there. */
|
|
149
156
|
private readonly lightTwin;
|
|
150
157
|
private lightResult;
|
|
158
|
+
/** Ferrofluid paint: the stroke's twin over the ferrofluid channel, and what it left there. */
|
|
159
|
+
private readonly ferroTwin;
|
|
160
|
+
private ferroResult;
|
|
151
161
|
/** UV-fluorescent ink: the stroke's twin over the fluorescence channel, and what it left there. */
|
|
152
162
|
private readonly fluorTwin;
|
|
153
163
|
private fluorResult;
|
|
@@ -186,6 +196,10 @@ export declare class PaintStrokeSession {
|
|
|
186
196
|
fluorChannel(): TiledSurface | null;
|
|
187
197
|
/** Thermochromic ink: the layer's thermochromic channel after the stroke, or `null` when unchanged. */
|
|
188
198
|
thermoChannel(): TiledSurface | null;
|
|
199
|
+
/** The stroke's twin over the ferrofluid channel: the same marks in grey at the brush's ferro amount (see `ferro.ts`). */
|
|
200
|
+
private makeFerroTwin;
|
|
201
|
+
/** Ferrofluid paint: the layer's ferrofluid channel after the stroke, or `null` when the stroke has no twin or left it unchanged. */
|
|
202
|
+
ferroChannel(): TiledSurface | null;
|
|
189
203
|
private tileTarget;
|
|
190
204
|
get open(): boolean;
|
|
191
205
|
/** Adds raw pen samples (document pixels). */
|
|
@@ -20,6 +20,7 @@ import { TiledSurface, type RasterRect } from '../raster/surface.cjs';
|
|
|
20
20
|
import type { IridescenceSettings } from './brush-model.cjs';
|
|
21
21
|
import type { PaintBrush } from './brushes.cjs';
|
|
22
22
|
import { type PenPoint, type StrokeCopy } from './engine.cjs';
|
|
23
|
+
import { type FerroLayerInput } from './ferro.cjs';
|
|
23
24
|
/** Where the light comes from. */
|
|
24
25
|
export interface PaintLighting {
|
|
25
26
|
/** Degrees clockwise from the top of the canvas (315: top left, the default). */
|
|
@@ -66,8 +67,20 @@ export declare function lightTile(color: Uint8ClampedArray, height: Uint8Clamped
|
|
|
66
67
|
/** Cache of lit tiles for one layer, by the identity of their inputs. */
|
|
67
68
|
export declare class LitCache {
|
|
68
69
|
private readonly tiles;
|
|
69
|
-
/**
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* The layer's pixels lit (tiles without relief, film or ferrofluid nearby are the colour tiles
|
|
72
|
+
* themselves). Without ferrofluid this is the thick-paint / thin-film pass; with it, the liquid
|
|
73
|
+
* ferrofluid adds its carrier colour, glossy metallic material and (near magnets) Rosensweig
|
|
74
|
+
* spike heights before the same lighting.
|
|
75
|
+
*/
|
|
76
|
+
lit(color: TiledSurface, ch: ThickChannels, light: PaintLighting, viewTilt?: PaintViewTilt, ferro?: FerroLayerInput | null): TiledSurface;
|
|
77
|
+
/**
|
|
78
|
+
* The ferrofluid lighting pass: every tile with ferrofluid or thick relief nearby is lit, with the
|
|
79
|
+
* liquid's carrier colour and gloss / metal material blended in and its spikes added to the
|
|
80
|
+
* height field. Thick relief is lit even when `light.relief` is 0 here (the spikes need it), and
|
|
81
|
+
* a thin film on the same layer still colours the lit tiles.
|
|
82
|
+
*/
|
|
83
|
+
private litFerro;
|
|
71
84
|
}
|
|
72
85
|
/** Live thin-film iridescence buffer for any stroke engine (deposits or erases into 4-channel `ThickChannels.film`). */
|
|
73
86
|
export declare class FilmBuffer {
|
|
@@ -20,6 +20,7 @@ import { TiledSurface, type RasterRect } from '../raster/surface.js';
|
|
|
20
20
|
import type { IridescenceSettings } from './brush-model.js';
|
|
21
21
|
import type { PaintBrush } from './brushes.js';
|
|
22
22
|
import { type PenPoint, type StrokeCopy } from './engine.js';
|
|
23
|
+
import { type FerroLayerInput } from './ferro.js';
|
|
23
24
|
/** Where the light comes from. */
|
|
24
25
|
export interface PaintLighting {
|
|
25
26
|
/** Degrees clockwise from the top of the canvas (315: top left, the default). */
|
|
@@ -66,8 +67,20 @@ export declare function lightTile(color: Uint8ClampedArray, height: Uint8Clamped
|
|
|
66
67
|
/** Cache of lit tiles for one layer, by the identity of their inputs. */
|
|
67
68
|
export declare class LitCache {
|
|
68
69
|
private readonly tiles;
|
|
69
|
-
/**
|
|
70
|
-
|
|
70
|
+
/**
|
|
71
|
+
* The layer's pixels lit (tiles without relief, film or ferrofluid nearby are the colour tiles
|
|
72
|
+
* themselves). Without ferrofluid this is the thick-paint / thin-film pass; with it, the liquid
|
|
73
|
+
* ferrofluid adds its carrier colour, glossy metallic material and (near magnets) Rosensweig
|
|
74
|
+
* spike heights before the same lighting.
|
|
75
|
+
*/
|
|
76
|
+
lit(color: TiledSurface, ch: ThickChannels, light: PaintLighting, viewTilt?: PaintViewTilt, ferro?: FerroLayerInput | null): TiledSurface;
|
|
77
|
+
/**
|
|
78
|
+
* The ferrofluid lighting pass: every tile with ferrofluid or thick relief nearby is lit, with the
|
|
79
|
+
* liquid's carrier colour and gloss / metal material blended in and its spikes added to the
|
|
80
|
+
* height field. Thick relief is lit even when `light.relief` is 0 here (the spikes need it), and
|
|
81
|
+
* a thin film on the same layer still colours the lit tiles.
|
|
82
|
+
*/
|
|
83
|
+
private litFerro;
|
|
71
84
|
}
|
|
72
85
|
/** Live thin-film iridescence buffer for any stroke engine (deposits or erases into 4-channel `ThickChannels.film`). */
|
|
73
86
|
export declare class FilmBuffer {
|
|
@@ -302,6 +302,8 @@ export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
|
302
302
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
303
303
|
/** The evolution panel's mutation sliders (`0..1`). */
|
|
304
304
|
export declare const EVOLUTION_SLIDERS: readonly SliderControl[];
|
|
305
|
+
/** The ferrofluid panel's sliders for a magnet (`strength` and `radius`). */
|
|
306
|
+
export declare const MAGNET_SLIDERS: readonly SliderControl[];
|
|
305
307
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
306
308
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
307
309
|
width: number;
|
|
@@ -302,6 +302,8 @@ export declare const STROKE_SLIDERS: readonly SliderControl[];
|
|
|
302
302
|
export declare const STICKER_SLIDERS: readonly SliderControl[];
|
|
303
303
|
/** The evolution panel's mutation sliders (`0..1`). */
|
|
304
304
|
export declare const EVOLUTION_SLIDERS: readonly SliderControl[];
|
|
305
|
+
/** The ferrofluid panel's sliders for a magnet (`strength` and `radius`). */
|
|
306
|
+
export declare const MAGNET_SLIDERS: readonly SliderControl[];
|
|
305
307
|
/** Stencils a toolbar can lay with one click, centred on the canvas. */
|
|
306
308
|
export declare function quickStencil(kind: 'ruler' | 'circle' | 'ellipse-mask' | 'edge-mask', canvas: {
|
|
307
309
|
width: number;
|