@pixerate/editor 0.144.0 → 0.145.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.
@@ -150,7 +150,7 @@ require('../chunk-WOFXZ3XU.cjs');
150
150
  var _chunkFJ2MSI43cjs = require('../chunk-FJ2MSI43.cjs');
151
151
 
152
152
 
153
- var _chunkSVR5FR7Bcjs = require('../chunk-SVR5FR7B.cjs');
153
+ var _chunkUUTTJK77cjs = require('../chunk-UUTTJK77.cjs');
154
154
  require('../chunk-DWJJI6RT.cjs');
155
155
  require('../chunk-5FXOR7F2.cjs');
156
156
  require('../chunk-A6QWKBJP.cjs');
@@ -2807,7 +2807,7 @@ var VideoEditorController = (_class6 = class {
2807
2807
  this.readOnly = _nullishCoalesce(options.readOnly, () => ( false));
2808
2808
  this.previewScale = checkPreviewScale(_nullishCoalesce(options.previewScale, () => ( "auto")));
2809
2809
  this.onChange = options.onChange;
2810
- this.player = new (0, _chunkSVR5FR7Bcjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
2810
+ this.player = new (0, _chunkUUTTJK77cjs.AnimationPlayer)({ clock: options.clock, duration: () => _chunkVKF3PWKRcjs.videoProjectDuration.call(void 0, this.project), loop: "none" });
2811
2811
  this.state = this.computeState();
2812
2812
  this.connect();
2813
2813
  }
@@ -150,7 +150,7 @@ import {
150
150
  } from "../chunk-RNSANXPT.js";
151
151
  import {
152
152
  AnimationPlayer
153
- } from "../chunk-I4T4J27S.js";
153
+ } from "../chunk-QX25HWFL.js";
154
154
  import "../chunk-5UJHB3BW.js";
155
155
  import "../chunk-45VRG4RB.js";
156
156
  import "../chunk-2WPNAGHI.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.144.0",
3
+ "version": "0.145.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -36,6 +36,9 @@ The full command vocabulary (every type, option and default) is in
36
36
  `move_command`, `delete_commands`. Use `write_animation` only to replace every shot.
37
37
  For a command type you have not written before, `describe_animation_command` returns its
38
38
  exact fields first.
39
+ For motion that should feel performed rather than keyed (a hand-drawn swoop, a jittery
40
+ drag, a colour picked mid-move), `record_animation_take` with timed samples records it as
41
+ one shot, the way a person records live on the stage.
39
42
  4. **Fit and cue.** `fit_animation` to hit a length (keep shots whose pace matters). For music
40
43
  or voiceover, `set_animation_settings` with `beat` or `narration`, read cues with
41
44
  `get_timing_grid`, and give shots `"at": { "beat": n }` or `{ "word": i }`.
@@ -68,6 +71,12 @@ The full command vocabulary (every type, option and default) is in
68
71
  `"with": "previous"` plus a small `delay` so it trails the lead.
69
72
  - **Arcs.** Natural movement curves: use `move` with `via` waypoints (one smooth path) instead
70
73
  of chained moves that stop at each point, or `follow` a path node.
74
+ - **Recorded takes.** Sample a performance at 30-60 per second; the recorder keeps only the
75
+ points that matter (raise `tolerance` for fewer, cleaner commands). Begin each moving
76
+ element with a sample at its current pose (`get_motion_path`'s last point, or its bounds'
77
+ centre at rest) or it jumps there at its first sample. A take is a new shot after the others
78
+ (or at `at`); it cannot be layered over an existing shot. Refine it like any shot: it is
79
+ ordinary `move` (with `via` and `times`), `scale`, `rotate`, `fade` and `style` commands.
71
80
  - **Hold long enough to read.** Leave each result on screen (shot `hold`, default 600 ms);
72
81
  roughly 250 ms per word for text that must be read, longer for the final frame or logo.
73
82
  - **Exaggeration with restraint.** Emphasis (`pulse`, `shake`, `teeter`, `color-pulse`) is for
@@ -111,6 +120,7 @@ The full command vocabulary (every type, option and default) is in
111
120
  | `set_animation_drivers` | Replace all drivers (empty list clears): a target's `x`, `y`, `rotation`, `scaleX`, `scaleY` or `opacity` follows a source node's property as change · `factor` + `offset`, optionally `clamp`ed. For parallax, wheels that turn as they roll, shadows that fade as something rises. |
112
121
  | `set_animation_clip` | Define, replace or (with `clip: null`) delete a named reusable clip whose `run` targets `"$"`; play it with a `play` command on any nodes. Prefer a clip over repeated identical commands. |
113
122
  | `copy_animation` | Give the nodes in `to` every command that animates `from` (all shots or `shots`), each copy starting with its original, optionally `stagger`ed (ms). Quick for one-off duplication; use a clip for motion you will reuse. |
123
+ | `record_animation_take` | Record performed motion as a new shot (one undo step): `samples` of `{ node, t (ms into the take), x, y (centre), scaleX, scaleY, rotation, opacity, fill, stroke, strokeWidth }` become a `move` through waypoints at the recorded `times` and a few eased `scale` / `rotate` / `fade` / `style` commands, each starting when it happened. Optional `length`, `id`, `label`, `at`, `tolerance`; `dry_run: true` returns the run first. Returns the shot id, its start and each command's index, type, start and end; `check_animation` and `render_animation_frame` after. |
114
124
  | `fit_animation` | Make the scene last `seconds` by setting shot `speed`, keeping proportions; shots in `keep` play as written. `dry_run: true` reports the new length and speeds first. |
115
125
  | `import_flair_effect` | Replace the whole scene with a Flair vector `effect` or SvgMotion `motion` (give exactly one; optional `name`). Placeholders become colour controls; each Flair step becomes a shot. Use `dry_run: true` first. |
116
126
  | `insert_shots` | Add one or more complete shots (`id`, `run`, optional `label`, `camera`, `hold`, `speed`, `at`) at position `at` (default the end). Returns every shot's timing and issues. |
@@ -56,7 +56,9 @@ camera move 1000.
56
56
 
57
57
  - `move`: `by` { x, y } offset or `to` { x, y } for the centre. `via`: up to 64 waypoints the
58
58
  centre passes through smoothly without overshoot; `pacing` `even` (default, steady speed)
59
- or `equal` (same time per stretch). `blend` default replace.
59
+ or `equal` (same time per stretch). `times`: one rising fraction of the duration (0-1) per
60
+ waypoint, when the centre passes it; overrides `pacing` (recorded takes set it).
61
+ `blend` default replace.
60
62
  - `rotate`: `by` degrees or `to` degrees from rest. `blend` default replace.
61
63
  - `scale`: `to` a factor or { x, y } (required); `geometric: true` for an even-rate zoom.
62
64
  - `fade`: `to` opacity 0-1 (required).