@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 tawaship
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,281 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tawaship/pixim-animate-runtime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Plays content made in Adobe Animate (published for HTML5 Canvas) in [Pixim.js](https://github.com/tawaship/Pixim.js)
|
|
4
|
+
applications, without CreateJS.
|
|
5
|
+
|
|
6
|
+
- **Convert once, at development time**: the command of
|
|
7
|
+
[@tawaship/pixi-animate-runtime](https://github.com/tawaship/pixi-animate-runtime) turns the files Animate
|
|
8
|
+
publishes into an optimized *runtime content* file
|
|
9
|
+
- **Load it as an asset of a Pixim content and play it in a Pixim container**: the runtime content loads with
|
|
10
|
+
the content's other assets, and plays as CreateJS would, without CreateJS and without the published files
|
|
11
|
+
- **What it brings**: the player of pixi-animate-runtime (light instance creation, even playback, checked frame
|
|
12
|
+
by frame against CreateJS), included in this package
|
|
13
|
+
|
|
14
|
+
Coming from [@tawaship/pixim-animate-container](https://github.com/tawaship/Pixim-animate-container)? It plays the
|
|
15
|
+
same content and is used the same way; see [Coming from pixim-animate-container](#coming-from-pixim-animate-container).
|
|
16
|
+
|
|
17
|
+
**Status: under development.**
|
|
18
|
+
|
|
19
|
+
API reference: https://tawaship.github.io/Pixim-animate-runtime/docs/
|
|
20
|
+
|
|
21
|
+
Samples (content published from Animate, played by this package or by CreateJS): https://tawaship.github.io/Pixim-animate-runtime/samples/
|
|
22
|
+
|
|
23
|
+
**Convert only content you trust.** Converting (with pixi-animate-runtime's command) runs the published
|
|
24
|
+
JavaScript, frame scripts included. It runs in a sandbox that is given nothing of your machine, but running code
|
|
25
|
+
is never without risk: convert content published by you or by people you trust, and treat content you receive as
|
|
26
|
+
code you would run (see [the note in its README](https://github.com/tawaship/pixi-animate-runtime#readme)).
|
|
27
|
+
|
|
28
|
+
## Quick start
|
|
29
|
+
|
|
30
|
+
The published files are needed only to convert. Your application ships the runtime content (and the images it
|
|
31
|
+
uses), not the published files. This example keeps them apart:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
my-project/
|
|
35
|
+
├─ animate/ what Animate publishes (read when converting; not shipped)
|
|
36
|
+
└─ public/ what the application ships
|
|
37
|
+
├─ animates/ the runtime content, written by the command
|
|
38
|
+
├─ lib/ PixiJS, Pixim.js and this package
|
|
39
|
+
└─ index.html
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
1. **Publish from Animate.** In Adobe Animate, publish the document for HTML5 Canvas into `animate/` (you get
|
|
43
|
+
`title.js`, `title.html` and an `images/` directory).
|
|
44
|
+
|
|
45
|
+
2. **Install.** In the project (Node.js 18 or later):
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
npm install pixi.js@5 @tawaship/pixim.js @tawaship/pixim-animate-runtime
|
|
49
|
+
npm install --save-dev @tawaship/pixi-animate-runtime
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
pixi-animate-runtime brings the command that converts (the player itself is in this package). Copy
|
|
53
|
+
`node_modules/pixi.js/dist/pixi.min.js`, `node_modules/@tawaship/pixim.js/dist/Pixim.min.js` and
|
|
54
|
+
`node_modules/@tawaship/pixim-animate-runtime/dist/pixim-animate-runtime.js` into `public/lib/` (or import them
|
|
55
|
+
with a bundler).
|
|
56
|
+
|
|
57
|
+
3. **Convert.** From the project's root:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
npx --no-install @tawaship/pixi-animate-runtime animate --out-dir public/animates
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
It lists what it will write and asks; answer `y`. This writes `public/animates/title.js` (the runtime
|
|
64
|
+
content) and copies the images it uses into `public/animates/images/`. The list shows the content's
|
|
65
|
+
**composition id**, which the next step needs.
|
|
66
|
+
|
|
67
|
+
4. **Play.** In `public/index.html`, load PixiJS, Pixim.js and this package, define the content as an asset of
|
|
68
|
+
a Pixim content, and put the symbol the published HTML showed (named after the published file, here `title`)
|
|
69
|
+
on an `AnimateContainer`:
|
|
70
|
+
|
|
71
|
+
```html
|
|
72
|
+
<script src="lib/pixi.min.js"></script>
|
|
73
|
+
<script src="lib/Pixim.min.js"></script>
|
|
74
|
+
<script src="lib/pixim-animate-runtime.js"></script>
|
|
75
|
+
<script>
|
|
76
|
+
const { defineAnimateContentsTo, AnimateContainer } = Pixim.animateRuntime;
|
|
77
|
+
|
|
78
|
+
const Game = Pixim.Content.create();
|
|
79
|
+
defineAnimateContentsTo(Game, {
|
|
80
|
+
title: { id: '<composition id>', basepath: 'animates/', filepath: 'title.js' }
|
|
81
|
+
});
|
|
82
|
+
Game.defineLibraries({
|
|
83
|
+
root: class Root extends Pixim.Container {
|
|
84
|
+
constructor($) {
|
|
85
|
+
super();
|
|
86
|
+
const container = new AnimateContainer();
|
|
87
|
+
this.addChild(container);
|
|
88
|
+
container.addCreatejs($.resources.animateContents.title.create('title'));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
const app = new Pixim.Application({ width: 550, height: 400 });
|
|
94
|
+
app.attachAsync(new Game()).then(() => app.play());
|
|
95
|
+
</script>
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
The runtime content and its images load with the Pixim content's other assets, and the content plays at the
|
|
99
|
+
frame rate it was published with.
|
|
100
|
+
|
|
101
|
+
5. **After publishing again from Animate, run step 3 again.** The player plays the runtime content, never the
|
|
102
|
+
published files: a change made in Animate shows only once the runtime content is made again.
|
|
103
|
+
|
|
104
|
+
The sections below explain [defining contents](#playing-content), the [options](#options-of-the-pixim-content)
|
|
105
|
+
of the Pixim content and the [container](#playing). Converting is explained in
|
|
106
|
+
[pixi-animate-runtime's README](https://github.com/tawaship/pixi-animate-runtime#converting-published-content).
|
|
107
|
+
|
|
108
|
+
## What you need
|
|
109
|
+
|
|
110
|
+
- PixiJS 5.3 (`pixi.js` ^5.3.2) and Pixim.js 1.15 (`@tawaship/pixim.js` ^1.15.2) in your application
|
|
111
|
+
- Runtime content files, made from the published content with the command line tool of pixi-animate-runtime
|
|
112
|
+
(`npx --no-install @tawaship/pixi-animate-runtime <published directory>`)
|
|
113
|
+
|
|
114
|
+
## Supported versions
|
|
115
|
+
|
|
116
|
+
- Content published by **Adobe Animate 24.0.15** for HTML5 Canvas. What this package reads is the form of the published
|
|
117
|
+
JavaScript, which depends on the version of Animate; content published by other versions has not been checked
|
|
118
|
+
- PixiJS 5.3 (`pixi.js` ^5.3.2). Checked with 5.3.9
|
|
119
|
+
- Pixim.js 1.15 (`@tawaship/pixim.js` ^1.15.2). Checked with 1.15.2
|
|
120
|
+
|
|
121
|
+
## Playing content
|
|
122
|
+
|
|
123
|
+
Load this package after Pixi.js and Pixim.js. It includes the player: do not load pixi-animate-runtime as well.
|
|
124
|
+
What the player does (the objects and their PixiJS nodes, what is supported, the current limits) is as described in
|
|
125
|
+
[pixi-animate-runtime's README](https://github.com/tawaship/pixi-animate-runtime#readme).
|
|
126
|
+
|
|
127
|
+
```html
|
|
128
|
+
<script src="pixi.js"></script>
|
|
129
|
+
<script src="Pixim.js"></script>
|
|
130
|
+
<script src="pixim-animate-runtime.js"></script>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Define the contents a Pixim content uses, by name, and take them from `$.resources.animateContents` in its
|
|
134
|
+
classes:
|
|
135
|
+
|
|
136
|
+
```js
|
|
137
|
+
const { defineAnimateContentsTo, AnimateContainer } = Pixim.animateRuntime;
|
|
138
|
+
|
|
139
|
+
const Game = Pixim.Content.create();
|
|
140
|
+
|
|
141
|
+
defineAnimateContentsTo(Game, {
|
|
142
|
+
title: { id: '2FA8E0C7230941478CE2CA3DB82DBEDF', basepath: 'assets/animates/', filepath: 'title.js' }
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
class Root extends Pixim.Container {
|
|
146
|
+
constructor($) {
|
|
147
|
+
super();
|
|
148
|
+
const content = $.resources.animateContents.title;
|
|
149
|
+
const container = new AnimateContainer();
|
|
150
|
+
this.addChild(container);
|
|
151
|
+
container.addCreatejs(content.create('title')); // the symbol the published HTML used as its root
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
Game.defineLibraries({ root: Root });
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
When the application attaches the content, the runtime content file and the content's images are loaded with
|
|
159
|
+
the content's other assets, and the `title` symbol plays at the frame rate it was published with while the
|
|
160
|
+
container is on the display tree.
|
|
161
|
+
|
|
162
|
+
- `id` is the composition id (the command line tool prints it, and it is written at the top of the runtime
|
|
163
|
+
content file)
|
|
164
|
+
- `basepath` is the directory the runtime content file and the content's images are in, relative to the base
|
|
165
|
+
path of the Pixim content (its `basepath` option)
|
|
166
|
+
- `filepath` is the runtime content file, relative to `basepath`. Without it, the file has to be loaded
|
|
167
|
+
already (by a script tag, for example)
|
|
168
|
+
- `options` takes what pixi-animate-runtime's `loadContentAsync` takes: `crossOrigin: false` loads the images
|
|
169
|
+
without CORS, and `handleManifest(manifest)` is called with the content's images (`{ id, src }`) before they are
|
|
170
|
+
loaded, so that their `src` can be changed for this load (to a `data:` URL, for example)
|
|
171
|
+
- `defineAnimateContentsTo(Game, targets, { unrequired: true })` gives `null` for a content that could not be
|
|
172
|
+
loaded instead of failing the whole Pixim content. `addAnimateContentsTo(game, targets)` adds contents to
|
|
173
|
+
one instance of a Pixim content
|
|
174
|
+
|
|
175
|
+
What `$.resources.animateContents.title` holds is the content as pixi-animate-runtime's `loadContentAsync`
|
|
176
|
+
gives it: `id`, `lib`, `properties` and `create(id)`.
|
|
177
|
+
|
|
178
|
+
### Options of the Pixim content
|
|
179
|
+
|
|
180
|
+
The options a Pixim content is created with apply as they do to its other assets:
|
|
181
|
+
|
|
182
|
+
```js
|
|
183
|
+
new Game({
|
|
184
|
+
basepath: 'https://example.com/',
|
|
185
|
+
version: 12,
|
|
186
|
+
xhr: { requestOptions: { credentials: 'include' } },
|
|
187
|
+
typeOptions: { animateContents: { fileVersion: 3, assetVersion: 5 } }
|
|
188
|
+
});
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
- `version` adds `_fv=<version>` to the URLs of the runtime content files and the images (the query Animate
|
|
192
|
+
adds to each image path on every publish stays). `fileVersion` and `assetVersion` under
|
|
193
|
+
`typeOptions.animateContents` set it for the files and for the images separately
|
|
194
|
+
- With `xhr`, the runtime content files and the images are fetched with its request options. The images are
|
|
195
|
+
fetched after the target's `handleManifest` is called, so an image it gives a `data:` URL is not fetched
|
|
196
|
+
|
|
197
|
+
### Playing
|
|
198
|
+
|
|
199
|
+
`AnimateContainer` is a Pixim container. While it is on the display tree of a running application, every
|
|
200
|
+
frame of the application plays the roots put on it with `addCreatejs`, at their content's frame rate.
|
|
201
|
+
|
|
202
|
+
- `taskEnabled = false` stops playing; the container's `task` is free for your own use (clearing it does not
|
|
203
|
+
stop playing)
|
|
204
|
+
- `speed` changes the playback speed (`1` is the published frame rate, `0` stops; a value below `0` stops it as `0`
|
|
205
|
+
does). `overSpeed = false` plays at
|
|
206
|
+
most one frame per frame of the application
|
|
207
|
+
- `smooth` (`true` by default) keeps the playing even when the time between frames of the application varies a
|
|
208
|
+
little, while keeping to the real time, as described for pixi-animate-runtime. `false` plays by the time of
|
|
209
|
+
each frame as it is
|
|
210
|
+
- `removeCreatejs(instance)` takes an instance off; a movie clip put on again starts from its first frame
|
|
211
|
+
|
|
212
|
+
Everything pixi-animate-runtime exports is in `Pixim.animateRuntime` too (`loadContentAsync`, `tick`, the
|
|
213
|
+
CreateJS-compatible classes, `VERSION` and so on), except that `AnimateContainer` is the Pixim container.
|
|
214
|
+
With a bundler, import from `@tawaship/pixim-animate-runtime`.
|
|
215
|
+
|
|
216
|
+
## Coming from pixim-animate-container
|
|
217
|
+
|
|
218
|
+
pixim-animate-container loads CreateJS and the published JavaScript as assets of a Pixim content and runs them
|
|
219
|
+
in the browser. This package loads runtime content files instead, generated from the published JavaScript at
|
|
220
|
+
development time: CreateJS is not loaded, and after publishing again from Animate the runtime content has to
|
|
221
|
+
be generated again. How the content is played otherwise changes as described for pixi-animate-runtime
|
|
222
|
+
(see its README).
|
|
223
|
+
|
|
224
|
+
Contents are defined and used the same way, under new names:
|
|
225
|
+
|
|
226
|
+
| pixim-animate-container | pixim-animate-runtime |
|
|
227
|
+
|---|---|
|
|
228
|
+
| A `<script>` tag for CreateJS | None |
|
|
229
|
+
| `Pixim.animate` | `Pixim.animateRuntime` |
|
|
230
|
+
| `defineAnimatesTo(Game, { name: { id, basepath, filepath } })`, `filepath` being the published `.js` | `defineAnimateContentsTo(Game, { name: { id, basepath, filepath } })`, `filepath` being the runtime content file |
|
|
231
|
+
| `addAnimatesTo` | `addAnimateContentsTo` |
|
|
232
|
+
| `$.resources.animates.name`, the `lib` of the content | `$.resources.animateContents.name`, the content (its classes are in `content.lib`) |
|
|
233
|
+
| `new $.resources.animates.name.game()` | `$.resources.animateContents.name.create('game')` |
|
|
234
|
+
| `Pixim.animate.Container` | `AnimateContainer` |
|
|
235
|
+
| `createjsSpeed` | `speed` |
|
|
236
|
+
| `createjsOverSpeed` | `overSpeed` |
|
|
237
|
+
| (none) | `smooth` (on by default; `false` plays as pixim-animate-container does) |
|
|
238
|
+
|
|
239
|
+
Not available: `replaceInstance()` on movie clips and `replaceTexture()` on sprites and bitmaps, besides what
|
|
240
|
+
pixi-animate-runtime does not have.
|
|
241
|
+
|
|
242
|
+
## Claude Code skills
|
|
243
|
+
|
|
244
|
+
The package comes with skills for Claude Code (Anthropic's AI coding tool) in `dist-skills/`: `pixim-animate-runtime-guide`, which tells it how to load and play runtime content in Pixim.js, and the skills of the packages it builds on (`pixi-animate-runtime-guide`, `animate-data-converter-guide`). To
|
|
245
|
+
let Claude Code use them in your project, copy them into the project's `.claude/skills/`:
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
mkdir -p .claude/skills
|
|
249
|
+
cp -r node_modules/@tawaship/pixim-animate-runtime/dist-skills/* .claude/skills/
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Copy them again after updating the package. Each skill names the versions it was written for; with another
|
|
253
|
+
version, it tells Claude Code to follow the type definitions in `node_modules` where they disagree.
|
|
254
|
+
|
|
255
|
+
## How correctness is checked
|
|
256
|
+
|
|
257
|
+
This package was developed with Claude (Anthropic's AI assistant). Its correctness rests on testing rather
|
|
258
|
+
than on trust in the author: it is run with Pixim.js, and what it loads (URLs, versions, request options,
|
|
259
|
+
images fetched into blob: URLs and released) and how its container plays (frame by frame, against the player
|
|
260
|
+
of pixi-animate-runtime given the same frame times) are compared with what is expected. Known faults are put
|
|
261
|
+
into the package on purpose to confirm that the comparison notices them.
|
|
262
|
+
|
|
263
|
+
## Change log
|
|
264
|
+
|
|
265
|
+
### 0.1.1
|
|
266
|
+
|
|
267
|
+
- A `speed` below `0` stops the playing as `0` does, and it goes on at once when the speed is above `0` again
|
|
268
|
+
- Built with pixi-animate-runtime 0.1.1: right after a goto made outside the playing (from a pointer event, for
|
|
269
|
+
example), synched and single frame clips, and clips coming back on the display list, are drawn as CreateJS shows
|
|
270
|
+
them from the first draw after the goto, not at their old frame until the content plays its next frame
|
|
271
|
+
|
|
272
|
+
### 0.1.0
|
|
273
|
+
|
|
274
|
+
- First release: loads runtime content as an asset of a Pixim content (`defineAnimateContentsTo`, `addAnimateContentsTo`,
|
|
275
|
+
with the Pixim content's `version` and `xhr`) and plays it in a Pixim container (`AnimateContainer`, with `speed`,
|
|
276
|
+
`overSpeed` and `smooth`)
|
|
277
|
+
- Claude Code skills in `dist-skills/`, published with the package
|
|
278
|
+
|
|
279
|
+
## License
|
|
280
|
+
|
|
281
|
+
MIT
|
|
@@ -0,0 +1,236 @@
|
|
|
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
|
+
'use strict';
|
|
11
|
+
|
|
12
|
+
var pixiAnimateRuntime = require('@tawaship/pixi-animate-runtime');
|
|
13
|
+
var pixim_js = require('@tawaship/pixim.js');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A Pixim container that plays the content roots put on it at their
|
|
17
|
+
* content's frame rate (the rate the content was published with), while it is
|
|
18
|
+
* on the display tree of a running Pixim application.
|
|
19
|
+
*
|
|
20
|
+
* Each frame of the application plays `delta x speed x fps / 60` frames of every
|
|
21
|
+
* root (delta being the application ticker's), one frame being createjs's tick
|
|
22
|
+
* phase followed by its resolve phase; the first frame after a root is put on
|
|
23
|
+
* only settles it on its first frame. Playing stops while `taskEnabled` is
|
|
24
|
+
* false. The container's own `task` is free for the application: what it holds
|
|
25
|
+
* does not change the playing.
|
|
26
|
+
*/
|
|
27
|
+
var AnimateContainer = /*@__PURE__*/(function (Container) {
|
|
28
|
+
function AnimateContainer() {
|
|
29
|
+
Container.call(this);
|
|
30
|
+
this._controller = new pixiAnimateRuntime.AnimateController(this);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if ( Container ) AnimateContainer.__proto__ = Container;
|
|
34
|
+
AnimateContainer.prototype = Object.create( Container && Container.prototype );
|
|
35
|
+
AnimateContainer.prototype.constructor = AnimateContainer;
|
|
36
|
+
|
|
37
|
+
var prototypeAccessors = { speed: { configurable: true },overSpeed: { configurable: true },smooth: { configurable: true } };
|
|
38
|
+
/** Playback speed (1 is the content's own frame rate, 0 stops; a value below 0 is taken as 0) */
|
|
39
|
+
prototypeAccessors.speed.get = function () { return this._controller.speed; };
|
|
40
|
+
prototypeAccessors.speed.set = function (value) { this._controller.speed = value; };
|
|
41
|
+
/** Whether one frame of the application may play more than one frame of a root (when the display runs slower than the content) */
|
|
42
|
+
prototypeAccessors.overSpeed.get = function () { return this._controller.overSpeed; };
|
|
43
|
+
prototypeAccessors.overSpeed.set = function (value) { this._controller.overSpeed = value; };
|
|
44
|
+
/** Whether frames are played by a steady clock, so that small changes of the delta do not make the playing uneven */
|
|
45
|
+
prototypeAccessors.smooth.get = function () { return this._controller.smooth; };
|
|
46
|
+
prototypeAccessors.smooth.set = function (value) { this._controller.smooth = value; };
|
|
47
|
+
AnimateContainer.prototype.updateTask = function updateTask (e) {
|
|
48
|
+
Container.prototype.updateTask.call(this, e);
|
|
49
|
+
if (!this.taskEnabled) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this._controller.handleTick(e.delta);
|
|
53
|
+
};
|
|
54
|
+
/** Plays the roots by hand, as one frame of the application with this delta does */
|
|
55
|
+
AnimateContainer.prototype.handleTick = function handleTick (delta) {
|
|
56
|
+
this._controller.handleTick(delta);
|
|
57
|
+
};
|
|
58
|
+
/** Puts a content object on this container; a MovieClip plays from then on */
|
|
59
|
+
AnimateContainer.prototype.addCreatejs = function addCreatejs (obj) {
|
|
60
|
+
return this._controller.addCreatejs(obj);
|
|
61
|
+
};
|
|
62
|
+
AnimateContainer.prototype.addCreatejsAt = function addCreatejsAt (obj, index) {
|
|
63
|
+
return this._controller.addCreatejsAt(obj, index);
|
|
64
|
+
};
|
|
65
|
+
AnimateContainer.prototype.removeCreatejs = function removeCreatejs (obj) {
|
|
66
|
+
return this._controller.removeCreatejs(obj);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
Object.defineProperties( AnimateContainer.prototype, prototypeAccessors );
|
|
70
|
+
|
|
71
|
+
return AnimateContainer;
|
|
72
|
+
}(pixim_js.Container));
|
|
73
|
+
|
|
74
|
+
var AnimateContentLoaderResource = /*@__PURE__*/(function (LoaderResource) {
|
|
75
|
+
function AnimateContentLoaderResource () {
|
|
76
|
+
LoaderResource.apply(this, arguments);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if ( LoaderResource ) AnimateContentLoaderResource.__proto__ = LoaderResource;
|
|
80
|
+
AnimateContentLoaderResource.prototype = Object.create( LoaderResource && LoaderResource.prototype );
|
|
81
|
+
AnimateContentLoaderResource.prototype.constructor = AnimateContentLoaderResource;
|
|
82
|
+
|
|
83
|
+
AnimateContentLoaderResource.prototype.destroy = function destroy () {
|
|
84
|
+
this._data = null;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
return AnimateContentLoaderResource;
|
|
88
|
+
}(pixim_js.LoaderResource));
|
|
89
|
+
function isUrl(src) {
|
|
90
|
+
return src.indexOf('data:') !== 0 && src.indexOf('blob:') !== 0;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Loads a content as a Pixim asset: its runtime content file (when a filepath
|
|
94
|
+
* is given), then the content with loadContentAsync, the base path being the
|
|
95
|
+
* Pixim content's and the target's together.
|
|
96
|
+
*
|
|
97
|
+
* With the Pixim content's `xhr` option, the images are fetched (with its
|
|
98
|
+
* request options) into blob: URLs first, after the target's own
|
|
99
|
+
* handleManifest; the blob: URLs are released once the content is loaded.
|
|
100
|
+
*/
|
|
101
|
+
var AnimateContentLoader = /*@__PURE__*/(function (LoaderBase) {
|
|
102
|
+
function AnimateContentLoader () {
|
|
103
|
+
LoaderBase.apply(this, arguments);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
if ( LoaderBase ) AnimateContentLoader.__proto__ = LoaderBase;
|
|
107
|
+
AnimateContentLoader.prototype = Object.create( LoaderBase && LoaderBase.prototype );
|
|
108
|
+
AnimateContentLoader.prototype.constructor = AnimateContentLoader;
|
|
109
|
+
|
|
110
|
+
AnimateContentLoader.prototype._loadAsync = function _loadAsync (target, options) {
|
|
111
|
+
var this$1$1 = this;
|
|
112
|
+
if ( options === void 0 ) options = {};
|
|
113
|
+
|
|
114
|
+
var basepath = pixiAnimateRuntime.resolveContentUrl(options.basepath || '', target.basepath || '');
|
|
115
|
+
return this._loadFileAsync(target, basepath, options)
|
|
116
|
+
.then(function () { return this$1$1._loadContentAsync(target, basepath, options); })
|
|
117
|
+
.then(function (content) { return new AnimateContentLoaderResource(content, null); })
|
|
118
|
+
.catch(function (e) { return new AnimateContentLoaderResource(null, e); });
|
|
119
|
+
};
|
|
120
|
+
AnimateContentLoader.prototype._loadFileAsync = function _loadFileAsync (target, basepath, options) {
|
|
121
|
+
if (!target.filepath) {
|
|
122
|
+
return Promise.resolve();
|
|
123
|
+
}
|
|
124
|
+
return new pixim_js.JsLoader().loadAsync(pixiAnimateRuntime.resolveContentUrl(basepath, target.filepath), { version: options.fileVersion || options.version, xhr: options.xhr })
|
|
125
|
+
.then(function (resource) {
|
|
126
|
+
if (resource.error) {
|
|
127
|
+
throw resource.error;
|
|
128
|
+
}
|
|
129
|
+
resource.ref();
|
|
130
|
+
});
|
|
131
|
+
};
|
|
132
|
+
AnimateContentLoader.prototype._loadContentAsync = function _loadContentAsync (target, basepath, options) {
|
|
133
|
+
var this$1$1 = this;
|
|
134
|
+
|
|
135
|
+
var version = options.assetVersion || options.version;
|
|
136
|
+
var blobs = [];
|
|
137
|
+
var release = function () {
|
|
138
|
+
blobs.forEach(function (blob) { return blob.destroy(); });
|
|
139
|
+
};
|
|
140
|
+
var own = target.options && target.options.handleManifest;
|
|
141
|
+
var contentTarget = {
|
|
142
|
+
id: target.id,
|
|
143
|
+
basepath: basepath,
|
|
144
|
+
options: {
|
|
145
|
+
crossOrigin: target.options ? target.options.crossOrigin : undefined,
|
|
146
|
+
handleManifest: function (manifest) {
|
|
147
|
+
return Promise.resolve(own ? own(manifest) : undefined)
|
|
148
|
+
.then(function () { return options.xhr ? this$1$1._fetchImagesAsync(manifest, basepath, version, options, blobs) : undefined; });
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
return pixiAnimateRuntime.loadContentAsync(contentTarget, { version: version })
|
|
153
|
+
.then(function (content) {
|
|
154
|
+
release();
|
|
155
|
+
return content;
|
|
156
|
+
}, function (e) {
|
|
157
|
+
release();
|
|
158
|
+
throw e;
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
/** The images fetched into blob: URLs, which then stand for their files */
|
|
162
|
+
AnimateContentLoader.prototype._fetchImagesAsync = function _fetchImagesAsync (manifest, basepath, version, options, blobs) {
|
|
163
|
+
var targets = {};
|
|
164
|
+
manifest.forEach(function (entry, i) {
|
|
165
|
+
if (isUrl(entry.src)) {
|
|
166
|
+
targets[i] = pixiAnimateRuntime.resolveContentUrl(basepath, entry.src);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
return new pixim_js.BlobLoader().loadAllAsync(targets, { version: version, xhr: options.xhr })
|
|
170
|
+
.then(function (resources) {
|
|
171
|
+
Object.keys(resources).forEach(function (i) {
|
|
172
|
+
blobs.push(resources[i]);
|
|
173
|
+
});
|
|
174
|
+
Object.keys(resources).forEach(function (i) {
|
|
175
|
+
var resource = resources[i];
|
|
176
|
+
if (resource.error) {
|
|
177
|
+
throw resource.error;
|
|
178
|
+
}
|
|
179
|
+
manifest[Number(i)].src = resource.data;
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
return AnimateContentLoader;
|
|
185
|
+
}(pixim_js.LoaderBase));
|
|
186
|
+
|
|
187
|
+
/** The key of the contents in a Pixim content's resources: `$.resources.animateContents` */
|
|
188
|
+
var ANIMATE_CONTENTS = 'animateContents';
|
|
189
|
+
var AnimateContentManifest = /*@__PURE__*/(function (ManifestBase) {
|
|
190
|
+
function AnimateContentManifest () {
|
|
191
|
+
ManifestBase.apply(this, arguments);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
if ( ManifestBase ) AnimateContentManifest.__proto__ = ManifestBase;
|
|
195
|
+
AnimateContentManifest.prototype = Object.create( ManifestBase && ManifestBase.prototype );
|
|
196
|
+
AnimateContentManifest.prototype.constructor = AnimateContentManifest;
|
|
197
|
+
|
|
198
|
+
AnimateContentManifest.prototype._createLoader = function _createLoader () {
|
|
199
|
+
return new AnimateContentLoader();
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
return AnimateContentManifest;
|
|
203
|
+
}(pixim_js.ManifestBase));
|
|
204
|
+
pixim_js.Content.registerManifest(ANIMATE_CONTENTS, AnimateContentManifest);
|
|
205
|
+
/**
|
|
206
|
+
* Defines contents for a Pixim content class: each is loaded with the class's
|
|
207
|
+
* other assets and given as `$.resources.animateContents[name]`.
|
|
208
|
+
*/
|
|
209
|
+
function defineAnimateContentsTo(PiximContent, targets, options) {
|
|
210
|
+
if ( options === void 0 ) options = {};
|
|
211
|
+
|
|
212
|
+
return PiximContent.defineTargets(ANIMATE_CONTENTS, targets, options);
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Adds contents to a Pixim content instance (loaded with its other assets).
|
|
216
|
+
*/
|
|
217
|
+
function addAnimateContentsTo(content, targets, options) {
|
|
218
|
+
if ( options === void 0 ) options = {};
|
|
219
|
+
|
|
220
|
+
return content.addTargets(ANIMATE_CONTENTS, targets, options);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
exports.ANIMATE_CONTENTS = ANIMATE_CONTENTS;
|
|
224
|
+
exports.AnimateContainer = AnimateContainer;
|
|
225
|
+
exports.AnimateContentLoader = AnimateContentLoader;
|
|
226
|
+
exports.AnimateContentLoaderResource = AnimateContentLoaderResource;
|
|
227
|
+
exports.AnimateContentManifest = AnimateContentManifest;
|
|
228
|
+
exports.addAnimateContentsTo = addAnimateContentsTo;
|
|
229
|
+
exports.defineAnimateContentsTo = defineAnimateContentsTo;
|
|
230
|
+
Object.keys(pixiAnimateRuntime).forEach(function (k) {
|
|
231
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
232
|
+
enumerable: true,
|
|
233
|
+
get: function () { return pixiAnimateRuntime[k]; }
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
//# sourceMappingURL=pixim-animate-runtime.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pixim-animate-runtime.cjs.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","AnimateController","Container","LoaderResource","const","resolveContentUrl","this","JsLoader","loadContentAsync","BlobLoader","LoaderBase","ManifestBase","Content"],"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,IAAIC,oCAAiB,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,CAAA,GAAA,GAAA,YAAM,EAAc,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA,CAAA;AACvD,IAAA,kBAAA,CAAI,MA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