@pixerate/editor 0.58.0 → 0.60.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/agent/index.cjs +111 -38
- package/dist/agent/index.cjs.map +1 -1
- package/dist/agent/index.d.cts +30 -2
- package/dist/agent/index.d.ts +30 -2
- package/dist/agent/index.js +96 -23
- package/dist/agent/index.js.map +1 -1
- package/dist/agent-caret-BmYhQF7L.d.cts +106 -0
- package/dist/agent-caret-BmYhQF7L.d.ts +106 -0
- package/dist/animation/index.cjs +9 -3
- package/dist/animation/index.cjs.map +1 -1
- package/dist/animation/index.d.cts +2 -2
- package/dist/animation/index.d.ts +2 -2
- package/dist/animation/index.js +9 -3
- package/dist/animation-editor/index.cjs +535 -124
- package/dist/animation-editor/index.cjs.map +1 -1
- package/dist/animation-editor/index.d.cts +239 -9
- package/dist/animation-editor/index.d.ts +239 -9
- package/dist/animation-editor/index.js +494 -83
- package/dist/animation-editor/index.js.map +1 -1
- package/dist/canvas/index.cjs +35 -29
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +4 -4
- package/dist/canvas/index.d.ts +4 -4
- package/dist/canvas/index.js +9 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-O4ONBPZW.cjs → chunk-2FGRTYJN.cjs} +4 -4
- package/dist/{chunk-O4ONBPZW.cjs.map → chunk-2FGRTYJN.cjs.map} +1 -1
- package/dist/{chunk-XZ4L3R4K.cjs → chunk-2FHLHZAL.cjs} +39 -3
- package/dist/chunk-2FHLHZAL.cjs.map +1 -0
- package/dist/{chunk-PYMV7HLI.js → chunk-3TLL5OID.js} +2 -2
- package/dist/{chunk-LMUDHBWR.js → chunk-4YFMSPBU.js} +2 -2
- package/dist/{chunk-3I6V7PI4.cjs → chunk-7ZSU4MQZ.cjs} +45 -45
- package/dist/{chunk-3I6V7PI4.cjs.map → chunk-7ZSU4MQZ.cjs.map} +1 -1
- package/dist/{chunk-UB2OY7FD.js → chunk-AGR4P4UZ.js} +38 -2
- package/dist/chunk-AGR4P4UZ.js.map +1 -0
- package/dist/{chunk-SHOVAHUB.js → chunk-JK6M6V7G.js} +2 -2
- package/dist/{chunk-WLVZ235X.js → chunk-OK7T2LHK.js} +229 -2
- package/dist/chunk-OK7T2LHK.js.map +1 -0
- package/dist/{chunk-AHCENCU4.cjs → chunk-T4XWVPJK.cjs} +253 -26
- package/dist/chunk-T4XWVPJK.cjs.map +1 -0
- package/dist/{chunk-FKONE6AO.cjs → chunk-YJLCBA7V.cjs} +3 -3
- package/dist/{chunk-FKONE6AO.cjs.map → chunk-YJLCBA7V.cjs.map} +1 -1
- package/dist/{easing-CNGk-W6d.d.ts → easing-lM0Xo9Ni.d.cts} +14 -2
- package/dist/{easing-CNGk-W6d.d.cts → easing-lM0Xo9Ni.d.ts} +14 -2
- package/dist/extensions/index.cjs +27 -3
- package/dist/extensions/index.cjs.map +1 -1
- package/dist/extensions/index.d.cts +2 -1
- package/dist/extensions/index.d.ts +2 -1
- package/dist/extensions/index.js +26 -2
- package/dist/{index-CTCc3m3C.d.ts → index-B16wbOn_.d.ts} +1 -0
- package/dist/{index-BcHyG0Wq.d.cts → index-BAt14aIU.d.cts} +1 -0
- package/dist/index.cjs +32 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/parameters/index.cjs +2 -2
- package/dist/parameters/index.d.cts +1 -1
- package/dist/parameters/index.d.ts +1 -1
- package/dist/parameters/index.js +1 -1
- package/dist/{player-W-5DX3Go.d.ts → player-DV4Jujdq.d.ts} +1 -1
- package/dist/{player-Dg0FT0UI.d.cts → player-DrcP2xqj.d.cts} +1 -1
- package/dist/vector/index.cjs +472 -472
- package/dist/vector/index.d.cts +1 -1
- package/dist/vector/index.d.ts +1 -1
- package/dist/vector/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-AHCENCU4.cjs.map +0 -1
- package/dist/chunk-UB2OY7FD.js.map +0 -1
- package/dist/chunk-WLVZ235X.js.map +0 -1
- package/dist/chunk-XZ4L3R4K.cjs.map +0 -1
- /package/dist/{chunk-PYMV7HLI.js.map → chunk-3TLL5OID.js.map} +0 -0
- /package/dist/{chunk-LMUDHBWR.js.map → chunk-4YFMSPBU.js.map} +0 -0
- /package/dist/{chunk-SHOVAHUB.js.map → chunk-JK6M6V7G.js.map} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as AnimationEasing } from '../easing-
|
|
2
|
-
import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-
|
|
1
|
+
import { b as AnimationEasing } from '../easing-lM0Xo9Ni.cjs';
|
|
2
|
+
import { b as AnimationLoopMode, c as AnimationPlayer, C as Clock } from '../player-DrcP2xqj.cjs';
|
|
3
3
|
import { V as VectorDocument, a as VectorNode, b as VectorBounds, c as VectorSvgExportOptions } from '../svg-ymShkNtu.cjs';
|
|
4
4
|
import { a as MotionBehavior } from '../behavior-Ymbld6jL.cjs';
|
|
5
5
|
import { A as AffineMatrix, B as BezierPath } from '../bezier-BfwIbVTl.cjs';
|
|
@@ -31,6 +31,11 @@ interface MotionScene {
|
|
|
31
31
|
loop?: AnimationLoopMode;
|
|
32
32
|
/** Frame rate used to sample motion that a target format cannot express exactly (default 30). */
|
|
33
33
|
fps?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Stepped time for every command that gives none: changes hold on a grid of this many frames
|
|
36
|
+
* per second ("on twos" at 12), for a hand-drawn look. Default: smooth.
|
|
37
|
+
*/
|
|
38
|
+
steps?: number;
|
|
34
39
|
/** Wanted length in seconds `[min, max]`; `check` warns outside it. */
|
|
35
40
|
target?: [number, number];
|
|
36
41
|
/** Parameters a Flair effect made from this scene exposes (see `toFlairVectorEffect`). */
|
|
@@ -55,6 +60,8 @@ type MotionCamera = (MotionRect | {
|
|
|
55
60
|
}) & {
|
|
56
61
|
ease?: AnimationEasing;
|
|
57
62
|
ms?: number;
|
|
63
|
+
/** Zoom at a steady rate (the size changes by the same factor each moment) instead of linearly. */
|
|
64
|
+
geometric?: boolean;
|
|
58
65
|
};
|
|
59
66
|
/** One beat of the animation. */
|
|
60
67
|
interface MotionShot {
|
|
@@ -73,7 +80,7 @@ interface MotionShot {
|
|
|
73
80
|
interface MotionCommandBase {
|
|
74
81
|
/** Node ids from the artwork (groups animate as one). */
|
|
75
82
|
targets: string[];
|
|
76
|
-
/** Length in ms for each target (each type has a default; `draw` follows the path length). */
|
|
83
|
+
/** Length in ms for each target, one cycle when repeating (each type has a default; `draw` follows the path length; a spring `ease` lasts until it settles). */
|
|
77
84
|
duration?: number;
|
|
78
85
|
/** Wait this many ms before starting (default 0). */
|
|
79
86
|
delay?: number;
|
|
@@ -81,9 +88,23 @@ interface MotionCommandBase {
|
|
|
81
88
|
stagger?: number;
|
|
82
89
|
/** `after` (default) starts when the commands before it finish; `previous` starts with the command before. */
|
|
83
90
|
with?: 'after' | 'previous';
|
|
91
|
+
/** An easing; a spring with no `duration` lasts until it settles. */
|
|
84
92
|
ease?: AnimationEasing;
|
|
85
93
|
/** Why this command is here (for people and agents reading the scene). */
|
|
86
94
|
note?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Play the change this many times (a whole number, default 1); `duration` is one cycle. Not
|
|
97
|
+
* for `enter`, `exit` or `wait`.
|
|
98
|
+
*/
|
|
99
|
+
repeat?: number;
|
|
100
|
+
/**
|
|
101
|
+
* How repeats follow each other: `loop` (default) starts each cycle afresh, `mirror` plays
|
|
102
|
+
* every other one backwards, `offset` carries on from where the last ended (rotate by 90,
|
|
103
|
+
* repeat 4: a full turn). Colours and shapes offset like `loop`.
|
|
104
|
+
*/
|
|
105
|
+
repeatMode?: 'loop' | 'mirror' | 'offset';
|
|
106
|
+
/** Stepped time: hold the change on a grid of this many frames per second (default: the scene's `steps`, else smooth). */
|
|
107
|
+
steps?: number;
|
|
87
108
|
}
|
|
88
109
|
type MotionEnterStyle = 'fade' | 'pop' | 'grow' | 'slide' | 'draw' | 'zoom' | 'rise' | 'wipe' | 'iris' | 'split';
|
|
89
110
|
type MotionExitStyle = 'fade' | 'shrink' | 'slide' | 'undraw' | 'wipe';
|
|
@@ -138,6 +159,13 @@ interface MotionDrawCommand extends MotionCommandBase {
|
|
|
138
159
|
}
|
|
139
160
|
/** Moves targets by an offset, or to a point (their centre lands there). */
|
|
140
161
|
interface MotionMoveCommand extends MotionCommandBase {
|
|
162
|
+
/**
|
|
163
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
164
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
165
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
166
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
167
|
+
*/
|
|
168
|
+
blend?: 'replace' | 'add';
|
|
141
169
|
type: 'move';
|
|
142
170
|
by?: {
|
|
143
171
|
x: number;
|
|
@@ -150,17 +178,33 @@ interface MotionMoveCommand extends MotionCommandBase {
|
|
|
150
178
|
}
|
|
151
179
|
/** Turns targets about their centre, by or to an angle in degrees (clockwise). */
|
|
152
180
|
interface MotionRotateCommand extends MotionCommandBase {
|
|
181
|
+
/**
|
|
182
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
183
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
184
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
185
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
186
|
+
*/
|
|
187
|
+
blend?: 'replace' | 'add';
|
|
153
188
|
type: 'rotate';
|
|
154
189
|
by?: number;
|
|
155
190
|
to?: number;
|
|
156
191
|
}
|
|
157
192
|
/** Scales targets about their centre (1 = rest size). */
|
|
158
193
|
interface MotionScaleCommand extends MotionCommandBase {
|
|
194
|
+
/**
|
|
195
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
196
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
197
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
198
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
199
|
+
*/
|
|
200
|
+
blend?: 'replace' | 'add';
|
|
159
201
|
type: 'scale';
|
|
160
202
|
to: number | {
|
|
161
203
|
x: number;
|
|
162
204
|
y: number;
|
|
163
205
|
};
|
|
206
|
+
/** Grow at a steady rate (the same factor each moment), which reads as an even zoom. */
|
|
207
|
+
geometric?: boolean;
|
|
164
208
|
}
|
|
165
209
|
/** Changes opacity (0–1). */
|
|
166
210
|
interface MotionFadeCommand extends MotionCommandBase {
|
|
@@ -195,6 +239,13 @@ interface MotionFollowCommand extends MotionCommandBase {
|
|
|
195
239
|
}
|
|
196
240
|
/** Scales up and back, `count` times (draws the eye). */
|
|
197
241
|
interface MotionPulseCommand extends MotionCommandBase {
|
|
242
|
+
/**
|
|
243
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
244
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
245
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
246
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
247
|
+
*/
|
|
248
|
+
blend?: 'replace' | 'add';
|
|
198
249
|
type: 'pulse';
|
|
199
250
|
/** Extra scale at the peak (default 0.15). */
|
|
200
251
|
amount?: number;
|
|
@@ -202,6 +253,13 @@ interface MotionPulseCommand extends MotionCommandBase {
|
|
|
202
253
|
}
|
|
203
254
|
/** Shakes side to side (or up and down), settling. */
|
|
204
255
|
interface MotionShakeCommand extends MotionCommandBase {
|
|
256
|
+
/**
|
|
257
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
258
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
259
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
260
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
261
|
+
*/
|
|
262
|
+
blend?: 'replace' | 'add';
|
|
205
263
|
type: 'shake';
|
|
206
264
|
/** Distance in document units (default 8). */
|
|
207
265
|
amount?: number;
|
|
@@ -211,6 +269,13 @@ interface MotionShakeCommand extends MotionCommandBase {
|
|
|
211
269
|
}
|
|
212
270
|
/** Rocks about the centre by `angle` either way, settling (Flair's `emphasis.teeter`). */
|
|
213
271
|
interface MotionTeeterCommand extends MotionCommandBase {
|
|
272
|
+
/**
|
|
273
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
274
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
275
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
276
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
277
|
+
*/
|
|
278
|
+
blend?: 'replace' | 'add';
|
|
214
279
|
type: 'teeter';
|
|
215
280
|
/** Degrees either way (default 8). */
|
|
216
281
|
angle?: number;
|
|
@@ -219,6 +284,13 @@ interface MotionTeeterCommand extends MotionCommandBase {
|
|
|
219
284
|
}
|
|
220
285
|
/** Bobs up and down without settling, like something floating (Flair's `emphasis.wave`). */
|
|
221
286
|
interface MotionWaveCommand extends MotionCommandBase {
|
|
287
|
+
/**
|
|
288
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
289
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
290
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
291
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
292
|
+
*/
|
|
293
|
+
blend?: 'replace' | 'add';
|
|
222
294
|
type: 'wave';
|
|
223
295
|
/** Height in document units (default 6). */
|
|
224
296
|
amount?: number;
|
|
@@ -230,6 +302,13 @@ interface MotionWaveCommand extends MotionCommandBase {
|
|
|
230
302
|
* `emphasis.wiggle`). The same seed always wanders the same way.
|
|
231
303
|
*/
|
|
232
304
|
interface MotionWiggleCommand extends MotionCommandBase {
|
|
305
|
+
/**
|
|
306
|
+
* `add` makes the change a layer over the pose instead of a change to it: it stacks on
|
|
307
|
+
* whatever else moves the target (a shake on a slide), and what it adds stays once it ends.
|
|
308
|
+
* Default `replace` for move, rotate and scale (the later change takes over), `add` for
|
|
309
|
+
* pulse, shake, teeter, wave and wiggle.
|
|
310
|
+
*/
|
|
311
|
+
blend?: 'replace' | 'add';
|
|
233
312
|
type: 'wiggle';
|
|
234
313
|
/** Up to about this far, in document units (default 6). */
|
|
235
314
|
amount?: number;
|
|
@@ -271,6 +350,8 @@ type MotionCommand = MotionEnterCommand | MotionExitCommand | MotionDrawCommand
|
|
|
271
350
|
type MotionCommandType = MotionCommand['type'];
|
|
272
351
|
declare const MOTION_COMMAND_TYPES: readonly MotionCommandType[];
|
|
273
352
|
declare const MOTION_ENTER_STYLES: readonly MotionEnterStyle[];
|
|
353
|
+
declare const MOTION_BLENDS: readonly ["replace", "add"];
|
|
354
|
+
declare const MOTION_REPEAT_MODES: readonly ["loop", "mirror", "offset"];
|
|
274
355
|
declare const MOTION_EXIT_STYLES: readonly MotionExitStyle[];
|
|
275
356
|
declare const MOTION_IRIS_SHAPES: readonly MotionIrisShape[];
|
|
276
357
|
declare const MOTION_SPLIT_ORIENTATIONS: readonly MotionSplitOrientation[];
|
|
@@ -388,6 +469,10 @@ declare const MOTION_ISSUE_CODES: {
|
|
|
388
469
|
readonly severity: "warning";
|
|
389
470
|
readonly wording: "A change is too quick to follow.";
|
|
390
471
|
};
|
|
472
|
+
readonly 'spring-cut-short': {
|
|
473
|
+
readonly severity: "warning";
|
|
474
|
+
readonly wording: "A spring is given a duration shorter than it takes to settle, so it jumps to its end.";
|
|
475
|
+
};
|
|
391
476
|
readonly 'scene-too-long': {
|
|
392
477
|
readonly severity: "warning";
|
|
393
478
|
readonly wording: "The scene runs past its target length.";
|
|
@@ -496,6 +581,18 @@ interface MotionSegment {
|
|
|
496
581
|
* transform Flair is given), so a wriggle wanders each on the channel Flair uses. Default 0.
|
|
497
582
|
*/
|
|
498
583
|
index?: number;
|
|
584
|
+
/** Played backwards in time (a mirrored repeat): progress runs 1 → 0 through the ease. */
|
|
585
|
+
reverse?: boolean;
|
|
586
|
+
/** Stepped time: progress holds on a grid of this many frames per second from the start. */
|
|
587
|
+
steps?: number;
|
|
588
|
+
/** Numbers change by a steady factor (`from·(to/from)^u`); a camera zooms at a steady rate. */
|
|
589
|
+
geometric?: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* `add`: the segment is a layer over the node's pose rather than a change to it. It lives on
|
|
592
|
+
* its own track (`motionAddTrackKey`), runs from 0 (offsets, turns) or 1 (scales), and what
|
|
593
|
+
* it adds stays once it ends, on top of whatever the pose does.
|
|
594
|
+
*/
|
|
595
|
+
blend?: 'add';
|
|
499
596
|
/** For `follow`: the path node id, and whether to turn with it. */
|
|
500
597
|
path?: string;
|
|
501
598
|
rotate?: boolean;
|
|
@@ -584,7 +681,7 @@ declare function motionRestValue(entry: MotionNodeEntry | undefined, property: M
|
|
|
584
681
|
}): MotionValue;
|
|
585
682
|
/** `from` → `to` at eased progress `u` (numbers extrapolate, colours mix in OKLab, others switch at the end). */
|
|
586
683
|
declare function interpolateMotionValue(from: MotionValue, to: MotionValue, u: number): MotionValue;
|
|
587
|
-
/** Progress (0–1, unclamped by the easing) of a segment at `time
|
|
684
|
+
/** Progress (0–1, unclamped by the easing) of a segment at `time`: stepped, reversed and eased as the segment says. */
|
|
588
685
|
declare function segmentProgress(segment: MotionSegment, time: number): {
|
|
589
686
|
u: number;
|
|
590
687
|
eased: number;
|
|
@@ -599,14 +696,27 @@ declare function activeSegment(track: readonly MotionSegment[] | undefined, time
|
|
|
599
696
|
/** A track's value at `time`, or `undefined` when nothing animates it. `raw` ignores behaviours (see `segmentValue`). */
|
|
600
697
|
declare function trackValue(track: readonly MotionSegment[] | undefined, time: number, raw?: boolean): MotionValue | undefined;
|
|
601
698
|
declare const motionTrackKey: (node: string, property: MotionProperty) => string;
|
|
699
|
+
/** The track of a node property's additive layers (segments with `blend: 'add'`). */
|
|
700
|
+
declare const motionAddTrackKey: (node: string, property: MotionProperty) => string;
|
|
701
|
+
/** Properties that take additive layers: offsets and turns add, scales multiply. */
|
|
702
|
+
declare const MOTION_ADDITIVE_PROPERTIES: readonly MotionProperty[];
|
|
703
|
+
/**
|
|
704
|
+
* A property's value with its additive layers on top of `base` (its pose): every layer that has
|
|
705
|
+
* started adds its value (offsets, turns) or multiplies by it (scales). `raw` ignores behaviours.
|
|
706
|
+
*/
|
|
707
|
+
declare function withMotionLayers(timeline: Pick<MotionTimeline, 'tracks'>, node: string, property: MotionProperty, base: number, time: number, raw?: boolean): number;
|
|
602
708
|
/** Grows a rectangle to the artwork's aspect ratio (about its centre). */
|
|
603
709
|
declare function fitMotionRect(rect: MotionRect, aspect: number): MotionRect;
|
|
604
710
|
/** The rectangle a camera looks at, or `null` when it frames an unknown node. */
|
|
605
711
|
declare function resolveMotionCamera(camera: MotionCamera, scene: MotionScene): MotionRect | null;
|
|
606
712
|
/** Length of a node's outline (its longest path for a group), in document units. */
|
|
607
713
|
declare function motionPathLength(node: VectorNode, parentWorld?: AffineMatrix): number;
|
|
608
|
-
/** How
|
|
714
|
+
/** How many times a command plays (1 for `enter`, `exit` and `wait`, which do not repeat). */
|
|
715
|
+
declare function motionCommandRepeat(command: MotionCommand): number;
|
|
716
|
+
/** How long one target of a command takes (ms), every repeat included. */
|
|
609
717
|
declare function motionCommandDuration(command: MotionCommand, scene: MotionScene, target?: string): number;
|
|
718
|
+
/** How long one cycle of a command takes for one target (ms): its `duration`, a spring's settle time, the line's length for a draw, or the type's default. */
|
|
719
|
+
declare function motionCycleDuration(command: MotionCommand, scene: MotionScene, target?: string): number;
|
|
610
720
|
/** Cubic ease-out, `1 − (1 − t)³` exactly (Flair's `out`): the default for things arriving. */
|
|
611
721
|
declare const MOTION_EASE_OUT: AnimationEasing;
|
|
612
722
|
/** Cubic ease-in-out (close to Flair's `in-out`): the default for moves. */
|
|
@@ -721,6 +831,7 @@ type MotionEdit = {
|
|
|
721
831
|
description?: string | null;
|
|
722
832
|
loop?: MotionScene['loop'];
|
|
723
833
|
fps?: number;
|
|
834
|
+
steps?: number | null;
|
|
724
835
|
target?: [number, number] | null;
|
|
725
836
|
} | {
|
|
726
837
|
op: 'insert_shots';
|
|
@@ -805,8 +916,17 @@ declare function createMotionScene(artwork: VectorDocument, init?: Partial<Omit<
|
|
|
805
916
|
*/
|
|
806
917
|
/** Flair's easing names. */
|
|
807
918
|
type FlairEaseName = 'linear' | 'in-out' | 'out';
|
|
808
|
-
/**
|
|
809
|
-
|
|
919
|
+
/** Flair's spring ease (Flair 0.39 and later): the editor's spring, number for number. */
|
|
920
|
+
interface FlairSpringEase {
|
|
921
|
+
spring: {
|
|
922
|
+
mass?: number;
|
|
923
|
+
stiffness?: number;
|
|
924
|
+
damping?: number;
|
|
925
|
+
velocity?: number;
|
|
926
|
+
};
|
|
927
|
+
}
|
|
928
|
+
/** A Flair easing: a name, (Flair 0.36 and later) a CSS cubic-bezier `[x1, y1, x2, y2]`, or (0.39) a spring. */
|
|
929
|
+
type FlairEase = FlairEaseName | readonly [number, number, number, number] | FlairSpringEase;
|
|
810
930
|
/** Flair's curves, for matching. */
|
|
811
931
|
declare const FLAIR_EASES: Readonly<Record<FlairEaseName, (t: number) => number>>;
|
|
812
932
|
/** One change of a Flair `SvgMotion` (mirrors `SvgAnimation` in `@pixerate/flair/vector`). */
|
|
@@ -825,6 +945,16 @@ interface FlairSvgAnimation {
|
|
|
825
945
|
orient?: boolean;
|
|
826
946
|
/** Flair 0.38 and later: how the change swings from → to (see `MotionBehavior`). */
|
|
827
947
|
behavior?: MotionBehavior;
|
|
948
|
+
/** Flair 0.39 and later: stepped time, held on a grid of this many frames per second. */
|
|
949
|
+
strobe?: number;
|
|
950
|
+
/** Flair 0.39 and later: whole cycles to play (default 1); with `alternate`, every other one backwards. */
|
|
951
|
+
repeat?: number;
|
|
952
|
+
alternate?: boolean;
|
|
953
|
+
/** Flair features scenes do not have (imports skip them with a note). */
|
|
954
|
+
count?: readonly [number, number];
|
|
955
|
+
write?: string;
|
|
956
|
+
scramble?: string;
|
|
957
|
+
solo?: number;
|
|
828
958
|
view?: readonly [number, number, number, number] | string;
|
|
829
959
|
}
|
|
830
960
|
/** Mirrors `SvgMotion` in `@pixerate/flair/vector`. */
|
|
@@ -896,7 +1026,17 @@ interface FlairExportOptions {
|
|
|
896
1026
|
* older Flair, and they are sampled into linear steps.
|
|
897
1027
|
*/
|
|
898
1028
|
behaviors?: boolean;
|
|
1029
|
+
/**
|
|
1030
|
+
* The Flair version the export is for (default `0.39`): it decides what is written exactly
|
|
1031
|
+
* and what is sampled. 0.36 adds cubic-bezier curves, 0.38 behaviours, 0.39 springs and
|
|
1032
|
+
* stepped time (`strobe`). `curves` and `behaviors` override it.
|
|
1033
|
+
*/
|
|
1034
|
+
flair?: string;
|
|
899
1035
|
}
|
|
1036
|
+
/** The Flair version exports target by default. */
|
|
1037
|
+
declare const FLAIR_EXPORT_VERSION = "0.39";
|
|
1038
|
+
/** Whether Flair `version` is at least `min` (dotted numbers). */
|
|
1039
|
+
declare function flairAtLeast(version: string, min: string): boolean;
|
|
900
1040
|
/** The Flair easing that matches `ease` (within 1% everywhere), if any. */
|
|
901
1041
|
declare function flairEaseFor(ease: AnimationEasing): FlairEaseName | undefined;
|
|
902
1042
|
/**
|
|
@@ -922,6 +1062,36 @@ declare function toFlairVectorEffect(scene: MotionScene, options?: FlairEffectOp
|
|
|
922
1062
|
/** A scene as a document for Flair's `EffectEditor` (`replaceDocument`). */
|
|
923
1063
|
declare function toFlairEffectDocument(scene: MotionScene, options?: FlairExportOptions): FlairEffectDocument;
|
|
924
1064
|
|
|
1065
|
+
/**
|
|
1066
|
+
* Import from Flair: a Flair `SvgMotion` (or a catalog `VectorEffect`) becomes a scene, so an
|
|
1067
|
+
* effect made in Flair, or taken from its catalog, can be opened and edited here. The reverse
|
|
1068
|
+
* of `toFlairSvgMotion`, as far as the scene model goes:
|
|
1069
|
+
*
|
|
1070
|
+
* - The SVG becomes the artwork (`parseVectorSvg`); `{{name: color …}}` placeholders become
|
|
1071
|
+
* colour controls (other placeholders take their defaults).
|
|
1072
|
+
* - Each Flair step becomes a shot, its changes commands timed by their `delay`, all together.
|
|
1073
|
+
* - Opacity, paint, stroke width, transforms (as move, rotate and scale), drawing on, following
|
|
1074
|
+
* a path, camera views and behaviours (pulse, shake, teeter, wave, wiggle, colour pulse) carry
|
|
1075
|
+
* over. Counting, writing text, solo containers and anything else are listed in `notes`.
|
|
1076
|
+
*/
|
|
1077
|
+
interface FlairImportResult {
|
|
1078
|
+
scene: MotionScene;
|
|
1079
|
+
/** What could not be carried over exactly, in sentences. */
|
|
1080
|
+
notes: string[];
|
|
1081
|
+
/** `checkMotionScene` of the result. */
|
|
1082
|
+
issues: MotionIssue[];
|
|
1083
|
+
}
|
|
1084
|
+
interface FlairImportOptions {
|
|
1085
|
+
/** The scene's name (default: the effect's, else `from-flair`). */
|
|
1086
|
+
name?: string;
|
|
1087
|
+
/** Hold after the last shot, ms (default: the effect's `hold`, else 600). */
|
|
1088
|
+
hold?: number;
|
|
1089
|
+
}
|
|
1090
|
+
/** A Flair `SvgMotion` as a scene (see the module notes for what carries over). */
|
|
1091
|
+
declare function fromFlairSvgMotion(input: FlairSvgMotion, options?: FlairImportOptions): FlairImportResult;
|
|
1092
|
+
/** A Flair catalog `VectorEffect` as a scene: its motion, name, description, colour controls and presets. */
|
|
1093
|
+
declare function fromFlairVectorEffect(effect: FlairVectorEffect, options?: FlairImportOptions): FlairImportResult;
|
|
1094
|
+
|
|
925
1095
|
interface AnimationEditorOptions {
|
|
926
1096
|
/** The scene to open (default: an empty one over a blank 800 × 450 artwork). */
|
|
927
1097
|
scene?: MotionScene;
|
|
@@ -1105,6 +1275,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1105
1275
|
with?: "after" | "previous";
|
|
1106
1276
|
ease?: AnimationEasing;
|
|
1107
1277
|
note?: string;
|
|
1278
|
+
repeat?: number;
|
|
1279
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1280
|
+
steps?: number;
|
|
1108
1281
|
index: number;
|
|
1109
1282
|
} | {
|
|
1110
1283
|
flairPrimitive?: string | undefined;
|
|
@@ -1121,6 +1294,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1121
1294
|
with?: "after" | "previous";
|
|
1122
1295
|
ease?: AnimationEasing;
|
|
1123
1296
|
note?: string;
|
|
1297
|
+
repeat?: number;
|
|
1298
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1299
|
+
steps?: number;
|
|
1124
1300
|
index: number;
|
|
1125
1301
|
} | {
|
|
1126
1302
|
flairPrimitive?: string | undefined;
|
|
@@ -1136,11 +1312,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1136
1312
|
with?: "after" | "previous";
|
|
1137
1313
|
ease?: AnimationEasing;
|
|
1138
1314
|
note?: string;
|
|
1315
|
+
repeat?: number;
|
|
1316
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1317
|
+
steps?: number;
|
|
1139
1318
|
index: number;
|
|
1140
1319
|
} | {
|
|
1141
1320
|
flairPrimitive?: string | undefined;
|
|
1142
1321
|
start: number;
|
|
1143
1322
|
end: number;
|
|
1323
|
+
blend?: "replace" | "add";
|
|
1144
1324
|
type: "move";
|
|
1145
1325
|
by?: {
|
|
1146
1326
|
x: number;
|
|
@@ -1157,11 +1337,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1157
1337
|
with?: "after" | "previous";
|
|
1158
1338
|
ease?: AnimationEasing;
|
|
1159
1339
|
note?: string;
|
|
1340
|
+
repeat?: number;
|
|
1341
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1342
|
+
steps?: number;
|
|
1160
1343
|
index: number;
|
|
1161
1344
|
} | {
|
|
1162
1345
|
flairPrimitive?: string | undefined;
|
|
1163
1346
|
start: number;
|
|
1164
1347
|
end: number;
|
|
1348
|
+
blend?: "replace" | "add";
|
|
1165
1349
|
type: "rotate";
|
|
1166
1350
|
by?: number;
|
|
1167
1351
|
to?: number;
|
|
@@ -1172,16 +1356,21 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1172
1356
|
with?: "after" | "previous";
|
|
1173
1357
|
ease?: AnimationEasing;
|
|
1174
1358
|
note?: string;
|
|
1359
|
+
repeat?: number;
|
|
1360
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1361
|
+
steps?: number;
|
|
1175
1362
|
index: number;
|
|
1176
1363
|
} | {
|
|
1177
1364
|
flairPrimitive?: string | undefined;
|
|
1178
1365
|
start: number;
|
|
1179
1366
|
end: number;
|
|
1367
|
+
blend?: "replace" | "add";
|
|
1180
1368
|
type: "scale";
|
|
1181
1369
|
to: number | {
|
|
1182
1370
|
x: number;
|
|
1183
1371
|
y: number;
|
|
1184
1372
|
};
|
|
1373
|
+
geometric?: boolean;
|
|
1185
1374
|
targets: string[];
|
|
1186
1375
|
duration?: number;
|
|
1187
1376
|
delay?: number;
|
|
@@ -1189,6 +1378,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1189
1378
|
with?: "after" | "previous";
|
|
1190
1379
|
ease?: AnimationEasing;
|
|
1191
1380
|
note?: string;
|
|
1381
|
+
repeat?: number;
|
|
1382
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1383
|
+
steps?: number;
|
|
1192
1384
|
index: number;
|
|
1193
1385
|
} | {
|
|
1194
1386
|
flairPrimitive?: string | undefined;
|
|
@@ -1203,6 +1395,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1203
1395
|
with?: "after" | "previous";
|
|
1204
1396
|
ease?: AnimationEasing;
|
|
1205
1397
|
note?: string;
|
|
1398
|
+
repeat?: number;
|
|
1399
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1400
|
+
steps?: number;
|
|
1206
1401
|
index: number;
|
|
1207
1402
|
} | {
|
|
1208
1403
|
flairPrimitive?: string | undefined;
|
|
@@ -1219,6 +1414,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1219
1414
|
with?: "after" | "previous";
|
|
1220
1415
|
ease?: AnimationEasing;
|
|
1221
1416
|
note?: string;
|
|
1417
|
+
repeat?: number;
|
|
1418
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1419
|
+
steps?: number;
|
|
1222
1420
|
index: number;
|
|
1223
1421
|
} | {
|
|
1224
1422
|
flairPrimitive?: string | undefined;
|
|
@@ -1233,6 +1431,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1233
1431
|
with?: "after" | "previous";
|
|
1234
1432
|
ease?: AnimationEasing;
|
|
1235
1433
|
note?: string;
|
|
1434
|
+
repeat?: number;
|
|
1435
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1436
|
+
steps?: number;
|
|
1236
1437
|
index: number;
|
|
1237
1438
|
} | {
|
|
1238
1439
|
flairPrimitive?: string | undefined;
|
|
@@ -1250,11 +1451,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1250
1451
|
with?: "after" | "previous";
|
|
1251
1452
|
ease?: AnimationEasing;
|
|
1252
1453
|
note?: string;
|
|
1454
|
+
repeat?: number;
|
|
1455
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1456
|
+
steps?: number;
|
|
1253
1457
|
index: number;
|
|
1254
1458
|
} | {
|
|
1255
1459
|
flairPrimitive?: string | undefined;
|
|
1256
1460
|
start: number;
|
|
1257
1461
|
end: number;
|
|
1462
|
+
blend?: "replace" | "add";
|
|
1258
1463
|
type: "pulse";
|
|
1259
1464
|
amount?: number;
|
|
1260
1465
|
count?: number;
|
|
@@ -1265,11 +1470,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1265
1470
|
with?: "after" | "previous";
|
|
1266
1471
|
ease?: AnimationEasing;
|
|
1267
1472
|
note?: string;
|
|
1473
|
+
repeat?: number;
|
|
1474
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1475
|
+
steps?: number;
|
|
1268
1476
|
index: number;
|
|
1269
1477
|
} | {
|
|
1270
1478
|
flairPrimitive?: string | undefined;
|
|
1271
1479
|
start: number;
|
|
1272
1480
|
end: number;
|
|
1481
|
+
blend?: "replace" | "add";
|
|
1273
1482
|
type: "shake";
|
|
1274
1483
|
amount?: number;
|
|
1275
1484
|
count?: number;
|
|
@@ -1281,11 +1490,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1281
1490
|
with?: "after" | "previous";
|
|
1282
1491
|
ease?: AnimationEasing;
|
|
1283
1492
|
note?: string;
|
|
1493
|
+
repeat?: number;
|
|
1494
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1495
|
+
steps?: number;
|
|
1284
1496
|
index: number;
|
|
1285
1497
|
} | {
|
|
1286
1498
|
flairPrimitive?: string | undefined;
|
|
1287
1499
|
start: number;
|
|
1288
1500
|
end: number;
|
|
1501
|
+
blend?: "replace" | "add";
|
|
1289
1502
|
type: "teeter";
|
|
1290
1503
|
angle?: number;
|
|
1291
1504
|
count?: number;
|
|
@@ -1296,11 +1509,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1296
1509
|
with?: "after" | "previous";
|
|
1297
1510
|
ease?: AnimationEasing;
|
|
1298
1511
|
note?: string;
|
|
1512
|
+
repeat?: number;
|
|
1513
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1514
|
+
steps?: number;
|
|
1299
1515
|
index: number;
|
|
1300
1516
|
} | {
|
|
1301
1517
|
flairPrimitive?: string | undefined;
|
|
1302
1518
|
start: number;
|
|
1303
1519
|
end: number;
|
|
1520
|
+
blend?: "replace" | "add";
|
|
1304
1521
|
type: "wave";
|
|
1305
1522
|
amount?: number;
|
|
1306
1523
|
count?: number;
|
|
@@ -1311,11 +1528,15 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1311
1528
|
with?: "after" | "previous";
|
|
1312
1529
|
ease?: AnimationEasing;
|
|
1313
1530
|
note?: string;
|
|
1531
|
+
repeat?: number;
|
|
1532
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1533
|
+
steps?: number;
|
|
1314
1534
|
index: number;
|
|
1315
1535
|
} | {
|
|
1316
1536
|
flairPrimitive?: string | undefined;
|
|
1317
1537
|
start: number;
|
|
1318
1538
|
end: number;
|
|
1539
|
+
blend?: "replace" | "add";
|
|
1319
1540
|
type: "wiggle";
|
|
1320
1541
|
amount?: number;
|
|
1321
1542
|
frequency?: number;
|
|
@@ -1329,6 +1550,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1329
1550
|
with?: "after" | "previous";
|
|
1330
1551
|
ease?: AnimationEasing;
|
|
1331
1552
|
note?: string;
|
|
1553
|
+
repeat?: number;
|
|
1554
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1555
|
+
steps?: number;
|
|
1332
1556
|
index: number;
|
|
1333
1557
|
} | {
|
|
1334
1558
|
flairPrimitive?: string | undefined;
|
|
@@ -1345,6 +1569,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1345
1569
|
with?: "after" | "previous";
|
|
1346
1570
|
ease?: AnimationEasing;
|
|
1347
1571
|
note?: string;
|
|
1572
|
+
repeat?: number;
|
|
1573
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1574
|
+
steps?: number;
|
|
1348
1575
|
index: number;
|
|
1349
1576
|
} | {
|
|
1350
1577
|
flairPrimitive?: string | undefined;
|
|
@@ -1361,6 +1588,9 @@ declare function describeMotionShots(scene: MotionScene): {
|
|
|
1361
1588
|
with?: "after" | "previous";
|
|
1362
1589
|
ease?: AnimationEasing;
|
|
1363
1590
|
note?: string;
|
|
1591
|
+
repeat?: number;
|
|
1592
|
+
repeatMode?: "loop" | "mirror" | "offset";
|
|
1593
|
+
steps?: number;
|
|
1364
1594
|
index: number;
|
|
1365
1595
|
} | {
|
|
1366
1596
|
flairPrimitive?: string | undefined;
|
|
@@ -1392,6 +1622,6 @@ declare function createAnimationEditorToolProvider(controller: AnimationEditorCo
|
|
|
1392
1622
|
* A short authoring guide for a model writing vector animations with the animation editor's
|
|
1393
1623
|
* tools. Static, so it caches well as part of a system prompt.
|
|
1394
1624
|
*/
|
|
1395
|
-
declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
|
|
1625
|
+
declare const ANIMATION_EDITOR_AGENT_INSTRUCTIONS = "You animate vector artwork. A scene is artwork (vector paths and groups, each with an id) plus shots.\n\nHow it plays\n- Shots play in order. A shot optionally moves the camera, plays its commands, then holds (default 600 ms).\n- Commands in a shot play one after another; give \"with\": \"previous\" to start one together with the command before, \"delay\" to wait, \"stagger\" to offset several targets.\n- Timing comes from the content: each command has a default length (enter 600 ms, move 700 ms, draw follows the path length). Only set \"duration\" to change the pace.\n- Anything that enters later is hidden until it enters. Things that never enter are visible from the start.\n- Every frame is a pure function of time: the same scene always plays the same frames.\n\nCommands\n- enter (fade, pop, grow, slide, draw) and exit (fade, shrink, slide, undraw) bring things in and out.\n- enter also reveals through a clip over the target's box: wipe (behind an edge travelling \"direction\", default right), iris (from the centre; \"shape\": circle or box) and split (from a line through the middle; \"orientation\": horizontal or vertical). exit wipe hides the same way. Reveals need a width and a height: use draw / undraw for a straight line.\n- draw draws strokes on to a fraction; move, rotate, scale and fade change the pose (about the centre); style blends solid colours and stroke width.\n- enter also has zoom (settles from larger) and rise (rises a short way, overshooting a touch); pop and zoom take a starting \"scale\".\n- morph turns a shape into another node's shape (keep the target hidden); follow moves along a path node (with \"rotate\", moves made meanwhile turn with the path).\n- Emphasis draws the eye and returns to rest: pulse (swell), shake (side to side, or \"axis\": \"vertical\"), teeter (rock), wave (bob, no settling), wiggle (seeded wander; the same seed wanders the same way) and color-pulse (tint and back).\n- Emphasis stacks on other motion: a shake during a slide shakes as it slides. Give move, rotate or scale \"blend\": \"add\" to stack them too (what they add stays); \"blend\": \"replace\" makes a change take over instead.\n- Any command but enter and exit can \"repeat\" (loop, mirror back and forth, or offset to carry on: rotate by 90, repeat 4 is a full turn); \"duration\" is one cycle.\n- Springs (\"spring-gentle\", \"spring-quick\", \"spring-bouncy\", \"spring-slow\" or { \"type\": \"spring\", \u2026 }) feel physical; leave \"duration\" out and the spring sets it.\n- \"steps\": 12 (on a command, or for the whole scene with set_animation_settings) holds poses \"on twos\" for a hand-drawn look. \"geometric\": true on scale or a camera zooms at an even rate.\n- Commands share their names and defaults with Flair's motion primitives (get_animation shows each one's \"flairPrimitive\"), and emphasis, reveals and follows export to Flair exactly.\n- effect tweens a numeric parameter of a live path effect already on the node (twist angle, wiggle time, zig zag size).\n\nWorking method\n1. get_animation to learn the element ids (set_animation_artwork_svg first if there is no artwork: give every element you will animate an id; or import_flair_effect to start from a Flair effect and edit it).\n2. Plan a few shots, each one idea. Add them with insert_shots, or edit_animation to make several edits as one step (dry_run first when unsure).\n3. check_animation and fix every error and warning; render_animation_frame (shot + \"end\") to look at the result.\n4. To make a reusable Flair effect, set_animation_controls (colour controls stand for every use of their default colour) and export_flair_effect.\n\nKeep motion purposeful: one thing moving at a time reads best, ease-out for arrivals, ease-in for exits, and hold long enough to see each result.";
|
|
1396
1626
|
|
|
1397
|
-
export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairMotionExport, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairCurveFor, flairEaseFor, freshShotId, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, motionClipAttrs, motionCommandDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withViewBox };
|
|
1627
|
+
export { ANIMATION_EDITOR_AGENT_INSTRUCTIONS, AnimationEditorController, type AnimationEditorOptions, type AnimationEditorSelection, type AnimationEditorState, type AnimationEditorToolProviderOptions, FLAIR_EASES, FLAIR_EXPORT_VERSION, type FlairEase, type FlairEaseName, type FlairEffectDocument, type FlairEffectOptions, type FlairExportOptions, type FlairImportOptions, type FlairImportResult, type FlairMotionExport, type FlairSpringEase, type FlairSvgAnimation, type FlairSvgMotion, type FlairVectorEffect, MOTION_ADDITIVE_PROPERTIES, MOTION_BLENDS, MOTION_CAMERA_MS, MOTION_COMMAND_SCHEMA, MOTION_COMMAND_TYPES, MOTION_DEFAULT_DURATIONS, MOTION_DEFAULT_HOLD, MOTION_DIRECTIONS, MOTION_DRAW_EFFECT_ID, MOTION_DRAW_MS_PER_UNIT, MOTION_DRAW_RANGE, MOTION_EASE_IN_OUT, MOTION_EASE_OUT, MOTION_EDIT_OPS, MOTION_ENTER_STYLES, MOTION_EXIT_STYLES, MOTION_IRIS_SHAPES, MOTION_ISSUE_CODES, MOTION_MIN_CHANGE_MS, MOTION_REPEAT_MODES, MOTION_SPLIT_ORIENTATIONS, type MotionCamera, type MotionClipShape, type MotionColorPulseCommand, type MotionCommand, type MotionCommandBase, type MotionCommandTiming, type MotionCommandType, type MotionControl, type MotionDirection, type MotionDrawCommand, type MotionEdit, type MotionEditOp, type MotionEditResult, type MotionEffectCommand, type MotionEnterCommand, type MotionEnterStyle, type MotionExitCommand, type MotionExitStyle, type MotionFadeCommand, type MotionFollowCommand, type MotionFrame, type MotionFrameOptions, type MotionIrisShape, type MotionIssue, type MotionIssueCode, type MotionIssueSeverity, type MotionMorphCommand, type MotionMoveCommand, type MotionNodeEntry, type MotionPreset, type MotionProperty, type MotionPulseCommand, type MotionRect, type MotionReveal, type MotionRotateCommand, type MotionScaleCommand, type MotionScene, MotionSceneFormatError, type MotionSegment, type MotionShakeCommand, type MotionShot, type MotionShotTiming, type MotionSplitOrientation, type MotionStyleCommand, type MotionSvgOptions, type MotionTeeterCommand, type MotionTimeline, type MotionValue, type MotionWaitCommand, type MotionWaveCommand, type MotionWiggleCommand, activeSegment, applyMotionControlValues, applyMotionEdits, checkMotionScene, commandShapeProblems, compileMotionScene, createAnimationEditorToolProvider, createMotionScene, describeMotionElements, describeMotionShots, fitMotionRect, flairAtLeast, flairCurveFor, flairEaseFor, freshShotId, fromFlairSvgMotion, fromFlairVectorEffect, indexMotionNodes, interpolateMotionValue, isMotionCommand, isMotionShot, motionAddTrackKey, motionClipAttrs, motionCommandDuration, motionCommandRepeat, motionCycleDuration, motionFlairPrimitive, motionFollowRoute, motionFrameAt, motionFrameToSvg, motionIssue, motionIssueKey, motionIssueLine, motionNodeClips, motionNodeOffset, motionPathLength, motionRestValue, motionRevealClip, motionRevealPadding, motionSceneShapeProblems, motionSceneToJson, motionShotAt, motionTrackKey, namedWithSuggestion, parseMotionScene, resolveMotionCamera, segmentProgress, segmentValue, shotShapeProblems, suggestName, toFlairEffectDocument, toFlairSvgMotion, toFlairVectorEffect, trackValue, withMotionLayers, withViewBox };
|