@flatkit/types 0.17.3 → 0.19.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/index.d.ts +19 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -45,11 +45,15 @@ type Shape = PolyGroup[];
|
|
|
45
45
|
type Stop = {
|
|
46
46
|
offset: number;
|
|
47
47
|
color: string;
|
|
48
|
+
param?: string;
|
|
49
|
+
alpha?: number;
|
|
48
50
|
};
|
|
49
|
-
/** A Flash-style "tint" color effect: recolors a container toward `color` by `amount` (0..1).
|
|
51
|
+
/** A Flash-style "tint" color effect: recolors a container toward `color` by `amount` (0..1). `param` (if
|
|
52
|
+
* set) binds the tint hue to a symbol COLOR param, resolved per instance at render (else the literal `color`). */
|
|
50
53
|
type Tint = {
|
|
51
54
|
color: string;
|
|
52
55
|
amount: number;
|
|
56
|
+
param?: string;
|
|
53
57
|
};
|
|
54
58
|
/** Blend mode (Flash / After Effects style). `add`/`screen` = additive light (glow, mixing); `multiply` = shadow. */
|
|
55
59
|
type BlendMode = 'add' | 'screen' | 'multiply';
|
|
@@ -164,12 +168,25 @@ type InstanceBind = {
|
|
|
164
168
|
as: string;
|
|
165
169
|
expr: Partial<Record<ExprChannel, string>>;
|
|
166
170
|
};
|
|
167
|
-
|
|
171
|
+
/**
|
|
172
|
+
* How a nested instance's OWN timeline advances (Flash's symbol-instance models):
|
|
173
|
+
* - `synced` — Graphic symbol: the local frame DERIVES from the ancestor's (a slave clock). Scrubbed
|
|
174
|
+
* and TRUNCATED by the parent (looped within [0,duration)). The default — deterministic,
|
|
175
|
+
* lip-sync / editor scrub friendly.
|
|
176
|
+
* - `independent` — MovieClip: an INDEPENDENT clock. The playhead is driven by the runtime's monotone
|
|
177
|
+
* heartbeat (`mono`), looped on the instance's OWN duration, immune to any ancestor's
|
|
178
|
+
* loop length. For state-loops / idles that must keep their phase across the parent's wrap.
|
|
179
|
+
* - `once` — like `independent` but CLAMPED to [0, duration-1]: plays through once, then HOLDS the
|
|
180
|
+
* last frame forever (a one-shot: a splash, an explosion, a "fried" pose that stays fried).
|
|
181
|
+
* - `singleFrame` — frozen on a fixed `frame` (a dead pose).
|
|
182
|
+
*/
|
|
183
|
+
type PlaybackMode = 'synced' | 'singleFrame' | 'independent' | 'once';
|
|
168
184
|
type InstancePlayback = {
|
|
169
185
|
mode: PlaybackMode;
|
|
170
186
|
frame?: number;
|
|
171
187
|
speed?: number;
|
|
172
188
|
loop?: boolean;
|
|
189
|
+
startFrame?: number;
|
|
173
190
|
};
|
|
174
191
|
/**
|
|
175
192
|
* Payload of a `send`: numeric (DSL expression) or textual (`text("itemId")`, the live content of a
|