@pixerate/editor 0.243.0 → 0.244.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.
Files changed (62) hide show
  1. package/dist/animation-editor/index.cjs +59 -59
  2. package/dist/animation-editor/index.js +3 -3
  3. package/dist/{brushstrokeRender-274HGNZR.js → brushstrokeRender-4542T5HP.js} +2 -2
  4. package/dist/{brushstrokeRender-C7RJZPMC.cjs → brushstrokeRender-QA5WVIDT.cjs} +5 -5
  5. package/dist/canvas/index.cjs +8 -8
  6. package/dist/canvas/index.js +1 -1
  7. package/dist/{chunk-6L3WWIDW.js → chunk-4EQY4TZJ.js} +1 -1
  8. package/dist/{chunk-5FZS7J7C.cjs → chunk-4T47Z4J3.cjs} +18 -2
  9. package/dist/{chunk-4ZHXLFXS.js → chunk-5RFENYO5.js} +1 -1
  10. package/dist/{chunk-SRXWDOUI.js → chunk-7YQNKSQ7.js} +1 -1
  11. package/dist/{chunk-OONFIFEU.cjs → chunk-BDIH4DYR.cjs} +23 -23
  12. package/dist/{chunk-KK2FWMA2.cjs → chunk-HZ547SGQ.cjs} +1 -1
  13. package/dist/{chunk-3WOZEBXZ.cjs → chunk-IZL5V5RK.cjs} +2 -2
  14. package/dist/{chunk-IXI5KATU.js → chunk-L5PB7EG3.js} +1 -1
  15. package/dist/{chunk-R2FVAKFH.cjs → chunk-M6JORA5Z.cjs} +86 -86
  16. package/dist/{chunk-H4Z72Z4Z.js → chunk-OSTKS3YN.js} +1 -1
  17. package/dist/{chunk-HLBTRSQJ.js → chunk-P3NIPIKS.js} +263 -63
  18. package/dist/{chunk-UV7OOZJQ.cjs → chunk-SD23XMVJ.cjs} +35 -35
  19. package/dist/{chunk-HQZHOPNE.js → chunk-TBJEMELS.js} +18 -2
  20. package/dist/{chunk-XFYLA3ZO.cjs → chunk-VMROIWLL.cjs} +290 -90
  21. package/dist/image-editor/index.cjs +785 -777
  22. package/dist/image-editor/index.js +13 -5
  23. package/dist/kernel-wasm-4KVONDAU.js +9 -0
  24. package/dist/kernel-wasm-TTYRBGAK.cjs +9 -0
  25. package/dist/paint/index.cjs +10 -2
  26. package/dist/paint/index.js +9 -1
  27. package/dist/paint/wet/film.d.cts +19 -1
  28. package/dist/paint/wet/film.d.ts +19 -1
  29. package/dist/paint/wet/gpu-kernels.d.cts +2 -2
  30. package/dist/paint/wet/gpu-kernels.d.ts +2 -2
  31. package/dist/paint/wet/kernel-wasm.d.cts +5 -5
  32. package/dist/paint/wet/kernel-wasm.d.ts +5 -5
  33. package/dist/paint/wet/kernel.d.cts +1 -1
  34. package/dist/paint/wet/kernel.d.ts +1 -1
  35. package/dist/paint/wet/medium.d.cts +3 -1
  36. package/dist/paint/wet/medium.d.ts +3 -1
  37. package/dist/paint/wet/model.d.cts +19 -4
  38. package/dist/paint/wet/model.d.ts +19 -4
  39. package/dist/paint/wet/world.d.cts +34 -8
  40. package/dist/paint/wet/world.d.ts +34 -8
  41. package/dist/paint-editor/backlight.d.cts +77 -0
  42. package/dist/paint-editor/backlight.d.ts +77 -0
  43. package/dist/paint-editor/controller.d.cts +11 -0
  44. package/dist/paint-editor/controller.d.ts +11 -0
  45. package/dist/paint-editor/index.cjs +685 -397
  46. package/dist/paint-editor/index.d.cts +1 -0
  47. package/dist/paint-editor/index.d.ts +1 -0
  48. package/dist/paint-editor/index.js +308 -20
  49. package/dist/paint-editor/paper.d.cts +7 -0
  50. package/dist/paint-editor/paper.d.ts +7 -0
  51. package/dist/paint-editor/wet.d.cts +9 -0
  52. package/dist/paint-editor/wet.d.ts +9 -0
  53. package/dist/vector/index.cjs +962 -962
  54. package/dist/vector/index.js +4 -4
  55. package/package.json +1 -1
  56. package/skills/pixerate-paint-editor/SKILL.md +3 -3
  57. package/skills/pixerate-paint-editor/references/light-paint.md +24 -7
  58. package/skills/pixerate-paint-watercolour/SKILL.md +10 -1
  59. package/skills/pixerate-paint-watercolour/evals/glowing-wash.json +22 -0
  60. package/skills/pixerate-paint-watercolour/evals/stained-glass.json +16 -0
  61. package/dist/kernel-wasm-6FPOLVUZ.cjs +0 -9
  62. package/dist/kernel-wasm-WIMMJUF2.js +0 -9
