pixi-effects 0.28.2 → 0.29.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +10 -10
  3. package/ai/chat-template.html +5 -5
  4. package/ai/tools/check.mjs +18 -3
  5. package/ai/tools/pixi-effects.mjs +1 -1
  6. package/ai/tools/render.mjs +14 -9
  7. package/ai/tools/view.mjs +6 -2
  8. package/dist/Base-CB1_FPZD.d.cts +60 -0
  9. package/dist/Base-Ne74ztNl.d.ts +60 -0
  10. package/dist/Composition-MUKR3FYD.cjs +16 -0
  11. package/dist/{Composition-K6B3APM5.cjs.map → Composition-MUKR3FYD.cjs.map} +1 -1
  12. package/dist/Composition-RJGA7KDU.js +7 -0
  13. package/dist/{Composition-H7UNR5F5.js.map → Composition-RJGA7KDU.js.map} +1 -1
  14. package/dist/Controller.cjs +73 -45
  15. package/dist/Controller.cjs.map +1 -1
  16. package/dist/Controller.d.cts +16 -22
  17. package/dist/Controller.d.ts +16 -22
  18. package/dist/Controller.js +74 -40
  19. package/dist/Controller.js.map +1 -1
  20. package/dist/{Movie-CHcM8HNB.d.ts → Movie-C2rZFkrO.d.ts} +227 -119
  21. package/dist/{Movie-Cx5ozUGb.d.cts → Movie-DdnpLpw1.d.cts} +227 -119
  22. package/dist/{blendModes-HDOP6R7T.cjs → blendModes-ETMYWATF.cjs} +5 -5
  23. package/dist/{blendModes-HDOP6R7T.cjs.map → blendModes-ETMYWATF.cjs.map} +1 -1
  24. package/dist/{blendModes-PAVTW3BO.js → blendModes-RIVZXL5A.js} +4 -4
  25. package/dist/{blendModes-PAVTW3BO.js.map → blendModes-RIVZXL5A.js.map} +1 -1
  26. package/dist/{chunk-P4GY3Z4G.cjs → chunk-2DXPTKQZ.cjs} +6 -6
  27. package/dist/chunk-2DXPTKQZ.cjs.map +1 -0
  28. package/dist/{chunk-TYWFKCPY.js → chunk-4KB3GUEK.js} +5 -5
  29. package/dist/chunk-4KB3GUEK.js.map +1 -0
  30. package/dist/{chunk-5MZWXVTT.js → chunk-A3Q3SDSH.js} +35 -28
  31. package/dist/chunk-A3Q3SDSH.js.map +1 -0
  32. package/dist/chunk-CRQFDY7E.js +4182 -0
  33. package/dist/chunk-CRQFDY7E.js.map +1 -0
  34. package/dist/chunk-HREBQAY4.cjs +4206 -0
  35. package/dist/chunk-HREBQAY4.cjs.map +1 -0
  36. package/dist/{chunk-ZMAD3KJU.cjs → chunk-LYOKH7KE.cjs} +22 -3
  37. package/dist/chunk-LYOKH7KE.cjs.map +1 -0
  38. package/dist/{chunk-45QKLD6M.js → chunk-RCVZX2JP.js} +22 -3
  39. package/dist/chunk-RCVZX2JP.js.map +1 -0
  40. package/dist/{chunk-KBH33IQX.cjs → chunk-WHNADXXG.cjs} +121 -114
  41. package/dist/chunk-WHNADXXG.cjs.map +1 -0
  42. package/dist/{chunk-7VN2KI3U.js → chunk-ZAXYPXKW.js} +14 -6
  43. package/dist/chunk-ZAXYPXKW.js.map +1 -0
  44. package/dist/{chunk-MJW7KILM.cjs → chunk-ZVUO325O.cjs} +32 -24
  45. package/dist/chunk-ZVUO325O.cjs.map +1 -0
  46. package/dist/index.cjs +106 -4482
  47. package/dist/index.cjs.map +1 -1
  48. package/dist/index.d.cts +15 -60
  49. package/dist/index.d.ts +15 -60
  50. package/dist/index.js +6 -4457
  51. package/dist/index.js.map +1 -1
  52. package/dist/loader.css +1 -1
  53. package/dist/{Presenter.cjs → present.cjs} +370 -31
  54. package/dist/present.cjs.map +1 -0
  55. package/dist/present.d.cts +278 -0
  56. package/dist/present.d.ts +278 -0
  57. package/dist/{Presenter.js → present.js} +358 -32
  58. package/dist/present.js.map +1 -0
  59. package/dist/three.cjs +6 -6
  60. package/dist/three.d.cts +2 -2
  61. package/dist/three.d.ts +2 -2
  62. package/dist/three.js +2 -2
  63. package/dist/{types-DpK1vwcl.d.ts → types-BzIB65Vk.d.cts} +11 -265
  64. package/dist/{types-DpK1vwcl.d.cts → types-BzIB65Vk.d.ts} +11 -265
  65. package/docs/api.md +44 -77
  66. package/docs/dsl.md +16 -14
  67. package/llms-full.txt +86 -115
  68. package/llms.txt +1 -1
  69. package/package.json +5 -5
  70. package/skills/pixi-effects/SKILL.md +5 -5
  71. package/skills/pixi-effects/reference/cheatsheet.md +9 -9
  72. package/skills/pixi-effects/reference/direction.md +2 -0
  73. package/skills/pixi-effects/reference/pitfalls.md +6 -6
  74. package/skills/pixi-effects/reference/recipes.md +4 -4
  75. package/skills/pixi-effects/template.html +7 -7
  76. package/dist/Base-C6f0fE8j.d.ts +0 -109
  77. package/dist/Base-DI1FCGcH.d.cts +0 -109
  78. package/dist/Composition-H7UNR5F5.js +0 -7
  79. package/dist/Composition-K6B3APM5.cjs +0 -16
  80. package/dist/Presenter.cjs.map +0 -1
  81. package/dist/Presenter.d.cts +0 -122
  82. package/dist/Presenter.d.ts +0 -122
  83. package/dist/Presenter.js.map +0 -1
  84. package/dist/chunk-45QKLD6M.js.map +0 -1
  85. package/dist/chunk-5MZWXVTT.js.map +0 -1
  86. package/dist/chunk-7VN2KI3U.js.map +0 -1
  87. package/dist/chunk-KBH33IQX.cjs.map +0 -1
  88. package/dist/chunk-MJW7KILM.cjs.map +0 -1
  89. package/dist/chunk-P4GY3Z4G.cjs.map +0 -1
  90. package/dist/chunk-TYWFKCPY.js.map +0 -1
  91. package/dist/chunk-ZMAD3KJU.cjs.map +0 -1
