pixi-effects 0.28.2 → 0.30.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/CHANGELOG.md +59 -0
- package/README.md +11 -10
- package/ai/chat-template.html +5 -5
- package/ai/tools/check.mjs +18 -3
- package/ai/tools/lookup.mjs +208 -0
- package/ai/tools/pixi-effects.mjs +16 -5
- package/ai/tools/render.mjs +14 -9
- package/ai/tools/view.mjs +6 -2
- package/dist/Base-CB1_FPZD.d.cts +60 -0
- package/dist/Base-Ne74ztNl.d.ts +60 -0
- package/dist/Composition-MUKR3FYD.cjs +16 -0
- package/dist/{Composition-K6B3APM5.cjs.map → Composition-MUKR3FYD.cjs.map} +1 -1
- package/dist/Composition-RJGA7KDU.js +7 -0
- package/dist/{Composition-H7UNR5F5.js.map → Composition-RJGA7KDU.js.map} +1 -1
- package/dist/Controller.cjs +73 -45
- package/dist/Controller.cjs.map +1 -1
- package/dist/Controller.d.cts +16 -22
- package/dist/Controller.d.ts +16 -22
- package/dist/Controller.js +74 -40
- package/dist/Controller.js.map +1 -1
- package/dist/{Movie-CHcM8HNB.d.ts → Movie-C2rZFkrO.d.ts} +227 -119
- package/dist/{Movie-Cx5ozUGb.d.cts → Movie-DdnpLpw1.d.cts} +227 -119
- package/dist/{blendModes-HDOP6R7T.cjs → blendModes-ETMYWATF.cjs} +5 -5
- package/dist/{blendModes-HDOP6R7T.cjs.map → blendModes-ETMYWATF.cjs.map} +1 -1
- package/dist/{blendModes-PAVTW3BO.js → blendModes-RIVZXL5A.js} +4 -4
- package/dist/{blendModes-PAVTW3BO.js.map → blendModes-RIVZXL5A.js.map} +1 -1
- package/dist/{chunk-P4GY3Z4G.cjs → chunk-2DXPTKQZ.cjs} +6 -6
- package/dist/chunk-2DXPTKQZ.cjs.map +1 -0
- package/dist/{chunk-TYWFKCPY.js → chunk-4KB3GUEK.js} +5 -5
- package/dist/chunk-4KB3GUEK.js.map +1 -0
- package/dist/{chunk-5MZWXVTT.js → chunk-A3Q3SDSH.js} +35 -28
- package/dist/chunk-A3Q3SDSH.js.map +1 -0
- package/dist/chunk-CRQFDY7E.js +4182 -0
- package/dist/chunk-CRQFDY7E.js.map +1 -0
- package/dist/chunk-HREBQAY4.cjs +4206 -0
- package/dist/chunk-HREBQAY4.cjs.map +1 -0
- package/dist/{chunk-ZMAD3KJU.cjs → chunk-LYOKH7KE.cjs} +22 -3
- package/dist/chunk-LYOKH7KE.cjs.map +1 -0
- package/dist/{chunk-45QKLD6M.js → chunk-RCVZX2JP.js} +22 -3
- package/dist/chunk-RCVZX2JP.js.map +1 -0
- package/dist/{chunk-KBH33IQX.cjs → chunk-WHNADXXG.cjs} +121 -114
- package/dist/chunk-WHNADXXG.cjs.map +1 -0
- package/dist/{chunk-7VN2KI3U.js → chunk-ZAXYPXKW.js} +14 -6
- package/dist/chunk-ZAXYPXKW.js.map +1 -0
- package/dist/{chunk-MJW7KILM.cjs → chunk-ZVUO325O.cjs} +32 -24
- package/dist/chunk-ZVUO325O.cjs.map +1 -0
- package/dist/index.cjs +106 -4482
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -60
- package/dist/index.d.ts +15 -60
- package/dist/index.js +6 -4457
- package/dist/index.js.map +1 -1
- package/dist/loader.css +1 -1
- package/dist/{Presenter.cjs → present.cjs} +370 -31
- package/dist/present.cjs.map +1 -0
- package/dist/present.d.cts +278 -0
- package/dist/present.d.ts +278 -0
- package/dist/{Presenter.js → present.js} +358 -32
- package/dist/present.js.map +1 -0
- package/dist/three.cjs +6 -6
- package/dist/three.d.cts +2 -2
- package/dist/three.d.ts +2 -2
- package/dist/three.js +2 -2
- package/dist/{types-DpK1vwcl.d.ts → types-BzIB65Vk.d.cts} +11 -265
- package/dist/{types-DpK1vwcl.d.cts → types-BzIB65Vk.d.ts} +11 -265
- package/docs/api.md +44 -77
- package/docs/dsl.md +16 -14
- package/llms-full.txt +121 -117
- package/llms.txt +3 -2
- package/package.json +5 -5
- package/skills/pixi-effects/SKILL.md +7 -7
- package/skills/pixi-effects/reference/cheatsheet.md +9 -9
- package/skills/pixi-effects/reference/direction.md +2 -0
- package/skills/pixi-effects/reference/pitfalls.md +6 -6
- package/skills/pixi-effects/reference/quickstart.md +29 -0
- package/skills/pixi-effects/reference/recipes.md +4 -4
- package/skills/pixi-effects/template.html +7 -7
- package/dist/Base-C6f0fE8j.d.ts +0 -109
- package/dist/Base-DI1FCGcH.d.cts +0 -109
- package/dist/Composition-H7UNR5F5.js +0 -7
- package/dist/Composition-K6B3APM5.cjs +0 -16
- package/dist/Presenter.cjs.map +0 -1
- package/dist/Presenter.d.cts +0 -122
- package/dist/Presenter.d.ts +0 -122
- package/dist/Presenter.js.map +0 -1
- package/dist/chunk-45QKLD6M.js.map +0 -1
- package/dist/chunk-5MZWXVTT.js.map +0 -1
- package/dist/chunk-7VN2KI3U.js.map +0 -1
- package/dist/chunk-KBH33IQX.cjs.map +0 -1
- package/dist/chunk-MJW7KILM.cjs.map +0 -1
- package/dist/chunk-P4GY3Z4G.cjs.map +0 -1
- package/dist/chunk-TYWFKCPY.js.map +0 -1
- package/dist/chunk-ZMAD3KJU.cjs.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { M as MusicEvents } from './Movie-DdnpLpw1.cjs';
|
|
2
|
+
export { A as AudioInspectOptions, a as AudioReport, b as AudioSourceReport, C as ContactSheetOptions, F as FontReport, c as FrameEvent, I as InspectOptions, d as InspectReport, e as IssueGroup, L as LayerInfo, f as LoadProgressState, g as LoadStage, h as LoaderOption, i as MotionBlurOptions, j as MotionBlurSpec, k as Movie, l as MovieErrorEvent, m as MovieOptions, n as MusicDrumEvents, o as MusicDrumHit, p as MusicNote, q as MusicSummary, r as MusicTrackEvents, O as OnionSkinOptions, P as ProgressEvent, R as RenderOptions, s as ReviewOptions, t as ReviewReport, S as SnapshotOptions, u as SoundMeasure, T as TimelineData, v as TimelineHtmlOptions, w as TimelineRow, x as TimelineSvgOptions, y as TimelineTransition, V as VolumeEvent, z as dismissLoader, B as failLoader, D as resolveLoader } from './Movie-DdnpLpw1.cjs';
|
|
3
|
+
import { S as SequenceSpec, C as CompositionShape, I as ImageSequenceSpec, a as CameraSequenceSpec, K as Keyframe, T as TextSequenceSpec, M as MusicOptions, b as SequenceCommon } from './types-BzIB65Vk.cjs';
|
|
4
|
+
export { A as ArcShapeSpec, c as AssetSpec, d as AudioAssetSpec, e as AudioMusicSpec, f as AudioSequenceSpec, g as AudioSfxSpec, B as BlendModeName, h as ChromaKeyFilterSpec, i as CircleShapeSpec, j as CompositionSequenceSpec, k as CompositionSpec, l as CrossfadeTransition, m as CustomFilterSpec, D as DipTransition, n as DissolveTransition, E as EllipseShapeSpec, o as Expr, F as FilterSpec, G as GradientSpec, p as IrisTransition, L as LightSequenceSpec, q as LineShapeSpec, r as LumaTransition, s as MaskRefSpec, t as MatteRefSpec, u as MusicDrum, v as MusicDrums, w as MusicInstrument, x as MusicLevel, y as MusicTrack, N as NullSequenceSpec, P as PathShapeSpec, z as PolygonShapeSpec, H as PropValue, J as Props, R as RectShapeSpec, O as SfxKnobs, Q as SfxOptions, U as SfxPreset, V as SfxVoice, W as ShaderSequenceSpec, X as ShapeSequenceSpec, Y as SlideTransition, Z as Stop, _ as StopSpec, $ as TransitionCommon, a0 as TransitionSpec, a1 as VideoSequenceSpec, a2 as WipeTransition, a3 as ZoomTransition } from './types-BzIB65Vk.cjs';
|
|
5
|
+
import { S as Sequence } from './Base-CB1_FPZD.cjs';
|
|
5
6
|
import 'pixi.js';
|
|
6
7
|
|
|
7
8
|
/** A text style as written in a `text` layer's `style` (numbers, not expressions, for the fields that size the text). */
|
|
@@ -53,6 +54,12 @@ declare function measureText(text: string, style?: MeasureStyle): TextSize;
|
|
|
53
54
|
*/
|
|
54
55
|
declare function splitText(text: string, style?: MeasureStyle, opts?: SplitOptions): TextPiece[];
|
|
55
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Unknown option keys are silently ignored by JavaScript, which is how a guessed name like `cols`
|
|
59
|
+
* or `fps` quietly does nothing. Say so, and say what was probably meant.
|
|
60
|
+
*/
|
|
61
|
+
declare function warnUnknownOptions(where: string, opts: object | undefined | null, valid: readonly string[]): void;
|
|
62
|
+
|
|
56
63
|
type SequenceCtor = {
|
|
57
64
|
new (spec: SequenceSpec, parent: CompositionShape | null, root: CompositionShape): Sequence;
|
|
58
65
|
};
|
|
@@ -404,6 +411,8 @@ interface AnimateTextTween {
|
|
|
404
411
|
duration?: number;
|
|
405
412
|
/** Ease name. */
|
|
406
413
|
ease?: string;
|
|
414
|
+
/** `out` only: the composition second the exit starts at (every piece leaves in the same wave from then on, and holds its exit state until the layer ends). Without it the exit is the end of the layer run backwards. Not for `in` (an entrance starts with its piece: the options' `at`). */
|
|
415
|
+
at?: number;
|
|
407
416
|
}
|
|
408
417
|
interface AnimateTextOptions {
|
|
409
418
|
/** What a piece is: a character (default), a word or a line. */
|
|
@@ -421,7 +430,7 @@ interface AnimateTextOptions {
|
|
|
421
430
|
duration: number;
|
|
422
431
|
/** How a piece arrives: a preset (`'rise'` default, `'drop'`, `'fade'`, `'pop'`, `'zoom'`, `'slide'`, `'spin'`), your own tween, or `false` for none. */
|
|
423
432
|
in?: TextPreset | AnimateTextTween | false;
|
|
424
|
-
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way).
|
|
433
|
+
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way). With `{ preset, at: T }` the exit starts at composition second T; without `at` it leaves from the END of the layer (`at + duration`), the last piece finishing exactly then. Default none. */
|
|
425
434
|
out?: TextPreset | AnimateTextTween | false;
|
|
426
435
|
/** The wave: see {@link stagger}. Default `{ each: 0.04 }`. */
|
|
427
436
|
stagger?: StaggerOptions;
|
|
@@ -601,60 +610,6 @@ declare function musicBuffer(music: MusicOptions, options?: {
|
|
|
601
610
|
*/
|
|
602
611
|
declare function musicEvents(music: MusicOptions): Promise<MusicEvents>;
|
|
603
612
|
|
|
604
|
-
interface DeckPage {
|
|
605
|
-
/** The page's name: shown by the Presenter, and in the stops list. */
|
|
606
|
-
name?: string;
|
|
607
|
-
/** How long the page lasts, seconds (including any transition into the next page, see `DeckOptions.transition`). Required. */
|
|
608
|
-
duration: number;
|
|
609
|
-
/** The page's layers, written in the page's own time (`at: 0` is the start of the page). */
|
|
610
|
-
sequences: SequenceSpec[];
|
|
611
|
-
/** Where the page stops, in the page's own time: the first is the page settled, the rest are steps (a bullet appears, a chart grows). Default: where the transition into the next page begins (the end for the last page). */
|
|
612
|
-
stops?: Array<number | {
|
|
613
|
-
at: number;
|
|
614
|
-
pdf?: boolean;
|
|
615
|
-
}>;
|
|
616
|
-
/** Speaker notes (kept on the page's first stop). */
|
|
617
|
-
notes?: string;
|
|
618
|
-
/** Move on by itself this many seconds after the page's last stop (kiosk mode). */
|
|
619
|
-
advance?: number;
|
|
620
|
-
/** The page is itself a layer: it may carry `initial`, `keyframes`, `filters`, … (fade or slide the whole page, for instance). */
|
|
621
|
-
initial?: Props;
|
|
622
|
-
keyframes?: Keyframe[];
|
|
623
|
-
}
|
|
624
|
-
/** A transition spec without the parts `deck()` fills in (which two pages, and when). */
|
|
625
|
-
type DeckTransition = TransitionSpec extends infer T ? (T extends TransitionSpec ? Omit<T, 'from' | 'to' | 'at'> : never) : never;
|
|
626
|
-
interface DeckOptions {
|
|
627
|
-
pages: DeckPage[];
|
|
628
|
-
/**
|
|
629
|
-
* A transition between every two pages: `{ kind: 'crossfade' | 'slide' | 'wipe' | 'iris' | 'dip' | 'zoom' | 'dissolve' | 'luma', duration, …its own options }` (see Transitions). The next page starts
|
|
630
|
-
* `duration` seconds before the current one ends, and the transition plays across the overlap.
|
|
631
|
-
*/
|
|
632
|
-
transition?: DeckTransition;
|
|
633
|
-
}
|
|
634
|
-
/** What `deck()` returns: spread it into `movie.init` (`{ duration, composition: { sequences, transitions?, stops } }` plus any movie option you passed). */
|
|
635
|
-
interface DeckResult {
|
|
636
|
-
duration: number;
|
|
637
|
-
composition: CompositionSpec;
|
|
638
|
-
[movieOption: string]: unknown;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* A deck of pages as one movie. Each page is a nested composition laid out after the one before (so its layers use the page's own
|
|
642
|
-
* time), the stops (where a `Presenter` pauses) come from the pages, and an optional `transition` joins the pages with the existing
|
|
643
|
-
* crossfade / slide / wipe / … transitions.
|
|
644
|
-
*
|
|
645
|
-
* ```js
|
|
646
|
-
* await movie.init({ canvas, width: 1280, height: 720, frameRate: 30, ...deck({
|
|
647
|
-
* transition: { kind: 'slide', duration: 0.6, direction: 'left' },
|
|
648
|
-
* pages: [
|
|
649
|
-
* { name: 'Hello', duration: 5, stops: [1.2], sequences: [ …title, subtitle… ] },
|
|
650
|
-
* { name: 'Why', duration: 8, stops: [1.2, 3, 5], sequences: [ …three bullets, at 1.2, 3, 5… ] },
|
|
651
|
-
* ],
|
|
652
|
-
* }) });
|
|
653
|
-
* movie.on('ready', …); new Presenter(movie, { canvas });
|
|
654
|
-
* ```
|
|
655
|
-
*/
|
|
656
|
-
declare function deck(options: DeckOptions): DeckResult;
|
|
657
|
-
|
|
658
613
|
interface WiggleProp {
|
|
659
614
|
/** The value the property rests at: a number or an expression (`'W/2'`). The wiggle starts and ends here. */
|
|
660
615
|
around: number | string;
|
|
@@ -732,4 +687,4 @@ interface WithFadeOptions {
|
|
|
732
687
|
*/
|
|
733
688
|
declare function withFade<T extends SequenceCommon>(spec: T, opts: WithFadeOptions): T;
|
|
734
689
|
|
|
735
|
-
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape,
|
|
690
|
+
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape, type EnvelopeOptions, type FollowPathOptions, ImageSequenceSpec, type KenBurnsOptions, Keyframe, type MeasureStyle, MusicEvents, MusicOptions, type OrbitOptions, type ParticlesOptions, type ReactOptions, type ReactProp, Sequence, SequenceCommon, type SequenceCtor, SequenceSpec, type SplitOptions, type StaggerOptions, type TextPiece, type TextPreset, TextSequenceSpec, type TextSize, type WiggleOptions, type WiggleProp, type WithFadeOptions, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, parseEase as ease, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, noise, orbit, particles, rand, random, react, registerSequenceType, splitText, stagger, warnUnknownOptions, wiggle, withFade };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { M as MusicEvents } from './Movie-C2rZFkrO.js';
|
|
2
|
+
export { A as AudioInspectOptions, a as AudioReport, b as AudioSourceReport, C as ContactSheetOptions, F as FontReport, c as FrameEvent, I as InspectOptions, d as InspectReport, e as IssueGroup, L as LayerInfo, f as LoadProgressState, g as LoadStage, h as LoaderOption, i as MotionBlurOptions, j as MotionBlurSpec, k as Movie, l as MovieErrorEvent, m as MovieOptions, n as MusicDrumEvents, o as MusicDrumHit, p as MusicNote, q as MusicSummary, r as MusicTrackEvents, O as OnionSkinOptions, P as ProgressEvent, R as RenderOptions, s as ReviewOptions, t as ReviewReport, S as SnapshotOptions, u as SoundMeasure, T as TimelineData, v as TimelineHtmlOptions, w as TimelineRow, x as TimelineSvgOptions, y as TimelineTransition, V as VolumeEvent, z as dismissLoader, B as failLoader, D as resolveLoader } from './Movie-C2rZFkrO.js';
|
|
3
|
+
import { S as SequenceSpec, C as CompositionShape, I as ImageSequenceSpec, a as CameraSequenceSpec, K as Keyframe, T as TextSequenceSpec, M as MusicOptions, b as SequenceCommon } from './types-BzIB65Vk.js';
|
|
4
|
+
export { A as ArcShapeSpec, c as AssetSpec, d as AudioAssetSpec, e as AudioMusicSpec, f as AudioSequenceSpec, g as AudioSfxSpec, B as BlendModeName, h as ChromaKeyFilterSpec, i as CircleShapeSpec, j as CompositionSequenceSpec, k as CompositionSpec, l as CrossfadeTransition, m as CustomFilterSpec, D as DipTransition, n as DissolveTransition, E as EllipseShapeSpec, o as Expr, F as FilterSpec, G as GradientSpec, p as IrisTransition, L as LightSequenceSpec, q as LineShapeSpec, r as LumaTransition, s as MaskRefSpec, t as MatteRefSpec, u as MusicDrum, v as MusicDrums, w as MusicInstrument, x as MusicLevel, y as MusicTrack, N as NullSequenceSpec, P as PathShapeSpec, z as PolygonShapeSpec, H as PropValue, J as Props, R as RectShapeSpec, O as SfxKnobs, Q as SfxOptions, U as SfxPreset, V as SfxVoice, W as ShaderSequenceSpec, X as ShapeSequenceSpec, Y as SlideTransition, Z as Stop, _ as StopSpec, $ as TransitionCommon, a0 as TransitionSpec, a1 as VideoSequenceSpec, a2 as WipeTransition, a3 as ZoomTransition } from './types-BzIB65Vk.js';
|
|
5
|
+
import { S as Sequence } from './Base-Ne74ztNl.js';
|
|
5
6
|
import 'pixi.js';
|
|
6
7
|
|
|
7
8
|
/** A text style as written in a `text` layer's `style` (numbers, not expressions, for the fields that size the text). */
|
|
@@ -53,6 +54,12 @@ declare function measureText(text: string, style?: MeasureStyle): TextSize;
|
|
|
53
54
|
*/
|
|
54
55
|
declare function splitText(text: string, style?: MeasureStyle, opts?: SplitOptions): TextPiece[];
|
|
55
56
|
|
|
57
|
+
/**
|
|
58
|
+
* Unknown option keys are silently ignored by JavaScript, which is how a guessed name like `cols`
|
|
59
|
+
* or `fps` quietly does nothing. Say so, and say what was probably meant.
|
|
60
|
+
*/
|
|
61
|
+
declare function warnUnknownOptions(where: string, opts: object | undefined | null, valid: readonly string[]): void;
|
|
62
|
+
|
|
56
63
|
type SequenceCtor = {
|
|
57
64
|
new (spec: SequenceSpec, parent: CompositionShape | null, root: CompositionShape): Sequence;
|
|
58
65
|
};
|
|
@@ -404,6 +411,8 @@ interface AnimateTextTween {
|
|
|
404
411
|
duration?: number;
|
|
405
412
|
/** Ease name. */
|
|
406
413
|
ease?: string;
|
|
414
|
+
/** `out` only: the composition second the exit starts at (every piece leaves in the same wave from then on, and holds its exit state until the layer ends). Without it the exit is the end of the layer run backwards. Not for `in` (an entrance starts with its piece: the options' `at`). */
|
|
415
|
+
at?: number;
|
|
407
416
|
}
|
|
408
417
|
interface AnimateTextOptions {
|
|
409
418
|
/** What a piece is: a character (default), a word or a line. */
|
|
@@ -421,7 +430,7 @@ interface AnimateTextOptions {
|
|
|
421
430
|
duration: number;
|
|
422
431
|
/** How a piece arrives: a preset (`'rise'` default, `'drop'`, `'fade'`, `'pop'`, `'zoom'`, `'slide'`, `'spin'`), your own tween, or `false` for none. */
|
|
423
432
|
in?: TextPreset | AnimateTextTween | false;
|
|
424
|
-
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way).
|
|
433
|
+
/** How a piece leaves, in the same wave (the entrance backwards, eased the other way). With `{ preset, at: T }` the exit starts at composition second T; without `at` it leaves from the END of the layer (`at + duration`), the last piece finishing exactly then. Default none. */
|
|
425
434
|
out?: TextPreset | AnimateTextTween | false;
|
|
426
435
|
/** The wave: see {@link stagger}. Default `{ each: 0.04 }`. */
|
|
427
436
|
stagger?: StaggerOptions;
|
|
@@ -601,60 +610,6 @@ declare function musicBuffer(music: MusicOptions, options?: {
|
|
|
601
610
|
*/
|
|
602
611
|
declare function musicEvents(music: MusicOptions): Promise<MusicEvents>;
|
|
603
612
|
|
|
604
|
-
interface DeckPage {
|
|
605
|
-
/** The page's name: shown by the Presenter, and in the stops list. */
|
|
606
|
-
name?: string;
|
|
607
|
-
/** How long the page lasts, seconds (including any transition into the next page, see `DeckOptions.transition`). Required. */
|
|
608
|
-
duration: number;
|
|
609
|
-
/** The page's layers, written in the page's own time (`at: 0` is the start of the page). */
|
|
610
|
-
sequences: SequenceSpec[];
|
|
611
|
-
/** Where the page stops, in the page's own time: the first is the page settled, the rest are steps (a bullet appears, a chart grows). Default: where the transition into the next page begins (the end for the last page). */
|
|
612
|
-
stops?: Array<number | {
|
|
613
|
-
at: number;
|
|
614
|
-
pdf?: boolean;
|
|
615
|
-
}>;
|
|
616
|
-
/** Speaker notes (kept on the page's first stop). */
|
|
617
|
-
notes?: string;
|
|
618
|
-
/** Move on by itself this many seconds after the page's last stop (kiosk mode). */
|
|
619
|
-
advance?: number;
|
|
620
|
-
/** The page is itself a layer: it may carry `initial`, `keyframes`, `filters`, … (fade or slide the whole page, for instance). */
|
|
621
|
-
initial?: Props;
|
|
622
|
-
keyframes?: Keyframe[];
|
|
623
|
-
}
|
|
624
|
-
/** A transition spec without the parts `deck()` fills in (which two pages, and when). */
|
|
625
|
-
type DeckTransition = TransitionSpec extends infer T ? (T extends TransitionSpec ? Omit<T, 'from' | 'to' | 'at'> : never) : never;
|
|
626
|
-
interface DeckOptions {
|
|
627
|
-
pages: DeckPage[];
|
|
628
|
-
/**
|
|
629
|
-
* A transition between every two pages: `{ kind: 'crossfade' | 'slide' | 'wipe' | 'iris' | 'dip' | 'zoom' | 'dissolve' | 'luma', duration, …its own options }` (see Transitions). The next page starts
|
|
630
|
-
* `duration` seconds before the current one ends, and the transition plays across the overlap.
|
|
631
|
-
*/
|
|
632
|
-
transition?: DeckTransition;
|
|
633
|
-
}
|
|
634
|
-
/** What `deck()` returns: spread it into `movie.init` (`{ duration, composition: { sequences, transitions?, stops } }` plus any movie option you passed). */
|
|
635
|
-
interface DeckResult {
|
|
636
|
-
duration: number;
|
|
637
|
-
composition: CompositionSpec;
|
|
638
|
-
[movieOption: string]: unknown;
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* A deck of pages as one movie. Each page is a nested composition laid out after the one before (so its layers use the page's own
|
|
642
|
-
* time), the stops (where a `Presenter` pauses) come from the pages, and an optional `transition` joins the pages with the existing
|
|
643
|
-
* crossfade / slide / wipe / … transitions.
|
|
644
|
-
*
|
|
645
|
-
* ```js
|
|
646
|
-
* await movie.init({ canvas, width: 1280, height: 720, frameRate: 30, ...deck({
|
|
647
|
-
* transition: { kind: 'slide', duration: 0.6, direction: 'left' },
|
|
648
|
-
* pages: [
|
|
649
|
-
* { name: 'Hello', duration: 5, stops: [1.2], sequences: [ …title, subtitle… ] },
|
|
650
|
-
* { name: 'Why', duration: 8, stops: [1.2, 3, 5], sequences: [ …three bullets, at 1.2, 3, 5… ] },
|
|
651
|
-
* ],
|
|
652
|
-
* }) });
|
|
653
|
-
* movie.on('ready', …); new Presenter(movie, { canvas });
|
|
654
|
-
* ```
|
|
655
|
-
*/
|
|
656
|
-
declare function deck(options: DeckOptions): DeckResult;
|
|
657
|
-
|
|
658
613
|
interface WiggleProp {
|
|
659
614
|
/** The value the property rests at: a number or an expression (`'W/2'`). The wiggle starts and ends here. */
|
|
660
615
|
around: number | string;
|
|
@@ -732,4 +687,4 @@ interface WithFadeOptions {
|
|
|
732
687
|
*/
|
|
733
688
|
declare function withFade<T extends SequenceCommon>(spec: T, opts: WithFadeOptions): T;
|
|
734
689
|
|
|
735
|
-
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape,
|
|
690
|
+
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape, type EnvelopeOptions, type FollowPathOptions, ImageSequenceSpec, type KenBurnsOptions, Keyframe, type MeasureStyle, MusicEvents, MusicOptions, type OrbitOptions, type ParticlesOptions, type ReactOptions, type ReactProp, Sequence, SequenceCommon, type SequenceCtor, SequenceSpec, type SplitOptions, type StaggerOptions, type TextPiece, type TextPreset, TextSequenceSpec, type TextSize, type WiggleOptions, type WiggleProp, type WithFadeOptions, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, parseEase as ease, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, noise, orbit, particles, rand, random, react, registerSequenceType, splitText, stagger, warnUnknownOptions, wiggle, withFade };
|