@pixerate/editor 0.219.2 → 0.221.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/{chunk-S55JFWDA.cjs → chunk-R35YOUP2.cjs} +407 -161
- package/dist/{chunk-F7Z2MKY2.js → chunk-S6KKLFZO.js} +261 -15
- package/dist/image-editor/controller.d.cts +52 -5
- package/dist/image-editor/controller.d.ts +52 -5
- package/dist/image-editor/index.cjs +3065 -2536
- package/dist/image-editor/index.d.cts +1 -0
- package/dist/image-editor/index.d.ts +1 -0
- package/dist/image-editor/index.js +1528 -999
- package/dist/image-editor/layers/hybrid-mask.d.cts +31 -0
- package/dist/image-editor/layers/hybrid-mask.d.ts +31 -0
- package/dist/image-editor/layers/model.d.cts +17 -0
- package/dist/image-editor/layers/model.d.ts +17 -0
- package/dist/image-editor/layers/serialize.d.cts +4 -0
- package/dist/image-editor/layers/serialize.d.ts +4 -0
- package/dist/image-editor/layers/vector-mask.d.cts +10 -5
- package/dist/image-editor/layers/vector-mask.d.ts +10 -5
- package/dist/image-editor/path-edit.d.cts +4 -0
- package/dist/image-editor/path-edit.d.ts +4 -0
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/selection/recipe.d.cts +89 -0
- package/dist/image-editor/selection/recipe.d.ts +89 -0
- package/dist/image-editor/types.d.cts +9 -0
- package/dist/image-editor/types.d.ts +9 -0
- package/dist/paint-editor/index.cjs +6 -6
- package/dist/paint-editor/index.js +1 -1
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +7 -11
- package/skills/pixerate-image-editor/references/painting.md +17 -1
- package/skills/pixerate-image-selection-masking/SKILL.md +3 -3
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
# Painting: mixing paint, the Mixer Brush and gradient paint
|
|
1
|
+
# Painting: strokes, mixing paint, the Mixer Brush and gradient paint
|
|
2
|
+
|
|
3
|
+
## Strokes
|
|
4
|
+
|
|
5
|
+
1. **Paint on its own layer** (`add_pixel_layer`), not on the Background (active on a new image, so
|
|
6
|
+
strokes without `layerId` land there) unless asked: a layer can be faded, masked or deleted.
|
|
7
|
+
2. **Retouch through masks**, not the eraser (see `pixerate-image-selection-masking`).
|
|
8
|
+
3. **One stroke is one call and one undo step.** Send the path's points in order (a few points
|
|
9
|
+
per brush diameter is enough; dabs are spaced by `brush.spacing`). Use `opacity` for the
|
|
10
|
+
overall strength and `flow` for gradual build-up within the stroke.
|
|
11
|
+
4. **Limit paint with a selection**, or lock transparency (`set_layer_properties`
|
|
12
|
+
`locks.transparency`) to paint only where the layer already has pixels.
|
|
13
|
+
5. **Mixing paint, the Mixer Brush and gradient paint**: `mix_colors` mixes named paints like
|
|
14
|
+
pigment; `paint_stroke` `tool: "mixer"` picks up and smears the layer's colours; gradient paint
|
|
15
|
+
changes colour along a stroke. See below.
|
|
16
|
+
|
|
17
|
+
## Mixing paint, the Mixer Brush and gradient paint
|
|
2
18
|
|
|
3
19
|
Read this before `mix_colors`, a `paint_stroke` with `tool: "mixer"`, or gradient paint
|
|
4
20
|
(`set_paint` / `paint_stroke` `paint`).
|
|
@@ -40,9 +40,9 @@ This skill is the method. `pixerate-image-editor` has the full tool reference.
|
|
|
40
40
|
**Check:** `get_selection` → `empty: false` and a plausible `percent` (for a person in a
|
|
41
41
|
portrait, typically 15–50 %). A wand or range above about 80 % has flooded: undo, then lower
|
|
42
42
|
`tolerance` / `fuzziness`.
|
|
43
|
-
2. **Build it in steps** with `mode`:
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
2. **Build it in steps** with `mode`: `replace`, then `add` what was missed, `subtract` what
|
|
44
|
+
leaked, `intersect` to limit it. The steps are kept (`get_selection_recipe`): fix one with
|
|
45
|
+
`edit_selection_step` (a wand's tolerance, a box) rather than starting over.
|
|
46
46
|
**Check:** `bounds` hug the subject. A bounds as large as the image means a leak. Smart tools
|
|
47
47
|
return `uncertainRegions` (edge with no image edge under it): look there, refine with `regions`.
|
|
48
48
|
3. **Measure the edge, then look.** `inspect_mask_edge` scores it: `haloScore` ≥ 0.35 is old
|