@pixerate/editor 0.274.0 → 0.275.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 +60 -60
- package/dist/animation-editor/index.js +4 -4
- package/dist/brushes/index.cjs +102 -74
- package/dist/brushes/index.js +34 -6
- package/dist/brushes/patch.d.cts +1 -1
- package/dist/brushes/patch.d.ts +1 -1
- package/dist/brushes/preview.d.cts +3 -0
- package/dist/brushes/preview.d.ts +3 -0
- package/dist/brushes/profiles.d.cts +2 -0
- package/dist/brushes/profiles.d.ts +2 -0
- package/dist/brushes/schema.d.cts +4 -0
- package/dist/brushes/schema.d.ts +4 -0
- package/dist/brushes/types.d.cts +47 -0
- package/dist/brushes/types.d.ts +47 -0
- package/dist/{brushstrokeRender-5YBCLFDQ.cjs → brushstrokeRender-2RQL46WB.cjs} +15 -15
- package/dist/{brushstrokeRender-DZGFU3J4.js → brushstrokeRender-WGY4DZHF.js} +3 -3
- package/dist/canvas/index.cjs +13 -13
- package/dist/canvas/index.js +1 -1
- package/dist/chart/contract.d.cts +3 -1
- package/dist/chart/contract.d.ts +3 -1
- package/dist/{chunk-2XDNF73E.js → chunk-43XJC3PP.js} +1 -1
- package/dist/{chunk-GHGBIAWQ.cjs → chunk-6QNDGMK7.cjs} +263 -45
- package/dist/{chunk-2F3YDXCN.js → chunk-75SYKUOT.js} +1 -1
- package/dist/{chunk-M3RZOF3G.cjs → chunk-C6VB7CPY.cjs} +1 -1
- package/dist/{chunk-N5IMDAHM.cjs → chunk-DHC4E2DU.cjs} +89 -37
- package/dist/{chunk-NAHJV3O6.js → chunk-G5TCMKX5.js} +28 -11
- package/dist/{chunk-DZVRH63Y.js → chunk-IEEY5RJV.js} +1 -1
- package/dist/{chunk-7W2EQQBP.cjs → chunk-JDXWLCXF.cjs} +6 -6
- package/dist/{chunk-N3SKPQEH.js → chunk-LMG57L5A.js} +62 -10
- package/dist/{chunk-5HP2VSAS.js → chunk-MSWLJI4G.js} +1 -1
- package/dist/{chunk-SNAFFCAX.cjs → chunk-OLZXXAER.cjs} +221 -196
- package/dist/{chunk-YJANF2BL.cjs → chunk-RAPNRK4R.cjs} +86 -86
- package/dist/{chunk-CLB2I2FU.js → chunk-RJGW3RQS.js} +2 -2
- package/dist/{chunk-FXVCB6YG.cjs → chunk-T6KNJVBP.cjs} +35 -35
- package/dist/{chunk-ZEI7ZEA4.js → chunk-Y2ISSVPH.js} +34 -9
- package/dist/{chunk-3JKCREEU.cjs → chunk-Y354ETAE.cjs} +76 -59
- package/dist/{chunk-TNLKFW7D.cjs → chunk-YYZC2EQO.cjs} +23 -23
- package/dist/{chunk-UXYCY3HP.js → chunk-ZM7IKQ4X.js} +239 -21
- package/dist/image-editor/index.cjs +789 -789
- package/dist/image-editor/index.js +5 -5
- package/dist/paint/index.cjs +2 -2
- package/dist/paint/index.js +1 -1
- package/dist/paint/wet/world.d.cts +15 -2
- package/dist/paint/wet/world.d.ts +15 -2
- package/dist/paint-editor/brush-controls.d.cts +7 -0
- package/dist/paint-editor/brush-controls.d.ts +7 -0
- package/dist/paint-editor/brush-model.d.cts +59 -1
- package/dist/paint-editor/brush-model.d.ts +59 -1
- package/dist/paint-editor/controller.d.cts +168 -1
- package/dist/paint-editor/controller.d.ts +168 -1
- package/dist/paint-editor/dab-stroke.d.cts +3 -0
- package/dist/paint-editor/dab-stroke.d.ts +3 -0
- package/dist/paint-editor/document.d.cts +13 -3
- package/dist/paint-editor/document.d.ts +13 -3
- package/dist/paint-editor/engine.d.cts +3 -0
- package/dist/paint-editor/engine.d.ts +3 -0
- package/dist/paint-editor/heat.d.cts +156 -0
- package/dist/paint-editor/heat.d.ts +156 -0
- package/dist/paint-editor/index.cjs +3386 -855
- package/dist/paint-editor/index.d.cts +3 -0
- package/dist/paint-editor/index.d.ts +3 -0
- package/dist/paint-editor/index.js +2731 -200
- package/dist/paint-editor/mutation-tools.d.cts +13 -0
- package/dist/paint-editor/mutation-tools.d.ts +13 -0
- package/dist/paint-editor/mutation.d.cts +67 -0
- package/dist/paint-editor/mutation.d.ts +67 -0
- package/dist/paint-editor/presence.d.cts +7 -1
- package/dist/paint-editor/presence.d.ts +7 -1
- package/dist/paint-editor/procedural.d.cts +3 -0
- package/dist/paint-editor/procedural.d.ts +3 -0
- package/dist/paint-editor/stroke.d.cts +32 -2
- package/dist/paint-editor/stroke.d.ts +32 -2
- package/dist/paint-editor/thick.d.cts +48 -7
- package/dist/paint-editor/thick.d.ts +48 -7
- package/dist/paint-editor/ui.d.cts +34 -1
- package/dist/paint-editor/ui.d.ts +34 -1
- package/dist/paint-editor/wet.d.cts +8 -1
- package/dist/paint-editor/wet.d.ts +8 -1
- package/dist/vector/index.cjs +999 -999
- package/dist/vector/index.js +5 -5
- package/package.json +1 -1
- package/skills/pixerate-brushes/SKILL.md +1 -0
- package/skills/pixerate-paint-editor/SKILL.md +7 -1
- package/skills/pixerate-paint-editor/references/brush-facets.md +1 -0
- package/skills/pixerate-paint-editor/references/live-patterns.md +41 -0
- package/skills/pixerate-paint-watercolour/SKILL.md +8 -0
|
@@ -156,7 +156,7 @@ export declare function guideOverlay(controller: PaintEditorController, drag?: {
|
|
|
156
156
|
to: Point2;
|
|
157
157
|
kind: GuideOverlayKind;
|
|
158
158
|
}>;
|
|
159
|
-
export { BRUSH_SLIDERS, brushEngineControls, GHOST_SLIDERS, multiColorSliders, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.js';
|
|
159
|
+
export { BRUSH_SLIDERS, brushEngineControls, GHOST_SLIDERS, IRIDESCENCE_SLIDERS, multiColorSliders, MUTATION_SLIDERS, patchBrushValue, type BrushEngineControls, type SliderControl } from './brush-controls.js';
|
|
160
160
|
import type { SliderControl } from './brush-controls.js';
|
|
161
161
|
export declare const PAPER_SLIDERS: readonly SliderControl[];
|
|
162
162
|
/** Reads `a.b` from an object. */
|
|
@@ -230,6 +230,39 @@ export declare const WET_MEDIUM_LABELS: Readonly<Record<WetMediumKind, string>>;
|
|
|
230
230
|
export declare const IMPASTO_TOOL_LABELS: Readonly<Record<ImpastoTool, string>>;
|
|
231
231
|
/** The light sliders (thick paint and metallic paper). */
|
|
232
232
|
export declare const LIGHT_SLIDERS: readonly SliderControl[];
|
|
233
|
+
/** The UV blacklight sliders. */
|
|
234
|
+
export declare const UV_LIGHT_SLIDERS: readonly SliderControl[];
|
|
235
|
+
/** The view tilt sliders (thin-film iridescence and specular highlights). */
|
|
236
|
+
export declare const VIEW_TILT_SLIDERS: readonly SliderControl[];
|
|
237
|
+
/**
|
|
238
|
+
* Maps `DeviceOrientationEvent` angles (`beta` front-to-back in degrees, `gamma` left-to-right in
|
|
239
|
+
* degrees) relative to `rest` (default `{ beta: 45, gamma: 0 }`, a tablet held in hand) into a
|
|
240
|
+
* `viewTilt` in `-1..1` (35° reaches full tilt), rounded to 0.01.
|
|
241
|
+
*/
|
|
242
|
+
export declare function deviceOrientationToViewTilt(betaOrEvent: number | {
|
|
243
|
+
beta?: number | null;
|
|
244
|
+
gamma?: number | null;
|
|
245
|
+
} | null | undefined, gammaOrRest?: number | {
|
|
246
|
+
beta: number;
|
|
247
|
+
gamma: number;
|
|
248
|
+
} | null | undefined, rest?: {
|
|
249
|
+
beta: number;
|
|
250
|
+
gamma: number;
|
|
251
|
+
}): {
|
|
252
|
+
x: number;
|
|
253
|
+
y: number;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Asks iOS Safari for `DeviceOrientationEvent` permission when `requestPermission` is present
|
|
257
|
+
* (must be called from a user gesture on iOS 13+). Resolves to `'granted'` on browsers that do not
|
|
258
|
+
* gate `deviceorientation` behind a permission prompt, or `'unsupported'` without `DeviceOrientationEvent`.
|
|
259
|
+
*/
|
|
260
|
+
export declare function requestDeviceTiltPermission(): Promise<'granted' | 'denied' | 'unsupported'>;
|
|
261
|
+
/**
|
|
262
|
+
* Listens to `deviceorientation` events on `globalThis` and updates `controller.setViewTilt` relative
|
|
263
|
+
* to the first reading's orientation. Returns a cleanup function.
|
|
264
|
+
*/
|
|
265
|
+
export declare function startDeviceTilt(controller: PaintEditorController): () => void;
|
|
233
266
|
/** Labels of the particle kinds and renders. */
|
|
234
267
|
export declare const PARTICLE_KIND_LABELS: Readonly<Record<ParticleKind, string>>;
|
|
235
268
|
export declare const PARTICLE_RENDER_LABELS: Readonly<Record<ParticleRender, string>>;
|
|
@@ -32,6 +32,7 @@ import { TiledSurface, type RasterRect } from '../raster/surface.cjs';
|
|
|
32
32
|
import type { PaintBrush, WetMediumKind } from './brushes.cjs';
|
|
33
33
|
import { type PenPoint, type StrokeCopy } from './engine.cjs';
|
|
34
34
|
import { type PaperGrain as PaperGrainType, type PaperSettings } from './paper.cjs';
|
|
35
|
+
import type { FilmBuffer } from './thick.cjs';
|
|
35
36
|
/** The paper as the wet simulation reads it. */
|
|
36
37
|
export declare function wetPaperInput(paper: PaperSettings): WetPaperInput;
|
|
37
38
|
export interface WetStrokeInit {
|
|
@@ -60,6 +61,8 @@ export interface WetStrokeInit {
|
|
|
60
61
|
* the water like any pigment.
|
|
61
62
|
*/
|
|
62
63
|
effect?: EffectPaintPixels | null;
|
|
64
|
+
/** Thin-film iridescence channel for wet brushes with `iridescence`. */
|
|
65
|
+
film?: FilmBuffer | null;
|
|
63
66
|
/** Simulation steps per second (for ghost fade countdown). */
|
|
64
67
|
speed?: number;
|
|
65
68
|
}
|
|
@@ -137,7 +140,7 @@ export interface WetEvent {
|
|
|
137
140
|
clock: number;
|
|
138
141
|
/** How many strokes were recorded before it (where it falls between strokes in a replay). */
|
|
139
142
|
at?: number;
|
|
140
|
-
kind: 'dry' | 'tilt' | 'params' | 'flow' | 'wet-paper';
|
|
143
|
+
kind: 'dry' | 'tilt' | 'params' | 'flow' | 'wet-paper' | 'ghost-release' | 'ghost-keep';
|
|
141
144
|
layerId?: string;
|
|
142
145
|
data?: unknown;
|
|
143
146
|
}
|
|
@@ -296,6 +299,10 @@ export declare class PaintWetLayers {
|
|
|
296
299
|
layerId: string;
|
|
297
300
|
bounds: RasterRect | null;
|
|
298
301
|
}>;
|
|
302
|
+
/** Starts the fade countdown of an agent-triggered ghost on `layerId`. */
|
|
303
|
+
releaseGhost(layerId: string, linger?: number): void;
|
|
304
|
+
/** Keeps an unclaimed agent-triggered ghost on `layerId` as ordinary wet paint. */
|
|
305
|
+
keepGhost(layerId: string): void;
|
|
299
306
|
/** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
|
|
300
307
|
bakedLight(layerId: string): TiledSurface | null;
|
|
301
308
|
/** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
|
|
@@ -32,6 +32,7 @@ import { TiledSurface, type RasterRect } from '../raster/surface.js';
|
|
|
32
32
|
import type { PaintBrush, WetMediumKind } from './brushes.js';
|
|
33
33
|
import { type PenPoint, type StrokeCopy } from './engine.js';
|
|
34
34
|
import { type PaperGrain as PaperGrainType, type PaperSettings } from './paper.js';
|
|
35
|
+
import type { FilmBuffer } from './thick.js';
|
|
35
36
|
/** The paper as the wet simulation reads it. */
|
|
36
37
|
export declare function wetPaperInput(paper: PaperSettings): WetPaperInput;
|
|
37
38
|
export interface WetStrokeInit {
|
|
@@ -60,6 +61,8 @@ export interface WetStrokeInit {
|
|
|
60
61
|
* the water like any pigment.
|
|
61
62
|
*/
|
|
62
63
|
effect?: EffectPaintPixels | null;
|
|
64
|
+
/** Thin-film iridescence channel for wet brushes with `iridescence`. */
|
|
65
|
+
film?: FilmBuffer | null;
|
|
63
66
|
/** Simulation steps per second (for ghost fade countdown). */
|
|
64
67
|
speed?: number;
|
|
65
68
|
}
|
|
@@ -137,7 +140,7 @@ export interface WetEvent {
|
|
|
137
140
|
clock: number;
|
|
138
141
|
/** How many strokes were recorded before it (where it falls between strokes in a replay). */
|
|
139
142
|
at?: number;
|
|
140
|
-
kind: 'dry' | 'tilt' | 'params' | 'flow' | 'wet-paper';
|
|
143
|
+
kind: 'dry' | 'tilt' | 'params' | 'flow' | 'wet-paper' | 'ghost-release' | 'ghost-keep';
|
|
141
144
|
layerId?: string;
|
|
142
145
|
data?: unknown;
|
|
143
146
|
}
|
|
@@ -296,6 +299,10 @@ export declare class PaintWetLayers {
|
|
|
296
299
|
layerId: string;
|
|
297
300
|
bounds: RasterRect | null;
|
|
298
301
|
}>;
|
|
302
|
+
/** Starts the fade countdown of an agent-triggered ghost on `layerId`. */
|
|
303
|
+
releaseGhost(layerId: string, linger?: number): void;
|
|
304
|
+
/** Keeps an unclaimed agent-triggered ghost on `layerId` as ordinary wet paint. */
|
|
305
|
+
keepGhost(layerId: string): void;
|
|
299
306
|
/** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
|
|
300
307
|
bakedLight(layerId: string): TiledSurface | null;
|
|
301
308
|
/** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
|