@pixerate/editor 0.246.0 → 0.249.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 (105) hide show
  1. package/README.md +1 -0
  2. package/dist/animation-editor/index.cjs +64 -61
  3. package/dist/animation-editor/index.js +8 -5
  4. package/dist/{brushstrokeRender-ZDHMXJAE.cjs → brushstrokeRender-GCKK7V2I.cjs} +14 -11
  5. package/dist/{brushstrokeRender-AKUI3SEJ.js → brushstrokeRender-T3JZST44.js} +7 -4
  6. package/dist/canvas/index.cjs +8 -8
  7. package/dist/canvas/index.js +1 -1
  8. package/dist/{chunk-UVPD55UZ.cjs → chunk-2SMMZDMG.cjs} +35 -35
  9. package/dist/chunk-2VJAVXLI.js +192 -0
  10. package/dist/{chunk-OLNIPTB3.cjs → chunk-2VX55NFM.cjs} +1 -320
  11. package/dist/chunk-3K6HWEXZ.cjs +92 -0
  12. package/dist/{chunk-UOOK7HTX.js → chunk-3PPJRMIG.js} +1 -1
  13. package/dist/chunk-4D6KP5BV.js +92 -0
  14. package/dist/chunk-5RH3VXAK.js +269 -0
  15. package/dist/{chunk-LDPLEZ5T.js → chunk-6BIDVPED.js} +1 -1
  16. package/dist/{chunk-2ONK3ERD.cjs → chunk-75K3W4D6.cjs} +20 -20
  17. package/dist/chunk-BOHDJJ2O.cjs +192 -0
  18. package/dist/{chunk-2PBZBRP5.js → chunk-D5KGAO4Z.js} +10 -92
  19. package/dist/{chunk-DQWPMGH2.js → chunk-DOIU7VJG.js} +1 -1
  20. package/dist/{chunk-HB4ICNNA.cjs → chunk-DPYAO5U6.cjs} +42 -42
  21. package/dist/chunk-EJLRBS5Q.js +301 -0
  22. package/dist/{chunk-Q2UYUWAZ.cjs → chunk-H4AOUUBE.cjs} +679 -164
  23. package/dist/{chunk-PQ3H2AAN.cjs → chunk-I7NJPHWV.cjs} +122 -204
  24. package/dist/{chunk-FK5LTDOO.cjs → chunk-IOFVM3L3.cjs} +7 -7
  25. package/dist/{chunk-42TWUPNJ.js → chunk-IRSTHLQQ.js} +1 -320
  26. package/dist/{chunk-VDAWA546.js → chunk-J7T5QZ45.js} +614 -99
  27. package/dist/{chunk-VMROIWLL.cjs → chunk-KBYB7OWB.cjs} +3 -3
  28. package/dist/{chunk-5MFDD7SP.cjs → chunk-KYX7NZ5V.cjs} +1 -1
  29. package/dist/chunk-LJRCU3BJ.cjs +301 -0
  30. package/dist/{chunk-XTWXBQD4.cjs → chunk-LP2MCSBE.cjs} +593 -236
  31. package/dist/{chunk-A23PSOBB.js → chunk-O75V4ZS3.js} +1 -1
  32. package/dist/chunk-OTTT5N3K.js +322 -0
  33. package/dist/{chunk-N6WUB3Y5.js → chunk-PZP2SZIZ.js} +2 -2
  34. package/dist/{chunk-4PMCMWQS.js → chunk-UBRJOIR5.js} +367 -10
  35. package/dist/chunk-W5M3J7PV.cjs +322 -0
  36. package/dist/{chunk-4P6H35HU.js → chunk-WA44NKPF.js} +2 -2
  37. package/dist/{chunk-CEPKXLBS.cjs → chunk-WLJZZHUZ.cjs} +23 -23
  38. package/dist/{chunk-P3NIPIKS.js → chunk-WQCNC4DK.js} +1 -1
  39. package/dist/chunk-ZEYMKDYS.cjs +269 -0
  40. package/dist/image-editor/effect-tools.d.cts +37 -4
  41. package/dist/image-editor/effect-tools.d.ts +37 -4
  42. package/dist/image-editor/index.cjs +1340 -1828
  43. package/dist/image-editor/index.d.cts +1 -1
  44. package/dist/image-editor/index.d.ts +1 -1
  45. package/dist/image-editor/index.js +298 -786
  46. package/dist/paint/index.cjs +8 -5
  47. package/dist/paint/index.js +13 -10
  48. package/dist/paint-editor/controller.d.cts +71 -2
  49. package/dist/paint-editor/controller.d.ts +71 -2
  50. package/dist/paint-editor/index.cjs +901 -589
  51. package/dist/paint-editor/index.d.cts +3 -0
  52. package/dist/paint-editor/index.d.ts +3 -0
  53. package/dist/paint-editor/index.js +365 -53
  54. package/dist/paint-editor/procedural.d.cts +82 -5
  55. package/dist/paint-editor/procedural.d.ts +82 -5
  56. package/dist/paint-editor/sticker-art.d.cts +55 -0
  57. package/dist/paint-editor/sticker-art.d.ts +55 -0
  58. package/dist/paint-editor/stickers.d.cts +30 -17
  59. package/dist/paint-editor/stickers.d.ts +30 -17
  60. package/dist/paint-editor/stroke.d.cts +4 -0
  61. package/dist/paint-editor/stroke.d.ts +4 -0
  62. package/dist/paint-editor/tools.d.cts +1 -1
  63. package/dist/paint-editor/tools.d.ts +1 -1
  64. package/dist/paint-editor/ui.d.cts +25 -4
  65. package/dist/paint-editor/ui.d.ts +25 -4
  66. package/dist/{image-editor/layers/effects-ui.d.cts → raster/effects/ui.d.cts} +32 -5
  67. package/dist/{image-editor/layers/effects-ui.d.ts → raster/effects/ui.d.ts} +32 -5
  68. package/dist/raster/index.cjs +17 -3
  69. package/dist/raster/index.d.cts +1 -0
  70. package/dist/raster/index.d.ts +1 -0
  71. package/dist/raster/index.js +23 -9
  72. package/dist/stickers/browser.d.cts +48 -0
  73. package/dist/stickers/browser.d.ts +48 -0
  74. package/dist/stickers/combine.d.cts +10 -0
  75. package/dist/stickers/combine.d.ts +10 -0
  76. package/dist/stickers/conformance.d.cts +18 -0
  77. package/dist/stickers/conformance.d.ts +18 -0
  78. package/dist/stickers/editor.d.cts +14 -0
  79. package/dist/stickers/editor.d.ts +14 -0
  80. package/dist/stickers/errors.d.cts +6 -0
  81. package/dist/stickers/errors.d.ts +6 -0
  82. package/dist/stickers/fake.d.cts +16 -0
  83. package/dist/stickers/fake.d.ts +16 -0
  84. package/dist/stickers/helpers.d.cts +51 -0
  85. package/dist/stickers/helpers.d.ts +51 -0
  86. package/dist/stickers/index.cjs +331 -0
  87. package/dist/stickers/index.d.cts +16 -0
  88. package/dist/stickers/index.d.ts +16 -0
  89. package/dist/stickers/index.js +331 -0
  90. package/dist/stickers/stamps.d.cts +13 -0
  91. package/dist/stickers/stamps.d.ts +13 -0
  92. package/dist/stickers/tools.d.cts +25 -0
  93. package/dist/stickers/tools.d.ts +25 -0
  94. package/dist/stickers/types.d.cts +123 -0
  95. package/dist/stickers/types.d.ts +123 -0
  96. package/dist/vector/index.cjs +978 -975
  97. package/dist/vector/index.js +9 -6
  98. package/package.json +11 -1
  99. package/skills/README.md +1 -0
  100. package/skills/pixerate-paint-editor/SKILL.md +26 -32
  101. package/skills/pixerate-paint-editor/references/gradient-paint.md +23 -0
  102. package/skills/pixerate-paint-editor/references/layer-effects.md +28 -0
  103. package/skills/pixerate-paint-editor/references/light-paint.md +10 -2
  104. package/skills/pixerate-paint-editor/references/particle-brushes.md +66 -0
  105. package/skills/pixerate-stickers/SKILL.md +45 -0