@@ -1,5 +1,204 @@
1
1
  import { Application } from 'pixi.js';
2
- import { O as MusicSummary, ac as Timeline, a4 as Stop, f as AssetSpec, d as CompositionSpec } from './types-DpK1vwcl.js';
2
+ import { Z as Stop, c as AssetSpec, k as CompositionSpec } from './types-BzIB65Vk.js';
3
+
4
+ type EaseFn = (p: number) => number;
5
+
6
+ /**
7
+ * A timeline that is a pure function of time (spike: see docs/superpowers/specs/2026-10-10-pure-timeline-design.md).
8
+ *
9
+ * For every (target, property) it keeps the segments that write it, ordered by start time. The value at `t`
10
+ * is the value of the last segment that has started, computed from `t` alone; nothing is remembered between
11
+ * two calls except the start values captured when the segment was built. GSAP is the oracle: the rules below
12
+ * were taken from black-box probes of `gsap.timeline` and are checked against it by tests/core/pure/timelineParity.test.ts.
13
+ */
14
+ interface PureVars {
15
+ duration?: number;
16
+ ease?: string | EaseFn;
17
+ repeat?: number;
18
+ yoyo?: boolean;
19
+ repeatDelay?: number;
20
+ onUpdate?: () => void;
21
+ /** The Pixi plugin's shorthands: `scale`, `anchor`, `rotation` (degrees), `tint`, `autoAlpha` ... */
22
+ pixi?: Record<string, unknown>;
23
+ [prop: string]: unknown;
24
+ }
25
+ /** One thing a timeline writes: see `segments()`. */
26
+ interface SegmentInfo {
27
+ target: object;
28
+ /** The property (`'alpha'`, `'scale.x'`, `'fill'`). */
29
+ id: string;
30
+ start: number;
31
+ duration: number;
32
+ repeat: number;
33
+ yoyo: boolean;
34
+ repeatDelay: number;
35
+ kind: 'set' | 'to' | 'from' | 'fromTo';
36
+ }
37
+ /** A marker that only lengthens a timeline (what `gsap.to({}, { duration })` is used for). */
38
+ interface Spacer {
39
+ readonly spacer: true;
40
+ readonly duration: number;
41
+ }
42
+ declare class PureTimeline {
43
+ private readonly defaultEase;
44
+ private readonly channels;
45
+ private readonly channelList;
46
+ private readonly children;
47
+ private spans;
48
+ private now;
49
+ private order;
50
+ private killed;
51
+ private prepared;
52
+ constructor(opts?: {
53
+ paused?: boolean;
54
+ defaults?: {
55
+ ease?: string | EaseFn;
56
+ };
57
+ });
58
+ /** Adds a child timeline (played with its local time) or a spacer that lengthens this one. */
59
+ add(child: PureTimeline | Spacer, at?: number): this;
60
+ set(target: object, vars: PureVars, at?: number): this;
61
+ to(target: object, vars: PureVars, at?: number): this;
62
+ from(target: object, vars: PureVars, at?: number): this;
63
+ fromTo(target: object, fromVars: PureVars, toVars: PureVars, at?: number): this;
64
+ private build;
65
+ private channel;
66
+ /**
67
+ * A property moved by a function of the caller (a colour in OKLab, a gradient): `to` and `from` say how to get the two ends from
68
+ * the value before the segment, `make` the interpolator between them. The value is only written while the segment is the last
69
+ * one that has started, so nothing is read or kept between two frames.
70
+ */
71
+ tweenValue<T>(spec: {
72
+ holder: object;
73
+ id: string;
74
+ get(): T;
75
+ set(v: T): void;
76
+ from?: (prev: T) => T;
77
+ to: (start: T, prev: T, base: T) => T;
78
+ make: (a: T, b: T) => (p: number) => T;
79
+ duration: number;
80
+ ease: string | EaseFn;
81
+ at: number;
82
+ repeat?: number;
83
+ yoyo?: boolean;
84
+ repeatDelay?: number;
85
+ }): this;
86
+ /**
87
+ * A write that is undone when time goes back before it: the property is `value` from `at` on, and what it was before otherwise.
88
+ * `holder` and `id` name the property, so a set and the tweens of the same property are one channel; `write` is the way the caller
89
+ * writes it (it may do more than assign: redraw), and runs again whenever this set is what the property shows.
90
+ */
91
+ setValue<T>(holder: object, id: string, at: number, read: () => T, write: (v: T) => void, value: T): this;
92
+ /** What the timeline will write, for tools and tests: every segment of this timeline and of the ones under it, starts in this timeline's time. */
93
+ segments(offset?: number): SegmentInfo[];
94
+ /** How many timelines are directly under this one. */
95
+ timelines(): number;
96
+ duration(): number;
97
+ time(): number;
98
+ time(value: number): this;
99
+ /** GSAP's name for `time(t)`. */
100
+ seek(t: number): this;
101
+ progress(): number;
102
+ progress(p: number): this;
103
+ kill(): void;
104
+ /**
105
+ * What GSAP ended up with once it had been played to the end and back (what Movie used to do at build), as rules that depend
106
+ * on the segments of a property only:
107
+ * - a `from` / `fromTo` shows its start from the moment it is built, so a `to` that comes first starts at the start of the
108
+ * `from` built last, else at the property's own value;
109
+ * - a `to` (and a `set`) starts where the segment before it ended;
110
+ * - a `from` ends where the segment before it ended, or, with none before, where the property was when it was built;
111
+ * - before the first segment the property shows that segment's start.
112
+ */
113
+ private prepare;
114
+ /** Every channel of this timeline and of its children reads the property it starts from before any of them writes. */
115
+ private prepareDeep;
116
+ /** How many channels write each (target, property) in this timeline and everything under it. */
117
+ private countChannels;
118
+ private isExclusive;
119
+ private markExclusive;
120
+ private evaluate;
121
+ }
122
+
123
+ /**
124
+ * The timeline of the library and the few things around it: a timeline is a pure function of time (a value at a time is computed from the
125
+ * script and the time alone, never from the way the playhead came), see docs/superpowers/specs/2026-10-10-pure-timeline-design.md.
126
+ */
127
+ type Timeline = PureTimeline;
128
+
129
+ /** One note or chord of a track, as a score reader sees it. */
130
+ interface MusicNote {
131
+ /** Where it starts: beats from the start, and the same moment in seconds (the tempo map applied; swing and humanize are not). */
132
+ beat: number;
133
+ time: number;
134
+ /** How long it is held, in beats and in seconds. */
135
+ duration: number;
136
+ seconds: number;
137
+ /** The bar it starts in (1-based, from `meter`) and its beat inside that bar (1 = the downbeat, 1.5 = the "and" of 1). */
138
+ bar: number;
139
+ beatInBar: number;
140
+ /** The audible MIDI notes (`music.transpose` and the track's `transpose` are in). */
141
+ midi: number[];
142
+ /** What the score called it: `Am7`, `c4`, `[c4 e4 g4]`. */
143
+ name: string;
144
+ /** More than one note at once. */
145
+ chord: boolean;
146
+ /** 0–1 (0.8 normal, 1 accented with `!`, 0.55 soft with `,`). */
147
+ velocity: number;
148
+ }
149
+ interface MusicTrackEvents {
150
+ inst: string;
151
+ /** The track's length in beats and in bars (not a whole number when a bar is short: that is what to look for). */
152
+ beats: number;
153
+ bars: number;
154
+ notes: MusicNote[];
155
+ }
156
+ interface MusicDrumHit {
157
+ beat: number;
158
+ time: number;
159
+ bar: number;
160
+ beatInBar: number;
161
+ velocity: number;
162
+ }
163
+ interface MusicDrumEvents {
164
+ kind: string;
165
+ hits: MusicDrumHit[];
166
+ }
167
+ interface MusicEvents {
168
+ /** The tempo at the start. */
169
+ bpm: number;
170
+ meter: number;
171
+ beats: number;
172
+ bars: number;
173
+ /** The music without its reverb tail. */
174
+ seconds: number;
175
+ tracks: MusicTrackEvents[];
176
+ /** Every drum that is hit, over all sections, with every hit written out. */
177
+ drums: MusicDrumEvents[];
178
+ }
179
+ /** What the `check` tool prints about a music layer: lengths in bars (a short track shows), what starts in each bar, where the drums play. */
180
+ interface MusicSummary {
181
+ bpm: number;
182
+ meter: number;
183
+ /** The score set `meter`; when false 4 is only assumed. */
184
+ meterSet: boolean;
185
+ beats: number;
186
+ bars: number;
187
+ seconds: number;
188
+ tail: number;
189
+ tracks: Array<{
190
+ inst: string;
191
+ beats: number;
192
+ bars: number;
193
+ events: number;
194
+ perBar: string[];
195
+ }>;
196
+ drums: Array<{
197
+ from: number;
198
+ to: number;
199
+ kinds: string[];
200
+ }>;
201
+ }
3
202
 
