pixi-effects 0.47.5 → 0.48.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 +8 -0
- package/README.md +8 -6
- package/ai/chat-template.html +3 -3
- package/dist/Controller.cjs +3 -0
- package/dist/Controller.cjs.map +1 -1
- package/dist/Controller.js +3 -0
- package/dist/Controller.js.map +1 -1
- package/dist/{chunk-LHUIEFMH.js → chunk-GX2WQV4A.js} +43 -33
- package/dist/chunk-GX2WQV4A.js.map +1 -0
- package/dist/chunk-K3XOEC3C.js +53 -0
- package/dist/chunk-K3XOEC3C.js.map +1 -0
- package/dist/{chunk-2AT5WSSV.cjs → chunk-NGK4E536.cjs} +47 -37
- package/dist/chunk-NGK4E536.cjs.map +1 -0
- package/dist/chunk-VQXZ2NOI.cjs +56 -0
- package/dist/chunk-VQXZ2NOI.cjs.map +1 -0
- package/dist/index.cjs +30 -25
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +2 -1
- package/dist/loader.css +1 -1
- package/dist/present.cjs +2 -1
- package/dist/present.cjs.map +1 -1
- package/dist/present.js +2 -1
- package/dist/present.js.map +1 -1
- package/docs/api.md +15 -0
- package/llms-full.txt +16 -1
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/chunk-2AT5WSSV.cjs.map +0 -1
- package/dist/chunk-LHUIEFMH.js.map +0 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/core/mediabunny.ts
|
|
4
|
+
var source = null;
|
|
5
|
+
var pending = null;
|
|
6
|
+
function useMediabunny(from) {
|
|
7
|
+
if (from == null || typeof from !== "string" && typeof from !== "function" && typeof from !== "object") {
|
|
8
|
+
throw new TypeError(`pixi-effects: useMediabunny() takes the mediabunny module, a URL or a function that returns the module; it got ${String(from)}`);
|
|
9
|
+
}
|
|
10
|
+
source = from;
|
|
11
|
+
pending = null;
|
|
12
|
+
}
|
|
13
|
+
function loadMediabunny() {
|
|
14
|
+
if (!pending) {
|
|
15
|
+
const from = source;
|
|
16
|
+
const p = fetchModule(from).then(
|
|
17
|
+
(mod) => {
|
|
18
|
+
if (!mod || typeof mod.Output !== "function") {
|
|
19
|
+
throw new Error(`pixi-effects: ${describe(from)} did not give the mediabunny module (no Output in it). ${HOW}`);
|
|
20
|
+
}
|
|
21
|
+
return mod;
|
|
22
|
+
},
|
|
23
|
+
(err) => {
|
|
24
|
+
const why = err instanceof Error ? err.message : String(err);
|
|
25
|
+
throw new Error(`pixi-effects: could not load mediabunny from ${describe(from)} (${why}). ${HOW}`, { cause: err });
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
pending = p;
|
|
29
|
+
p.catch(() => {
|
|
30
|
+
if (pending === p) pending = null;
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return pending;
|
|
34
|
+
}
|
|
35
|
+
var HOW = 'mediabunny is needed to export (movie.render(), the download button) and for a video layer; playing needs nothing. Add it to the import map ("mediabunny": "https://cdn.jsdelivr.net/npm/mediabunny@1/+esm"), install it next to pixi-effects, or call useMediabunny(module | url | () => import(...)) before you export.';
|
|
36
|
+
function fetchModule(from) {
|
|
37
|
+
if (from === null) return import('mediabunny');
|
|
38
|
+
if (typeof from === "string") return import(
|
|
39
|
+
/* @vite-ignore */
|
|
40
|
+
/* webpackIgnore: true */
|
|
41
|
+
from
|
|
42
|
+
);
|
|
43
|
+
if (typeof from === "function") return Promise.resolve().then(from);
|
|
44
|
+
return Promise.resolve(from);
|
|
45
|
+
}
|
|
46
|
+
function describe(from) {
|
|
47
|
+
if (from === null) return "'mediabunny' (the bare name: an import map or a bundler resolves it)";
|
|
48
|
+
if (typeof from === "string") return from;
|
|
49
|
+
if (typeof from === "function") return "the function given to useMediabunny()";
|
|
50
|
+
return "the object given to useMediabunny()";
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
exports.loadMediabunny = loadMediabunny;
|
|
54
|
+
exports.useMediabunny = useMediabunny;
|
|
55
|
+
//# sourceMappingURL=chunk-VQXZ2NOI.cjs.map
|
|
56
|
+
//# sourceMappingURL=chunk-VQXZ2NOI.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/core/mediabunny.ts"],"names":[],"mappings":";;;AAeA,IAAI,MAAA,GAAkC,IAAA;AACtC,IAAI,OAAA,GAA4C,IAAA;AAOzC,SAAS,cAAc,IAAA,EAA8B;AAC1D,EAAA,IAAI,IAAA,IAAQ,IAAA,IAAS,OAAO,IAAA,KAAS,QAAA,IAAY,OAAO,IAAA,KAAS,UAAA,IAAc,OAAO,IAAA,KAAS,QAAA,EAAW;AACxG,IAAA,MAAM,IAAI,SAAA,CAAU,CAAA,+GAAA,EAAkH,MAAA,CAAO,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,EACtJ;AACA,EAAA,MAAA,GAAS,IAAA;AACT,EAAA,OAAA,GAAU,IAAA;AACZ;AAGO,SAAS,cAAA,GAA4C;AAC1D,EAAA,IAAI,CAAC,OAAA,EAAS;AACZ,IAAA,MAAM,IAAA,GAAO,MAAA;AACb,IAAA,MAAM,CAAA,GAAI,WAAA,CAAY,IAAI,CAAA,CAAE,IAAA;AAAA,MAC1B,CAAC,GAAA,KAAQ;AACP,QAAA,IAAI,CAAC,GAAA,IAAO,OAAQ,GAAA,CAA6B,WAAW,UAAA,EAAY;AACtE,UAAA,MAAM,IAAI,MAAM,CAAA,cAAA,EAAiB,QAAA,CAAS,IAAI,CAAC,CAAA,uDAAA,EAA0D,GAAG,CAAA,CAAE,CAAA;AAAA,QAChH;AACA,QAAA,OAAO,GAAA;AAAA,MACT,CAAA;AAAA,MACA,CAAC,GAAA,KAAiB;AAChB,QAAA,MAAM,MAAM,GAAA,YAAe,KAAA,GAAQ,GAAA,CAAI,OAAA,GAAU,OAAO,GAAG,CAAA;AAC3D,QAAA,MAAM,IAAI,KAAA,CAAM,CAAA,6CAAA,EAAgD,QAAA,CAAS,IAAI,CAAC,CAAA,EAAA,EAAK,GAAG,CAAA,GAAA,EAAM,GAAG,CAAA,CAAA,EAAI,EAAE,KAAA,EAAO,KAAK,CAAA;AAAA,MACnH;AAAA,KACF;AACA,IAAA,OAAA,GAAU,CAAA;AACV,IAAA,CAAA,CAAE,MAAM,MAAM;AAAE,MAAA,IAAI,OAAA,KAAY,GAAG,OAAA,GAAU,IAAA;AAAA,IAAM,CAAC,CAAA;AAAA,EACtD;AACA,EAAA,OAAO,OAAA;AACT;AAEA,IAAM,GAAA,GAAM,2TAAA;AAIZ,SAAS,YAAY,IAAA,EAA0D;AAC7E,EAAA,IAAI,IAAA,KAAS,IAAA,EAAM,OAAO,OAAO,YAAY,CAAA;AAC7C,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,EAAU,OAAO;AAAA;AAAA;AAAA,IAAoD;AAAA,GAAA;AACzF,EAAA,IAAI,OAAO,SAAS,UAAA,EAAY,OAAO,QAAQ,OAAA,EAAQ,CAAE,KAAK,IAAI,CAAA;AAClE,EAAA,OAAO,OAAA,CAAQ,QAAQ,IAAI,CAAA;AAC7B;AAEA,SAAS,SAAS,IAAA,EAAuC;AACvD,EAAA,IAAI,IAAA,KAAS,MAAM,OAAO,sEAAA;AAC1B,EAAA,IAAI,OAAO,IAAA,KAAS,QAAA,EAAU,OAAO,IAAA;AACrC,EAAA,IAAI,OAAO,IAAA,KAAS,UAAA,EAAY,OAAO,uCAAA;AACvC,EAAA,OAAO,qCAAA;AACT","file":"chunk-VQXZ2NOI.cjs","sourcesContent":["// mediabunny (about 180 KB gzipped) is what writes a video file and decodes a `video` layer. A page that only plays never needs it, so it is\n// fetched the first time something asks for it: `movie.render()`, a video asset. Nothing imports it at the top of a module.\nimport type * as Mediabunny from 'mediabunny';\n\n/** The mediabunny module, as `import * as mb from 'mediabunny'` gives it. */\nexport type MediabunnyModule = typeof Mediabunny;\n\n/**\n * Where mediabunny comes from, for {@link useMediabunny}:\n * - the module itself (`import * as mb from 'mediabunny'`: it is ready, nothing is fetched),\n * - a URL to `import()` (a page with no import map entry for it),\n * - a function that returns the module (`() => import('mediabunny')`, your own copy, a bundler chunk).\n */\nexport type MediabunnySource = MediabunnyModule | string | (() => Promise<MediabunnyModule>);\n\nlet source: MediabunnySource | null = null;\nlet pending: Promise<MediabunnyModule> | null = null;\n\n/**\n * Says where mediabunny comes from. Without it, the bare name `'mediabunny'` is imported the first time it is needed, which your bundler or the\n * page's import map resolves. A page that only plays (no export, no `video` layer) needs neither this nor an import map entry for it.\n * Calling it again replaces the source for the next load; a module that was already loaded stays in use by what holds it.\n */\nexport function useMediabunny(from: MediabunnySource): void {\n if (from == null || (typeof from !== 'string' && typeof from !== 'function' && typeof from !== 'object')) {\n throw new TypeError(`pixi-effects: useMediabunny() takes the mediabunny module, a URL or a function that returns the module; it got ${String(from)}`);\n }\n source = from;\n pending = null;\n}\n\n/** The mediabunny module, fetched once (the first call starts it; later calls share it). A failed load is tried again on the next call. */\nexport function loadMediabunny(): Promise<MediabunnyModule> {\n if (!pending) {\n const from = source;\n const p = fetchModule(from).then(\n (mod) => {\n if (!mod || typeof (mod as { Output?: unknown }).Output !== 'function') {\n throw new Error(`pixi-effects: ${describe(from)} did not give the mediabunny module (no Output in it). ${HOW}`);\n }\n return mod;\n },\n (err: unknown) => {\n const why = err instanceof Error ? err.message : String(err);\n throw new Error(`pixi-effects: could not load mediabunny from ${describe(from)} (${why}). ${HOW}`, { cause: err });\n },\n );\n pending = p;\n p.catch(() => { if (pending === p) pending = null; }); // the next call tries again (a network blip, an import map added later)\n }\n return pending;\n}\n\nconst HOW = 'mediabunny is needed to export (movie.render(), the download button) and for a video layer; playing needs nothing. '\n + 'Add it to the import map (\"mediabunny\": \"https://cdn.jsdelivr.net/npm/mediabunny@1/+esm\"), install it next to pixi-effects, '\n + 'or call useMediabunny(module | url | () => import(...)) before you export.';\n\nfunction fetchModule(from: MediabunnySource | null): Promise<MediabunnyModule> {\n if (from === null) return import('mediabunny');\n if (typeof from === 'string') return import(/* @vite-ignore */ /* webpackIgnore: true */ from) as Promise<MediabunnyModule>;\n if (typeof from === 'function') return Promise.resolve().then(from);\n return Promise.resolve(from);\n}\n\nfunction describe(from: MediabunnySource | null): string {\n if (from === null) return \"'mediabunny' (the bare name: an import map or a bundler resolves it)\";\n if (typeof from === 'string') return from;\n if (typeof from === 'function') return 'the function given to useMediabunny()';\n return 'the object given to useMediabunny()';\n}\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkNGK4E536_cjs = require('./chunk-NGK4E536.cjs');
|
|
4
4
|
require('./chunk-OGLRSR6C.cjs');
|
|
5
|
+
var chunkVQXZ2NOI_cjs = require('./chunk-VQXZ2NOI.cjs');
|
|
5
6
|
var chunkECLBZV4N_cjs = require('./chunk-ECLBZV4N.cjs');
|
|
6
7
|
var chunkZAHCGFGC_cjs = require('./chunk-ZAHCGFGC.cjs');
|
|
7
8
|
require('./chunk-WYR2AU4W.cjs');
|
|
@@ -12,99 +13,103 @@ var chunkDOLTCXCL_cjs = require('./chunk-DOLTCXCL.cjs');
|
|
|
12
13
|
|
|
13
14
|
Object.defineProperty(exports, "Movie", {
|
|
14
15
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkNGK4E536_cjs.Movie; }
|
|
16
17
|
});
|
|
17
18
|
Object.defineProperty(exports, "animateText", {
|
|
18
19
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkNGK4E536_cjs.animateText; }
|
|
20
21
|
});
|
|
21
22
|
Object.defineProperty(exports, "audioEnvelope", {
|
|
22
23
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkNGK4E536_cjs.audioEnvelope; }
|
|
24
25
|
});
|
|
25
26
|
Object.defineProperty(exports, "bpmEnvelope", {
|
|
26
27
|
enumerable: true,
|
|
27
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkNGK4E536_cjs.bpmEnvelope; }
|
|
28
29
|
});
|
|
29
30
|
Object.defineProperty(exports, "cameraPath", {
|
|
30
31
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkNGK4E536_cjs.cameraPath; }
|
|
32
33
|
});
|
|
33
34
|
Object.defineProperty(exports, "computeEnvelope", {
|
|
34
35
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkNGK4E536_cjs.computeEnvelope; }
|
|
36
37
|
});
|
|
37
38
|
Object.defineProperty(exports, "dismissLoader", {
|
|
38
39
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkNGK4E536_cjs.dismissLoader; }
|
|
40
41
|
});
|
|
41
42
|
Object.defineProperty(exports, "ease", {
|
|
42
43
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkNGK4E536_cjs.parseEase; }
|
|
44
45
|
});
|
|
45
46
|
Object.defineProperty(exports, "failLoader", {
|
|
46
47
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkNGK4E536_cjs.failLoader; }
|
|
48
49
|
});
|
|
49
50
|
Object.defineProperty(exports, "followPath", {
|
|
50
51
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkNGK4E536_cjs.followPath; }
|
|
52
53
|
});
|
|
53
54
|
Object.defineProperty(exports, "kenBurns", {
|
|
54
55
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkNGK4E536_cjs.kenBurns; }
|
|
56
57
|
});
|
|
57
58
|
Object.defineProperty(exports, "measureText", {
|
|
58
59
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkNGK4E536_cjs.measureText; }
|
|
60
61
|
});
|
|
61
62
|
Object.defineProperty(exports, "musicBuffer", {
|
|
62
63
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkNGK4E536_cjs.musicBuffer; }
|
|
64
65
|
});
|
|
65
66
|
Object.defineProperty(exports, "musicEnvelope", {
|
|
66
67
|
enumerable: true,
|
|
67
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkNGK4E536_cjs.musicEnvelope; }
|
|
68
69
|
});
|
|
69
70
|
Object.defineProperty(exports, "musicEvents", {
|
|
70
71
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkNGK4E536_cjs.musicEvents; }
|
|
72
73
|
});
|
|
73
74
|
Object.defineProperty(exports, "orbit", {
|
|
74
75
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkNGK4E536_cjs.orbit; }
|
|
76
77
|
});
|
|
77
78
|
Object.defineProperty(exports, "particles", {
|
|
78
79
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkNGK4E536_cjs.particles; }
|
|
80
81
|
});
|
|
81
82
|
Object.defineProperty(exports, "react", {
|
|
82
83
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkNGK4E536_cjs.react; }
|
|
84
85
|
});
|
|
85
86
|
Object.defineProperty(exports, "resolveLoader", {
|
|
86
87
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkNGK4E536_cjs.resolveLoader; }
|
|
88
89
|
});
|
|
89
90
|
Object.defineProperty(exports, "samplePath", {
|
|
90
91
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkNGK4E536_cjs.samplePath; }
|
|
92
93
|
});
|
|
93
94
|
Object.defineProperty(exports, "splitText", {
|
|
94
95
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkNGK4E536_cjs.splitText; }
|
|
96
97
|
});
|
|
97
98
|
Object.defineProperty(exports, "stagger", {
|
|
98
99
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkNGK4E536_cjs.stagger; }
|
|
100
101
|
});
|
|
101
102
|
Object.defineProperty(exports, "wiggle", {
|
|
102
103
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkNGK4E536_cjs.wiggle; }
|
|
104
105
|
});
|
|
105
106
|
Object.defineProperty(exports, "withFade", {
|
|
106
107
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkNGK4E536_cjs.withFade; }
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(exports, "useMediabunny", {
|
|
111
|
+
enumerable: true,
|
|
112
|
+
get: function () { return chunkVQXZ2NOI_cjs.useMediabunny; }
|
|
108
113
|
});
|
|
109
114
|
Object.defineProperty(exports, "Sequence", {
|
|
110
115
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, H as HoverOptions, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as PickHit, l as PickOptions, m as ProgressEvent, R as RebuildOptions, n as RebuildReason, o as RebuildReport, p as RenderOptions, q as ReviewOptions, r as ReviewReport, S as SnapshotOptions, T as ThumbnailOptions, s as TimelineData, t as TimelineHtmlOptions, u as TimelineRow, v as TimelineSvgOptions, w as TimelineTransition, V as VolumeEvent, x as dismissLoader, y as failLoader, z as resolveLoader } from './Movie-svZQF-9Z.cjs';
|
|
2
2
|
import { S as SequenceSpec, g as CompositionShape, b as Sequence, I as ImageSequenceSpec, h as CameraSequenceSpec, K as Keyframe, i as TextSequenceSpec, M as MusicOptions, d as SequenceCommon } from './types-CTSrPvY3.cjs';
|
|
3
3
|
export { j as ArcShapeSpec, A as AssetSpec, k as AudioAssetSpec, l as AudioMusicSpec, m as AudioSequenceSpec, n as AudioSfxSpec, B as BlendModeName, o as CanvasInfo, p as CanvasSequenceSpec, q as ChromaKeyFilterSpec, r as CircleShapeSpec, s as CompositionSequenceSpec, C as CompositionSpec, t as CrossfadeTransition, u as CustomFilterSpec, D as DipTransition, v as DissolveTransition, E as EllipseShapeSpec, w as Expr, F as FilterSpec, G as GradientSpec, x as IrisTransition, L as LightSequenceSpec, y as LineShapeSpec, z as LumaTransition, H as MaskRefSpec, J as MatteRefSpec, N as MusicDrum, O as MusicDrums, Q as MusicInstrument, R as MusicLevel, U as MusicTrack, V as NullSequenceSpec, W as PathShapeSpec, X as PolygonShapeSpec, e as PropValue, P as Props, Y as RectShapeSpec, Z as SfxKnobs, _ as SfxOptions, $ as SfxPreset, a0 as SfxVoice, a1 as ShaderSequenceSpec, a2 as ShapeSequenceSpec, a3 as SlideTransition, c as SpaceNow, a as Stop, a4 as StopSpec, a5 as TextSpan, a6 as TransitionCommon, T as TransitionSpec, a7 as VideoSequenceSpec, a8 as WipeTransition, a9 as ZoomTransition } from './types-CTSrPvY3.cjs';
|
|
4
|
+
import * as Mediabunny from 'mediabunny';
|
|
4
5
|
import { M as MusicEvents } from './soundEntry-DT13DNt8.cjs';
|
|
5
6
|
export { a as AudioInspectOptions, A as AudioReport, b as AudioSourceReport, c as MusicDrumEvents, d as MusicDrumHit, e as MusicNote, f as MusicSummary, g as MusicTrackEvents, S as SoundMeasure, h as SoundReport, i as inspectSound } from './soundEntry-DT13DNt8.cjs';
|
|
6
7
|
import 'pixi.js';
|
|
7
8
|
|
|
9
|
+
/** The mediabunny module, as `import * as mb from 'mediabunny'` gives it. */
|
|
10
|
+
type MediabunnyModule = typeof Mediabunny;
|
|
11
|
+
/**
|
|
12
|
+
* Where mediabunny comes from, for {@link useMediabunny}:
|
|
13
|
+
* - the module itself (`import * as mb from 'mediabunny'`: it is ready, nothing is fetched),
|
|
14
|
+
* - a URL to `import()` (a page with no import map entry for it),
|
|
15
|
+
* - a function that returns the module (`() => import('mediabunny')`, your own copy, a bundler chunk).
|
|
16
|
+
*/
|
|
17
|
+
type MediabunnySource = MediabunnyModule | string | (() => Promise<MediabunnyModule>);
|
|
18
|
+
/**
|
|
19
|
+
* Says where mediabunny comes from. Without it, the bare name `'mediabunny'` is imported the first time it is needed, which your bundler or the
|
|
20
|
+
* page's import map resolves. A page that only plays (no export, no `video` layer) needs neither this nor an import map entry for it.
|
|
21
|
+
* Calling it again replaces the source for the next load; a module that was already loaded stays in use by what holds it.
|
|
22
|
+
*/
|
|
23
|
+
declare function useMediabunny(from: MediabunnySource): void;
|
|
24
|
+
|
|
8
25
|
/** A text style as written in a `text` layer's `style` (numbers, not expressions, for the fields that size the text). */
|
|
9
26
|
type MeasureStyle = Record<string, unknown>;
|
|
10
27
|
interface TextSize {
|
|
@@ -729,4 +746,4 @@ interface WithFadeOptions {
|
|
|
729
746
|
*/
|
|
730
747
|
declare function withFade<T extends SequenceCommon>(spec: T, opts: WithFadeOptions): T;
|
|
731
748
|
|
|
732
|
-
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 PathSampler, 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, noise2, orbit, particles, rand, random, react, registerSequenceType, samplePath, splitText, stagger, warnUnknownOptions, wiggle, withFade };
|
|
749
|
+
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape, type EnvelopeOptions, type FollowPathOptions, ImageSequenceSpec, type KenBurnsOptions, Keyframe, type MeasureStyle, type MediabunnyModule, type MediabunnySource, MusicEvents, MusicOptions, type OrbitOptions, type ParticlesOptions, type PathSampler, 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, noise2, orbit, particles, rand, random, react, registerSequenceType, samplePath, splitText, stagger, useMediabunny, warnUnknownOptions, wiggle, withFade };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,27 @@
|
|
|
1
1
|
export { C as ContactSheetOptions, F as FontReport, b as FrameEvent, H as HoverOptions, I as InspectOptions, c as InspectReport, d as IssueGroup, L as LayerInfo, e as LoadProgressState, f as LoadStage, g as LoaderOption, h as LoopEvent, i as MotionBlurOptions, a as MotionBlurSpec, M as Movie, j as MovieErrorEvent, k as MovieOptions, O as OnionSkinOptions, P as PickHit, l as PickOptions, m as ProgressEvent, R as RebuildOptions, n as RebuildReason, o as RebuildReport, p as RenderOptions, q as ReviewOptions, r as ReviewReport, S as SnapshotOptions, T as ThumbnailOptions, s as TimelineData, t as TimelineHtmlOptions, u as TimelineRow, v as TimelineSvgOptions, w as TimelineTransition, V as VolumeEvent, x as dismissLoader, y as failLoader, z as resolveLoader } from './Movie--qSYKgAQ.js';
|
|
2
2
|
import { S as SequenceSpec, g as CompositionShape, b as Sequence, I as ImageSequenceSpec, h as CameraSequenceSpec, K as Keyframe, i as TextSequenceSpec, M as MusicOptions, d as SequenceCommon } from './types-CTSrPvY3.js';
|
|
3
3
|
export { j as ArcShapeSpec, A as AssetSpec, k as AudioAssetSpec, l as AudioMusicSpec, m as AudioSequenceSpec, n as AudioSfxSpec, B as BlendModeName, o as CanvasInfo, p as CanvasSequenceSpec, q as ChromaKeyFilterSpec, r as CircleShapeSpec, s as CompositionSequenceSpec, C as CompositionSpec, t as CrossfadeTransition, u as CustomFilterSpec, D as DipTransition, v as DissolveTransition, E as EllipseShapeSpec, w as Expr, F as FilterSpec, G as GradientSpec, x as IrisTransition, L as LightSequenceSpec, y as LineShapeSpec, z as LumaTransition, H as MaskRefSpec, J as MatteRefSpec, N as MusicDrum, O as MusicDrums, Q as MusicInstrument, R as MusicLevel, U as MusicTrack, V as NullSequenceSpec, W as PathShapeSpec, X as PolygonShapeSpec, e as PropValue, P as Props, Y as RectShapeSpec, Z as SfxKnobs, _ as SfxOptions, $ as SfxPreset, a0 as SfxVoice, a1 as ShaderSequenceSpec, a2 as ShapeSequenceSpec, a3 as SlideTransition, c as SpaceNow, a as Stop, a4 as StopSpec, a5 as TextSpan, a6 as TransitionCommon, T as TransitionSpec, a7 as VideoSequenceSpec, a8 as WipeTransition, a9 as ZoomTransition } from './types-CTSrPvY3.js';
|
|
4
|
+
import * as Mediabunny from 'mediabunny';
|
|
4
5
|
import { M as MusicEvents } from './soundEntry-DT13DNt8.js';
|
|
5
6
|
export { a as AudioInspectOptions, A as AudioReport, b as AudioSourceReport, c as MusicDrumEvents, d as MusicDrumHit, e as MusicNote, f as MusicSummary, g as MusicTrackEvents, S as SoundMeasure, h as SoundReport, i as inspectSound } from './soundEntry-DT13DNt8.js';
|
|
6
7
|
import 'pixi.js';
|
|
7
8
|
|
|
9
|
+
/** The mediabunny module, as `import * as mb from 'mediabunny'` gives it. */
|
|
10
|
+
type MediabunnyModule = typeof Mediabunny;
|
|
11
|
+
/**
|
|
12
|
+
* Where mediabunny comes from, for {@link useMediabunny}:
|
|
13
|
+
* - the module itself (`import * as mb from 'mediabunny'`: it is ready, nothing is fetched),
|
|
14
|
+
* - a URL to `import()` (a page with no import map entry for it),
|
|
15
|
+
* - a function that returns the module (`() => import('mediabunny')`, your own copy, a bundler chunk).
|
|
16
|
+
*/
|
|
17
|
+
type MediabunnySource = MediabunnyModule | string | (() => Promise<MediabunnyModule>);
|
|
18
|
+
/**
|
|
19
|
+
* Says where mediabunny comes from. Without it, the bare name `'mediabunny'` is imported the first time it is needed, which your bundler or the
|
|
20
|
+
* page's import map resolves. A page that only plays (no export, no `video` layer) needs neither this nor an import map entry for it.
|
|
21
|
+
* Calling it again replaces the source for the next load; a module that was already loaded stays in use by what holds it.
|
|
22
|
+
*/
|
|
23
|
+
declare function useMediabunny(from: MediabunnySource): void;
|
|
24
|
+
|
|
8
25
|
/** A text style as written in a `text` layer's `style` (numbers, not expressions, for the fields that size the text). */
|
|
9
26
|
type MeasureStyle = Record<string, unknown>;
|
|
10
27
|
interface TextSize {
|
|
@@ -729,4 +746,4 @@ interface WithFadeOptions {
|
|
|
729
746
|
*/
|
|
730
747
|
declare function withFade<T extends SequenceCommon>(spec: T, opts: WithFadeOptions): T;
|
|
731
748
|
|
|
732
|
-
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 PathSampler, 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, noise2, orbit, particles, rand, random, react, registerSequenceType, samplePath, splitText, stagger, warnUnknownOptions, wiggle, withFade };
|
|
749
|
+
export { type AnimateTextOptions, type AnimateTextTween, type AudioEnvelope, type AudioEnvelopeSource, type CameraPathOptions, CameraSequenceSpec, CompositionShape, type EnvelopeOptions, type FollowPathOptions, ImageSequenceSpec, type KenBurnsOptions, Keyframe, type MeasureStyle, type MediabunnyModule, type MediabunnySource, MusicEvents, MusicOptions, type OrbitOptions, type ParticlesOptions, type PathSampler, 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, noise2, orbit, particles, rand, random, react, registerSequenceType, samplePath, splitText, stagger, useMediabunny, warnUnknownOptions, wiggle, withFade };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-
|
|
1
|
+
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, parseEase as ease, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade } from './chunk-GX2WQV4A.js';
|
|
2
2
|
import './chunk-UI7CEUTP.js';
|
|
3
|
+
export { useMediabunny } from './chunk-K3XOEC3C.js';
|
|
3
4
|
export { Sequence, noise, noise2, rand, random, registerSequenceType } from './chunk-4PYVHLIK.js';
|
|
4
5
|
export { inspectSound } from './chunk-G4PXCV2B.js';
|
|
5
6
|
import './chunk-JBDBICS2.js';
|
package/dist/loader.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* pixi-effects loader: one line of HTML on the page, a few lines of CSS, no JavaScript of your own.
|
|
3
3
|
*
|
|
4
|
-
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
4
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/loader.css">
|
|
5
5
|
* <div class="stage" style="position: relative"> <!-- any box the canvas sits in, with position: relative -->
|
|
6
6
|
* <canvas id="stage" width="1280" height="720"></canvas>
|
|
7
7
|
* <div class="pe-loader" data-label="LOADING"></div> <!-- or class="pe-loader pe-loader--bar" -->
|
package/dist/present.cjs
CHANGED