@tawaship/pixim-animate-runtime 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +280 -2
- package/dist/pixim-animate-runtime.cjs.js +236 -0
- package/dist/pixim-animate-runtime.cjs.js.map +1 -0
- package/dist/pixim-animate-runtime.esm.js +223 -0
- package/dist/pixim-animate-runtime.esm.js.map +1 -0
- package/dist/pixim-animate-runtime.js +3929 -0
- package/dist/pixim-animate-runtime.js.map +1 -0
- package/dist-skills/animate-data-converter-guide/SKILL.md +86 -0
- package/dist-skills/pixi-animate-runtime-guide/SKILL.md +146 -0
- package/dist-skills/pixim-animate-runtime-guide/SKILL.md +112 -0
- package/package.json +53 -4
- package/types/AnimateContainer.d.ts +34 -0
- package/types/AnimateContentLoader.d.ts +35 -0
- package/types/AnimateContentManifest.d.ts +17 -0
- package/types/index.d.ts +5 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @tawaship/pixim-animate-runtime - v0.1.1
|
|
3
|
+
*
|
|
4
|
+
* @require pixi.js ^5.3.2
|
|
5
|
+
* @require @tawaship/pixim.js ^1.15.2
|
|
6
|
+
* @author tawaship (makazu.mori@gmail.com)
|
|
7
|
+
* @license MIT
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { AnimateController, resolveContentUrl, loadContentAsync } from '@tawaship/pixi-animate-runtime';
|
|
11
|
+
export * from '@tawaship/pixi-animate-runtime';
|
|
12
|
+
import { Container, JsLoader, BlobLoader, LoaderBase, LoaderResource, Content, ManifestBase } from '@tawaship/pixim.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A Pixim container that plays the content roots put on it at their
|
|
16
|
+
* content's frame rate (the rate the content was published with), while it is
|
|
17
|
+
* on the display tree of a running Pixim application.
|
|
18
|
+
*
|
|
19
|
+
* Each frame of the application plays `delta x speed x fps / 60` frames of every
|
|
20
|
+
* root (delta being the application ticker's), one frame being createjs's tick
|
|
21
|
+
* phase followed by its resolve phase; the first frame after a root is put on
|
|
22
|
+
* only settles it on its first frame. Playing stops while `taskEnabled` is
|
|
23
|
+
* false. The container's own `task` is free for the application: what it holds
|
|
24
|
+
* does not change the playing.
|
|
25
|
+
*/
|
|
26
|
+
var AnimateContainer = /*@__PURE__*/(function (Container) {
|
|
27
|
+
function AnimateContainer() {
|
|
28
|
+
Container.call(this);
|
|
29
|
+
this._controller = new AnimateController(this);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if ( Container ) AnimateContainer.__proto__ = Container;
|
|
33
|
+
AnimateContainer.prototype = Object.create( Container && Container.prototype );
|
|
34
|
+
AnimateContainer.prototype.constructor = AnimateContainer;
|
|
35
|
+
|
|
36
|
+
var prototypeAccessors = { speed: { configurable: true },overSpeed: { configurable: true },smooth: { configurable: true } };
|
|
37
|
+
/** Playback speed (1 is the content's own frame rate, 0 stops; a value below 0 is taken as 0) */
|
|
38
|
+
prototypeAccessors.speed.get = function () { return this._controller.speed; };
|
|
39
|
+
prototypeAccessors.speed.set = function (value) { this._controller.speed = value; };
|
|
40
|
+
/** Whether one frame of the application may play more than one frame of a root (when the display runs slower than the content) */
|
|
41
|
+
prototypeAccessors.overSpeed.get = function () { return this._controller.overSpeed; };
|
|
42
|
+
prototypeAccessors.overSpeed.set = function (value) { this._controller.overSpeed = value; };
|
|
43
|
+
/** Whether frames are played by a steady clock, so that small changes of the delta do not make the playing uneven */
|
|
44
|
+
prototypeAccessors.smooth.get = function () { return this._controller.smooth; };
|
|
45
|
+
prototypeAccessors.smooth.set = function (value) { this._controller.smooth = value; };
|
|
46
|
+
AnimateContainer.prototype.updateTask = function updateTask (e) {
|
|
47
|
+
Container.prototype.updateTask.call(this, e);
|
|
48
|
+
if (!this.taskEnabled) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this._controller.handleTick(e.delta);
|
|
52
|
+
};
|
|
53
|
+
/** Plays the roots by hand, as one frame of the application with this delta does */
|
|
54
|
+
AnimateContainer.prototype.handleTick = function handleTick (delta) {
|
|
55
|
+
this._controller.handleTick(delta);
|
|
56
|
+
};
|
|
57
|
+
/** Puts a content object on this container; a MovieClip plays from then on */
|
|
58
|
+
AnimateContainer.prototype.addCreatejs = function addCreatejs (obj) {
|
|
59
|
+
return this._controller.addCreatejs(obj);
|
|
60
|
+
};
|
|
61
|
+
AnimateContainer.prototype.addCreatejsAt = function addCreatejsAt (obj, index) {
|
|
62
|
+
return this._controller.addCreatejsAt(obj, index);
|
|
63
|
+
};
|
|
64
|
+
AnimateContainer.prototype.removeCreatejs = function removeCreatejs (obj) {
|
|
65
|
+
return this._controller.removeCreatejs(obj);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
Object.defineProperties( AnimateContainer.prototype, prototypeAccessors );
|
|
69
|
+
|
|
70
|
+
return AnimateContainer;
|
|
71
|
+
}(Container));
|
|
72
|
+
|
|
73
|
+
var AnimateContentLoaderResource = /*@__PURE__*/(function (LoaderResource) {
|
|
74
|
+
function AnimateContentLoaderResource () {
|
|
75
|
+
LoaderResource.apply(this, arguments);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if ( LoaderResource ) AnimateContentLoaderResource.__proto__ = LoaderResource;
|
|
79
|
+
AnimateContentLoaderResource.prototype = Object.create( LoaderResource && LoaderResource.prototype );
|
|
80
|
+
AnimateContentLoaderResource.prototype.constructor = AnimateContentLoaderResource;
|
|
81
|
+
|
|
82
|
+
AnimateContentLoaderResource.prototype.destroy = function destroy () {
|
|
83
|
+
this._data = null;
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
return AnimateContentLoaderResource;
|
|
87
|
+
}(LoaderResource));
|
|
88
|
+
function isUrl(src) {
|
|
89
|
+
return src.indexOf('data:') !== 0 && src.indexOf('blob:') !== 0;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Loads a content as a Pixim asset: its runtime content file (when a filepath
|
|
93
|
+
* is given), then the content with loadContentAsync, the base path being the
|
|
94
|
+
* Pixim content's and the target's together.
|
|
95
|
+
*
|
|
96
|
+
* With the Pixim content's `xhr` option, the images are fetched (with its
|
|
97
|
+
* request options) into blob: URLs first, after the target's own
|
|
98
|
+
* handleManifest; the blob: URLs are released once the content is loaded.
|
|
99
|
+
*/
|
|
100
|
+
var AnimateContentLoader = /*@__PURE__*/(function (LoaderBase) {
|
|
101
|
+
function AnimateContentLoader () {
|
|
102
|
+
LoaderBase.apply(this, arguments);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
if ( LoaderBase ) AnimateContentLoader.__proto__ = LoaderBase;
|
|
106
|
+
AnimateContentLoader.prototype = Object.create( LoaderBase && LoaderBase.prototype );
|
|
107
|
+
AnimateContentLoader.prototype.constructor = AnimateContentLoader;
|
|
108
|
+
|
|
109
|
+
AnimateContentLoader.prototype._loadAsync = function _loadAsync (target, options) {
|
|
110
|
+
var this$1$1 = this;
|
|
111
|
+
if ( options === void 0 ) options = {};
|
|
112
|
+
|
|
113
|
+
var basepath = resolveContentUrl(options.basepath || '', target.basepath || '');
|
|
114
|
+
return this._loadFileAsync(target, basepath, options)
|
|
115
|
+
.then(function () { return this$1$1._loadContentAsync(target, basepath, options); })
|
|
116
|
+
.then(function (content) { return new AnimateContentLoaderResource(content, null); })
|
|
117
|
+
.catch(function (e) { return new AnimateContentLoaderResource(null, e); });
|
|
118
|
+
};
|
|
119
|
+
AnimateContentLoader.prototype._loadFileAsync = function _loadFileAsync (target, basepath, options) {
|
|
120
|
+
if (!target.filepath) {
|
|
121
|
+
return Promise.resolve();
|
|
122
|
+
}
|
|
123
|
+
return new JsLoader().loadAsync(resolveContentUrl(basepath, target.filepath), { version: options.fileVersion || options.version, xhr: options.xhr })
|
|
124
|
+
.then(function (resource) {
|
|
125
|
+
if (resource.error) {
|
|
126
|
+
throw resource.error;
|
|
127
|
+
}
|
|
128
|
+
resource.ref();
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
AnimateContentLoader.prototype._loadContentAsync = function _loadContentAsync (target, basepath, options) {
|
|
132
|
+
var this$1$1 = this;
|
|
133
|
+
|
|
134
|
+
var version = options.assetVersion || options.version;
|
|
135
|
+
var blobs = [];
|
|
136
|
+
var release = function () {
|
|
137
|
+
blobs.forEach(function (blob) { return blob.destroy(); });
|
|
138
|
+
};
|
|
139
|
+
var own = target.options && target.options.handleManifest;
|
|
140
|
+
var contentTarget = {
|
|
141
|
+
id: target.id,
|
|
142
|
+
basepath: basepath,
|
|
143
|
+
options: {
|
|
144
|
+
crossOrigin: target.options ? target.options.crossOrigin : undefined,
|
|
145
|
+
handleManifest: function (manifest) {
|
|
146
|
+
return Promise.resolve(own ? own(manifest) : undefined)
|
|
147
|
+
.then(function () { return options.xhr ? this$1$1._fetchImagesAsync(manifest, basepath, version, options, blobs) : undefined; });
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
return loadContentAsync(contentTarget, { version: version })
|
|
152
|
+
.then(function (content) {
|
|
153
|
+
release();
|
|
154
|
+
return content;
|
|
155
|
+
}, function (e) {
|
|
156
|
+
release();
|
|
157
|
+
throw e;
|
|
158
|
+
});
|
|
159
|
+
};
|
|
160
|
+
/** The images fetched into blob: URLs, which then stand for their files */
|
|
161
|
+
AnimateContentLoader.prototype._fetchImagesAsync = function _fetchImagesAsync (manifest, basepath, version, options, blobs) {
|
|
162
|
+
var targets = {};
|
|
163
|
+
manifest.forEach(function (entry, i) {
|
|
164
|
+
if (isUrl(entry.src)) {
|
|
165
|
+
targets[i] = resolveContentUrl(basepath, entry.src);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
return new BlobLoader().loadAllAsync(targets, { version: version, xhr: options.xhr })
|
|
169
|
+
.then(function (resources) {
|
|
170
|
+
Object.keys(resources).forEach(function (i) {
|
|
171
|
+
blobs.push(resources[i]);
|
|
172
|
+
});
|
|
173
|
+
Object.keys(resources).forEach(function (i) {
|
|
174
|
+
var resource = resources[i];
|
|
175
|
+
if (resource.error) {
|
|
176
|
+
throw resource.error;
|
|
177
|
+
}
|
|
178
|
+
manifest[Number(i)].src = resource.data;
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
return AnimateContentLoader;
|
|
184
|
+
}(LoaderBase));
|
|
185
|
+
|
|
186
|
+
/** The key of the contents in a Pixim content's resources: `$.resources.animateContents` */
|
|
187
|
+
var ANIMATE_CONTENTS = 'animateContents';
|
|
188
|
+
var AnimateContentManifest = /*@__PURE__*/(function (ManifestBase) {
|
|
189
|
+
function AnimateContentManifest () {
|
|
190
|
+
ManifestBase.apply(this, arguments);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if ( ManifestBase ) AnimateContentManifest.__proto__ = ManifestBase;
|
|
194
|
+
AnimateContentManifest.prototype = Object.create( ManifestBase && ManifestBase.prototype );
|
|
195
|
+
AnimateContentManifest.prototype.constructor = AnimateContentManifest;
|
|
196
|
+
|
|
197
|
+
AnimateContentManifest.prototype._createLoader = function _createLoader () {
|
|
198
|
+
return new AnimateContentLoader();
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
return AnimateContentManifest;
|
|
202
|
+
}(ManifestBase));
|
|
203
|
+
Content.registerManifest(ANIMATE_CONTENTS, AnimateContentManifest);
|
|
204
|
+
/**
|
|
205
|
+
* Defines contents for a Pixim content class: each is loaded with the class's
|
|
206
|
+
* other assets and given as `$.resources.animateContents[name]`.
|
|
207
|
+
*/
|
|
208
|
+
function defineAnimateContentsTo(PiximContent, targets, options) {
|
|
209
|
+
if ( options === void 0 ) options = {};
|
|
210
|
+
|
|
211
|
+
return PiximContent.defineTargets(ANIMATE_CONTENTS, targets, options);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Adds contents to a Pixim content instance (loaded with its other assets).
|
|
215
|
+
*/
|
|
216
|
+
function addAnimateContentsTo(content, targets, options) {
|
|
217
|
+
if ( options === void 0 ) options = {};
|
|
218
|
+
|
|
219
|
+
return content.addTargets(ANIMATE_CONTENTS, targets, options);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { ANIMATE_CONTENTS, AnimateContainer, AnimateContentLoader, AnimateContentLoaderResource, AnimateContentManifest, addAnimateContentsTo, defineAnimateContentsTo };
|
|
223
|
+
//# sourceMappingURL=pixim-animate-runtime.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixim-animate-runtime.esm.js","sources":["../src/AnimateContainer.ts","../src/AnimateContentLoader.ts","../src/AnimateContentManifest.ts"],"sourcesContent":["import { Container, ITickerData } from '@tawaship/pixim.js';\nimport { AnimateController, DisplayObject } from '@tawaship/pixi-animate-runtime';\n\n/**\n * A Pixim container that plays the content roots put on it at their\n * content's frame rate (the rate the content was published with), while it is\n * on the display tree of a running Pixim application.\n *\n * Each frame of the application plays `delta x speed x fps / 60` frames of every\n * root (delta being the application ticker's), one frame being createjs's tick\n * phase followed by its resolve phase; the first frame after a root is put on\n * only settles it on its first frame. Playing stops while `taskEnabled` is\n * false. The container's own `task` is free for the application: what it holds\n * does not change the playing.\n */\nexport class AnimateContainer extends Container {\n\tprivate readonly _controller: AnimateController;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._controller = new AnimateController(this);\n\t}\n\n\t/** Playback speed (1 is the content's own frame rate, 0 stops; a value below 0 is taken as 0) */\n\tget speed(): number { return this._controller.speed; }\n\tset speed(value: number) { this._controller.speed = value; }\n\n\t/** Whether one frame of the application may play more than one frame of a root (when the display runs slower than the content) */\n\tget overSpeed(): boolean { return this._controller.overSpeed; }\n\tset overSpeed(value: boolean) { this._controller.overSpeed = value; }\n\n\t/** Whether frames are played by a steady clock, so that small changes of the delta do not make the playing uneven */\n\tget smooth(): boolean { return this._controller.smooth; }\n\tset smooth(value: boolean) { this._controller.smooth = value; }\n\n\tupdateTask(e: ITickerData): void {\n\t\tsuper.updateTask(e);\n\t\tif (!this.taskEnabled) {\n\t\t\treturn;\n\t\t}\n\t\tthis._controller.handleTick(e.delta);\n\t}\n\n\t/** Plays the roots by hand, as one frame of the application with this delta does */\n\thandleTick(delta: number): void {\n\t\tthis._controller.handleTick(delta);\n\t}\n\n\t/** Puts a content object on this container; a MovieClip plays from then on */\n\taddCreatejs<T extends DisplayObject>(obj: T): T {\n\t\treturn this._controller.addCreatejs(obj);\n\t}\n\n\taddCreatejsAt<T extends DisplayObject>(obj: T, index: number): T {\n\t\treturn this._controller.addCreatejsAt(obj, index);\n\t}\n\n\tremoveCreatejs<T extends DisplayObject>(obj: T): T {\n\t\treturn this._controller.removeCreatejs(obj);\n\t}\n}\n","import { BlobLoader, BlobLoaderResource, ILoaderOption, JsLoader, LoaderBase, LoaderResource, TLoaderResourceVersion } from '@tawaship/pixim.js';\nimport { IContent, IContentManifestEntry, IContentTarget, loadContentAsync, resolveContentUrl } from '@tawaship/pixi-animate-runtime';\n\n/** A content to load: what loadContentAsync takes, and the runtime content file to load first */\nexport interface IAnimateContentLoaderTarget extends IContentTarget {\n\t/**\n\t * The runtime content file, relative to `basepath`. Loaded (as a script) before\n\t * the content when given; otherwise it has to be loaded already.\n\t */\n\tfilepath?: string;\n}\n\nexport interface IAnimateContentLoaderOption extends ILoaderOption {\n\t/** The version added to the runtime content file's URL (`version` when omitted) */\n\tfileVersion?: TLoaderResourceVersion;\n\t/** The version added to the image URLs (`version` when omitted) */\n\tassetVersion?: TLoaderResourceVersion;\n}\n\nexport class AnimateContentLoaderResource extends LoaderResource<IContent | null> {\n\tdestroy(): void {\n\t\tthis._data = null;\n\t}\n}\n\nfunction isUrl(src: string): boolean {\n\treturn src.indexOf('data:') !== 0 && src.indexOf('blob:') !== 0;\n}\n\n/**\n * Loads a content as a Pixim asset: its runtime content file (when a filepath\n * is given), then the content with loadContentAsync, the base path being the\n * Pixim content's and the target's together.\n *\n * With the Pixim content's `xhr` option, the images are fetched (with its\n * request options) into blob: URLs first, after the target's own\n * handleManifest; the blob: URLs are released once the content is loaded.\n */\nexport class AnimateContentLoader extends LoaderBase<IAnimateContentLoaderTarget, IContent | null, AnimateContentLoaderResource> {\n\tprotected _loadAsync(target: IAnimateContentLoaderTarget, options: IAnimateContentLoaderOption = {}): Promise<AnimateContentLoaderResource> {\n\t\tconst basepath = resolveContentUrl(options.basepath || '', target.basepath || '');\n\t\treturn this._loadFileAsync(target, basepath, options)\n\t\t\t.then(() => this._loadContentAsync(target, basepath, options))\n\t\t\t.then(content => new AnimateContentLoaderResource(content, null))\n\t\t\t.catch((e: Error) => new AnimateContentLoaderResource(null, e));\n\t}\n\n\tprivate _loadFileAsync(target: IAnimateContentLoaderTarget, basepath: string, options: IAnimateContentLoaderOption): Promise<void> {\n\t\tif (!target.filepath) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\t\treturn new JsLoader().loadAsync(resolveContentUrl(basepath, target.filepath), { version: options.fileVersion || options.version, xhr: options.xhr })\n\t\t\t.then(resource => {\n\t\t\t\tif (resource.error) {\n\t\t\t\t\tthrow resource.error;\n\t\t\t\t}\n\t\t\t\tresource.ref();\n\t\t\t});\n\t}\n\n\tprivate _loadContentAsync(target: IAnimateContentLoaderTarget, basepath: string, options: IAnimateContentLoaderOption): Promise<IContent> {\n\t\tconst version = options.assetVersion || options.version;\n\t\tconst blobs: BlobLoaderResource[] = [];\n\t\tconst release = (): void => {\n\t\t\tblobs.forEach(blob => blob.destroy());\n\t\t};\n\t\tconst own = target.options && target.options.handleManifest;\n\t\tconst contentTarget: IContentTarget = {\n\t\t\tid: target.id,\n\t\t\tbasepath,\n\t\t\toptions: {\n\t\t\t\tcrossOrigin: target.options ? target.options.crossOrigin : undefined,\n\t\t\t\thandleManifest: (manifest: IContentManifestEntry[]) => {\n\t\t\t\t\treturn Promise.resolve(own ? own(manifest) : undefined)\n\t\t\t\t\t\t.then(() => options.xhr ? this._fetchImagesAsync(manifest, basepath, version, options, blobs) : undefined);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t\treturn loadContentAsync(contentTarget, { version })\n\t\t\t.then(content => {\n\t\t\t\trelease();\n\t\t\t\treturn content;\n\t\t\t}, (e: Error) => {\n\t\t\t\trelease();\n\t\t\t\tthrow e;\n\t\t\t});\n\t}\n\n\t/** The images fetched into blob: URLs, which then stand for their files */\n\tprivate _fetchImagesAsync(manifest: IContentManifestEntry[], basepath: string, version: TLoaderResourceVersion | undefined, options: IAnimateContentLoaderOption, blobs: BlobLoaderResource[]): Promise<void> {\n\t\tconst targets: Record<string, string> = {};\n\t\tmanifest.forEach((entry, i) => {\n\t\t\tif (isUrl(entry.src)) {\n\t\t\t\ttargets[i] = resolveContentUrl(basepath, entry.src);\n\t\t\t}\n\t\t});\n\t\treturn new BlobLoader().loadAllAsync(targets, { version, xhr: options.xhr })\n\t\t\t.then(resources => {\n\t\t\t\tObject.keys(resources).forEach(i => {\n\t\t\t\t\tblobs.push(resources[i]);\n\t\t\t\t});\n\t\t\t\tObject.keys(resources).forEach(i => {\n\t\t\t\t\tconst resource = resources[i];\n\t\t\t\t\tif (resource.error) {\n\t\t\t\t\t\tthrow resource.error;\n\t\t\t\t\t}\n\t\t\t\t\tmanifest[Number(i)].src = resource.data;\n\t\t\t\t});\n\t\t\t});\n\t}\n}\n","import { Content, IManifestOption, ManifestBase } from '@tawaship/pixim.js';\nimport { IContent } from '@tawaship/pixi-animate-runtime';\nimport { AnimateContentLoader, AnimateContentLoaderResource, IAnimateContentLoaderTarget } from './AnimateContentLoader';\n\n/** The key of the contents in a Pixim content's resources: `$.resources.animateContents` */\nexport const ANIMATE_CONTENTS = 'animateContents';\n\nexport class AnimateContentManifest extends ManifestBase<IAnimateContentLoaderTarget, IContent | null, AnimateContentLoaderResource> {\n\tprotected _createLoader(): AnimateContentLoader {\n\t\treturn new AnimateContentLoader();\n\t}\n}\n\nContent.registerManifest(ANIMATE_CONTENTS, AnimateContentManifest);\n\n/**\n * Defines contents for a Pixim content class: each is loaded with the class's\n * other assets and given as `$.resources.animateContents[name]`.\n */\nexport function defineAnimateContentsTo(PiximContent: typeof Content, targets: Record<string, IAnimateContentLoaderTarget>, options: IManifestOption = {}): typeof Content {\n\treturn PiximContent.defineTargets(ANIMATE_CONTENTS, targets, options);\n}\n\n/**\n * Adds contents to a Pixim content instance (loaded with its other assets).\n */\nexport function addAnimateContentsTo(content: Content, targets: Record<string, IAnimateContentLoaderTarget>, options: IManifestOption = {}): Content {\n\treturn content.addTargets(ANIMATE_CONTENTS, targets, options);\n}\n"],"names":["super","const","this"],"mappings":";;;;;;;;;;;;;AAGA;;;;;;;;;;;AAWG;AACG,IAAO,gBAAiB,iBAAiB,UAAA,SAAA,EAAA;AAG9C,IAAA,SAAA,gBAAA,GAAA;AACC,QAAAA,SAAAA,CAAAA,IAAK,CAAA,KAAE;QACP,IAAI,CAAC,WAAW,GAAG,IAAI,iBAAiB,CAAC,IAAI,CAAC;;;;;;;AAC9C,IAAA,IAAA,kBAAA,GAAA,EAAA,KAAA,EAAA,EAAA,YAAA,EAAA,IAAA,EAAA,CAAA,SAAA,EAAA,EAAA,YAAA,EAAA,IAAA,EAAA,CAAA,MAAA,EAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA;;IAGD,kBAAA,CAAI,KAAA,CAAA,GAAA,GAAA,YAAK,EAAa,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA,CAAA;AACpD,IAAA,kBAAA,CAAI,KAAA,CAAA,GAAA,GAAA,UAAM,KAAa,EAAA,EAAI,IAAI,CAAC,WAAW,CAAC,KAAK,GAAG,KAAK,CAAC,CAAA,CAAA;;IAG1D,kBAAA,CAAI,SAAA,CAAA,GAAA,GAAA,YAAS,EAAc,OAAO,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA,CAAA;AAC7D,IAAA,kBAAA,CAAI,SAAA,CAAA,GAAA,GAAA,UAAU,KAAc,EAAA,EAAI,IAAI,CAAC,WAAW,CAAC,SAAS,GAAG,KAAK,CAAC,CAAA,CAAA;;IAGnE,kBAAA,CAAI,MAAA,CA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