4
203
  interface AudioInspectOptions {
5
204
  /** Width of each loudness window in seconds. Default 0.1. */
@@ -323,34 +522,10 @@ interface SnapshotOptions {
323
522
  scale?: number;
324
523
  /** `'image/png'` (default) or `'image/jpeg'`. */
325
524
  type?: 'image/png' | 'image/jpeg';
326
- /** Return a `data:` URL string instead of a Blob (handy for scripts that can only return text). */
327
- as?: 'blob' | 'dataURL';
328
- }
329
- /** One picture of a stop (see `movie.stopImages()`). */
330
- interface StopImage {
331
- stop: Stop; /** The page it belongs to (0-based). */
332
- page: number;
333
- image: Blob | string;
334
- }
335
- interface StopImagesOptions {
336
- /** One picture per page (default) or one per stop. */
337
- which?: 'pages' | 'stops';
338
- /** With `which: 'pages'`: the page's last stop (default: the page fully built) or its first. */
339
- pick?: 'last' | 'first';
340
- /** Output size relative to the canvas. Default 1. */
341
- scale?: number;
342
- /** `'image/png'` (default) or `'image/jpeg'`. */
343
- type?: 'image/png' | 'image/jpeg';
344
- /** JPEG quality, 0–1. */
525
+ /** JPEG quality, 0 to 1 (the encoder's default when left out). */
345
526
  quality?: number;
346
- /** Return `data:` URLs instead of Blobs. */
347
- as?: 'blob' | 'dataURL';
348
- /** Motion blur for the pictures (off unless you ask: they are usually for looking at). */
349
- motionBlur?: MotionBlurSpec;
350
- /** Pictures for a PDF: stops flagged `pdf: false` are left out (a page whose stops are all flagged has no picture). `exportPDF` sets it. */
351
- pdf?: boolean;
352
- /** Called as each picture is ready, in order. */
353
- onImage?: (image: StopImage) => void;
527
+ /** Return a `data:` URL string instead of a Blob (handy for scripts that can only return text), or `'imageData'`: the pixels as an `ImageData` (to measure, compare). */
528
+ as?: 'blob' | 'dataURL' | 'imageData';
354
529
  }
355
530
  interface ContactSheetOptions {
356
531
  /** Motion blur for these pictures (see `MovieOptions.motionBlur`); overrides the movie's own setting, `false` turns it off. */
@@ -384,12 +559,6 @@ interface FrameEvent {
384
559
  frame: number;
385
560
  totalFrames: number;
386
561
  }
387
- /** A presentation reached a stop (`movie.next()` played to it, or `prev()` / `goToStop()` / `goToPage()` jumped to it). */
388
- interface StopEvent {
389
- index: number;
390
- stop: Stop;
391
- pageIndex: number;
392
- }
393
562
  interface ProgressEvent {
394
563
  progress: number;
395
564
  frame: number;
@@ -413,17 +582,14 @@ declare class Movie {
413
582
  app: Application | null;
414
583
  timeline: Timeline | null;
415
584
  audioBuffer: AudioBuffer | null;
416
- audioSource: AudioBufferSourceNode | null;
417
- gainNode: GainNode | null;
418
585
  private _cancelAudioStart;
419
586
  /** The poster time in seconds (`movie.init({ poster })`), or null. */
420
587
  poster: number | null;
421
- /** The stops of the composition (`composition.stops`), checked and in order: where `next()` pauses. Empty for an ordinary movie. */
588
+ /** The stops of the composition (`composition.stops`), checked and in order: named times for a presentation to pause on (`pixi-effects/present`). Empty for an ordinary movie. */
422
589
  stops: Stop[];
423
- /** The frame `next()` is playing toward, or null. */
424
- private _stopAt;
425
- private _stopWaiters;
426
- private _arriving;
590
+ /** The frame `playUntil()` is playing toward, or null (also null while it plays to the end). */
591
+ private _until;
592
+ private _untilWaiters;
427
593
  /** The motion blur `render()`, `snapshot()` and `contactSheet()` apply unless told otherwise (`movie.init({ motionBlur })`), or null. */
428
594
  motionBlur: ResolvedMotionBlur | null;
429
595
  private _posterFrame;
@@ -454,8 +620,6 @@ declare class Movie {
454
620
  private _audioSources;
455
621
  private _mixStats;
456
622
  on(event: 'ready', fn: () => void): this;
457
- /** A presentation is now on a stop (see `stops` in the composition, `next()`, `prev()`). */
458
- on(event: 'stop', fn: (e: StopEvent) => void): this;
459
623
  on(event: 'frame', fn: (e: FrameEvent) => void): this;
460
624
  /** A jump to another frame (`gotoFrame`, a seek bar) starts / finishes. Not emitted for playback ticks, `render()`, `snapshot()` or `contactSheet()`. */
461
625
  on(event: 'seeking' | 'seeked', fn: (e: FrameEvent) => void): this;
@@ -469,7 +633,6 @@ declare class Movie {
469
633
  on(event: 'play', fn: () => void): this;
470
634
  on(event: 'pause', fn: () => void): this;
471
635
  off(event: string, fn: Listener): this;
472
- emit(event: string, ...args: unknown[]): void;
473
636
  get isReady(): boolean;
474
637
  /** Milliseconds `init()` spent in each stage (assets, build, sound, frames), or null before it has finished: `check` says which stage is the slow one. */
475
638
  get loadStages(): Record<LoadStage, number> | null;
@@ -514,55 +677,13 @@ declare class Movie {
514
677
  snapshot(frame: number | undefined, opts: SnapshotOptions & {
515
678
  as: 'dataURL';
516
679
  }): Promise<string>;
680
+ snapshot(frame: number | undefined, opts: SnapshotOptions & {
681
+ as: 'imageData';
682
+ }): Promise<ImageData>;
517
683
  /** Seek to `frame` (quietly, and stay there) and draw the canvas on a new canvas of `scale` times its size. */
518
684
  private _frameCanvas;
519
- /** The pixels of `frame`, small (about 320 px wide) and without motion blur, to compare pictures. */
520
- private _framePixels;
521
685
  /** Seek to `frame` (quietly, and stay there) and encode the canvas as a picture. */
522
686
  private _captureFrame;
523
- /**
524
- * A picture of the settled state of each page (default: the page's last stop, fully built) or of every stop, for a page list, an
525
- * overview, an export. Pauses the movie, and leaves the playhead where it was. `onImage` is called as each picture is ready.
526
- */
527
- stopImages(opts: StopImagesOptions & {
528
- as: 'dataURL';
529
- }): Promise<Array<StopImage & {
530
- image: string;
531
- }>>;
532
- stopImages(opts?: StopImagesOptions): Promise<StopImage[]>;
533
- /**
534
- * Look at every stop: is the picture there still changing? A stop is compared with the picture `lookback` frames before it (default 3):
535
- * when more than `tolerance` (default 0.4 %) of the picture differs, the audience, a page overview and a PDF all see a half-finished
536
- * animation. `issues` says which stop, which page and what to do; leaves the playhead where it was.
537
- */
538
- inspectStops(opts?: {
539
- lookback?: number;
540
- tolerance?: number;
541
- }): Promise<{
542
- stops: Array<{
543
- index: number;
544
- page: string | null;
545
- at: number;
546
- frame: number;
547
- moving: number;
548
- settled: boolean;
549
- }>;
550
- issues: string[];
551
- }>;
552
- /**
553
- * The deck as a PDF: one page per page of the talk (the page's last stop, fully built, unless a stop says `pdf: true` or `pdf: false`;
554
- * `which: 'stops'` makes a page of every stop that is not `pdf: false`), each a
555
- * JPEG at the canvas size. Needs `composition.stops`. A transparent background comes out black: give the movie a `background`.
556
- */
557
- exportPDF(opts?: {
558
- which?: 'pages' | 'stops';
559
- pick?: 'last' | 'first';
560
- scale?: number;
561
- quality?: number;
562
- title?: string;
563
- motionBlur?: MotionBlurSpec;
564
- onImage?: (image: StopImage) => void;
565
- }): Promise<Blob>;
566
687
  /**
567
688
  * One picture of a movement: `count` frames from `from` to `to` drawn one over the other, each later one stronger, so a thing that
568
689
  * moves leaves a trail (its path and its easing: even steps = constant speed, bunched = slow) and what stays still stays itself.
@@ -596,7 +717,7 @@ declare class Movie {
596
717
  timelineData(): TimelineData;
597
718
  /** The timeline as one self-contained HTML page (an inline SVG, no scripts): layers as bars on a time axis, ◆ keyframes, transition bands. Open it in a browser. */
598
719
  timelineChart(opts?: TimelineHtmlOptions): string;
599
- /** Just the chart: one `<svg>` whose geometry is in `data-*` attributes (a viewer puts a playhead on it: `pixi-effects-view`). */
720
+ /** Just the chart: one `<svg>` whose geometry is in `data-*` attributes (a viewer puts a playhead on it: `pixi-effects view`). */
600
721
  timelineSvg(opts?: TimelineSvgOptions): string;
601
722
  /**
602
723
  * The soundtrack, measured: when every audio layer plays, how loud the mix is over time, and `issues`
@@ -608,7 +729,7 @@ declare class Movie {
608
729
  frame: number;
609
730
  }>;
610
731
  /**
611
- * One call that looks at everything `pixi-effects-check` looks at inside the page: layout issues over the whole timeline (every
732
+ * One call that looks at everything `pixi-effects check` looks at inside the page: layout issues over the whole timeline (every
612
733
  * scene's first and last frame and a frame every 0.25 s), fonts and the sound. See `ReviewReport`. Page warnings are in `window.__logs`. The movie is left as it was.
613
734
  */
614
735
  review(opts?: ReviewOptions): Promise<ReviewReport>;
@@ -637,37 +758,24 @@ declare class Movie {
637
758
  private _updateSpace;
638
759
  /** The motion blur an operation uses: its own option when given (`false` is off), otherwise the movie's. */
639
760
  private _blurFor;
761
+ private _blurCanvas;
640
762
  /**
641
- * @internal Draw `frame` with motion blur into `target` (a canvas the size of the stage): the average of `mb.samples` renders at moments
642
- * spread over the shutter interval around the frame time. With `settle` the playhead and the stage are left exactly on the frame.
763
+ * Play and pause exactly at `seconds`: it resolves `true` when the playhead has landed on that frame, `false` when something else ended it
764
+ * first (a `pause()`, a seek, a newer `playUntil()`), or when there is nothing to play toward (a time at or before the playhead, which also
765
+ * pauses it where it is, or a movie that is not ready). A time at or past the end lands on the last frame; with no time at all it plays to
766
+ * the end and resolves `true` once the movie has ended (and says `ended`). An ordinary `play()` is
767
+ * not affected by it. It is the one primitive a presentation is built on (see `pixi-effects/present`).
643
768
  */
644
- _exposeFrame(frame: number, mb: ResolvedMotionBlur, target: HTMLCanvasElement, settle: boolean): Promise<void>;
645
- private _blurCanvas;
646
- /** Which stop the playhead is on or has passed (-1 before the first). */
647
- get stopIndex(): number;
648
- /** The stop the playhead is on or has passed, or null. */
649
- get currentStop(): Stop | null;
650
- /** Which page the playhead is in (0-based), -1 before the first stop. */
651
- get pageIndex(): number;
652
- /** How many pages the stops make. */
653
- get pageCount(): number;
654
- private _cancelStop;
655
- private _settleStopWaiters;
656
- private _emitStop;
657
- /** Land exactly on a stop's frame, pause, and say so. */
658
- private _arriveAtStop;
769
+ playUntil(seconds?: number): Promise<boolean>;
659
770
  /**
660
- * Play to the next stop and pause exactly there (a presentation's "next"). Pressed again while it is playing toward a stop, it skips the
661
- * rest of the animation and lands on that stop at once. After the last stop it plays to the end. Resolves when it has landed (or
662
- * stopped for another reason). An ordinary `play()` ignores the stops.
771
+ * Look around and put the movie back: pauses, runs `fn` (seek, take pictures: the seeks made inside are not reported as `seeking` / `seeked`),
772
+ * then puts the playhead (or the poster) back where it was, whatever `fn` did, and returns what `fn` returned.
663
773
  */
664
- next(): Promise<void>;
665
- /** Jump back to the previous stop at once (no reverse playback); from the first stop, to the start. */
666
- prev(): Promise<void>;
667
- /** Jump to stop `index` (0-based). */
668
- goToStop(index: number): Promise<void>;
669
- /** Jump to the first stop of page `page` (0-based). */
670
- goToPage(page: number): Promise<void>;
774
+ peek<T>(fn: () => Promise<T>): Promise<T>;
775
+ private _settleUntil;
776
+ private _cancelUntil;
777
+ /** The playhead reached the frame `playUntil()` was playing to: land exactly on it, pause, resolve true. */
778
+ private _arriveUntil;
671
779
  play(): void;
672
780
  pause(): void;
673
781
  set volume(v: number);
@@ -679,4 +787,4 @@ declare class Movie {
679
787
  destroy(): Promise<void>;
680
788
  }
681
789
 
682
- export { type AudioInspectOptions as A, type ContactSheetOptions as C, type FontReport as F, type InspectOptions as I, type LayerInfo as L, type MotionBlurOptions as M, type OnionSkinOptions as O, type ProgressEvent as P, type RenderOptions as R, type SnapshotOptions as S, type TimelineData as T, type VolumeEvent as V, type AudioReport as a, type AudioSourceReport as b, type FrameEvent as c, type InspectReport as d, type IssueGroup as e, type LoadProgressState as f, type LoadStage as g, type LoaderOption as h, type MotionBlurSpec as i, Movie as j, type MovieErrorEvent as k, type MovieOptions as l, type ReviewOptions as m, type ReviewReport as n, type SoundMeasure as o, type StopEvent as p, type StopImage as q, type StopImagesOptions as r, type TimelineHtmlOptions as s, type TimelineRow as t, type TimelineSvgOptions as u, type TimelineTransition as v, dismissLoader as w, failLoader as x, resolveLoader as y };
790
+ export { type AudioInspectOptions as A, failLoader as B, type ContactSheetOptions as C, resolveLoader as D, type FontReport as F, type InspectOptions as I, type LayerInfo as L, type MusicEvents as M, type OnionSkinOptions as O, type ProgressEvent as P, type RenderOptions as R, type SnapshotOptions as S, type TimelineData as T, type VolumeEvent as V, type AudioReport as a, type AudioSourceReport as b, type FrameEvent as c, type InspectReport as d, type IssueGroup as e, type LoadProgressState as f, type LoadStage as g, type LoaderOption as h, type MotionBlurOptions as i, type MotionBlurSpec as j, Movie as k, type MovieErrorEvent as l, type MovieOptions as m, type MusicDrumEvents as n, type MusicDrumHit as o, type MusicNote as p, type MusicSummary as q, type MusicTrackEvents as r, type ReviewOptions as s, type ReviewReport as t, type SoundMeasure as u, type TimelineHtmlOptions as v, type TimelineRow as w, type TimelineSvgOptions as x, type TimelineTransition as y, dismissLoader as z };