@pixerate/editor 0.240.0 → 0.241.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 +58 -58
- package/dist/animation-editor/index.js +3 -3
- package/dist/{brushstrokeRender-WB67GMUP.js → brushstrokeRender-MOYGEXOC.js} +2 -2
- package/dist/{brushstrokeRender-MPOM7BFW.cjs → brushstrokeRender-UKADOV5D.cjs} +5 -5
- package/dist/canvas/index.cjs +8 -8
- package/dist/canvas/index.js +1 -1
- package/dist/{chunk-NKTNLJUJ.cjs → chunk-5BR7LC24.cjs} +99 -11
- package/dist/{chunk-ZXNO3ZOX.cjs → chunk-7F4G74UQ.cjs} +35 -35
- package/dist/{chunk-AD7GA3TL.cjs → chunk-AFLMXITL.cjs} +23 -23
- package/dist/{chunk-PP6BXVRL.cjs → chunk-HGGJ36HR.cjs} +1 -1
- package/dist/{chunk-BBUE3UJL.cjs → chunk-HW72ABGR.cjs} +86 -86
- package/dist/{chunk-7YGBSFC6.js → chunk-ILM6GYAX.js} +1 -1
- package/dist/{chunk-THXFU3JB.cjs → chunk-KCMV2534.cjs} +2 -2
- package/dist/{chunk-3E36VDMJ.js → chunk-NE6OOKWJ.js} +1 -1
- package/dist/{chunk-RV5DKZHU.js → chunk-QP2B3MID.js} +1 -1
- package/dist/{chunk-UUBO6RB5.js → chunk-UDBDYZET.js} +1 -1
- package/dist/{chunk-PJYG6FCF.js → chunk-XBZK47LV.js} +98 -10
- package/dist/{chunk-XK4SST43.js → chunk-ZDPLZDTT.js} +1 -1
- package/dist/image-editor/index.cjs +775 -775
- package/dist/image-editor/index.js +4 -4
- package/dist/paint-editor/controller.d.cts +67 -0
- package/dist/paint-editor/controller.d.ts +67 -0
- package/dist/paint-editor/effect-paint.d.cts +60 -3
- package/dist/paint-editor/effect-paint.d.ts +60 -3
- package/dist/paint-editor/index.cjs +676 -430
- package/dist/paint-editor/index.js +282 -36
- package/dist/paint-editor/stickers.d.cts +6 -0
- package/dist/paint-editor/stickers.d.ts +6 -0
- package/dist/paint-editor/thick.d.cts +4 -0
- package/dist/paint-editor/thick.d.ts +4 -0
- package/dist/paint-editor/wet.d.cts +8 -0
- package/dist/paint-editor/wet.d.ts +8 -0
- package/dist/vector/index.cjs +962 -962
- package/dist/vector/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +17 -21
- package/skills/pixerate-paint-editor/references/effect-paint.md +25 -0
package/dist/vector/index.js
CHANGED
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
traceField,
|
|
27
27
|
traceVectorImage,
|
|
28
28
|
vectorTraceContours
|
|
29
|
-
} from "../chunk-
|
|
29
|
+
} from "../chunk-UDBDYZET.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-
|
|
56
|
+
} from "../chunk-ZDPLZDTT.js";
|
|
57
57
|
import {
|
|
58
58
|
DEFAULT_VECTOR_FONT,
|
|
59
59
|
IDENTITY_MATRIX,
|
|
@@ -526,8 +526,8 @@ import {
|
|
|
526
526
|
withVectorStrokes,
|
|
527
527
|
withVectorTargetPaint,
|
|
528
528
|
zigzagPaths
|
|
529
|
-
} from "../chunk-
|
|
530
|
-
import "../chunk-
|
|
529
|
+
} from "../chunk-ILM6GYAX.js";
|
|
530
|
+
import "../chunk-XBZK47LV.js";
|
|
531
531
|
import {
|
|
532
532
|
createProvenance
|
|
533
533
|
} from "../chunk-M6DNZNVY.js";
|
package/package.json
CHANGED
|
@@ -235,21 +235,19 @@ for the controls and presets.
|
|
|
235
235
|
|
|
236
236
|
## Effect paint
|
|
237
237
|
|
|
238
|
-
`set_effect_paint` makes a generator, overlay or title effect the paint
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
an overlay paints only where it has pixels.
|
|
238
|
+
`set_effect_paint` makes a generator, overlay or title effect the paint: rendered once, every
|
|
239
|
+
stroke takes each pixel's colour from it, fixed to the canvas (painting reveals a hidden image).
|
|
240
|
+
Its transparency paints nothing.
|
|
242
241
|
|
|
243
242
|
1. `search_effects` (`use` generator, overlay or title) and `describe_effect` for the controls.
|
|
244
|
-
2. `set_effect_paint` with `effect`, `values
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
impasto brushes take it per pixel too, shifted by any paint they pick up: in watercolour and
|
|
249
|
-
gouache the pattern then flows, blooms and granulates with the water; impasto keeps its relief.
|
|
243
|
+
2. `set_effect_paint` with `effect`, `values`, `time` (ms, default 0). Wait for it to return.
|
|
244
|
+
3. Paint: dab, particle and bristle brushes take the colour per pixel; the Mixer Brush and pick-up
|
|
245
|
+
dab brushes take it per dab at its centre. Wet and impasto brushes take it per pixel, shifted by
|
|
246
|
+
paint they pick up (in watercolour and gouache it flows with the water; impasto keeps its relief).
|
|
250
247
|
Sprayed stickers each take the colour at their centre (they stay recolourable).
|
|
251
|
-
4. `set_color
|
|
252
|
-
|
|
248
|
+
4. `set_color`, `set_paint` or `remove_effect` (target and effect `paint`) go back to colour;
|
|
249
|
+
`update_effect` (target and effect `paint`, `values`) renders new values.
|
|
250
|
+
5. Along each stroke (`map`) or playing on stroke layers (`live`): [references/effect-paint.md](references/effect-paint.md).
|
|
253
251
|
|
|
254
252
|
When to use which:
|
|
255
253
|
|
|
@@ -259,6 +257,7 @@ When to use which:
|
|
|
259
257
|
| The effect in a wash that flows, or in thick paint | `set_effect_paint` and a watercolour, gouache, oil or impasto brush |
|
|
260
258
|
| The effect inside an exact shape, unchanged by water | Paint the shape, dry it, then `fill_layer_with_effect` with `lockTransparency: true` |
|
|
261
259
|
| The effect over the whole sheet | `set_paper_effect` or `add_effect_layer` |
|
|
260
|
+
| A pattern that follows the stroke, or paint that moves | `map: { by: "stroke" }`, `live: true` on a stroke layer |
|
|
262
261
|
|
|
263
262
|
## Canvas-hosted layer
|
|
264
263
|
|
|
@@ -402,7 +401,8 @@ view), so work with the tools you are given.
|
|
|
402
401
|
| `set_paper_effect` | Draw a generator over the paper (`values`, `opacity`, `blend` default `multiply`, `time`); `effect: null` removes it. One undo step. Returns the effect paper. |
|
|
403
402
|
| `add_effect_layer` | Add a layer drawn by a generator, overlay or title effect (`values`, `name`, `aboveId`, `opacity`, `blend`, `time`); it becomes active. Returns the layer and its effect. |
|
|
404
403
|
| `fill_layer_with_effect` | Composite a generator, overlay or title effect onto a layer (`layerId`, `values`, `opacity`, `lockTransparency`, `time`). One undo step. Returns the layer id and the effect. |
|
|
405
|
-
| `set_effect_paint` | Paint with a generator, overlay or title effect (`effect`, `values`, `time` ms default 0): rendered once at the canvas size, strokes take each pixel's colour from it. Call after `describe_effect`, then `paint_stroke
|
|
404
|
+
| `set_effect_paint` | Paint with a generator, overlay or title effect (`effect`, `values`, `time` ms default 0): rendered once at the canvas size, strokes take each pixel's colour from it; `map` `{ by: "stroke", length, repeat }` lays it along each stroke; `live` keeps it playing on stroke layers. Call after `describe_effect`, then `paint_stroke`. Editor state, not an undo step. Returns `effectPaint`. |
|
|
405
|
+
| `set_effect_playback` | Play or pause live effect paint in the view (`playing`) and cap its frame rate (`fps` 1..60). Editor state. Returns `playing`, `fps`, `time` and `animation` (what plays, or null). Export a moment with `export_image` / `export_psd` `time`. |
|
|
406
406
|
|
|
407
407
|
### Guides
|
|
408
408
|
|
|
@@ -495,13 +495,9 @@ The host may add the shared document tools (see `pixerate-agent-tools`). A paint
|
|
|
495
495
|
strokes record it, and replays render it again first, so they need the same provider (an
|
|
496
496
|
error names the effect and provider when it is missing; `color` on `replay_strokes` repaints
|
|
497
497
|
in one colour instead).
|
|
498
|
-
- **Effect paint
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
`set_paint` paints colour instead.
|
|
503
|
-
- **Effect paint is fixed to the canvas, not the stroke**: a replayed or moved stroke shows the
|
|
504
|
-
part of the effect under its new place. Wait for `set_effect_paint` to return before painting;
|
|
505
|
-
strokes are refused while it renders.
|
|
498
|
+
- **Effect paint is fixed to the canvas by default** (`map: { by: "stroke" }` follows the stroke),
|
|
499
|
+
and in wet paint it flows with the water; for a crisp pattern in an exact shape, paint and dry
|
|
500
|
+
the shape, then `fill_layer_with_effect` (`lockTransparency: true`). Erasers, blenders and
|
|
501
|
+
smudges ignore it. Wait for `set_effect_paint` to return; strokes are refused while it renders.
|
|
506
502
|
- **Recorded strokes are kept in saved documents** (`save_paint_document`, `get_paint_document`),
|
|
507
503
|
so a painting can be replayed and repainted at a higher resolution.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Effect paint along the stroke, and live effect paint
|
|
2
|
+
|
|
3
|
+
- **Along the stroke** (`set_effect_paint` `map: { by: "stroke", length, repeat }`): the effect is
|
|
4
|
+
rendered as a strip `length` px long (16..4096, default 300) and 256 px across. Each pixel takes
|
|
5
|
+
the colour at its distance along the stroke and its place across the tip, so the pattern follows
|
|
6
|
+
the stroke's turns instead of staying fixed to the canvas. `repeat` starts the strip again
|
|
7
|
+
(default), `mirror` runs it back, `clamp` holds the last colour. Use it for ribbons, ropes,
|
|
8
|
+
flames and textures that should flow with the mark; use the default canvas mapping to reveal one
|
|
9
|
+
hidden picture across many strokes. Every colour-laying brush takes it (watercolour, gouache, oil
|
|
10
|
+
and impasto too; sprayed stickers at their centre); particle and bristle marks take the place of
|
|
11
|
+
their pen dab.
|
|
12
|
+
Scaled replays (`export_high_res`) scale `length` with the canvas.
|
|
13
|
+
- **Live** (`live: true`): on a stroke layer (`add_layer {type: "strokes"}`) each stroke keeps
|
|
14
|
+
playing the effect, so the paint moves. Paint the strokes, then `set_effect_playback`
|
|
15
|
+
(`playing`, `fps` 1..60, default 30) plays or pauses them in the view. The document keeps the
|
|
16
|
+
frame at the effect's own `time`; `export_image` and `export_psd` take `time` (ms) to export
|
|
17
|
+
another moment. Live strokes stay editable like any stroke on a stroke layer
|
|
18
|
+
(`update_stroke` with `paint` changes the effect).
|
|
19
|
+
- **Where it applies**: live only plays on stroke layers; on a pixel layer the stroke bakes the
|
|
20
|
+
frame at `time`. A painting plays at most 8 distinct live effects (each needs a renderer per
|
|
21
|
+
frame); paint more strokes with one of them, or bake new ones (`live: false`).
|
|
22
|
+
- **Cost**: each frame redraws the live strokes (and any stroke overlapping them), and renders
|
|
23
|
+
each live effect once. On a large canvas with many live strokes, lower `fps`.
|
|
24
|
+
- **Without the provider** (a document opened elsewhere): the saved pixels show the frame as
|
|
25
|
+
painted, and nothing plays until the provider is registered.
|