@@ -26,7 +26,7 @@ import {
26
26
  traceField,
27
27
  traceVectorImage,
28
28
  vectorTraceContours
29
- } from "../chunk-DQWPMGH2.js";
29
+ } from "../chunk-DOIU7VJG.js";
30
30
  import {
31
31
  applyHomography,
32
32
  homographyFromPoints,
@@ -53,7 +53,7 @@ import {
53
53
  reverseMorphContour,
54
54
  subpathToMorphContour,
55
55
  turnMorphContour
56
- } from "../chunk-A23PSOBB.js";
56
+ } from "../chunk-O75V4ZS3.js";
57
57
  import {
58
58
  DEFAULT_VECTOR_FONT,
59
59
  IDENTITY_MATRIX,
@@ -526,8 +526,9 @@ import {
526
526
  withVectorStrokes,
527
527
  withVectorTargetPaint,
528
528
  zigzagPaths
529
- } from "../chunk-N6WUB3Y5.js";
530
- import "../chunk-VDAWA546.js";
529
+ } from "../chunk-PZP2SZIZ.js";
530
+ import "../chunk-J7T5QZ45.js";
531
+ import "../chunk-5RH3VXAK.js";
531
532
  import {
532
533
  createProvenance
533
534
  } from "../chunk-M6DNZNVY.js";
