pixi-effects 0.26.3 → 0.27.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/CHANGELOG.md +24 -0
- package/README.md +12 -10
- package/ai/CHAT.md +1 -1
- package/ai/chat-template.html +4 -6
- package/dist/{Base-CpdDs4HT.d.ts → Base-CKGl6jCo.d.ts} +2 -4
- package/dist/{Base-TbBhHPrG.d.cts → Base-DjhdL8B1.d.cts} +2 -4
- package/dist/Composition-BJVY5HP7.js +7 -0
- package/dist/{Composition-3O7L2VL5.js.map → Composition-BJVY5HP7.js.map} +1 -1
- package/dist/Composition-YW2G6EXL.cjs +16 -0
- package/dist/{Composition-EE3KEE2L.cjs.map → Composition-YW2G6EXL.cjs.map} +1 -1
- package/dist/Controller.d.cts +2 -3
- package/dist/Controller.d.ts +2 -3
- package/dist/{Movie-BkP82KXS.d.ts → Movie-CbYwTs6U.d.cts} +2 -3
- package/dist/{Movie-BWLLWRRe.d.cts → Movie-ILKq2fw_.d.ts} +2 -3
- package/dist/Presenter.d.cts +2 -3
- package/dist/Presenter.d.ts +2 -3
- package/dist/{blendModes-YV43K6E7.cjs → blendModes-HDOP6R7T.cjs} +5 -5
- package/dist/{blendModes-YV43K6E7.cjs.map → blendModes-HDOP6R7T.cjs.map} +1 -1
- package/dist/{blendModes-G3NOAU3T.js → blendModes-PAVTW3BO.js} +4 -4
- package/dist/{blendModes-G3NOAU3T.js.map → blendModes-PAVTW3BO.js.map} +1 -1
- package/dist/{chunk-TLYTYBWX.js → chunk-45QKLD6M.js} +9 -11
- package/dist/chunk-45QKLD6M.js.map +1 -0
- package/dist/{chunk-WMMZDPWK.js → chunk-AR3HVHKF.js} +7 -11
- package/dist/chunk-AR3HVHKF.js.map +1 -0
- package/dist/{chunk-A225HYSY.cjs → chunk-ETKTRQL2.cjs} +970 -258
- package/dist/chunk-ETKTRQL2.cjs.map +1 -0
- package/dist/{chunk-3DLYAPK7.cjs → chunk-P4GY3Z4G.cjs} +5 -5
- package/dist/{chunk-3DLYAPK7.cjs.map → chunk-P4GY3Z4G.cjs.map} +1 -1
- package/dist/{chunk-AXZUKNXF.js → chunk-TYWFKCPY.js} +4 -4
- package/dist/{chunk-AXZUKNXF.js.map → chunk-TYWFKCPY.js.map} +1 -1
- package/dist/{chunk-IIDBEYQH.cjs → chunk-VH5R473P.cjs} +91 -95
- package/dist/chunk-VH5R473P.cjs.map +1 -0
- package/dist/{chunk-FXAHNPBP.js → chunk-X42BGR6P.js} +950 -241
- package/dist/chunk-X42BGR6P.js.map +1 -0
- package/dist/{chunk-ECA2WNRX.cjs → chunk-ZMAD3KJU.cjs} +9 -11
- package/dist/chunk-ZMAD3KJU.cjs.map +1 -0
- package/dist/index.cjs +102 -105
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -14
- package/dist/index.d.ts +16 -14
- package/dist/index.js +48 -33
- package/dist/index.js.map +1 -1
- package/dist/loader.css +1 -1
- package/dist/{music-3O5MDQXY.js → music-JVRNXHQ5.js} +34 -7
- package/dist/music-JVRNXHQ5.js.map +1 -0
- package/dist/{music-4O367SPR.cjs → music-YPUZTWTN.cjs} +34 -6
- package/dist/music-YPUZTWTN.cjs.map +1 -0
- package/dist/three.cjs +6 -6
- package/dist/three.d.cts +2 -3
- package/dist/three.d.ts +2 -3
- package/dist/three.js +2 -2
- package/dist/{types-DSGwN5w1.d.cts → types-BNVsBBZf.d.cts} +130 -3
- package/dist/{types-DSGwN5w1.d.ts → types-BNVsBBZf.d.ts} +130 -3
- package/docs/api.md +5 -1
- package/docs/dsl.md +13 -15
- package/llms-full.txt +24 -22
- package/llms.txt +1 -1
- package/package.json +4 -5
- package/skills/pixi-effects/SKILL.md +1 -1
- package/skills/pixi-effects/reference/cheatsheet.md +1 -1
- package/skills/pixi-effects/reference/pitfalls.md +3 -3
- package/skills/pixi-effects/reference/recipes.md +1 -1
- package/skills/pixi-effects/template.html +6 -8
- package/dist/Composition-3O7L2VL5.js +0 -7
- package/dist/Composition-EE3KEE2L.cjs +0 -16
- package/dist/chunk-A225HYSY.cjs.map +0 -1
- package/dist/chunk-ECA2WNRX.cjs.map +0 -1
- package/dist/chunk-FXAHNPBP.js.map +0 -1
- package/dist/chunk-IIDBEYQH.cjs.map +0 -1
- package/dist/chunk-TLYTYBWX.js.map +0 -1
- package/dist/chunk-WMMZDPWK.js.map +0 -1
- package/dist/music-3O5MDQXY.js.map +0 -1
- package/dist/music-4O367SPR.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.27.1
|
|
4
|
+
|
|
5
|
+
**Fixed**
|
|
6
|
+
|
|
7
|
+
- **The load of a long movie no longer freezes the page, and the loading number moves through the sound.** The music was made in one piece (4.4 s of blocked page for the 81-second reel); it is now made in slices that hand control back every 50 ms (`renderMusicAsync`; the samples are the same ones as `renderMusic`'s, a test compares them), and the sound stage reports how far it is (the number used to sit at 75 % until the end). On the landing page the reel's loading line says the stage and the percentage, with a bar.
|
|
8
|
+
- **The landing page's "A real piece, live" plays in front of its poster** (the poster stayed on top of the frame, with the piece playing behind it).
|
|
9
|
+
- **Gallery: Matchday Graphics' two team panels meet on the seam** (a wedge of blue showed to the left of the gold blade).
|
|
10
|
+
|
|
11
|
+
## 0.27.0
|
|
12
|
+
|
|
13
|
+
**Changed (breaking)**
|
|
14
|
+
|
|
15
|
+
- **The library no longer uses GSAP.** The timeline is the library's own (`src/core/pure/`): a value at a time is computed from the script and the time alone, never from the way the playhead came to it, so scrubbing, looping, reverse play and export all give the same picture at the same time. `gsap` leaves the peer dependencies (`npm install pixi-effects pixi.js`), and every page loses the `gsap` and `gsap/PixiPlugin` lines of its import map (a page that still has them works; nothing imports them). Measured against the GSAP build on 92 pages by frame hash: 77 identical, 9 within 3/255, and the rest explained (four pages use `expo`, whose formula differs between GSAP 3.12 and 3.15; one page is not reproducible even with GSAP). The timeline itself is 1.3 to 11 times faster per frame and 25 KB (gzip) lighter for a page; a whole frame is dominated by drawing and changes by 1 to 15 %.
|
|
16
|
+
- **`expo` is GSAP 3.15's curve** (`2^(10(p-1))·p + p^6(1-p)`, which lands exactly on 1): up to 0.78 % of the range away from 3.12's, so a page made with 3.12 moves a little.
|
|
17
|
+
- **Where GSAP answered by the way the playhead came, the answer is now the script's**: overlapping tweens on one property (the one that started last wins), two items with the same start, a `set` where a tween ends (GSAP could lose it), a `from` after another segment (it ends where that segment ended).
|
|
18
|
+
- **`blur`, `blurX`, `blurY`, `blurPadding`, `colorize`, `colorizeAmount`, `colorMatrixFilter`, `lineColor`, `lineAlpha` are no longer keys** (they were GSAP PixiPlugin shorthands for a filter on the layer): the lint says so with the likely name; use a named filter and animate `filters.<name>.<prop>`. `scale`, `anchor`, `pivot`, `skew` (degrees), `rotation` (degrees), `position`, `tilePosition`, `tileScale`, `tint` and `autoAlpha` stay.
|
|
19
|
+
- `ease` names are the familiar ones (`power1…4`, `sine`, `expo`, `circ`, `back`, `elastic`, `bounce`, `steps(n)`, `spring…`, `cubic-bezier(…)`); a name nobody knows still warns and runs as `power1.out`. `delay` in a keyframe's vars moves its start; `onStart`, `onComplete`, `onRepeat` and `onReverseComplete` are said once and ignored.
|
|
20
|
+
- `movie.timeline` is the library's `Timeline` (`time(t)`, `duration()`, `segments()`), not a GSAP timeline.
|
|
21
|
+
|
|
22
|
+
**Added**
|
|
23
|
+
|
|
24
|
+
- `ease(name)` is exported: the function behind an ease name.
|
|
25
|
+
- Colour strings that Pixi can read (names, `hsl()`, `oklch()`) interpolate in `'rgb'` colour space as rgba.
|
|
26
|
+
|
|
3
27
|
## 0.26.3
|
|
4
28
|
|
|
5
29
|
**Added**
|
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.27.1`. The API may still change between minor versions; see the [CHANGELOG](./CHANGELOG.md) for what each release changed.
|
|
4
4
|
|
|
5
5
|
**[Guide →](https://yjmtmtk.github.io/pixi-effects/guide/)** · **[Gallery →](https://yjmtmtk.github.io/pixi-effects/examples/gallery/)** · 50 portfolio pieces written as plain data by AI models · **[Examples →](https://yjmtmtk.github.io/pixi-effects/examples/)** · 15 numbered examples, a music lab + an in-browser playground.
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ Give any AI (ChatGPT, Claude, Codex, Cursor, Claude Code …) one sentence:
|
|
|
12
12
|
|
|
13
13
|
That is all it needs. **To register it as a skill** in your agent (Claude Code, Codex, Cursor, Gemini CLI, Copilot, OpenCode, …): `npx skills add yjmtmtk/pixi-effects` (update with `npx skills update`). In Claude Code you can also run `/plugin install pixi-effects --marketplace yjmtmtk/pixi-effects`. **If you are the AI** that was asked to do this, do not read the whole repository: if you can run commands (a shell, Node 22, Chrome), read [`AGENTS.md`](./AGENTS.md) and [`skills/pixi-effects/SKILL.md`](./skills/pixi-effects/SKILL.md); if you can only write text (a browser chat), fetch https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/CHAT.md and follow it. You will write the video as plain data in one HTML file, check it (the check tool writes a contact sheet to look at), and hand it over; the person opens the file and downloads the MP4 with the button in the player bar.
|
|
14
14
|
|
|
15
|
-
Declarative composition and video rendering for the web. After Effects-style timelines on top of [PixiJS v8](https://pixijs.com/) and [GSAP](https://gsap.com/), with
|
|
15
|
+
Declarative composition and video rendering for the web. After Effects-style timelines on top of [PixiJS v8](https://pixijs.com/), with a small timeline of its own and strict TypeScript types. The ease names and the way `to` / `from` / `set` read are [GSAP](https://gsap.com/)'s, with thanks. Render to MP4 / WebM / MOV via [mediabunny](https://mediabunny.dev/).
|
|
16
16
|
|
|
17
17
|
- **Declarative DSL** — describe your composition as a tree of typed sequences (text, image, video, audio, shapes, nested compositions). No imperative tween code.
|
|
18
18
|
- **Sound effects without files** — `{ type: 'audio', sfx: 'swoosh', at: 2 }`: 11 synthesised presets (click, pop, swoosh, riser, hit, chime …) with `pitch` / `brightness` / `seed`, or your own `voices`; deterministic and in the exported file at the same moments as in the browser; `movie.inspectAudio()` checks them as numbers.
|
|
@@ -29,12 +29,12 @@ 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
|
|
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`.
|
|
33
33
|
|
|
34
34
|
## Install
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
npm install pixi-effects pixi.js
|
|
37
|
+
npm install pixi-effects pixi.js
|
|
38
38
|
npm install three # optional — only if you import `pixi-effects/three`
|
|
39
39
|
npm install pixi-filters # optional — only if a layer uses a named filter other than blur / noise / alpha / colorMatrix
|
|
40
40
|
```
|
|
@@ -48,11 +48,9 @@ Drop the imports into an [importmap](https://developer.mozilla.org/docs/Web/HTML
|
|
|
48
48
|
{
|
|
49
49
|
"imports": {
|
|
50
50
|
"pixi.js": "https://esm.sh/pixi.js@8.22.0?bundle-deps",
|
|
51
|
-
"gsap": "https://esm.sh/gsap@3.12.5",
|
|
52
|
-
"gsap/PixiPlugin": "https://esm.sh/gsap@3.12.5/PixiPlugin",
|
|
53
51
|
"mediabunny": "https://esm.sh/mediabunny",
|
|
54
|
-
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
55
|
-
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
52
|
+
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/index.js",
|
|
53
|
+
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/Controller.js"
|
|
56
54
|
}
|
|
57
55
|
}
|
|
58
56
|
</script>
|
|
@@ -63,7 +61,7 @@ Drop the imports into an [importmap](https://developer.mozilla.org/docs/Web/HTML
|
|
|
63
61
|
</script>
|
|
64
62
|
```
|
|
65
63
|
|
|
66
|
-
Load the `dist/` files **as they are** (jsDelivr's `/npm/…/dist/…`, or unpkg's `https://unpkg.com/pixi-effects@0.
|
|
64
|
+
Load the `dist/` files **as they are** (jsDelivr's `/npm/…/dist/…`, or unpkg's `https://unpkg.com/pixi-effects@0.27.1/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.
|
|
67
65
|
|
|
68
66
|
> **Using three.js?** Add two more entries (`three` and `pixi-effects/three`) to this importmap — see [Adding three.js](#adding-threejs-optional) below.
|
|
69
67
|
>
|
|
@@ -79,7 +77,7 @@ Add two more entries to the importmap above: three.js itself, and the `pixi-effe
|
|
|
79
77
|
"imports": {
|
|
80
78
|
"...": "(everything from the importmap above)",
|
|
81
79
|
"three": "https://esm.sh/three@0.178.0",
|
|
82
|
-
"pixi-effects/three": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
80
|
+
"pixi-effects/three": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/three.js"
|
|
83
81
|
}
|
|
84
82
|
}
|
|
85
83
|
</script>
|
|
@@ -221,6 +219,10 @@ Rendering uses the [WebCodecs API](https://developer.mozilla.org/docs/Web/API/We
|
|
|
221
219
|
|
|
222
220
|
Some codecs (notably `aac` audio in older Firefox) may need the [mediabunny polyfill encoders](https://mediabunny.dev/) (`@mediabunny/aac-encoder`, etc.).
|
|
223
221
|
|
|
222
|
+
## Author
|
|
223
|
+
|
|
224
|
+
Made by [@t_yjm](https://x.com/t_yjm): release notes and small experiments are posted there. Questions, bugs and ideas are welcome as [GitHub issues](https://github.com/yjmtmtk/pixi-effects/issues).
|
|
225
|
+
|
|
224
226
|
## License
|
|
225
227
|
|
|
226
228
|
MIT — see [LICENSE](./LICENSE).
|
package/ai/CHAT.md
CHANGED
|
@@ -53,7 +53,7 @@ That is a complete, working video (the block between the two markers). Change th
|
|
|
53
53
|
- **Order.** Layers are drawn in array order: later = on top. Put the background rect first.
|
|
54
54
|
- **Units.** Pixels from the top-left; angles in **degrees**; colours `'#rrggbb'`. Any number may be an expression string: `'GW/2'`, `'GH - 80'`, `'min(GW, GH) * 0.4'`.
|
|
55
55
|
- **Anchors.** `rect`, `circle`, `ellipse` are centred on `x, y`. **Text and image are top-left**: add `anchorX: 0.5, anchorY: 0.5` to centre them. A bar that grows from its base needs `anchorY: 1`.
|
|
56
|
-
- **Animate with keyframes.** `{ at, duration, ease, to: {...} }` animates to a value, `from: {...}` from one, `from` + `to` both (a delayed fade-in needs no `initial.alpha`), `set: {...}` jumps. Eases are
|
|
56
|
+
- **Animate with keyframes.** `{ at, duration, ease, to: {...} }` animates to a value, `from: {...}` from one, `from` + `to` both (a delayed fade-in needs no `initial.alpha`), `set: {...}` jumps. Eases are the familiar names: `'power2.out'`, `'back.out(1.7)'`, `'none'`.
|
|
57
57
|
- **Draw a line on:** `trimEnd: 0` in `initial`, then a keyframe `to: { trimEnd: 1 }` (every shape except `arc`).
|
|
58
58
|
- **Shapes:** `shape: 'rect' | 'circle' | 'ellipse' | 'arc' | 'line' | 'polygon' | 'path'`. `rect`: `width height cornerRadius`; `circle`: `radius`; `line`: `from: [x, y], to: [x, y]` (canvas coordinates, no `x, y`); `path`: `d` (SVG path data). Style: `fillColor strokeColor strokeWidth fillAlpha`.
|
|
59
59
|
- **Text:** `style` is a PixiJS text style (`fontSize fontFamily fontWeight fill letterSpacing align wordWrap wordWrapWidth lineHeight`). Use fonts that exist everywhere (`Georgia, serif`, `Arial, sans-serif`, `ui-monospace, monospace`); this page loads no web fonts. Estimate a text's width at about 0.6 × `fontSize` per character, keep important text 5 % away from the edges, and keep the bottom 60 px free (the player bar covers it in the preview, not in the file).
|
package/ai/chat-template.html
CHANGED
|
@@ -54,16 +54,14 @@
|
|
|
54
54
|
window.__add = add;
|
|
55
55
|
</script>
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
<script type="importmap">
|
|
58
58
|
{
|
|
59
59
|
"imports": {
|
|
60
60
|
"pixi.js": "https://cdn.jsdelivr.net/npm/pixi.js@8.22.0/dist/pixi.min.mjs",
|
|
61
|
-
"gsap": "https://cdn.jsdelivr.net/npm/gsap@3.12.5/+esm",
|
|
62
|
-
"gsap/PixiPlugin": "https://cdn.jsdelivr.net/npm/gsap@3.12.5/PixiPlugin/+esm",
|
|
63
61
|
"mediabunny": "https://cdn.jsdelivr.net/npm/mediabunny@1.61.3/+esm",
|
|
64
|
-
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
65
|
-
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
66
|
-
"pixi-effects/presenter": "https://cdn.jsdelivr.net/npm/pixi-effects@0.
|
|
62
|
+
"pixi-effects": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/index.js",
|
|
63
|
+
"pixi-effects/controller": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/Controller.js",
|
|
64
|
+
"pixi-effects/presenter": "https://cdn.jsdelivr.net/npm/pixi-effects@0.27.1/dist/Presenter.js"
|
|
67
65
|
}
|
|
68
66
|
}
|
|
69
67
|
</script>
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Filter, Container, RenderTexture, Matrix } from 'pixi.js';
|
|
2
|
-
import { S as SequenceSpec, C as CompositionShape, a6 as AudioDescriptor } from './types-
|
|
3
|
-
import { gsap } from 'gsap';
|
|
2
|
+
import { S as SequenceSpec, C as CompositionShape, a6 as Timeline, a7 as AudioDescriptor } from './types-BNVsBBZf.js';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* Resolves a routed keyframe path to a concrete
|
|
5
|
+
* Resolves a routed keyframe path to a concrete tween target.
|
|
7
6
|
* `path` is everything after the registered prefix + dot (for
|
|
8
7
|
* `three.cube.rotation.y` under prefix `three`, path = `cube.rotation.y`).
|
|
9
8
|
* Return null to skip the key (the router is expected to have warned).
|
|
@@ -45,7 +44,6 @@ interface SpaceHost {
|
|
|
45
44
|
}): void;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
type Timeline = ReturnType<typeof gsap.timeline>;
|
|
49
47
|
declare abstract class Sequence {
|
|
50
48
|
spec: SequenceSpec;
|
|
51
49
|
parent: CompositionShape | null;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Filter, Container, RenderTexture, Matrix } from 'pixi.js';
|
|
2
|
-
import { S as SequenceSpec, C as CompositionShape, a6 as AudioDescriptor } from './types-
|
|
3
|
-
import { gsap } from 'gsap';
|
|
2
|
+
import { S as SequenceSpec, C as CompositionShape, a6 as Timeline, a7 as AudioDescriptor } from './types-BNVsBBZf.cjs';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* Resolves a routed keyframe path to a concrete
|
|
5
|
+
* Resolves a routed keyframe path to a concrete tween target.
|
|
7
6
|
* `path` is everything after the registered prefix + dot (for
|
|
8
7
|
* `three.cube.rotation.y` under prefix `three`, path = `cube.rotation.y`).
|
|
9
8
|
* Return null to skip the key (the router is expected to have warned).
|
|
@@ -45,7 +44,6 @@ interface SpaceHost {
|
|
|
45
44
|
}): void;
|
|
46
45
|
}
|
|
47
46
|
|
|
48
|
-
type Timeline = ReturnType<typeof gsap.timeline>;
|
|
49
47
|
declare abstract class Sequence {
|
|
50
48
|
spec: SequenceSpec;
|
|
51
49
|
parent: CompositionShape | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CompositionSequence } from './chunk-AR3HVHKF.js';
|
|
2
|
+
import './chunk-X42BGR6P.js';
|
|
3
|
+
import './chunk-TYWFKCPY.js';
|
|
4
|
+
import './chunk-45QKLD6M.js';
|
|
5
|
+
import './chunk-BXOCEZ4U.js';
|
|
6
|
+
//# sourceMappingURL=Composition-BJVY5HP7.js.map
|
|
7
|
+
//# sourceMappingURL=Composition-BJVY5HP7.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-BJVY5HP7.js"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkVH5R473P_cjs = require('./chunk-VH5R473P.cjs');
|
|
4
|
+
require('./chunk-ETKTRQL2.cjs');
|
|
5
|
+
require('./chunk-P4GY3Z4G.cjs');
|
|
6
|
+
require('./chunk-ZMAD3KJU.cjs');
|
|
7
|
+
require('./chunk-TWZNOUM7.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "CompositionSequence", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkVH5R473P_cjs.CompositionSequence; }
|
|
14
|
+
});
|
|
15
|
+
//# sourceMappingURL=Composition-YW2G6EXL.cjs.map
|
|
16
|
+
//# sourceMappingURL=Composition-YW2G6EXL.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-YW2G6EXL.cjs"}
|
package/dist/Controller.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { j as Movie } from './Movie-
|
|
1
|
+
import { j as Movie } from './Movie-CbYwTs6U.cjs';
|
|
2
2
|
import 'pixi.js';
|
|
3
|
-
import '
|
|
4
|
-
import './types-DSGwN5w1.cjs';
|
|
3
|
+
import './types-BNVsBBZf.cjs';
|
|
5
4
|
|
|
6
5
|
/** The bar's default stylesheet. Its colours and sizes are CSS custom properties (`--mc-accent`, `--mc-fg`, `--mc-track`, `--mc-bar-bg`, `--mc-track-height`, `--mc-font`): set them in your page CSS, or with the `theme` option. */
|
|
7
6
|
declare const CONTROLLER_CSS = "\n.movie-controller-wrap { position: relative; display: inline-block; line-height: 0; }\n.movie-controller {\n position: absolute;\n pointer-events: none;\n font-family: var(--mc-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 1;\n transition: opacity 200ms ease;\n}\n.movie-controller[data-state=\"hidden\"] { opacity: 0; }\n.movie-controller > * { pointer-events: auto; }\n\n.mc-progress {\n position: relative;\n width: 100%;\n height: 16px;\n cursor: pointer;\n display: flex;\n align-items: center;\n outline: none;\n}\n.mc-progress:focus-visible {\n outline: 2px solid var(--mc-accent, #007AFF);\n outline-offset: 2px;\n}\n.mc-progress::before {\n content: \"\"; position: absolute; left: 12px; right: 12px;\n height: var(--mc-track-height, 3px); background: var(--mc-track, rgba(255,255,255,0.25));\n transition: height 120ms ease;\n}\n.mc-progress:hover::before, .mc-progress.mc-scrubbing::before { height: calc(var(--mc-track-height, 3px) + 2px); }\n.mc-stops { position: absolute; left: 12px; right: 12px; top: 0; bottom: 0; pointer-events: none; }\n.mc-stop-tick { position: absolute; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--mc-fg, #fff); box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5); }\n.mc-stop-page { width: 11px; height: 11px; box-shadow: 0 0 0 2.5px var(--mc-accent, #007AFF), 0 0 0 4px rgba(0,0,0,0.35); }\n.mc-progress-fill {\n position: absolute; left: 12px; top: 50%;\n height: var(--mc-track-height, 3px);\n width: calc((100% - 24px) * var(--mc-fill, 0));\n background: var(--mc-accent, #007AFF);\n transform: translateY(-50%);\n transition: height 120ms ease;\n pointer-events: none;\n}\n.mc-progress:hover .mc-progress-fill,\n.mc-progress.mc-scrubbing .mc-progress-fill { height: calc(var(--mc-track-height, 3px) + 2px); }\n.mc-progress-thumb {\n position: absolute; top: 50%;\n left: calc(12px + (100% - 24px) * var(--mc-fill, 0));\n width: 12px; height: 12px; border-radius: 50%;\n background: var(--mc-accent, #007AFF);\n transform: translate(-50%, -50%) scale(0);\n transition: transform 120ms ease;\n pointer-events: none;\n}\n.mc-progress:hover .mc-progress-thumb,\n.mc-progress.mc-scrubbing .mc-progress-thumb { transform: translate(-50%, -50%) scale(1); }\n\n.mc-bar {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 12px 8px 12px;\n background: var(--mc-bar-bg, linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%));\n color: var(--mc-fg, #fff);\n line-height: 1;\n}\n.mc-btn {\n background: none; border: 0; padding: 0; margin: 0;\n width: 28px; height: 28px;\n display: inline-flex; align-items: center; justify-content: center;\n color: var(--mc-fg, #fff); opacity: 0.85; cursor: pointer;\n transition: opacity 120ms ease;\n}\n.mc-btn:hover { opacity: 1; }\n.mc-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n.mc-time {\n font-size: 12px; font-family: Menlo, Monaco, monospace;\n color: var(--mc-fg, #fff); opacity: 0.85;\n min-width: 90px;\n}\n.mc-spacer { flex: 1; }\n\n.mc-volume { display: flex; align-items: center; }\n.mc-vol-slider {\n position: relative;\n width: 0;\n height: 28px;\n display: flex;\n align-items: center;\n cursor: pointer;\n margin-left: 0;\n outline: none;\n transition: width 200ms ease, margin-left 200ms ease;\n overflow: hidden;\n}\n.mc-volume:hover .mc-vol-slider,\n.mc-volume:focus-within .mc-vol-slider,\n.mc-vol-slider.mc-scrubbing {\n width: 70px;\n margin-left: 6px;\n}\n.mc-vol-slider:focus-visible { outline: 2px solid var(--mc-accent, #007AFF); outline-offset: 2px; }\n.mc-vol-slider::before {\n content: \"\"; position: absolute; left: 4px; right: 4px;\n height: 3px; background: var(--mc-track, rgba(255,255,255,0.25)); border-radius: 2px;\n}\n.mc-vol-fill {\n position: absolute; left: 4px; top: 50%;\n height: 3px;\n width: calc((100% - 8px) * var(--mc-volume, 1));\n background: var(--mc-fg, #fff);\n transform: translateY(-50%);\n border-radius: 2px;\n pointer-events: none;\n}\n.mc-vol-thumb {\n position: absolute; top: 50%;\n left: calc(4px + (100% - 8px) * var(--mc-volume, 1));\n width: 10px; height: 10px; border-radius: 50%;\n background: var(--mc-fg, #fff);\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n[data-mc-wrap]:fullscreen {\n width: 100vw; height: 100vh;\n display: flex; align-items: center; justify-content: center;\n background: #000;\n}\n[data-mc-wrap]:fullscreen > canvas {\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n max-height: none !important;\n object-fit: contain;\n border-radius: 0;\n}\n\n.mc-settings-popover {\n position: absolute;\n bottom: calc(100% + 8px);\n right: 12px;\n background: rgba(20, 20, 20, 0.96);\n border-radius: 8px;\n padding: 10px 12px;\n min-width: 180px;\n color: #fff;\n font-size: 12px;\n box-shadow: 0 4px 16px rgba(0,0,0,0.4);\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mc-settings-popover[data-open=\"false\"] { display: none; }\n.mc-settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.mc-settings-row > span { color: rgba(255,255,255,0.85); }\n.mc-settings-row > select {\n font: inherit;\n background: rgba(255,255,255,0.1);\n color: #fff;\n border: 1px solid rgba(255,255,255,0.18);\n border-radius: 4px;\n padding: 2px 6px;\n cursor: pointer;\n}\n.mc-export-confirm {\n margin-top: 4px;\n width: 100%;\n background: var(--mc-accent, #007AFF);\n color: #fff;\n border: 0;\n border-radius: 4px;\n padding: 6px 10px;\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n transition: background 120ms ease;\n}\n.mc-export-confirm:hover { background: #0066d6; }\n.mc-export-confirm:disabled { background: rgba(255,255,255,0.18); cursor: not-allowed; }\n\n.mc-export-overlay {\n position: absolute; inset: 0;\n background: rgba(0,0,0,0.7);\n display: flex; justify-content: center; align-items: center;\n z-index: 2;\n}\n.mc-export-panel {\n background: rgba(20,20,20,0.96); color: #fff;\n border-radius: 8px; padding: 16px 20px;\n text-align: center; min-width: 200px; max-width: 80%;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n}\n.mc-export-title { font-size: 13px; margin-bottom: 10px; opacity: 0.9; }\n.mc-export-track {\n width: 100%; height: 6px;\n background: rgba(255,255,255,0.15); border-radius: 3px;\n margin-bottom: 8px; overflow: hidden;\n}\n.mc-export-fill {\n height: 100%; width: 0%;\n background: linear-gradient(90deg, var(--mc-accent, #007AFF), var(--mc-accent, #0056CC));\n transition: width 0.3s ease; border-radius: 3px;\n}\n.mc-export-text {\n color: rgba(255,255,255,0.7); font-size: 11px;\n font-family: Menlo, Monaco, monospace;\n}\n";
|
package/dist/Controller.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { j as Movie } from './Movie-
|
|
1
|
+
import { j as Movie } from './Movie-ILKq2fw_.js';
|
|
2
2
|
import 'pixi.js';
|
|
3
|
-
import '
|
|
4
|
-
import './types-DSGwN5w1.js';
|
|
3
|
+
import './types-BNVsBBZf.js';
|
|
5
4
|
|
|
6
5
|
/** The bar's default stylesheet. Its colours and sizes are CSS custom properties (`--mc-accent`, `--mc-fg`, `--mc-track`, `--mc-bar-bg`, `--mc-track-height`, `--mc-font`): set them in your page CSS, or with the `theme` option. */
|
|
7
6
|
declare const CONTROLLER_CSS = "\n.movie-controller-wrap { position: relative; display: inline-block; line-height: 0; }\n.movie-controller {\n position: absolute;\n pointer-events: none;\n font-family: var(--mc-font, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n opacity: 1;\n transition: opacity 200ms ease;\n}\n.movie-controller[data-state=\"hidden\"] { opacity: 0; }\n.movie-controller > * { pointer-events: auto; }\n\n.mc-progress {\n position: relative;\n width: 100%;\n height: 16px;\n cursor: pointer;\n display: flex;\n align-items: center;\n outline: none;\n}\n.mc-progress:focus-visible {\n outline: 2px solid var(--mc-accent, #007AFF);\n outline-offset: 2px;\n}\n.mc-progress::before {\n content: \"\"; position: absolute; left: 12px; right: 12px;\n height: var(--mc-track-height, 3px); background: var(--mc-track, rgba(255,255,255,0.25));\n transition: height 120ms ease;\n}\n.mc-progress:hover::before, .mc-progress.mc-scrubbing::before { height: calc(var(--mc-track-height, 3px) + 2px); }\n.mc-stops { position: absolute; left: 12px; right: 12px; top: 0; bottom: 0; pointer-events: none; }\n.mc-stop-tick { position: absolute; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--mc-fg, #fff); box-shadow: 0 0 0 1.5px rgba(0,0,0,0.5); }\n.mc-stop-page { width: 11px; height: 11px; box-shadow: 0 0 0 2.5px var(--mc-accent, #007AFF), 0 0 0 4px rgba(0,0,0,0.35); }\n.mc-progress-fill {\n position: absolute; left: 12px; top: 50%;\n height: var(--mc-track-height, 3px);\n width: calc((100% - 24px) * var(--mc-fill, 0));\n background: var(--mc-accent, #007AFF);\n transform: translateY(-50%);\n transition: height 120ms ease;\n pointer-events: none;\n}\n.mc-progress:hover .mc-progress-fill,\n.mc-progress.mc-scrubbing .mc-progress-fill { height: calc(var(--mc-track-height, 3px) + 2px); }\n.mc-progress-thumb {\n position: absolute; top: 50%;\n left: calc(12px + (100% - 24px) * var(--mc-fill, 0));\n width: 12px; height: 12px; border-radius: 50%;\n background: var(--mc-accent, #007AFF);\n transform: translate(-50%, -50%) scale(0);\n transition: transform 120ms ease;\n pointer-events: none;\n}\n.mc-progress:hover .mc-progress-thumb,\n.mc-progress.mc-scrubbing .mc-progress-thumb { transform: translate(-50%, -50%) scale(1); }\n\n.mc-bar {\n position: relative;\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 6px 12px 8px 12px;\n background: var(--mc-bar-bg, linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 100%));\n color: var(--mc-fg, #fff);\n line-height: 1;\n}\n.mc-btn {\n background: none; border: 0; padding: 0; margin: 0;\n width: 28px; height: 28px;\n display: inline-flex; align-items: center; justify-content: center;\n color: var(--mc-fg, #fff); opacity: 0.85; cursor: pointer;\n transition: opacity 120ms ease;\n}\n.mc-btn:hover { opacity: 1; }\n.mc-btn:disabled { opacity: 0.4; cursor: not-allowed; }\n.mc-time {\n font-size: 12px; font-family: Menlo, Monaco, monospace;\n color: var(--mc-fg, #fff); opacity: 0.85;\n min-width: 90px;\n}\n.mc-spacer { flex: 1; }\n\n.mc-volume { display: flex; align-items: center; }\n.mc-vol-slider {\n position: relative;\n width: 0;\n height: 28px;\n display: flex;\n align-items: center;\n cursor: pointer;\n margin-left: 0;\n outline: none;\n transition: width 200ms ease, margin-left 200ms ease;\n overflow: hidden;\n}\n.mc-volume:hover .mc-vol-slider,\n.mc-volume:focus-within .mc-vol-slider,\n.mc-vol-slider.mc-scrubbing {\n width: 70px;\n margin-left: 6px;\n}\n.mc-vol-slider:focus-visible { outline: 2px solid var(--mc-accent, #007AFF); outline-offset: 2px; }\n.mc-vol-slider::before {\n content: \"\"; position: absolute; left: 4px; right: 4px;\n height: 3px; background: var(--mc-track, rgba(255,255,255,0.25)); border-radius: 2px;\n}\n.mc-vol-fill {\n position: absolute; left: 4px; top: 50%;\n height: 3px;\n width: calc((100% - 8px) * var(--mc-volume, 1));\n background: var(--mc-fg, #fff);\n transform: translateY(-50%);\n border-radius: 2px;\n pointer-events: none;\n}\n.mc-vol-thumb {\n position: absolute; top: 50%;\n left: calc(4px + (100% - 8px) * var(--mc-volume, 1));\n width: 10px; height: 10px; border-radius: 50%;\n background: var(--mc-fg, #fff);\n transform: translate(-50%, -50%);\n pointer-events: none;\n}\n\n[data-mc-wrap]:fullscreen {\n width: 100vw; height: 100vh;\n display: flex; align-items: center; justify-content: center;\n background: #000;\n}\n[data-mc-wrap]:fullscreen > canvas {\n width: 100% !important;\n height: 100% !important;\n max-width: none !important;\n max-height: none !important;\n object-fit: contain;\n border-radius: 0;\n}\n\n.mc-settings-popover {\n position: absolute;\n bottom: calc(100% + 8px);\n right: 12px;\n background: rgba(20, 20, 20, 0.96);\n border-radius: 8px;\n padding: 10px 12px;\n min-width: 180px;\n color: #fff;\n font-size: 12px;\n box-shadow: 0 4px 16px rgba(0,0,0,0.4);\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mc-settings-popover[data-open=\"false\"] { display: none; }\n.mc-settings-row {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n.mc-settings-row > span { color: rgba(255,255,255,0.85); }\n.mc-settings-row > select {\n font: inherit;\n background: rgba(255,255,255,0.1);\n color: #fff;\n border: 1px solid rgba(255,255,255,0.18);\n border-radius: 4px;\n padding: 2px 6px;\n cursor: pointer;\n}\n.mc-export-confirm {\n margin-top: 4px;\n width: 100%;\n background: var(--mc-accent, #007AFF);\n color: #fff;\n border: 0;\n border-radius: 4px;\n padding: 6px 10px;\n font: inherit;\n font-weight: 600;\n cursor: pointer;\n transition: background 120ms ease;\n}\n.mc-export-confirm:hover { background: #0066d6; }\n.mc-export-confirm:disabled { background: rgba(255,255,255,0.18); cursor: not-allowed; }\n\n.mc-export-overlay {\n position: absolute; inset: 0;\n background: rgba(0,0,0,0.7);\n display: flex; justify-content: center; align-items: center;\n z-index: 2;\n}\n.mc-export-panel {\n background: rgba(20,20,20,0.96); color: #fff;\n border-radius: 8px; padding: 16px 20px;\n text-align: center; min-width: 200px; max-width: 80%;\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif;\n}\n.mc-export-title { font-size: 13px; margin-bottom: 10px; opacity: 0.9; }\n.mc-export-track {\n width: 100%; height: 6px;\n background: rgba(255,255,255,0.15); border-radius: 3px;\n margin-bottom: 8px; overflow: hidden;\n}\n.mc-export-fill {\n height: 100%; width: 0%;\n background: linear-gradient(90deg, var(--mc-accent, #007AFF), var(--mc-accent, #0056CC));\n transition: width 0.3s ease; border-radius: 3px;\n}\n.mc-export-text {\n color: rgba(255,255,255,0.7); font-size: 11px;\n font-family: Menlo, Monaco, monospace;\n}\n";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Application } from 'pixi.js';
|
|
2
|
-
import {
|
|
3
|
-
import { _ as Stop, e as AssetSpec, c as CompositionSpec } from './types-DSGwN5w1.js';
|
|
2
|
+
import { a6 as Timeline, _ as Stop, e as AssetSpec, c as CompositionSpec } from './types-BNVsBBZf.cjs';
|
|
4
3
|
|
|
5
4
|
interface AudioInspectOptions {
|
|
6
5
|
/** Width of each loudness window in seconds. Default 0.1. */
|
|
@@ -410,7 +409,7 @@ declare class Movie {
|
|
|
410
409
|
private _events;
|
|
411
410
|
private _initState;
|
|
412
411
|
app: Application | null;
|
|
413
|
-
timeline:
|
|
412
|
+
timeline: Timeline | null;
|
|
414
413
|
audioBuffer: AudioBuffer | null;
|
|
415
414
|
audioSource: AudioBufferSourceNode | null;
|
|
416
415
|
gainNode: GainNode | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Application } from 'pixi.js';
|
|
2
|
-
import {
|
|
3
|
-
import { _ as Stop, e as AssetSpec, c as CompositionSpec } from './types-DSGwN5w1.cjs';
|
|
2
|
+
import { a6 as Timeline, _ as Stop, e as AssetSpec, c as CompositionSpec } from './types-BNVsBBZf.js';
|
|
4
3
|
|
|
5
4
|
interface AudioInspectOptions {
|
|
6
5
|
/** Width of each loudness window in seconds. Default 0.1. */
|
|
@@ -410,7 +409,7 @@ declare class Movie {
|
|
|
410
409
|
private _events;
|
|
411
410
|
private _initState;
|
|
412
411
|
app: Application | null;
|
|
413
|
-
timeline:
|
|
412
|
+
timeline: Timeline | null;
|
|
414
413
|
audioBuffer: AudioBuffer | null;
|
|
415
414
|
audioSource: AudioBufferSourceNode | null;
|
|
416
415
|
gainNode: GainNode | null;
|
package/dist/Presenter.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { j as Movie } from './Movie-
|
|
1
|
+
import { j as Movie } from './Movie-CbYwTs6U.cjs';
|
|
2
2
|
import 'pixi.js';
|
|
3
|
-
import '
|
|
4
|
-
import './types-DSGwN5w1.cjs';
|
|
3
|
+
import './types-BNVsBBZf.cjs';
|
|
5
4
|
|
|
6
5
|
interface PresenterOptions {
|
|
7
6
|
canvas: HTMLCanvasElement;
|
package/dist/Presenter.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { j as Movie } from './Movie-
|
|
1
|
+
import { j as Movie } from './Movie-ILKq2fw_.js';
|
|
2
2
|
import 'pixi.js';
|
|
3
|
-
import '
|
|
4
|
-
import './types-DSGwN5w1.js';
|
|
3
|
+
import './types-BNVsBBZf.js';
|
|
5
4
|
|
|
6
5
|
interface PresenterOptions {
|
|
7
6
|
canvas: HTMLCanvasElement;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkP4GY3Z4G_cjs = require('./chunk-P4GY3Z4G.cjs');
|
|
4
|
+
require('./chunk-ZMAD3KJU.cjs');
|
|
5
5
|
require('./chunk-TWZNOUM7.cjs');
|
|
6
6
|
var pixi_js = require('pixi.js');
|
|
7
7
|
|
|
@@ -68,7 +68,7 @@ function make(name, gl, gpu) {
|
|
|
68
68
|
var OWN_MODES = [...Object.keys(SEPARABLE), ...Object.keys(NONSEP)];
|
|
69
69
|
var done = false;
|
|
70
70
|
function registerBlendModes() {
|
|
71
|
-
|
|
71
|
+
chunkP4GY3Z4G_cjs.setBlendFilterFactory(createBlendFilter);
|
|
72
72
|
if (done) return;
|
|
73
73
|
done = true;
|
|
74
74
|
for (const [name, s] of Object.entries(SEPARABLE)) {
|
|
@@ -90,5 +90,5 @@ fn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { ${s.gpu} }`);
|
|
|
90
90
|
exports.OWN_MODES = OWN_MODES;
|
|
91
91
|
exports.createBlendFilter = createBlendFilter;
|
|
92
92
|
exports.registerBlendModes = registerBlendModes;
|
|
93
|
-
//# sourceMappingURL=blendModes-
|
|
94
|
-
//# sourceMappingURL=blendModes-
|
|
93
|
+
//# sourceMappingURL=blendModes-HDOP6R7T.cjs.map
|
|
94
|
+
//# sourceMappingURL=blendModes-HDOP6R7T.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/filters/blendModes.ts"],"names":["BlendModeFilter","ExtensionType","extensions","setBlendFilterFactory"],"mappings":";;;;;;;AAaA,IAAM,SAAA,GAAiC;AAAA,EACrC,OAAA,EAAe,EAAE,EAAA,EAAI,oEAAA,EAAsE,KAAK,0EAAA,EAA2E;AAAA,EAC3K,YAAA,EAAe,EAAE,EAAA,EAAI,oEAAA,EAAsE,KAAK,0EAAA,EAA2E;AAAA,EAC3K,YAAA,EAAe;AAAA,IACb,EAAA,EAAI,oKAAA;AAAA,IACJ,GAAA,EAAK;AAAA,GACP;AAAA,EACA,aAAA,EAAe,EAAE,EAAA,EAAI,4EAAA,EAA8E,KAAK,sFAAA,EAAuF;AAAA,EAC/L,YAAA,EAAe,EAAE,EAAA,EAAI,kFAAA,EAAoF,KAAK,4FAAA,EAA6F;AAAA,EAC3M,MAAA,EAAe,EAAE,EAAA,EAAI,mBAAA,EAAqB,KAAK,mBAAA,EAAoB;AAAA,EACnE,OAAA,EAAe,EAAE,EAAA,EAAI,mBAAA,EAAqB,KAAK,mBAAA,EAAoB;AAAA,EACnE,UAAA,EAAe,EAAE,EAAA,EAAI,oBAAA,EAAsB,KAAK,oBAAA,EAAqB;AAAA,EACrE,SAAA,EAAe,EAAE,EAAA,EAAI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AM,CAAC,KAAK,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,EAAG;AACjD,IAAA,IAAA;AAAA,MAAK,IAAA;AAAA,MACH,CAAA,4BAAA,EAA+B,EAAE,EAAE,CAAA;AAAA,6FAAA,CAAA;AAAA,MACnC,CAAA,8BAAA,EAAiC,EAAE,GAAG,CAAA;AAAA,yHAAA;AAAA,KAA+H;AAAA,EACzK;AACA,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,CAAC,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAC9C,IAAA,IAAA,CAAK,IAAA,EAAM,GAAG,SAAS;AAAA,kCAAA,EAAuC,CAAA,CAAE,EAAE,CAAA,EAAA,CAAA,EAAM,CAAA,EAAG,UAAU;AAAA,yDAAA,EAA8D,CAAA,CAAE,GAAG,CAAA,EAAA,CAAI,CAAA;AAAA,EAC9J;AACF","file":"blendModes-HDOP6R7T.cjs","sourcesContent":["import { BlendModeFilter, ExtensionType, extensions } from 'pixi.js';\nimport { setBlendFilterFactory, type BlendFilterLike } from '../core/blend';\n\n/**\n * The W3C compositing blend modes as our own `BlendModeFilter`s, registered on the SAME pixi instance the movie uses (this file imports\n * 'pixi.js' like the rest of the library; `import 'pixi.js/advanced-blend-modes'` would register on its own copy of `extensions` when\n * the page maps pixi.js to an esm.sh bundle, and then nothing is registered and the layer silently draws as `normal`). It also avoids\n * what pixi 8.22's own versions get wrong: the source colour is premultiplied (a half-transparent layer was blended with its darkened\n * colour and then faded again), the backdrop's alpha is ignored, soft-light is inverted on WebGPU (`select` arguments swapped),\n * linear-light and saturation are wrong. Loaded by `Movie.init` only when a layer uses one of these (see `usesAdvancedBlend`).\n */\ntype Sep = { gl: string; gpu: string }; // a separable blend: the body of B(b, s) for one channel\n\nconst SEPARABLE: Record<string, Sep> = {\n overlay: { gl: 'return b <= 0.5 ? 2.0 * b * s : 1.0 - 2.0 * (1.0 - b) * (1.0 - s);', gpu: 'return select(1.0 - 2.0 * (1.0 - b) * (1.0 - s), 2.0 * b * s, b <= 0.5);' },\n 'hard-light': { gl: 'return s <= 0.5 ? 2.0 * b * s : 1.0 - 2.0 * (1.0 - b) * (1.0 - s);', gpu: 'return select(1.0 - 2.0 * (1.0 - b) * (1.0 - s), 2.0 * b * s, s <= 0.5);' },\n 'soft-light': {\n gl: 'if (s <= 0.5) return b - (1.0 - 2.0 * s) * b * (1.0 - b); float d = b <= 0.25 ? ((16.0 * b - 12.0) * b + 4.0) * b : sqrt(b); return b + (2.0 * s - 1.0) * (d - b);',\n gpu: 'let d = select(sqrt(b), ((16.0 * b - 12.0) * b + 4.0) * b, b <= 0.25); return select(b + (2.0 * s - 1.0) * (d - b), b - (1.0 - 2.0 * s) * b * (1.0 - b), s <= 0.5);',\n },\n 'color-dodge': { gl: 'if (b <= 0.0) return 0.0; return s >= 1.0 ? 1.0 : min(1.0, b / (1.0 - s));', gpu: 'if (b <= 0.0) { return 0.0; } return select(min(1.0, b / (1.0 - s)), 1.0, s >= 1.0);' },\n 'color-burn': { gl: 'if (b >= 1.0) return 1.0; return s <= 0.0 ? 0.0 : 1.0 - min(1.0, (1.0 - b) / s);', gpu: 'if (b >= 1.0) { return 1.0; } return select(1.0 - min(1.0, (1.0 - b) / s), 0.0, s <= 0.0);' },\n darken: { gl: 'return min(b, s);', gpu: 'return min(b, s);' },\n lighten: { gl: 'return max(b, s);', gpu: 'return max(b, s);' },\n difference: { gl: 'return abs(b - s);', gpu: 'return abs(b - s);' },\n exclusion: { gl: 'return b + s - 2.0 * b * s;', gpu: 'return b + s - 2.0 * b * s;' },\n 'linear-burn': { gl: 'return max(0.0, b + s - 1.0);', gpu: 'return max(0.0, b + s - 1.0);' },\n};\n\nconst GL_NONSEP = `\nfloat lum(vec3 c) { return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; }\nvec3 clipColor(vec3 c) { float l = lum(c); float n = min(c.r, min(c.g, c.b)); float x = max(c.r, max(c.g, c.b));\n if (n < 0.0) c = l + (c - l) * l / (l - n); if (x > 1.0) c = l + (c - l) * (1.0 - l) / (x - l); return c; }\nvec3 setLum(vec3 c, float l) { return clipColor(c + (l - lum(c))); }\nfloat sat(vec3 c) { return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); }\nvec3 setSat(vec3 c, float s) { float mx = max(c.r, max(c.g, c.b)); float mn = min(c.r, min(c.g, c.b)); return mx > mn ? (c - mn) * s / (mx - mn) : vec3(0.0); }`;\nconst GPU_NONSEP = `\nfn lum(c: vec3<f32>) -> f32 { return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; }\nfn clipColor(c0: vec3<f32>) -> vec3<f32> { var c = c0; let l = lum(c); let n = min(c.r, min(c.g, c.b)); let x = max(c.r, max(c.g, c.b));\n if (n < 0.0) { c = l + (c - l) * l / (l - n); } if (x > 1.0) { c = l + (c - l) * (1.0 - l) / (x - l); } return c; }\nfn setLum(c: vec3<f32>, l: f32) -> vec3<f32> { return clipColor(c + (l - lum(c))); }\nfn sat(c: vec3<f32>) -> f32 { return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); }\nfn setSat(c: vec3<f32>, s: f32) -> vec3<f32> { let mx = max(c.r, max(c.g, c.b)); let mn = min(c.r, min(c.g, c.b)); if (mx > mn) { return (c - vec3<f32>(mn)) * s / (mx - mn); } return vec3<f32>(0.0); }`;\nconst NONSEP: Record<string, { gl: string; gpu: string }> = {\n hue: { gl: 'return setLum(setSat(cs, sat(cb)), lum(cb));', gpu: 'return setLum(setSat(cs, sat(cb)), lum(cb));' },\n saturation: { gl: 'return setLum(setSat(cb, sat(cs)), lum(cb));', gpu: 'return setLum(setSat(cb, sat(cs)), lum(cb));' },\n color: { gl: 'return setLum(cs, lum(cb));', gpu: 'return setLum(cs, lum(cb));' },\n luminosity: { gl: 'return setLum(cb, lum(cs));', gpu: 'return setLum(cb, lum(cs));' },\n};\n\nconst GL_MAIN = `\n vec3 cs = front.a > 0.0 ? front.rgb / front.a : vec3(0.0);\n vec3 cb = back.a > 0.0 ? back.rgb / back.a : vec3(0.0);\n vec3 mixed = front.rgb * (1.0 - back.a) + front.a * back.a * blendRGB(cb, cs) + (1.0 - front.a) * back.rgb;\n finalColor = vec4(mixed, blendedAlpha) * uBlend;`;\nconst GPU_MAIN = `\n let cs = select(vec3<f32>(0.0), front.rgb / front.a, front.a > 0.0);\n let cb = select(vec3<f32>(0.0), back.rgb / back.a, back.a > 0.0);\n let mixed = front.rgb * (1.0 - back.a) + front.a * back.a * blendRGB(cb, cs) + (1.0 - front.a) * back.rgb;\n out = vec4<f32>(mixed, blendedAlpha) * blendUniforms.uBlend;`;\n\nconst CLASSES = new Map<string, new () => BlendModeFilter>();\n\n/** A fresh blend filter for a layer that has filters of its own (it goes last in the chain and reads the backdrop). */\nexport function createBlendFilter(name: string): BlendFilterLike | null {\n const C = CLASSES.get(name);\n return C ? (new C() as unknown as BlendFilterLike) : null;\n}\n\nfunction make(name: string, gl: string, gpu: string): void {\n const C = class extends BlendModeFilter {\n static extension = { name, type: ExtensionType.BlendMode };\n constructor() { super({ gl: { functions: gl, main: GL_MAIN }, gpu: { functions: gpu, main: GPU_MAIN } }); }\n };\n CLASSES.set(name, C);\n extensions.add(C as never);\n}\n\nexport const OWN_MODES: readonly string[] = [...Object.keys(SEPARABLE), ...Object.keys(NONSEP)];\n\nlet done = false;\n/** Register the blends (once per page), and give `core/blend.ts` the maker for the filter chain case. */\nexport function registerBlendModes(): void {\n setBlendFilterFactory(createBlendFilter); // every call: the registration below is once per page, the maker is cheap to hand over again\n if (done) return;\n done = true;\n for (const [name, s] of Object.entries(SEPARABLE)) {\n make(name,\n `float B(float b, float s) { ${s.gl} }\\nvec3 blendRGB(vec3 cb, vec3 cs) { return vec3(B(cb.r, cs.r), B(cb.g, cs.g), B(cb.b, cs.b)); }`,\n `fn B(b: f32, s: f32) -> f32 { ${s.gpu} }\\nfn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { return vec3<f32>(B(cb.r, cs.r), B(cb.g, cs.g), B(cb.b, cs.b)); }`);\n }\n for (const [name, s] of Object.entries(NONSEP)) {\n make(name, `${GL_NONSEP}\\nvec3 blendRGB(vec3 cb, vec3 cs) { ${s.gl} }`, `${GPU_NONSEP}\\nfn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { ${s.gpu} }`);\n }\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { setBlendFilterFactory } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
import { setBlendFilterFactory } from './chunk-TYWFKCPY.js';
|
|
2
|
+
import './chunk-45QKLD6M.js';
|
|
3
3
|
import './chunk-BXOCEZ4U.js';
|
|
4
4
|
import { BlendModeFilter, ExtensionType, extensions } from 'pixi.js';
|
|
5
5
|
|
|
@@ -86,5 +86,5 @@ fn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { ${s.gpu} }`);
|
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
export { OWN_MODES, createBlendFilter, registerBlendModes };
|
|
89
|
-
//# sourceMappingURL=blendModes-
|
|
90
|
-
//# sourceMappingURL=blendModes-
|
|
89
|
+
//# sourceMappingURL=blendModes-PAVTW3BO.js.map
|
|
90
|
+
//# sourceMappingURL=blendModes-PAVTW3BO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/filters/blendModes.ts"],"names":[],"mappings":";;;;;AAaA,IAAM,SAAA,GAAiC;AAAA,EACrC,OAAA,EAAe,EAAE,EAAA,EAAI,oEAAA,EAAsE,KAAK,0EAAA,EAA2E;AAAA,EAC3K,YAAA,EAAe,EAAE,EAAA,EAAI,oEAAA,EAAsE,KAAK,0EAAA,EAA2E;AAAA,EAC3K,YAAA,EAAe;AAAA,IACb,EAAA,EAAI,oKAAA;AAAA,IACJ,GAAA,EAAK;AAAA,GACP;AAAA,EACA,aAAA,EAAe,EAAE,EAAA,EAAI,4EAAA,EAA8E,KAAK,sFAAA,EAA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AA+B,CAAC,GAAG,MAAA,CAAO,IAAA,CAAK,SAAS,CAAA,EAAG,GAAG,MAAA,CAAO,IAAA,CAAK,MAAM,CAAC;AAE9F,IAAI,IAAA,GAAO,KAAA;AAEJ,SAAS,kBAAA,GAA2B;AACzC,EAAA,qBAAA,CAAsB,iBAAiB,CAAA;AACvC,EAAA,IAAI,IAAA,EAAM;AACV,EAAA,IAAA,GAAO,IAAA;AACP,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,CAAC,KAAK,MAAA,CAAO,OAAA,CAAQ,SAAS,CAAA,EAAG;AACjD,IAAA,IAAA;AAAA,MAAK,IAAA;AAAA,MACH,CAAA,4BAAA,EAA+B,EAAE,EAAE,CAAA;AAAA,6FAAA,CAAA;AAAA,MACnC,CAAA,8BAAA,EAAiC,EAAE,GAAG,CAAA;AAAA,yHAAA;AAAA,KAA+H;AAAA,EACzK;AACA,EAAA,KAAA,MAAW,CAAC,IAAA,EAAM,CAAC,KAAK,MAAA,CAAO,OAAA,CAAQ,MAAM,CAAA,EAAG;AAC9C,IAAA,IAAA,CAAK,IAAA,EAAM,GAAG,SAAS;AAAA,kCAAA,EAAuC,CAAA,CAAE,EAAE,CAAA,EAAA,CAAA,EAAM,CAAA,EAAG,UAAU;AAAA,yDAAA,EAA8D,CAAA,CAAE,GAAG,CAAA,EAAA,CAAI,CAAA;AAAA,EAC9J;AACF","file":"blendModes-PAVTW3BO.js","sourcesContent":["import { BlendModeFilter, ExtensionType, extensions } from 'pixi.js';\nimport { setBlendFilterFactory, type BlendFilterLike } from '../core/blend';\n\n/**\n * The W3C compositing blend modes as our own `BlendModeFilter`s, registered on the SAME pixi instance the movie uses (this file imports\n * 'pixi.js' like the rest of the library; `import 'pixi.js/advanced-blend-modes'` would register on its own copy of `extensions` when\n * the page maps pixi.js to an esm.sh bundle, and then nothing is registered and the layer silently draws as `normal`). It also avoids\n * what pixi 8.22's own versions get wrong: the source colour is premultiplied (a half-transparent layer was blended with its darkened\n * colour and then faded again), the backdrop's alpha is ignored, soft-light is inverted on WebGPU (`select` arguments swapped),\n * linear-light and saturation are wrong. Loaded by `Movie.init` only when a layer uses one of these (see `usesAdvancedBlend`).\n */\ntype Sep = { gl: string; gpu: string }; // a separable blend: the body of B(b, s) for one channel\n\nconst SEPARABLE: Record<string, Sep> = {\n overlay: { gl: 'return b <= 0.5 ? 2.0 * b * s : 1.0 - 2.0 * (1.0 - b) * (1.0 - s);', gpu: 'return select(1.0 - 2.0 * (1.0 - b) * (1.0 - s), 2.0 * b * s, b <= 0.5);' },\n 'hard-light': { gl: 'return s <= 0.5 ? 2.0 * b * s : 1.0 - 2.0 * (1.0 - b) * (1.0 - s);', gpu: 'return select(1.0 - 2.0 * (1.0 - b) * (1.0 - s), 2.0 * b * s, s <= 0.5);' },\n 'soft-light': {\n gl: 'if (s <= 0.5) return b - (1.0 - 2.0 * s) * b * (1.0 - b); float d = b <= 0.25 ? ((16.0 * b - 12.0) * b + 4.0) * b : sqrt(b); return b + (2.0 * s - 1.0) * (d - b);',\n gpu: 'let d = select(sqrt(b), ((16.0 * b - 12.0) * b + 4.0) * b, b <= 0.25); return select(b + (2.0 * s - 1.0) * (d - b), b - (1.0 - 2.0 * s) * b * (1.0 - b), s <= 0.5);',\n },\n 'color-dodge': { gl: 'if (b <= 0.0) return 0.0; return s >= 1.0 ? 1.0 : min(1.0, b / (1.0 - s));', gpu: 'if (b <= 0.0) { return 0.0; } return select(min(1.0, b / (1.0 - s)), 1.0, s >= 1.0);' },\n 'color-burn': { gl: 'if (b >= 1.0) return 1.0; return s <= 0.0 ? 0.0 : 1.0 - min(1.0, (1.0 - b) / s);', gpu: 'if (b >= 1.0) { return 1.0; } return select(1.0 - min(1.0, (1.0 - b) / s), 0.0, s <= 0.0);' },\n darken: { gl: 'return min(b, s);', gpu: 'return min(b, s);' },\n lighten: { gl: 'return max(b, s);', gpu: 'return max(b, s);' },\n difference: { gl: 'return abs(b - s);', gpu: 'return abs(b - s);' },\n exclusion: { gl: 'return b + s - 2.0 * b * s;', gpu: 'return b + s - 2.0 * b * s;' },\n 'linear-burn': { gl: 'return max(0.0, b + s - 1.0);', gpu: 'return max(0.0, b + s - 1.0);' },\n};\n\nconst GL_NONSEP = `\nfloat lum(vec3 c) { return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; }\nvec3 clipColor(vec3 c) { float l = lum(c); float n = min(c.r, min(c.g, c.b)); float x = max(c.r, max(c.g, c.b));\n if (n < 0.0) c = l + (c - l) * l / (l - n); if (x > 1.0) c = l + (c - l) * (1.0 - l) / (x - l); return c; }\nvec3 setLum(vec3 c, float l) { return clipColor(c + (l - lum(c))); }\nfloat sat(vec3 c) { return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); }\nvec3 setSat(vec3 c, float s) { float mx = max(c.r, max(c.g, c.b)); float mn = min(c.r, min(c.g, c.b)); return mx > mn ? (c - mn) * s / (mx - mn) : vec3(0.0); }`;\nconst GPU_NONSEP = `\nfn lum(c: vec3<f32>) -> f32 { return 0.3 * c.r + 0.59 * c.g + 0.11 * c.b; }\nfn clipColor(c0: vec3<f32>) -> vec3<f32> { var c = c0; let l = lum(c); let n = min(c.r, min(c.g, c.b)); let x = max(c.r, max(c.g, c.b));\n if (n < 0.0) { c = l + (c - l) * l / (l - n); } if (x > 1.0) { c = l + (c - l) * (1.0 - l) / (x - l); } return c; }\nfn setLum(c: vec3<f32>, l: f32) -> vec3<f32> { return clipColor(c + (l - lum(c))); }\nfn sat(c: vec3<f32>) -> f32 { return max(c.r, max(c.g, c.b)) - min(c.r, min(c.g, c.b)); }\nfn setSat(c: vec3<f32>, s: f32) -> vec3<f32> { let mx = max(c.r, max(c.g, c.b)); let mn = min(c.r, min(c.g, c.b)); if (mx > mn) { return (c - vec3<f32>(mn)) * s / (mx - mn); } return vec3<f32>(0.0); }`;\nconst NONSEP: Record<string, { gl: string; gpu: string }> = {\n hue: { gl: 'return setLum(setSat(cs, sat(cb)), lum(cb));', gpu: 'return setLum(setSat(cs, sat(cb)), lum(cb));' },\n saturation: { gl: 'return setLum(setSat(cb, sat(cs)), lum(cb));', gpu: 'return setLum(setSat(cb, sat(cs)), lum(cb));' },\n color: { gl: 'return setLum(cs, lum(cb));', gpu: 'return setLum(cs, lum(cb));' },\n luminosity: { gl: 'return setLum(cb, lum(cs));', gpu: 'return setLum(cb, lum(cs));' },\n};\n\nconst GL_MAIN = `\n vec3 cs = front.a > 0.0 ? front.rgb / front.a : vec3(0.0);\n vec3 cb = back.a > 0.0 ? back.rgb / back.a : vec3(0.0);\n vec3 mixed = front.rgb * (1.0 - back.a) + front.a * back.a * blendRGB(cb, cs) + (1.0 - front.a) * back.rgb;\n finalColor = vec4(mixed, blendedAlpha) * uBlend;`;\nconst GPU_MAIN = `\n let cs = select(vec3<f32>(0.0), front.rgb / front.a, front.a > 0.0);\n let cb = select(vec3<f32>(0.0), back.rgb / back.a, back.a > 0.0);\n let mixed = front.rgb * (1.0 - back.a) + front.a * back.a * blendRGB(cb, cs) + (1.0 - front.a) * back.rgb;\n out = vec4<f32>(mixed, blendedAlpha) * blendUniforms.uBlend;`;\n\nconst CLASSES = new Map<string, new () => BlendModeFilter>();\n\n/** A fresh blend filter for a layer that has filters of its own (it goes last in the chain and reads the backdrop). */\nexport function createBlendFilter(name: string): BlendFilterLike | null {\n const C = CLASSES.get(name);\n return C ? (new C() as unknown as BlendFilterLike) : null;\n}\n\nfunction make(name: string, gl: string, gpu: string): void {\n const C = class extends BlendModeFilter {\n static extension = { name, type: ExtensionType.BlendMode };\n constructor() { super({ gl: { functions: gl, main: GL_MAIN }, gpu: { functions: gpu, main: GPU_MAIN } }); }\n };\n CLASSES.set(name, C);\n extensions.add(C as never);\n}\n\nexport const OWN_MODES: readonly string[] = [...Object.keys(SEPARABLE), ...Object.keys(NONSEP)];\n\nlet done = false;\n/** Register the blends (once per page), and give `core/blend.ts` the maker for the filter chain case. */\nexport function registerBlendModes(): void {\n setBlendFilterFactory(createBlendFilter); // every call: the registration below is once per page, the maker is cheap to hand over again\n if (done) return;\n done = true;\n for (const [name, s] of Object.entries(SEPARABLE)) {\n make(name,\n `float B(float b, float s) { ${s.gl} }\\nvec3 blendRGB(vec3 cb, vec3 cs) { return vec3(B(cb.r, cs.r), B(cb.g, cs.g), B(cb.b, cs.b)); }`,\n `fn B(b: f32, s: f32) -> f32 { ${s.gpu} }\\nfn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { return vec3<f32>(B(cb.r, cs.r), B(cb.g, cs.g), B(cb.b, cs.b)); }`);\n }\n for (const [name, s] of Object.entries(NONSEP)) {\n make(name, `${GL_NONSEP}\\nvec3 blendRGB(vec3 cb, vec3 cs) { ${s.gl} }`, `${GPU_NONSEP}\\nfn blendRGB(cb: vec3<f32>, cs: vec3<f32>) -> vec3<f32> { ${s.gpu} }`);\n }\n}\n"]}
|
|
@@ -48,7 +48,7 @@ function kindsWithKey(key) {
|
|
|
48
48
|
return out;
|
|
49
49
|
}
|
|
50
50
|
var PROP_KEYS = /* @__PURE__ */ new Set([
|
|
51
|
-
// transform and look
|
|
51
|
+
// transform and look
|
|
52
52
|
"x",
|
|
53
53
|
"y",
|
|
54
54
|
"z",
|
|
@@ -75,21 +75,19 @@ var PROP_KEYS = /* @__PURE__ */ new Set([
|
|
|
75
75
|
"position",
|
|
76
76
|
"positionX",
|
|
77
77
|
"positionY",
|
|
78
|
+
"tilePosition",
|
|
79
|
+
"tilePositionX",
|
|
80
|
+
"tilePositionY",
|
|
81
|
+
"tileScale",
|
|
82
|
+
"tileScaleX",
|
|
83
|
+
"tileScaleY",
|
|
78
84
|
"tint",
|
|
79
|
-
"colorize",
|
|
80
|
-
"colorizeAmount",
|
|
81
|
-
"blur",
|
|
82
|
-
"blurX",
|
|
83
|
-
"blurY",
|
|
84
|
-
"blurPadding",
|
|
85
85
|
// shapes
|
|
86
86
|
"fillColor",
|
|
87
87
|
"fillAlpha",
|
|
88
88
|
"strokeColor",
|
|
89
89
|
"strokeAlpha",
|
|
90
90
|
"strokeWidth",
|
|
91
|
-
"lineColor",
|
|
92
|
-
"lineAlpha",
|
|
93
91
|
"cornerRadius",
|
|
94
92
|
"radius",
|
|
95
93
|
"radiusX",
|
|
@@ -278,5 +276,5 @@ function lintKeys(spec, warn = defaultWarn) {
|
|
|
278
276
|
}
|
|
279
277
|
|
|
280
278
|
export { collectPropKeys, describeLayer, lintKeys, lintText, lintTiming, summarizeWarnings };
|
|
281
|
-
//# sourceMappingURL=chunk-
|
|
282
|
-
//# sourceMappingURL=chunk-
|
|
279
|
+
//# sourceMappingURL=chunk-45QKLD6M.js.map
|
|
280
|
+
//# sourceMappingURL=chunk-45QKLD6M.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/space/specKeys.ts","../src/core/layerKeys.ts","../src/core/lint.ts"],"names":[],"mappings":";;;AAGO,SAAS,gBAAgB,IAAA,EAGhB;AACd,EAAA,MAAM,GAAA,uBAAU,GAAA,EAAY;AAC5B,EAAA,KAAA,MAAW,CAAA,IAAK,MAAA,CAAO,IAAA,CAAK,IAAA,CAAK,OAAA,IAAW,EAAE,CAAA,EAAG,GAAA,CAAI,GAAA,CAAI,CAAC,CAAA;AAC1D,EAAA,KAAA,MAAW,EAAA,IAAM,IAAA,CAAK,SAAA,IAAa,EAAC,EAAG;AACrC,IAAA,KAAA,MAAW,GAAA,IAAO,CAAC,EAAA,CAAG,GAAA,EAAK,GAAG,EAAA,EAAI,EAAA,CAAG,IAAI,CAAA,EAAG;AAC1C,MAAA,KAAA,MAAW,CAAA,IAAK,OAAO,IAAA,CAAK,GAAA,IAAO,EAAE,CAAA,EAAG,GAAA,CAAI,GAAA,CAAI,CAAC,CAAA;AAAA,IACnD;AAAA,EACF;AACA,EAAA,OAAO,GAAA;AACT;;;ACAA,IAAM,SAAS,CAAC,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,MAAM,UAAA,EAAY,SAAA,EAAW,WAAA,EAAa,SAAA,EAAW,cAAc,MAAA,EAAQ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AAQ,WAAA,CAAY,GAAA,EAAK,CAAC,GAAG,SAAS,CAAC,CAAA;AAC7C,MAAA,IAAA,CAAK,CAAA,cAAA,EAAiB,GAAG,CAAA,GAAA,EAAM,GAAG,CAAA,+BAAA,EAAkC,QAAQ,CAAA,sBAAA,EAAoB,KAAK,CAAA,EAAA,CAAA,GAAO,EAAE,CAAA,2FAAA,CAA6F,CAAA;AAAA,IAC7M;AAAA,EACF;AACA,EAAA,IAAI,IAAA,CAAK,SAAS,MAAA,IAAU,IAAA,CAAK,SAAS,OAAO,IAAA,CAAK,UAAU,QAAA,EAAU;AACxE,IAAA,KAAA,MAAW,GAAA,IAAO,MAAA,CAAO,IAAA,CAAK,IAAA,CAAK,KAAK,CAAA,EAAG;AACzC,MAAA,IAAI,UAAA,CAAW,SAAS,GAAG,CAAA,IAAM,KAAK,KAAA,CAAkC,GAAG,MAAM,MAAA,EAAW;AAC5F,MAAA,MAAM,KAAA,GAAQ,WAAA,CAAY,GAAA,EAAK,UAAU,CAAA;AACzC,MAAA,IAAA,CAAK,CAAA,cAAA,EAAiB,GAAG,CAAA,QAAA,EAAW,GAAG,2BAA2B,KAAA,GAAQ,CAAA,sBAAA,EAAoB,KAAK,CAAA,EAAA,CAAA,GAAO,EAAE,CAAA,wBAAA,EAA2B,UAAA,CAAW,IAAA,CAAK,IAAI,CAAC,CAAA,CAAE,CAAA;AAAA,IAChK;AAAA,EACF;AACF","file":"chunk-45QKLD6M.js","sourcesContent":["import type { Keyframe } from '../types';\n\n/** Every prop key a spec touches in `initial` and in keyframe `set` / `to` / `from`. */\nexport function collectPropKeys(spec: {\n initial?: Record<string, unknown>;\n keyframes?: Keyframe[];\n}): Set<string> {\n const out = new Set<string>();\n for (const k of Object.keys(spec.initial ?? {})) out.add(k);\n for (const kf of spec.keyframes ?? []) {\n for (const bag of [kf.set, kf.to, kf.from]) {\n for (const k of Object.keys(bag ?? {})) out.add(k);\n }\n }\n return out;\n}\n","import type {\n SequenceCommon, VideoSequenceSpec, ImageSequenceSpec, TextSequenceSpec, AudioAssetSpec, AudioSfxSpec, AudioMusicSpec,\n CompositionSequenceSpec, CameraSequenceSpec, LightSequenceSpec, ShaderSequenceSpec, NullSequenceSpec, SequenceSpec,\n RectShapeSpec, CircleShapeSpec, EllipseShapeSpec, ArcShapeSpec, LineShapeSpec, PolygonShapeSpec, PathShapeSpec,\n} from '../types';\n\n/**\n * The keys a layer of each kind may have, for `lintKeys`. They are tables of names, so each one is checked against its type twice, by\n * the compiler: `satisfies` rejects a name the type does not have, and `Covers` fails the build when the type has a key the table lacks\n * (add a key to a spec type and `tsc` tells you to add it here, so the warning never calls a real key unknown).\n */\ntype KeysOfUnion<T> = T extends unknown ? keyof T : never;\ntype Covers<T, K extends readonly string[]> = [Exclude<KeysOfUnion<T>, K[number]>] extends [never] ? true : { missing: Exclude<KeysOfUnion<T>, K[number]> };\ntype Assert<T extends true> = T;\n\nconst COMMON = ['type', 'name', 'parent', 'at', 'duration', 'initial', 'keyframes', 'filters', 'filterArea', 'mask', 'maskInverted', 'blendMode', 'threeD', 'hideBehindCamera', 'lit', 'castsShadows'] as const satisfies readonly KeysOfUnion<SequenceCommon | { type: string }>[];\n\nconst VIDEO = [...COMMON, 'asset', 'loop', 'audio', 'volume', 'speed'] as const satisfies readonly KeysOfUnion<VideoSequenceSpec>[];\nconst IMAGE = [...COMMON, 'asset', 'colorSpace'] as const satisfies readonly KeysOfUnion<ImageSequenceSpec>[];\nconst TEXT = [...COMMON, 'text', 'format', 'style', 'colorSpace', 'fillGradient'] as const satisfies readonly KeysOfUnion<TextSequenceSpec>[];\nconst AUDIO = [...COMMON, 'volume', 'asset', 'loop', 'sfx', 'music', 'speed'] as const satisfies readonly KeysOfUnion<AudioAssetSpec | AudioSfxSpec | AudioMusicSpec>[];\nconst COMPOSITION = [...COMMON, 'width', 'height', 'sequences', 'transitions', 'speed'] as const satisfies readonly KeysOfUnion<CompositionSequenceSpec>[];\nconst CAMERA = [...COMMON] as const satisfies readonly KeysOfUnion<CameraSequenceSpec>[];\nconst LIGHT = [...COMMON, 'kind', 'falloff'] as const satisfies readonly KeysOfUnion<LightSequenceSpec>[];\nconst SHADER = [...COMMON, 'fragment', 'uniforms', 'width', 'height', 'resolution', 'transparent'] as const satisfies readonly KeysOfUnion<ShaderSequenceSpec>[];\nconst NULL = [...COMMON] as const satisfies readonly KeysOfUnion<NullSequenceSpec>[];\n\nconst SHAPE = [...COMMON, 'shape', 'fillGradient', 'colorSpace', 'strokeCap', 'strokeJoin'] as const;\nconst TRIM = ['trimStart', 'trimEnd', 'trimEach'] as const;\nconst RECT = [...SHAPE, ...TRIM, 'width', 'height', 'cornerRadius', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<RectShapeSpec>[];\nconst CIRCLE = [...SHAPE, ...TRIM, 'radius', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<CircleShapeSpec>[];\nconst ELLIPSE = [...SHAPE, ...TRIM, 'radiusX', 'radiusY', 'anchorX', 'anchorY'] as const satisfies readonly KeysOfUnion<EllipseShapeSpec>[];\nconst ARC = [...SHAPE, 'radius', 'innerRadius', 'startAngle', 'endAngle'] as const satisfies readonly KeysOfUnion<ArcShapeSpec>[];\nconst LINE = [...SHAPE, ...TRIM, 'from', 'to'] as const satisfies readonly KeysOfUnion<LineShapeSpec>[];\nconst POLYGON = [...SHAPE, ...TRIM, 'points', 'open'] as const satisfies readonly KeysOfUnion<PolygonShapeSpec>[];\nconst PATH = [...SHAPE, ...TRIM, 'd', 'morphTo', 'morph', 'morphPoints'] as const satisfies readonly KeysOfUnion<PathShapeSpec>[];\n\n/** The compiler checks every table covers its type (this type is never used: it exists to fail the build). */\nexport type __Covered = [\n Assert<Covers<VideoSequenceSpec, typeof VIDEO>>, Assert<Covers<ImageSequenceSpec, typeof IMAGE>>, Assert<Covers<TextSequenceSpec, typeof TEXT>>,\n Assert<Covers<AudioAssetSpec | AudioSfxSpec | AudioMusicSpec, typeof AUDIO>>, Assert<Covers<CompositionSequenceSpec, typeof COMPOSITION>>,\n Assert<Covers<CameraSequenceSpec, typeof CAMERA>>, Assert<Covers<LightSequenceSpec, typeof LIGHT>>, Assert<Covers<ShaderSequenceSpec, typeof SHADER>>, Assert<Covers<NullSequenceSpec, typeof NULL>>,\n Assert<Covers<RectShapeSpec, typeof RECT>>, Assert<Covers<CircleShapeSpec, typeof CIRCLE>>, Assert<Covers<EllipseShapeSpec, typeof ELLIPSE>>,\n Assert<Covers<ArcShapeSpec, typeof ARC>>, Assert<Covers<LineShapeSpec, typeof LINE>>, Assert<Covers<PolygonShapeSpec, typeof POLYGON>>,\n Assert<Covers<PathShapeSpec, typeof PATH>>,\n];\n\nconst SHAPES: Record<string, readonly string[]> = { rect: RECT, circle: CIRCLE, ellipse: ELLIPSE, arc: ARC, line: LINE, polygon: POLYGON, path: PATH };\nconst BY_TYPE: Record<string, readonly string[]> = { video: VIDEO, image: IMAGE, text: TEXT, audio: AUDIO, composition: COMPOSITION, camera: CAMERA, light: LIGHT, shader: SHADER, null: NULL };\n\n/** What a layer may be called, for the message: `text layer`, `rect shape`. */\nexport function kindName(spec: { type: string; shape?: string }): string {\n return spec.type === 'shape' && spec.shape ? `${spec.shape} shape` : `${spec.type} layer`;\n}\n\n/** The keys a layer may have, or null for a kind this library does not know (a `three` layer: registered elsewhere, so not checked). */\nexport function layerKeys(spec: { type: string; shape?: string }): readonly string[] | null {\n if (spec.type === 'shape') return (spec.shape && SHAPES[spec.shape]) || null;\n return BY_TYPE[spec.type] ?? null;\n}\n\n/** Which kinds have `key` (for \"it belongs to a circle shape\"). */\nexport function kindsWithKey(key: string): string[] {\n const out: string[] = [];\n for (const [shape, keys] of Object.entries(SHAPES)) if (keys.includes(key)) out.push(`${shape} shape`);\n for (const [type, keys] of Object.entries(BY_TYPE)) if (keys.includes(key)) out.push(`${type} layer`);\n return out;\n}\n\n/** Names a keyframe or `initial` may animate. Dotted paths (`filters.g.amount`, `three.box.x`) belong to their routers and are not looked up here. */\nexport const PROP_KEYS: ReadonlySet<string> = new Set([\n // transform and look\n 'x', 'y', 'z', 'alpha', 'rotation', 'rotationX', 'rotationY', 'width', 'height', 'visible', 'autoAlpha',\n 'scale', 'scaleX', 'scaleY', 'anchor', 'anchorX', 'anchorY', 'pivot', 'pivotX', 'pivotY', 'skew', 'skewX', 'skewY',\n 'position', 'positionX', 'positionY', 'tilePosition', 'tilePositionX', 'tilePositionY', 'tileScale', 'tileScaleX', 'tileScaleY', 'tint',\n // shapes\n 'fillColor', 'fillAlpha', 'strokeColor', 'strokeAlpha', 'strokeWidth', 'cornerRadius', 'radius', 'radiusX', 'radiusY',\n 'innerRadius', 'startAngle', 'endAngle', 'trimStart', 'trimEnd', 'trimEach', 'morph', 'fillGradient', 'strokeCap', 'strokeJoin',\n // text, audio, video\n 'fill', 'value', 'visibleChars', 'text', 'volume', 'time',\n // camera\n 'lookAtX', 'lookAtY', 'lookAtZ', 'fov', 'focus', 'aperture', 'offsetX', 'offsetY', 'offsetZ', 'lookOffsetX', 'lookOffsetY', 'lookOffsetZ',\n // light + fog\n 'intensity', 'color', 'coneAngle', 'coneFeather', 'falloffDistance', 'shadowDarkness', 'shadowDiffusion', 'fogNear', 'fogFar', 'fogColor', 'fogAmount',\n]);\n\n/** The text `style` keys (PixiJS TextStyle) that this library passes on. */\nexport const STYLE_KEYS: readonly string[] = [\n 'fontSize', 'fontFamily', 'fontWeight', 'fontStyle', 'fontVariant', 'fill', 'stroke', 'dropShadow', 'letterSpacing', 'lineHeight', 'leading',\n 'align', 'wordWrap', 'wordWrapWidth', 'breakWords', 'whiteSpace', 'padding', 'textBaseline', 'trim', 'lineJoin', 'miterLimit', 'filters', 'tagStyles',\n];\n\nexport type { SequenceSpec };\n","import type { SequenceSpec } from '../types';\nimport { collectPropKeys } from '../space/specKeys';\nimport { suggestName } from './options';\nimport { layerKeys, kindName, kindsWithKey, PROP_KEYS, STYLE_KEYS } from './layerKeys';\n\ntype Warn = (message: string, kind?: 'late-keyframe') => void;\nconst defaultWarn: Warn = m => console.warn(m);\n\n/** \"layer \"name\"\" or \"unnamed text layer\" — how warnings refer to a sequence. */\nexport function describeLayer(spec: { name?: string; type: string }): string {\n return spec.name ? `layer \"${spec.name}\"` : `unnamed ${spec.type} layer`;\n}\n\n/**\n * Timing mistakes that otherwise fail silently: a layer that starts after its\n * composition has ended, or a keyframe that starts after its own layer has\n * ended (the usual cause: writing keyframe `at` in composition time instead of\n * time since the start of the layer).\n */\nexport function lintTiming(spec: SequenceSpec, parentDuration: number, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const at = spec.at ?? 0;\n if (at >= parentDuration) {\n warn(`pixi-effects: ${who} starts at ${at}s, after its composition ends (${parentDuration}s), so it is never visible`);\n }\n // An sfx or a piece of music without a duration is as long as its sound, which only the audio layer knows (it checks its own keyframes).\n if (spec.type === 'audio' && ((spec as { sfx?: unknown }).sfx !== undefined || (spec as { music?: unknown }).music !== undefined) && spec.duration === undefined) return;\n const duration = spec.duration ?? parentDuration;\n (spec.keyframes ?? []).forEach((kf, i) => {\n const kat = kf.at ?? 0;\n if (kat >= duration) {\n warn(\n `pixi-effects: ${who}: keyframes[${i}] starts at ${kat}s, after the layer ends (duration ${duration}s), so it never plays. ` +\n `Keyframe \\`at\\` is measured from the start of this layer, not from the start of the composition.`,\n 'late-keyframe',\n );\n }\n });\n}\n\n/**\n * A loop that builds a hundred layers makes the same mistake a hundred times. Print the first few in full and\n * say how many more there are: the rest are the same loop.\n */\nexport function summarizeWarnings(messages: string[], shown = 3): string[] {\n if (messages.length <= shown) return messages;\n return [...messages.slice(0, shown), `pixi-effects: ${messages.length - shown} more layers with the same problem (the same loop or helper is probably building them): fix the ones above and these go away.`];\n}\n\n/** A text layer that animates `value` but has nowhere to print it. */\nexport function lintText(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n if (spec.type !== 'text') return;\n // Every string the layer ever shows: its `text` and any `set: { text }` swap.\n const strings = [spec.text ?? '', ...(spec.keyframes ?? []).map(kf => String((kf.set as Record<string, unknown> | undefined)?.text ?? ''))];\n const hasPlaceholder = strings.some(t => t.includes('{value}'));\n if (hasPlaceholder && !collectPropKeys(spec).has('value')) {\n warn(`pixi-effects: ${describeLayer(spec)}: the text has a {value} placeholder but nothing sets or animates \\`value\\`, so it prints 0. Set initial: { value: … } or animate it; {value} is reserved for counters (there is no way to print a literal \"{value}\").`);\n }\n if (collectPropKeys(spec).has('value') && !hasPlaceholder) {\n warn(`pixi-effects: ${describeLayer(spec)}: \\`value\\` is set or animated but the text has no {value} placeholder, so nothing shows it. Use text: '{value}' (or e.g. '{value} users').`);\n }\n}\n\nconst REMAPPABLE = new Set(['video', 'audio', 'composition']);\n/** Top-level names that mean a time remap and have their own message. */\nconst REMAP_NAMES = new Set(['time', 'timeRemap', 'reverse']);\nconst TIME_BAGS = ['set', 'to', 'from'] as const;\n\n/** The mistakes a time remap can make (`speed` / `time`), said once when the layer is built. Called from `lintKeys`. */\nfunction lintRemap(spec: SequenceSpec, warn: Warn): void {\n const s = spec as unknown as Record<string, any>;\n const who = describeLayer(spec);\n const kfs: Array<Record<string, any>> = s.keyframes ?? [];\n const bags: Array<Record<string, any> | undefined> = [s.initial, ...kfs.flatMap(kf => TIME_BAGS.map(b => kf[b]))];\n const timeInInitial = !!s.initial && s.initial.time !== undefined;\n const timeInKeyframes = kfs.some(kf => TIME_BAGS.some(b => kf[b] && kf[b].time !== undefined));\n const timed = timeInInitial || timeInKeyframes;\n if (bags.some(bag => bag && bag.speed !== undefined)) {\n warn(`pixi-effects: ${who}: speed is a fixed setting, not an animatable property: write it on the layer (speed: 2); to change the speed over time, animate time (keyframes: [{ at: 0, from: { time: 0 }, to: { time: 4 }, duration: 2, ease: 'power2.in' }])`);\n }\n if (!REMAPPABLE.has(spec.type)) {\n if (timed) warn(`pixi-effects: ${who}: \"time\" only works on video, audio and composition layers; put this layer in a composition and remap that (it is ignored here)`);\n return; // a top-level speed here is the key warning's business (\"not a ... key\")\n }\n if (s.reverse !== undefined) warn(`pixi-effects: ${who}: \"reverse\" is not a key: write speed: -1 to play backward`);\n if (s.timeRemap !== undefined) warn(`pixi-effects: ${who}: \"timeRemap\" is not a key: animate time in keyframes (from / to / set), or write speed`);\n if (s.time !== undefined) warn(`pixi-effects: ${who}: \"time\" belongs in initial or keyframes (initial: { time: 2 }), not on the layer`);\n if (spec.type === 'audio' && (s.sfx !== undefined || s.music !== undefined) && (s.speed !== undefined || timed)) {\n warn(`pixi-effects: ${who}: speed and time do not apply to a synthesised sound (sfx, music); change an sfx's pitch with pitch (semitones), or put it in a composition and remap that`);\n return;\n }\n if (s.speed !== undefined && (typeof s.speed !== 'number' || !Number.isFinite(s.speed) || s.speed === 0)) {\n warn(`pixi-effects: ${who}: speed ${JSON.stringify(s.speed)} cannot be used: write a number other than 0 (negative plays backward); to hold a moment, key time to the same value twice`);\n }\n if (s.speed !== undefined && timeInKeyframes) {\n warn(`pixi-effects: ${who}: speed and keyframed time are both set; time wins and speed is ignored. Use one of them`);\n }\n if (timeInInitial && typeof s.initial.time !== 'number') {\n warn(`pixi-effects: ${who}: initial.time must be a number of seconds, got ${JSON.stringify(s.initial.time)}`);\n }\n kfs.forEach((kf, i) => {\n for (const b of TIME_BAGS) {\n const v = kf[b]?.time;\n if (v !== undefined && typeof v !== 'number' && typeof v !== 'string') warn(`pixi-effects: ${who}: keyframes[${i}].${b}.time must be a number of seconds, got ${JSON.stringify(v)}`);\n }\n });\n}\n\n/**\n * Keys that do not exist, which the library used to ignore without a word (a typo in a layer key, a mistyped property in a keyframe, a\n * style key Pixi does not know). Said once each, with what was probably meant. A warning, never an error. Not checked here: dotted\n * paths (`filters.g.amount`, `three.box.x`: their routers say what is wrong), the names `fillGradient` says itself (`gradientAngle`),\n * and a kind of layer registered elsewhere (`three`).\n */\nexport function lintKeys(spec: SequenceSpec, warn: Warn = defaultWarn): void {\n const who = describeLayer(spec);\n const valid = layerKeys(spec as { type: string; shape?: string });\n if (valid) {\n for (const key of Object.keys(spec)) {\n if (valid.includes(key) || (spec as unknown as Record<string, unknown>)[key] === undefined) continue; // a spread that sets a key only when it applies leaves `undefined`\n if (REMAPPABLE.has(spec.type) && REMAP_NAMES.has(key)) continue; // lintRemap has its own message for these\n const guess = suggestName(key, valid.filter(k => k !== 'type'));\n const owners = kindsWithKey(key);\n const belongs = owners.length ? ` (it belongs to ${owners.slice(0, 3).join(', ')})` : '';\n const hint = guess ? ` — did you mean \"${guess}\"?${belongs}` : belongs;\n warn(`pixi-effects: ${who}: \"${key}\" is not a ${kindName(spec as { type: string; shape?: string })} key${hint}. Valid keys: ${valid.join(', ')}`);\n }\n }\n lintRemap(spec, warn);\n const said = new Set<string>();\n const bags: Array<Record<string, unknown> | undefined> = [spec.initial, ...(spec.keyframes ?? []).flatMap(kf => [kf.set, kf.to, kf.from])] as Array<Record<string, unknown> | undefined>;\n for (const bag of bags) {\n for (const key of Object.keys(bag ?? {})) {\n if (bag![key] === undefined) continue;\n if (PROP_KEYS.has(key) || key.includes('.') || /^gradient/i.test(key) || said.has(key) || key === 'speed') continue; // (speed: lintRemap says what to write)\n said.add(key);\n const guess = suggestName(key, [...PROP_KEYS]);\n warn(`pixi-effects: ${who}: \"${key}\" is not an animatable property${guess ? ` — did you mean \"${guess}\"?` : ''} (in initial, set, to or from). See the cheatsheet for the properties of this kind of layer`);\n }\n }\n if (spec.type === 'text' && spec.style && typeof spec.style === 'object') {\n for (const key of Object.keys(spec.style)) {\n if (STYLE_KEYS.includes(key) || (spec.style as Record<string, unknown>)[key] === undefined) continue;\n const guess = suggestName(key, STYLE_KEYS);\n warn(`pixi-effects: ${who}: style.${key} is not a text style key${guess ? ` — did you mean \"${guess}\"?` : ''} (it is ignored). Keys: ${STYLE_KEYS.join(', ')}`);\n }\n }\n}\n"]}
|