@pixerate/editor 0.269.2 → 0.271.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/README.md +5 -2
- package/dist/agent/index.cjs +30 -30
- package/dist/agent/index.js +3 -3
- package/dist/animation-editor/index.cjs +62 -62
- package/dist/animation-editor/index.js +4 -4
- package/dist/canvas/editorDocument.d.cts +3 -1
- package/dist/canvas/editorDocument.d.ts +3 -1
- package/dist/canvas/index.cjs +53 -27
- package/dist/canvas/index.js +34 -8
- package/dist/chart/index.cjs +21 -21
- package/dist/chart/index.js +2 -2
- package/dist/{chunk-GBEF2D4P.js → chunk-23YL2EAB.js} +1 -1
- package/dist/{chunk-QGVTOCNB.js → chunk-6ZSFRRJI.js} +1 -1
- package/dist/{chunk-4YSPQGZW.js → chunk-B5W677L7.js} +1 -1
- package/dist/{chunk-4NMPUJUK.cjs → chunk-DDL3ZBHK.cjs} +86 -86
- package/dist/{chunk-T4JPGBW3.cjs → chunk-DGITFN73.cjs} +8 -8
- package/dist/{chunk-PY4GWSE2.cjs → chunk-EBFPMSJO.cjs} +27 -5
- package/dist/{chunk-NS62CQ2B.js → chunk-GAZPHCTV.js} +23 -2
- package/dist/{chunk-YYBW6DF2.cjs → chunk-GSLOH2IN.cjs} +2 -2
- package/dist/{chunk-56RHCIJV.cjs → chunk-JJ2H25JG.cjs} +237 -170
- package/dist/{chunk-CBVNCWJM.cjs → chunk-LBDC5434.cjs} +2 -2
- package/dist/{chunk-BENSE3VX.cjs → chunk-M2ZVPU7L.cjs} +23 -23
- package/dist/{chunk-MQ6MGIQM.js → chunk-NMZQMPFZ.js} +1 -1
- package/dist/{chunk-AI4F33IV.cjs → chunk-NQUKTRKN.cjs} +45 -45
- package/dist/{chunk-4CPOKP27.js → chunk-QYXUE37Q.js} +1 -1
- package/dist/{chunk-MWUZCEFT.js → chunk-S2XPXA47.js} +1 -1
- package/dist/{chunk-EHLOCVWB.js → chunk-T2URHAJX.js} +27 -5
- package/dist/{chunk-FUDP5QBB.js → chunk-TNHDCP4R.js} +70 -3
- package/dist/{chunk-VBRHE4AM.cjs → chunk-U2ASNGO6.cjs} +35 -35
- package/dist/{chunk-WKPXOGZZ.cjs → chunk-WPLGZBNE.cjs} +23 -2
- package/dist/{chunk-N3UMQVKX.js → chunk-X4FTNFIA.js} +1 -1
- package/dist/{chunk-2OQGPEHH.cjs → chunk-XUDMRMXQ.cjs} +2 -2
- package/dist/{chunk-THBJHPUL.js → chunk-YNFSH72F.js} +1 -1
- package/dist/diagram/index.cjs +2 -2
- package/dist/diagram/index.js +1 -1
- package/dist/effects/index.cjs +8 -5
- package/dist/effects/index.js +6 -3
- package/dist/effects/pool.d.cts +9 -0
- package/dist/effects/pool.d.ts +9 -0
- package/dist/effects/types.d.cts +2 -0
- package/dist/effects/types.d.ts +2 -0
- package/dist/extensions/index.cjs +5 -5
- package/dist/extensions/index.js +4 -4
- package/dist/gradient/index.cjs +2 -2
- package/dist/gradient/index.js +1 -1
- package/dist/history/HistoryManager.d.cts +9 -0
- package/dist/history/HistoryManager.d.ts +9 -0
- package/dist/history/index.cjs +2 -2
- package/dist/history/index.js +1 -1
- package/dist/history/types.d.cts +5 -2
- package/dist/history/types.d.ts +5 -2
- package/dist/image-editor/index.cjs +784 -784
- package/dist/image-editor/index.js +4 -4
- package/dist/index.cjs +10 -10
- package/dist/index.js +4 -4
- package/dist/paint-editor/controller.d.cts +75 -4
- package/dist/paint-editor/controller.d.ts +75 -4
- package/dist/paint-editor/effect-paint.d.cts +33 -8
- package/dist/paint-editor/effect-paint.d.ts +33 -8
- package/dist/paint-editor/effects.d.cts +4 -0
- package/dist/paint-editor/effects.d.ts +4 -0
- package/dist/paint-editor/index.cjs +692 -398
- package/dist/paint-editor/index.js +362 -68
- package/dist/paint-editor/stroke.d.cts +13 -5
- package/dist/paint-editor/stroke.d.ts +13 -5
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.js +1 -1
- package/dist/vector/index.cjs +998 -998
- package/dist/vector/index.js +4 -4
- package/dist/video-editor/index.cjs +321 -321
- package/dist/video-editor/index.js +4 -4
- package/package.json +1 -1
- package/skills/pixerate-paint-editor/SKILL.md +2 -2
- package/skills/pixerate-paint-editor/references/effect-paint.md +28 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createEffectAuthoringSession
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-23YL2EAB.js";
|
|
4
4
|
import {
|
|
5
5
|
VIDEO_ADJUSTMENT_SCOPES,
|
|
6
6
|
VIDEO_BLEND_MODES,
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
videoTransitionEase,
|
|
150
150
|
videoValueAt,
|
|
151
151
|
videoWipeRect
|
|
152
|
-
} from "../chunk-
|
|
152
|
+
} from "../chunk-S2XPXA47.js";
|
|
153
153
|
import {
|
|
154
154
|
namedWithSuggestion
|
|
155
155
|
} from "../chunk-EUKY4KFX.js";
|
|
@@ -160,7 +160,7 @@ import {
|
|
|
160
160
|
effectTemplateTools,
|
|
161
161
|
fillEffectTemplate
|
|
162
162
|
} from "../chunk-DHQPRKXF.js";
|
|
163
|
-
import "../chunk-
|
|
163
|
+
import "../chunk-T2URHAJX.js";
|
|
164
164
|
import {
|
|
165
165
|
CAMERA_MOVE_MAX_MS,
|
|
166
166
|
EffectsSlot,
|
|
@@ -179,7 +179,7 @@ import {
|
|
|
179
179
|
import "../chunk-HF5QZS7Z.js";
|
|
180
180
|
import {
|
|
181
181
|
HistoryManager
|
|
182
|
-
} from "../chunk-
|
|
182
|
+
} from "../chunk-GAZPHCTV.js";
|
|
183
183
|
import {
|
|
184
184
|
AnimationPlayer
|
|
185
185
|
} from "../chunk-F6R67I3A.js";
|
package/package.json
CHANGED
|
@@ -235,7 +235,7 @@ When to use which:
|
|
|
235
235
|
| The effect in a wash that flows, or in thick paint | `set_effect_paint` and a watercolour, gouache, oil or impasto brush |
|
|
236
236
|
| The effect inside an exact shape, unchanged by water | Paint the shape, dry it, then `fill_layer_with_effect` with `lockTransparency: true` |
|
|
237
237
|
| The effect over the whole sheet | `set_paper_effect` or `add_effect_layer` |
|
|
238
|
-
| A pattern that follows the stroke, or paint that moves | `map: { by: "stroke" }
|
|
238
|
+
| A pattern that follows the stroke, or paint that moves | `map: { by: "stroke" }` (bends any effect as a strip), or `map: { by: "path" }` for effects with a path control (`accepts: ["path"]`: beams, trails, signatures); `live: true` on a stroke layer |
|
|
239
239
|
|
|
240
240
|
## Canvas-hosted layer
|
|
241
241
|
|
|
@@ -394,7 +394,7 @@ Listing, saving, sharing and previewing brushes are the brush library's tools (`
|
|
|
394
394
|
| `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. |
|
|
395
395
|
| `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. |
|
|
396
396
|
| `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. |
|
|
397
|
-
| `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 }`
|
|
397
|
+
| `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 }` bends a strip along each stroke, or `{ by: "path" }` passes the stroke's centreline to an effect with a path control (`format: "svg-path"`, `accepts: ["path"]`); `live` keeps it playing on stroke layers. Call after `describe_effect`, then `paint_stroke`. Editor state, not an undo step. Returns `effectPaint`. |
|
|
398
398
|
| `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`. |
|
|
399
399
|
|
|
400
400
|
### Guides
|
|
@@ -1,14 +1,36 @@
|
|
|
1
1
|
# Effect paint along the stroke, and live effect paint
|
|
2
2
|
|
|
3
|
-
- **Along the stroke** (`set_effect_paint` `map: { by: "
|
|
4
|
-
|
|
3
|
+
- **Along the stroke (native path)** (`set_effect_paint` `map: { by: "path" }`): when an effect has
|
|
4
|
+
a path control (`format: "svg-path"`, reported by `describe_effect` as `pathControls` and
|
|
5
|
+
`accepts: ["path"]`), each stroke passes its centreline `[x0, y0, x1, y1, …]` in canvas pixels
|
|
6
|
+
directly to that control and renders at the canvas size. The effect draws and lights itself along
|
|
7
|
+
the stroke's exact curve (e.g. a neon beam, laser trail or signature whose glow and lighting
|
|
8
|
+
belong to the path), while the brush's dabs and coverage still decide where paint lands. Strokes
|
|
9
|
+
with more than 256 points are evenly resampled to 256 points rather than refused. **Prefer
|
|
10
|
+
`by: "path"` over `by: "stroke"` whenever the effect has a path control** (`accepts: ["path"]`);
|
|
11
|
+
`set_effect_paint` refuses `by: "path"` on effects without a path control and tells you to use
|
|
12
|
+
`by: "stroke"` or `by: "canvas"`. Each stroke is a render of its own at the canvas size, so:
|
|
13
|
+
- A stroke painted by hand shows the effect along the path drawn so far while it is drawn,
|
|
14
|
+
re-rendered one render at a time, so it trails the pen by about one render. It is painted
|
|
15
|
+
again along its whole path when the pen lifts, as one undo step; if the preview already
|
|
16
|
+
rendered the whole path, at once. On a slow provider the editor is busy until that lands
|
|
17
|
+
(`effectPaintRendering`). `paint_stroke` and `stroke_path` know the path up front and paint
|
|
18
|
+
it at once.
|
|
19
|
+
- Wet brushes can't be painted by hand this way, as the simulation can't run twice; give them
|
|
20
|
+
the points through `paint_stroke`, or use `by: "stroke"`.
|
|
21
|
+
- With `live: true`, every stroke is a live source of its own, so at most 8 can play.
|
|
22
|
+
- Symmetry copies sample the same render, which only follows the original stroke: paint each
|
|
23
|
+
copy as its own stroke if it should draw too.
|
|
24
|
+
- **Along the stroke (strip)** (`set_effect_paint` `map: { by: "stroke", length, repeat }`): for
|
|
25
|
+
effects without a path control, the effect is rendered as a strip `length` px long (16..4096,
|
|
26
|
+
default 300) and 256 px across. Each pixel takes
|
|
5
27
|
the colour at its distance along the stroke and its place across the tip, so the pattern follows
|
|
6
28
|
the stroke's turns instead of staying fixed to the canvas. `repeat` starts the strip again
|
|
7
29
|
(default), `mirror` runs it back, `clamp` holds the last colour. Use it for ribbons, ropes,
|
|
8
|
-
flames and textures that
|
|
9
|
-
hidden picture across many strokes. Every colour-laying brush takes it (watercolour,
|
|
10
|
-
and impasto too; sprayed stickers at their centre); particle and bristle marks take
|
|
11
|
-
their pen dab.
|
|
30
|
+
flames and textures that have no path control of their own; use the default canvas mapping to
|
|
31
|
+
reveal one hidden picture across many strokes. Every colour-laying brush takes it (watercolour,
|
|
32
|
+
gouache, oil and impasto too; sprayed stickers at their centre); particle and bristle marks take
|
|
33
|
+
the place of their pen dab.
|
|
12
34
|
Scaled replays (`export_high_res`) scale `length` with the canvas.
|
|
13
35
|
- **Live** (`live: true`): on a stroke layer (`add_layer {type: "strokes"}`) each stroke keeps
|
|
14
36
|
playing the effect, so the paint moves. Paint the strokes, then `set_effect_playback`
|