@@ -84,6 +84,7 @@ export declare class WetStrokeDriver {
84
84
  private readonly paint;
85
85
  private readonly centre;
86
86
  private readonly depth;
87
+ private readonly lightBase;
87
88
  constructor(init: WetStrokeInit);
88
89
  private readonly sampler;
89
90
  private readonly sample;
@@ -143,6 +144,10 @@ export interface PaintWetHost {
143
144
  layerSurface(id: string): TiledSurface | null;
144
145
  /** Shows new pixels for wet layers (not an undo step); `rects` are where they changed. */
145
146
  updateSurfaces(surfaces: ReadonlyMap<string, TiledSurface>, rects: RasterRect[]): void;
147
+ /** The layer's light paint (one channel), or `null` without any. */
148
+ layerLight(id: string): TiledSurface | null;
149
+ /** Shows new light paint for wet layers (not an undo step); the next `updateSurfaces` redraws. */
150
+ updateLights(lights: ReadonlyMap<string, TiledSurface>): void;
146
151
  /** The paint dried while time passed (the editor records nothing, it just redraws). */
147
152
  changed(): void;
148
153
  }
@@ -259,6 +264,8 @@ export declare class PaintWetLayers {
259
264
  syncDisplays(maxTiles?: number): RasterRect[];
260
265
  /** Like `syncDisplays`, shading on the GPU when Engine B is active (all stale tiles at once). */
261
266
  syncDisplaysGpu(maxCpuTiles: number, lead?: boolean): Promise<RasterRect[]>;
267
+ /** Shows each wet layer's live light paint (the light under it with the wet light shaded in). */
268
+ private syncLights;
262
269
  /** Drops the wet layers whose paint has all dried (they become ordinary pixel layers). */
263
270
  private retireDry;
264
271
  /**
@@ -282,6 +289,8 @@ export declare class PaintWetLayers {
282
289
  layerId: string;
283
290
  bounds: RasterRect | null;
284
291
  }>;
292
+ /** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
293
+ bakedLight(layerId: string): TiledSurface | null;
285
294
  /** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
286
295
  bakedSurface(layerId: string): TiledSurface | null;
287
296
  /** A snapshot of the world for undo (`null` when there is none). */
@@ -84,6 +84,7 @@ export declare class WetStrokeDriver {
84
84
  private readonly paint;
85
85
  private readonly centre;
86
86
  private readonly depth;
87
+ private readonly lightBase;
87
88
  constructor(init: WetStrokeInit);
88
89
  private readonly sampler;
89
90
  private readonly sample;
@@ -143,6 +144,10 @@ export interface PaintWetHost {
143
144
  layerSurface(id: string): TiledSurface | null;
144
145
  /** Shows new pixels for wet layers (not an undo step); `rects` are where they changed. */
145
146
  updateSurfaces(surfaces: ReadonlyMap<string, TiledSurface>, rects: RasterRect[]): void;
147
+ /** The layer's light paint (one channel), or `null` without any. */
148
+ layerLight(id: string): TiledSurface | null;
149
+ /** Shows new light paint for wet layers (not an undo step); the next `updateSurfaces` redraws. */
150
+ updateLights(lights: ReadonlyMap<string, TiledSurface>): void;
146
151
  /** The paint dried while time passed (the editor records nothing, it just redraws). */
147
152
  changed(): void;
148
153
  }
@@ -259,6 +264,8 @@ export declare class PaintWetLayers {
259
264
  syncDisplays(maxTiles?: number): RasterRect[];
260
265
  /** Like `syncDisplays`, shading on the GPU when Engine B is active (all stale tiles at once). */
261
266
  syncDisplaysGpu(maxCpuTiles: number, lead?: boolean): Promise<RasterRect[]>;
267
+ /** Shows each wet layer's live light paint (the light under it with the wet light shaded in). */
268
+ private syncLights;
262
269
  /** Drops the wet layers whose paint has all dried (they become ordinary pixel layers). */
263
270
  private retireDry;
264
271
  /**
@@ -282,6 +289,8 @@ export declare class PaintWetLayers {
282
289
  layerId: string;
283
290
  bounds: RasterRect | null;
284
291
  }>;
292
+ /** The layer's light paint with all its wet paint dried (`null` without a wet layer or light), without changing anything. */
293
+ bakedLight(layerId: string): TiledSurface | null;
285
294
  /** The layer's pixels with all its wet paint dried (deterministic), without changing anything. */
286
295
  bakedSurface(layerId: string): TiledSurface | null;
287
296
  /** A snapshot of the world for undo (`null` when there is none). */