@@ -562,14 +563,16 @@ import {
562
563
  import "../chunk-V2ZCJRDM.js";
563
564
  import {
564
565
  GRAIN_PATTERNS
565
- } from "../chunk-2PBZBRP5.js";
566
+ } from "../chunk-D5KGAO4Z.js";
567
+ import "../chunk-4D6KP5BV.js";
566
568
  import "../chunk-ODBT55Q7.js";
569
+ import "../chunk-IRSTHLQQ.js";
567
570
  import {
568
571
  bytesToBase64,
569
572
  decodePng,
570
573
  isPng,
571
574
  parseDataUrl
572
- } from "../chunk-42TWUPNJ.js";
575
+ } from "../chunk-OTTT5N3K.js";
573
576
  import "../chunk-HVVR5PZW.js";
574
577
  import {
575
578
  deflate
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.246.0",
3
+ "version": "0.249.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -334,6 +334,16 @@
334
334
  "default": "./dist/effects/index.cjs"
335
335
  }
336
336
  },
337
+ "./stickers": {
338
+ "import": {
339
+ "types": "./dist/stickers/index.d.ts",
340
+ "default": "./dist/stickers/index.js"
341
+ },
342
+ "require": {
343
+ "types": "./dist/stickers/index.d.cts",
344
+ "default": "./dist/stickers/index.cjs"
345
+ }
346
+ },
337
347
  "./diagram": {
338
348
  "import": {
339
349
  "types": "./dist/diagram/index.d.ts",
package/skills/README.md CHANGED
@@ -29,6 +29,7 @@ model and its general practice.
29
29
  | [`pixerate-effect-authoring`](pixerate-effect-authoring/SKILL.md) | Authoring shaders and procedural effects: inspecting parameters and source code, setting values and presets, keyframing animation tracks, playback timing, and previewing. |
30
30
  | [`pixerate-color`](pixerate-color/SKILL.md) | Colour inspection, WCAG accessibility and contrast optimization, CVD simulation, palette audits, harmonies, and OKLab/OKLCH blends. |
31
31
  | [`pixerate-typography`](pixerate-typography/SKILL.md) | Fonts and fallback stacks, font loading, modular type scales and hierarchies, fluid sizes, readability and type-aware contrast audits, text segmentation, the font picker. |
32
+ | [`pixerate-stickers`](pixerate-stickers/SKILL.md) | Sticker libraries: finding stickers by ref (`provider:id`), categories, tags, tintable art and licences, for the editors that spray or place them. |
32
33
 
33
34
  ## Workflow skills
34
35
 
@@ -165,41 +165,28 @@ Wet oil blends where the brush meets it; impasto adds relief lit by `set_lightin
165
165
 
166
166
  ## Gradient paint
167
167
 
168
- Paint that changes colour as the stroke goes: give a gradient where a colour would go.
169
-
170
- 1. **`set_paint`** with `{ type: "gradient", stops, map }` makes it the paint for every following
171
- stroke (`set_color` goes back to one colour); `paint_stroke` `paint` overrides it for one stroke;
172
- a brush can carry its own (`set_brush` `paint`, presets `gradient-round`, `pressure-ombre`,
173
- `rainbow-marker`, `gradient-wash`).
174
- 2. **Choose the mapping by what the stroke should do**: `distance` (default, 300 px then
175
- `mirror` back) for "drag it out" colour; `pressure` for light-to-heavy shading in one stroke;
176
- `direction` for strokes coloured by their heading; `across-tip` for a brush loaded with several
177
- colours side by side; `random` (`every` dabs) for speckled or confetti colour; `time` and
178
- `velocity` need timed points (`t`). Set `length` to about the stroke length you will paint.
179
- 3. **Stops**: 2..16, sorted by `offset`; `"paint"` / `"secondary"` follow the two editor colours;
180
- `opacity` multiplies flow (fade a stroke out); `midpoint` shifts where two colours meet;
181
- `softness` 0 makes hard bands. `space` `pigment` (default) mixes like paint (blue to yellow
182
- through green), `oklab` keeps rainbows bright.
183
- 4. **It works with every colour engine**: dab, Mixer Brush (each dab reloads its reservoir),
184
- watercolour and gouache (each deposit carries its pigment into the wet layer, which then flows
185
- and mixes), oil and impasto (the colour varies along the relief), particles, bristles and
186
- stickers. Erasers, blenders and smudges ignore it; the eyedropper picks one colour.
187
- 5. Strokes record the gradient (with concrete colours), so replays, time-lapses, high-res
188
- re-renders and drying are exact. `get_brush` `strokePaint` says what the next stroke paints.
168
+ Paint that changes colour as the stroke goes (`set_paint` with a gradient, a brush's own `paint`,
169
+ or `paint_stroke` `paint`): read [references/gradient-paint.md](references/gradient-paint.md).
170
+
171
+ ## Layer effects
172
+
173
+ Live layer styles on a paint layer, drawn from its pixels so they follow later painting: outer and
174
+ inner glow, shadows, stroke, bevel, satin and overlays, as in the image editor
175
+ (`add_layer_effect` and the rows below). Read [references/layer-effects.md](references/layer-effects.md).
189
176
 
190
177
  ## Procedural brushes, bristles, stickers and stencils
191
178
 
192
- - **Particle brushes** (category `procedural`): `hair-strands` (strings of masses dragged behind
193
- the pen: hair, fur, grass), `spring-ink` (springs that overshoot: lively ink lines),
194
- `orbit-curls` (particles circling the pen: curls and spirals), `flow-fur` and `sparkle-dust`
195
- (particles thrown into a swirling flow), `bead-trail` (beads along a springy path). Tune with
196
- `particle` (kind, render dot / line / sequence, count, stiffness, damping, speed, gravity).
179
+ - **Particle brushes** (category `procedural`; ribbons, flames and bokeh are in `light`):
180
+ `hair-strands`, `spring-ink`, `orbit-curls`, `flow-fur`, `sparkle-dust`, `bead-trail`. Tune
181
+ with `particle`: kind (string, spring, orbit, flow, elastic, fuzzy), render (dot, line,
182
+ sequence, ribbon), waves and textured dots; read [references/particle-brushes.md](references/particle-brushes.md).
197
183
  Draw slowly and with varying direction: the particles react to movement.
198
184
  - **Bristle brushes** (category `bristle`): `bristle-round`, `bristle-flat`, `dry-brush`. Every
199
185
  bristle draws its own line: press harder to splay the tuft, tilt to flatten it; soft bristles
200
186
  bend into curves at turns; a low `bristle.load` runs dry into broken streaks.
201
- - **Sticker spray** (category `sticker`): stamps (`star`, `leaf`, `confetti`, `flower`, `heart`,
202
- `splat`, `sparkle`, `ring`, `dot`) sprayed onto an **empty layer**, each staying an object:
187
+ - **Sticker spray** (category `sticker`): stickers by ref (`editor:star`, `editor:leaf`… or any
188
+ from the host's library: `find_stickers`; tintable ones take the paint colour) sprayed onto an
189
+ **empty layer**, each staying an object:
203
190
  `add_stickers` (exact places), `sticker_at`, `list_stickers`, `update_sticker`, `arrange_stickers`,
204
191
  `remove_stickers`. A sticker layer takes no other paint; sprays are refused under an enabled
205
192
  mask stencil (hide it with `update_stencil` `enabled` false, then remove unwanted stickers).
@@ -283,9 +270,14 @@ is a canvas coordinate: read [references/canvas-hosted.md](references/canvas-hos
283
270
 
284
271
  | Tool | Use |
285
272
  | --- | --- |
286
- | `list_layers` | Read the layers top first: id, name, type (`pixel` / `group`), visible, opacity, blend, clipped, locks, `active`, painted `bounds` (null when empty), parent and depth. |
273
+ | `list_layers` | Read the layers top first: id, name, type (`pixel` / `group`), visible, opacity, blend, clipped, locks, `active`, painted `bounds` (null when empty), parent, depth and `effects` (how many layer effects). |
287
274
  | `add_layer` | Add an empty pixel layer (or `type: "group"`, or `type: "strokes"` for a stroke layer whose strokes stay editable) above the active layer, above `aboveId`, or at the top of group `parentId`; it becomes active. Returns the layer. Put each pass of a painting on its own layer. |
288
275
  | `update_layer` | Change `name`, `visible`, `opacity` (0..1), `blend`, `clipped` (clip to the layer below) or `locks` (`pixels`, `transparency`: paint only where there is paint, `position`, `all`). Returns the layer. |
276
+ | `list_layer_effects` | Read a layer's effects: the master switch, Scale Effects, margin, and each effect with its id, kind and settings, plus the pattern ids. Call before changing one. |
277
+ | `add_layer_effect` | Add a live effect (`outer-glow`, `inner-glow`, `drop-shadow`, `stroke`, …) with Photoshop's defaults changed by `settings`. One undo step. Returns its `effectId` and the layer's effects. |
278
+ | `update_layer_effect` | Change settings of one effect (by `effectId`) after painting: glow colour, size, opacity, blend. One undo step. Returns the layer's effects. |
279
+ | `remove_layer_effect` | Remove one effect (`update_layer_effect` `enabled: false` hides it instead). One undo step. |
280
+ | `set_layer_effects_enabled` | Turn all of a layer's effects on or off and set Scale Effects. One undo step. |
289
281
  | `list_blend_modes` | Read every blend mode: id, label, group (`standard`, `pigment`, `painterly`), what the pigment and painterly modes do, and the `psd` mode export writes instead. Read before choosing a painterly mode. Changes nothing. |
290
282
  | `set_active_layer` | Make a layer the default target of strokes, fills and clears. Editor state. |
291
283
  | `remove_layer` | Delete a layer (a group with its children). Prefer hiding it when the user may want it back. |
@@ -381,10 +373,12 @@ is a canvas coordinate: read [references/canvas-hosted.md](references/canvas-hos
381
373
 
382
374
  | Tool | Use |
383
375
  | --- | --- |
384
- | `list_stickers` | Read a layer's stickers bottom first: id, stamp, x, y, size, rotation, color, opacity. |
385
- | `add_stickers` | Place stickers exactly (`stamp`, `x`, `y`, optional `size`, `rotation`, `color`, `opacity`, `seed`) on a sticker layer or an empty layer. Use it for deliberate placement, a sticker brush for a scatter. One undo step. Returns the new stickers with ids. |
376
+ | `list_stickers` | Read a layer's stickers bottom first: id, `ref` (and `stamp` for the editor's own), x, y, size, rotation, color, opacity. |
377
+ | `add_stickers` | Place stickers exactly (`ref` from `find_stickers`, `x`, `y`, optional `size`, `rotation`, `color`, `opacity`, `seed`) on a sticker layer or an empty layer; a provider's art loads first. Use it for deliberate placement, a sticker brush for a scatter. One undo step. Returns the new stickers with ids. |
386
378
  | `sticker_at` | Read the top-most sticker under a point (`x`, `y`), or null. Use it to pick one sticker among many similar ones before `update_sticker`, `arrange_stickers` or `remove_stickers`. |
387
- | `update_sticker` | Change one sticker by `id`: `stamp`, `x`, `y`, `size`, `rotation`, `color`, `opacity`. One undo step. Returns it. |
379
+ | `update_sticker` | Change one sticker by `id`: `ref`, `x`, `y`, `size`, `rotation`, `color`, `opacity`. One undo step. Returns it. |
380
+ | `find_stickers` | Search the sticker library (the editor's stamps unless the host plugged in its own) by words, category, tags and commercial licence, a page at a time. Returns refs (`provider:id`) for sticker brushes (`set_brush` `sticker.stamps`) and `add_stickers`, with tintable and licence. |
381
+ | `describe_sticker` | One sticker by `ref`: licence and attribution, colours, outline. Unknown refs are refused with the closest ones. |
388
382
  | `arrange_stickers` | Move stickers (`ids`) to the `front` or `back` of their layer. One undo step. |
389
383
  | `remove_stickers` | Delete stickers by `ids`, or all on the layer. One undo step. |
390
384
 
@@ -0,0 +1,23 @@
1
+ # Gradient paint
2
+
3
+ Paint that changes colour as the stroke goes: give a gradient where a colour would go.
4
+
5
+ 1. **`set_paint`** with `{ type: "gradient", stops, map }` makes it the paint for every following
6
+ stroke (`set_color` goes back to one colour); `paint_stroke` `paint` overrides it for one stroke;
7
+ a brush can carry its own (`set_brush` `paint`, presets `gradient-round`, `pressure-ombre`,
8
+ `rainbow-marker`, `gradient-wash`).
9
+ 2. **Choose the mapping by what the stroke should do**: `distance` (default, 300 px then
10
+ `mirror` back) for "drag it out" colour; `pressure` for light-to-heavy shading in one stroke;
11
+ `direction` for strokes coloured by their heading; `across-tip` for a brush loaded with several
12
+ colours side by side; `random` (`every` dabs) for speckled or confetti colour; `time` and
13
+ `velocity` need timed points (`t`). Set `length` to about the stroke length you will paint.
14
+ 3. **Stops**: 2..16, sorted by `offset`; `"paint"` / `"secondary"` follow the two editor colours;
15
+ `opacity` multiplies flow (fade a stroke out); `midpoint` shifts where two colours meet;
16
+ `softness` 0 makes hard bands. `space` `pigment` (default) mixes like paint (blue to yellow
17
+ through green), `oklab` keeps rainbows bright.
18
+ 4. **It works with every colour engine**: dab, Mixer Brush (each dab reloads its reservoir),
19
+ watercolour and gouache (each deposit carries its pigment into the wet layer, which then flows
20
+ and mixes), oil and impasto (the colour varies along the relief), particles, bristles and
21
+ stickers. Erasers, blenders and smudges ignore it; the eyedropper picks one colour.
22
+ 5. Strokes record the gradient (with concrete colours), so replays, time-lapses, high-res
23
+ re-renders and drying are exact. `get_brush` `strokePaint` says what the next stroke paints.
@@ -0,0 +1,28 @@
1
+ # Layer effects (layer styles)
2
+
3
+ The paint editor's layers take the same live effects as the image editor's: outer glow, inner
4
+ glow, drop shadow, inner shadow, stroke, bevel & emboss, satin, and colour, gradient and pattern
5
+ overlays, with the same settings, defaults and limits. They are stored on the layer, drawn from its
6
+ pixels each time the painting is composited (so they follow every later stroke, smudge and
7
+ erase), saved with the document, undone one step per change, and written to PSD as layer styles.
8
+
9
+ - **Tools.** `add_layer_effect` (kind plus `settings`; returns the `effectId`),
10
+ `update_layer_effect` (only the settings you give), `remove_layer_effect`,
11
+ `set_layer_effects_enabled` (all on or off, and Scale Effects), `list_layer_effects` (read
12
+ them). They take pixel, stroke, sticker and group layers; a fully locked layer refuses them.
13
+ - **Glow you can still change.** Paint a light shape on its own layer, then `add_layer_effect`
14
+ `outer-glow` with `settings: { fill: { type: "color", color: "#22d3ee" }, size: 30, spread: 0.1,
15
+ blend: "linear-dodge", opacity: 0.9 }`. Change its colour or size later with
16
+ `update_layer_effect`, without repainting. `inner-glow` lights the inside of the shape from its
17
+ edge (`source: "edge"`) or centre.
18
+ - **Glow style vs light spill.** Light paint (`light.amount`, the Light brushes) spills each
19
+ stroke's own colour by its own strength. A glow style is one colour, one size, around everything
20
+ on the layer: use it for a uniform halo (a neon sign's tube, a sticker's outline, a title), or as
21
+ well as spill for a stronger, adjustable bloom. For the light-painting look on dark paper,
22
+ `linear-dodge` (or the default `screen`) glows add light; `normal` paints a solid halo.
23
+ - **Shadows and bevels** follow the default global light (120°, 30° altitude) unless you give
24
+ `angle` with `useGlobalLight: false`; the paint editor has no global light of its own (its
25
+ `set_lighting` lights impasto relief, not effects).
26
+ - **Wet paint** shows its effects as it is now; they redraw as it flows and dries.
27
+ - **PSD.** `export_psd` writes each layer's effects as its layer style (Photoshop reads them as
28
+ editable effects); the merged image matches the editor.
@@ -3,8 +3,9 @@
3
3
  Light paint is paint that gives off light: neon, light painting, glow-in-the-dark, glowing glassy
4
4
  tubes, glowing watercolour. Any dab, particle, bristle, Mixer Brush, impasto or wet paint brush
5
5
  lays it with `light.amount` above 0 (`set_brush`); the Light category presets are ready-made
6
- (`glow-gel`, `neon-marker`, `light-airbrush`, `spark-trail`, `glow-wash`,
7
- `highlighter`).
6
+ (`glow-gel`, `neon-marker`, `light-airbrush`, `spark-trail`, `light-ribbon`, `flame-ribbon`,
7
+ `neon-strand`, `smoke-ribbon`, `bokeh-dots`, `twinkle-sparks`, `glow-wash`, `highlighter`; the
8
+ particle ones are tuned in [particle-brushes.md](particle-brushes.md)).
8
9
 
9
10
  - **What it does.** Each layer keeps a light channel next to its colour. The light's colour is the
10
11
  paint's colour at that pixel, so recolouring paint recolours its light. It glows (the paint
@@ -28,6 +29,13 @@ lays it with `light.amount` above 0 (`set_brush`); the Light category presets ar
28
29
  layer that holds the text (a tip blend works within its layer), and turn that layer's spill off
29
30
  (`set_light_spill` `radius` 0): fluorescent ink does not light its surroundings, and spill would
30
31
  wash the text out.
32
+ - **Light painting** (long-exposure trails, neon signs, fire): set dark paper (`set_paper`
33
+ `color`, e.g. `#0b1020`), then paint with the Light presets in bright, saturated colours;
34
+ white light reads as a hot core, so lay a coloured stroke first and a thinner, lighter one over
35
+ it. Ribbons (`light-ribbon`, `flame-ribbon`) read best in long sweeping strokes with times;
36
+ `neon-strand` in steady strokes; `bokeh-dots` and `twinkle-sparks` as accents last. Put each
37
+ colour family on its own layer so you can tune its spill (`set_light_spill`: larger radius for
38
+ haze, 0 for crisp). Check with `export_image` before adding more: light adds up fast.
31
39
  - **Spill vs a glow layer style.** Spill takes each stroke's colour and strength. For a one-colour
32
40
  halo around everything on a layer, use a blend or an effect layer instead.
33
41
  - **Glowing watercolour** (wet paint brushes with `light.amount`, e.g. `glow-wash`): the light is
@@ -0,0 +1,66 @@
1
+ # Particle brushes
2
+
3
+ Particle brushes (`engine: 'particle'`) make marks with a small simulation driven by the pen. They
4
+ are seeded and stepped by distance, so the same points and `seed` paint the same pixels and
5
+ replays are exact. Their marks are ordinary coverage: opacity, blend modes, locks, stencils,
6
+ symmetry, gradient paint, effect paint and light paint all work as for a dab brush. Change them
7
+ with `set_brush` `particle` (missing fields keep their values); `get_brush` returns them all.
8
+
9
+ ## Kinds (`particle.kind`)
10
+
11
+ | Kind | Motion | Good for |
12
+ | --- | --- | --- |
13
+ | `string` | Strands of masses dragged behind the pen | Hair, fur, grass, silk |
14
+ | `spring` | Each particle on a spring to the pen, overshooting | Lively ink, twisting bands |
15
+ | `orbit` | Particles circling the pen | Curls, spirographs |
16
+ | `flow` | Thrown off the pen into a swirling flow until they fade (`life`) | Fur, sparks, flames, smoke |
17
+ | `elastic` | Strands whose links have a rest length: they stretch when the pen is fast and snap back | Neon tubes, rubber bands |
18
+ | `fuzzy` | Strings that always wind, each strand waving out of step | Fuzz, tangled light, yarn |
19
+
20
+ `stiffness`, `damping` and `gravity` shape the motion (negative gravity rises: flames, smoke).
21
+ `elastic` and `fuzzy` damp their strands enough to stay together at any setting; a `string` with
22
+ low damping and high stiffness can still swing wildly, which is part of its look.
23
+
24
+ ## Renders (`particle.render`)
25
+
26
+ - `dot`: a mark at every step; `line`: each particle's path as a line; `sequence`: beads spaced
27
+ by `interval` along each path.
28
+ - `ribbon`: the band between neighbouring particles' paths is filled, at `ribbonFill` (0..1,
29
+ default 0.5) of the stroke opacity, and the paths are drawn as its edges at `size` (keep
30
+ `size` small, about 0.01, for fine edges; `ribbonFill` 0 leaves only the edges).
31
+ `ribbonPairs` `adjacent` (default) joins each particle to its neighbour around the pen;
32
+ `first-last` makes one band between the outermost two. `spread` sets how wide it is. The fill
33
+ has no seams and does not build up where bands meet; it builds up only with other strokes.
34
+ `spring` ribbons twist like silk, `string` ribbons trail, `flow` ribbons flicker like flames.
35
+
36
+ ## Waves
37
+
38
+ Any kind and render can wave: each particle's drawn place moves sideways to the stroke on a sine.
39
+ `waveAmplitude` is a fraction of the tip size (0 default: off), `waveLength` px of pen travel
40
+ (4..2000, default 60), `waveSpeed` how fast the waves run by stroke time (0: they stand still on
41
+ the path; 1: about four a second, so slow strokes wave more), `wavePhaseJitter` how far out of
42
+ step the particles are (0: a wavy band; 1: tangled strands). Waves run by the points' `time`;
43
+ points without times run at a nominal 0.5 px/ms, so give times when the speed matters.
44
+
45
+ ## Textured dots
46
+
47
+ `dotTextures`: up to four sticker stamps (`list_stickers` stamp ids: dot, star, heart, leaf,
48
+ flower, confetti, splat, sparkle, ring) drawn instead of round marks by the `dot` and `sequence`
49
+ renders; a stamp listed twice is picked twice as often. `dotTextureOrder` `sequence` (default)
50
+ uses them in turn, `random` picks one per dot (seeded). `dotRotation` `random` (default),
51
+ `follow` (turned with each particle's motion) or `fixed` (the tip angle). Empty: round dots.
52
+
53
+ ## Light presets (category `light`)
54
+
55
+ `light-ribbon` (silk of light on slow waves), `flame-ribbon` (rising flow ribbons), `neon-strand`
56
+ (an elastic tube with a slow shimmer), `smoke-ribbon` (thin lit smoke), `bokeh-dots` (soft discs
57
+ and rings), `twinkle-sparks` (sparkles and stars thrown into the flow), `spark-trail`. Each lays
58
+ light paint; see [light-paint.md](light-paint.md) for spill and the light-painting method.
59
+
60
+ ## Best practice
61
+
62
+ - Check a setting with `render_brush_thumbnail` before painting with it.
63
+ - Change one thing at a time: kind for the motion, render for the look, then waves and textures.
64
+ - Many `flow` particles with long `life` in a `ribbon` are slow (every pair of live particles is
65
+ a band each step): keep `count` × `life` low (count 3..6, life ≤ 0.4).
66
+ - Stroke layers redraw particle strokes exactly, so ribbons and waves stay editable there.
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: pixerate-stickers
3
+ description: How to find, check and use stickers from the Pixerate sticker library through find_stickers and describe_sticker - the editor's own stamps (editor:star, editor:heart, ...) or any library a host plugged in (brand packs, uploads, third-party APIs), with refs (provider:id), categories, tags, tintable art and licences. Use when asked to add, spray, place, search for or credit stickers, or when find_stickers or describe_sticker are available.
4
+ ---
5
+
6
+ # Stickers
7
+
8
+ A sticker library is a `StickerProvider` the host plugs in (`@pixerate/editor/stickers`); with
9
+ none, it is the editor's own stamps (`editorStickers()`: `editor:dot`, `editor:star`,
10
+ `editor:heart`, `editor:leaf`, `editor:flower`, `editor:confetti`, `editor:splat`,
11
+ `editor:sparkle`, `editor:ring`, all MIT and tintable). Every sticker is named by a **ref**,
12
+ `provider:id`; the editors' sticker tools take refs.
13
+
14
+ ## Working method
15
+
16
+ 1. **Find.** `find_stickers` with a few words (`query`) and, when the result's `categories`
17
+ suggest one, a `category`. Pages are small: pass `next` as `after` for more, or narrow the
18
+ query. Filter with `commercial: true` for anything that will be sold or used in marketing.
19
+ 2. **Check.** `describe_sticker` when the choice matters: its licence (and the attribution line
20
+ it asks for), dominant colours, variants and outline.
21
+ 3. **Use.** Pass refs to the editor that places them: in the paint editor, a sticker brush
22
+ (`set_brush` `sticker.stamps`, then `paint_stroke`) sprays them and `add_stickers` places
23
+ them exactly. A provider's art loads before it is drawn.
24
+ 4. **Colour.** Tintable stickers (flat, single-colour art) take the paint colour or a sticker's
25
+ `color`; the rest keep their own colours.
26
+
27
+ ## Best practices
28
+
29
+ - Keep refs exactly as `find_stickers` returns them; a bare editor stamp (`star`) also works
30
+ and means `editor:star`.
31
+ - Credit stickers whose licence has an `attribution` wherever the work is published.
32
+ - Prefer tintable stickers when they must match a palette.
33
+
34
+ ## Pitfalls
35
+
36
+ - An unknown ref is refused with the closest refs: pick one of those or search again.
37
+ - A category that the library doesn't have is refused with the list of its categories.
38
+ - `limit` is 1..100; results beyond a page need `after`, not a larger limit.
39
+
40
+ ## Tool reference
41
+
42
+ | Tool | Use |
43
+ | --- | --- |
44
+ | `find_stickers` | Search or list the library: `query`, `category`, `tags`, `commercial`, `limit`, `after`. Returns `items` (each `ref`, name, category, tags, width, height, formats, tintable, licence), `total`, `next`, `categories`. Changes nothing. |
45
+ | `describe_sticker` | One sticker by `ref`: everything `find_stickers` returns plus `silhouette` (SVG path data), `colours` and `variants`. Unknown refs are refused with the closest ones. Changes nothing. |