pixi-effects 0.47.4 → 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 +18 -0
- package/README.md +8 -6
- package/ai/chat-template.html +3 -3
- package/dist/Composition-PMWLJQPI.cjs +16 -0
- package/dist/{Composition-ZYRDRLYB.cjs.map → Composition-PMWLJQPI.cjs.map} +1 -1
- package/dist/Composition-ZCRJHBB5.js +7 -0
- package/dist/{Composition-HTHQ2RLF.js.map → Composition-ZCRJHBB5.js.map} +1 -1
- package/dist/Controller.cjs +3 -0
- package/dist/Controller.cjs.map +1 -1
- package/dist/Controller.d.cts +1 -1
- package/dist/Controller.d.ts +1 -1
- package/dist/Controller.js +3 -0
- package/dist/Controller.js.map +1 -1
- package/dist/{Movie-sV8nJr_f.d.ts → Movie--qSYKgAQ.d.ts} +2 -2
- package/dist/{Movie-BqrAWN0g.d.cts → Movie-svZQF-9Z.d.cts} +2 -2
- package/dist/{Spans-JYCTJV4V.js → Spans-FMAVPATS.js} +4 -4
- package/dist/{Spans-JYCTJV4V.js.map → Spans-FMAVPATS.js.map} +1 -1
- package/dist/{Spans-I7P7ZVZO.cjs → Spans-KTUPDFSR.cjs} +9 -9
- package/dist/{Spans-I7P7ZVZO.cjs.map → Spans-KTUPDFSR.cjs.map} +1 -1
- package/dist/{chunk-34YNRCMT.js → chunk-4PYVHLIK.js} +20 -5
- package/dist/chunk-4PYVHLIK.js.map +1 -0
- package/dist/{chunk-CJS2S5XU.cjs → chunk-ECLBZV4N.cjs} +20 -5
- package/dist/chunk-ECLBZV4N.cjs.map +1 -0
- package/dist/{chunk-NCM2WU7R.js → chunk-GX2WQV4A.js} +58 -35
- 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-AES2L75M.cjs → chunk-NGK4E536.cjs} +103 -80
- package/dist/chunk-NGK4E536.cjs.map +1 -0
- package/dist/{chunk-DS2EWRV4.cjs → chunk-OGLRSR6C.cjs} +63 -63
- package/dist/{chunk-DS2EWRV4.cjs.map → chunk-OGLRSR6C.cjs.map} +1 -1
- package/dist/{chunk-RTZ5MW3E.js → chunk-UI7CEUTP.js} +3 -3
- package/dist/{chunk-RTZ5MW3E.js.map → chunk-UI7CEUTP.js.map} +1 -1
- package/dist/chunk-VQXZ2NOI.cjs +56 -0
- package/dist/chunk-VQXZ2NOI.cjs.map +1 -0
- package/dist/index.cjs +38 -33
- package/dist/index.d.cts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +4 -3
- package/dist/loader.css +1 -1
- package/dist/present.cjs +4 -3
- package/dist/present.cjs.map +1 -1
- package/dist/present.d.cts +1 -1
- package/dist/present.d.ts +1 -1
- package/dist/present.js +4 -3
- package/dist/present.js.map +1 -1
- package/dist/three.cjs +5 -5
- package/dist/three.js +1 -1
- package/docs/api.md +17 -2
- package/docs/dsl.md +7 -7
- package/llms-full.txt +26 -11
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/pitfalls.md +1 -1
- package/skills/pixi-effects/template.html +6 -6
- package/dist/Composition-HTHQ2RLF.js +0 -7
- package/dist/Composition-ZYRDRLYB.cjs +0 -16
- package/dist/chunk-34YNRCMT.js.map +0 -1
- package/dist/chunk-AES2L75M.cjs.map +0 -1
- package/dist/chunk-CJS2S5XU.cjs.map +0 -1
- package/dist/chunk-NCM2WU7R.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.48.0
|
|
4
|
+
|
|
5
|
+
A page that only plays no longer loads mediabunny (about 180 KB gzipped, a third of what such a page loaded). Nothing breaks.
|
|
6
|
+
|
|
7
|
+
- **mediabunny is fetched the first time something needs it:** the first `movie.render()` (or the download button), or a movie with a `video` asset at `init`. Before, every page imported it at load, and a page whose import map had no `"mediabunny"` entry failed to load at all. Now the entry is needed only to export or for a video layer; a bundler puts it in a chunk of its own.
|
|
8
|
+
- **New: `useMediabunny(source)`** says where it comes from: the module itself, a URL to `import()`, or a function that returns the module. With nothing said, the bare name `'mediabunny'` is imported as before. When it cannot be loaded, the export rejects with a sentence that says what to add, and the next call tries again.
|
|
9
|
+
- A test film (`export-mediabunny-on-demand`) holds it: no fetch while playing, the export and the video layer fetch it, the error and the retry.
|
|
10
|
+
|
|
11
|
+
## 0.47.5
|
|
12
|
+
|
|
13
|
+
An island inside a hole no longer draws a wedge, and `init({ loudness })` is never quieter than the plain gain. Nothing breaks.
|
|
14
|
+
|
|
15
|
+
Eight more test films (playback against seek, same-`at` keyframes and `speed`, the sound in an exported file, a stroke round holes, the loudness target, two more warning families, a matte under a crossfade, what `check` leaves alone).
|
|
16
|
+
|
|
17
|
+
- **Fixed: an island inside a hole of an `evenodd` path drew a wedge of the fill inside the hole** (cutting a shape out of a hole that was already cut). The island is now neither filled nor cut nor stroked, as the docs say.
|
|
18
|
+
- **Fixed: `init({ loudness })` could leave a mix QUIETER than with no option** when a loud click carried the plain mix's loudness: limiting the click let the very quiet bed back into the loudness gate and the integrated loudness fell. The limiter result is compared with the plain gain and the plain gain is used when the limiter would be worse.
|
|
19
|
+
- **Docs, each pinned by a film:** a frame drawn while playing is the snapshot of that frame; keyframes with the same `at`; the loudness of an exported file against the mix (an mp4's sound is padded to a whole AAC frame); the stroke of a shape is centred on its outline; crossfade is not a linear mix and a composition's `alpha` goes into each child; where a wipe starts and ends; `canvas`'s build warning for `Math.random` catches only a direct call; what `check` samples (every 0.25 s) and the layout sentences; the `loudness` JSDoc and the out-of-reach note were stale.
|
|
20
|
+
|
|
3
21
|
## 0.47.4
|
|
4
22
|
|
|
5
23
|
A morph between two quads keeps its corners when one is written with a closing line, and `style.colour` points at `fill`. Nothing breaks.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pixi-effects
|
|
2
2
|
|
|
3
|
-
> **Status**: experimental — current release `0.
|
|
3
|
+
> **Status**: experimental — current release `0.48.0`. The API may still change between minor versions; see the [CHANGELOG](./CHANGELOG.md) for what each release changed.
|
|
4
4
|
|
|
5
5
|
**[Gallery →](https://yjmtmtk.github.io/pixi-effects/examples/gallery/)** · 43 pieces written as plain data by AI models · **[For AI →](https://yjmtmtk.github.io/pixi-effects/for-ai.html)** · what an AI reads and runs · **[Playground →](https://yjmtmtk.github.io/pixi-effects/examples/playground.html)** in the browser.
|
|
6
6
|
|
|
@@ -29,7 +29,7 @@ Declarative composition and video rendering for the web. After Effects-style tim
|
|
|
29
29
|
- **Built-in player UI — or your own** — a drop-in HTML5-`<video>`-style overlay controller (play, scrub, mute, volume, fullscreen, export-to-file) whose colours are one option (`theme: { accent: '#ff4d6d' }`); or build a player yourself on the movie's `<video>`-named events (`play pause ended seeking seeked volumechange error`).
|
|
30
30
|
- **MP4 / WebM / MOV export** — pick container and quality from the controller, call `movie.render()` from code, or render headless from the command line (`pixi-effects render`).
|
|
31
31
|
- **A timeline you can read and scrub** — `movie.timelineChart()` draws every layer as a bar on a time axis; `pixi-effects view` opens the page with that timeline under it, zoomable, with a playhead you can drag.
|
|
32
|
-
- **Tiny dependency surface** — only `mediabunny` (runtime) plus PixiJS (a peer dep). three.js is an *optional* peer, needed only if you import `pixi-effects/three`.
|
|
32
|
+
- **Tiny dependency surface** — only `mediabunny` (runtime) plus PixiJS (a peer dep). three.js is an *optional* peer, needed only if you import `pixi-effects/three`. mediabunny is fetched only when you export or use a video layer: a page that only plays never loads it.
|
|
33
33
|
|
|
34
34
|
## Install
|
|
35
35
|
|
|
@@ -49,8 +49,8 @@ Drop the imports into an [importmap](https://developer.mozilla.org/docs/Web/HTML
|
|
|
49
49
|
"imports": {
|
|
50
50
|
"pixi.js": "https://esm.sh/pixi.js@8.22.0?bundle-deps",
|
|
51
51
|
"mediabunny": "https://esm.sh/mediabunny",
|
|
52
|
-
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
53
|
-
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
52
|
+
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/index.js",
|
|
53
|
+
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/Controller.js"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
</script>
|
|
@@ -61,7 +61,9 @@ Drop the imports into an [importmap](https://developer.mozilla.org/docs/Web/HTML
|
|
|
61
61
|
</script>
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
The `mediabunny` line is needed only to export (the download button, `movie.render()`) or for a `video` layer; a page that only plays can leave it out and never fetches it (or call `useMediabunny(url)` instead, see [the API](docs/api.md#where-the-encoder-comes-from-usemediabunnysource)).
|
|
65
|
+
|
|
66
|
+
Load the `dist/` files **as they are** (jsDelivr's `/npm/…/dist/…`, or unpkg's `https://unpkg.com/pixi-effects@0.48.0/dist/index.js`) rather than a CDN-rebundled build such as `esm.sh/pixi-effects` or jsDelivr's `+esm`: the entries (`pixi-effects`, `…/controller`, `…/three`) share internal chunks, which only works when each file is served untouched.
|
|
65
67
|
|
|
66
68
|
> **Using three.js?** Add two more entries (`three` and `pixi-effects/three`) to this importmap — see [Adding three.js](#adding-threejs-optional) below.
|
|
67
69
|
>
|
|
@@ -78,7 +80,7 @@ Add two more entries to the importmap above: three.js itself, and the `pixi-effe
|
|
|
78
80
|
"...": "(everything from the importmap above)",
|
|
79
81
|
"three": "https://esm.sh/three@0.178.0",
|
|
80
82
|
"three/addons/": "https://cdn.jsdelivr.net/npm/three@0.178.0/examples/jsm/",
|
|
81
|
-
"pixi-effects/three": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
83
|
+
"pixi-effects/three": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/three.js"
|
|
82
84
|
}
|
|
83
85
|
}
|
|
84
86
|
</script>
|
package/ai/chat-template.html
CHANGED
|
@@ -59,9 +59,9 @@
|
|
|
59
59
|
"imports": {
|
|
60
60
|
"pixi.js": "https://cdn.jsdelivr.net/npm/pixi.js@8.22.0/dist/pixi.min.mjs",
|
|
61
61
|
"mediabunny": "https://cdn.jsdelivr.net/npm/mediabunny@1.61.3/+esm",
|
|
62
|
-
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
63
|
-
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
64
|
-
"pixi-effects/present": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
62
|
+
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/index.js",
|
|
63
|
+
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/Controller.js",
|
|
64
|
+
"pixi-effects/present": "https://cdn.jsdelivr.net/npm/pixi-effects@0.48.0/dist/present.js"
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkOGLRSR6C_cjs = require('./chunk-OGLRSR6C.cjs');
|
|
4
|
+
require('./chunk-ECLBZV4N.cjs');
|
|
5
|
+
require('./chunk-WYR2AU4W.cjs');
|
|
6
|
+
require('./chunk-NGJXVJB7.cjs');
|
|
7
|
+
require('./chunk-DOLTCXCL.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "CompositionSequence", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkOGLRSR6C_cjs.CompositionSequence; }
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=Composition-PMWLJQPI.cjs.map
|
|
16
|
+
//# sourceMappingURL=Composition-PMWLJQPI.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-PMWLJQPI.cjs"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CompositionSequence } from './chunk-UI7CEUTP.js';
|
|
2
|
+
import './chunk-4PYVHLIK.js';
|
|
3
|
+
import './chunk-JBDBICS2.js';
|
|
4
|
+
import './chunk-BFRWSV3R.js';
|
|
5
|
+
import './chunk-WGRWFQOB.js';
|
|
6
|
+
//# sourceMappingURL=Composition-ZCRJHBB5.js.map
|
|
7
|
+
//# sourceMappingURL=Composition-ZCRJHBB5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-ZCRJHBB5.js"}
|
package/dist/Controller.cjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunkVQXZ2NOI_cjs = require('./chunk-VQXZ2NOI.cjs');
|
|
3
4
|
var chunkDOLTCXCL_cjs = require('./chunk-DOLTCXCL.cjs');
|
|
4
5
|
|
|
5
6
|
// src/controller/css.ts
|
|
@@ -1098,6 +1099,8 @@ var Controller = class _Controller {
|
|
|
1098
1099
|
this.hideTimer = null;
|
|
1099
1100
|
}
|
|
1100
1101
|
this.setVisible(true);
|
|
1102
|
+
chunkVQXZ2NOI_cjs.loadMediabunny().catch(() => {
|
|
1103
|
+
});
|
|
1101
1104
|
} else {
|
|
1102
1105
|
this.kickIdleTimer();
|
|
1103
1106
|
}
|