pixi-effects 0.49.0 → 0.50.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 +20 -0
- package/README.md +9 -8
- package/ai/CHAT.md +1 -1
- package/ai/chat-template.html +11 -5
- package/ai/tools/check.mjs +6 -6
- package/dist/3d.cjs +18 -13
- package/dist/3d.cjs.map +1 -1
- package/dist/3d.d.cts +3 -1
- package/dist/3d.d.ts +3 -1
- package/dist/3d.js +10 -5
- package/dist/3d.js.map +1 -1
- package/dist/Composition-5SBIDTBB.cjs +17 -0
- package/dist/{Composition-464AWDV6.cjs.map → Composition-5SBIDTBB.cjs.map} +1 -1
- package/dist/Composition-7D6ERUVY.js +8 -0
- package/dist/{Composition-5U63LMPX.js.map → Composition-7D6ERUVY.js.map} +1 -1
- package/dist/Controller.d.cts +2 -2
- package/dist/Controller.d.ts +2 -2
- package/dist/{Movie-BxB7bauG.d.cts → Movie-DogzDBuW.d.cts} +20 -5
- package/dist/{Movie-6EWOz6Yw.d.ts → Movie-Y7iHg2V8.d.ts} +20 -5
- package/dist/{Spans-DUR2W5EH.cjs → Spans-OBNYI6LJ.cjs} +12 -11
- package/dist/Spans-OBNYI6LJ.cjs.map +1 -0
- package/dist/{Spans-W5VJRMGC.js → Spans-WRQPIDPO.js} +7 -6
- package/dist/Spans-WRQPIDPO.js.map +1 -0
- package/dist/{blendModes-NC76DNVX.cjs → blendModes-2IDILRN6.cjs} +5 -5
- package/dist/{blendModes-NC76DNVX.cjs.map → blendModes-2IDILRN6.cjs.map} +1 -1
- package/dist/{blendModes-ZOBLPSR3.js → blendModes-4QH44GOL.js} +4 -4
- package/dist/{blendModes-ZOBLPSR3.js.map → blendModes-4QH44GOL.js.map} +1 -1
- package/dist/{chunk-PBMDZT2T.js → chunk-24MVJFW4.js} +40 -74
- package/dist/chunk-24MVJFW4.js.map +1 -0
- package/dist/{chunk-GUDLIAIG.cjs → chunk-2DC6TRJI.cjs} +83 -117
- package/dist/chunk-2DC6TRJI.cjs.map +1 -0
- package/dist/{chunk-BSFWVTSR.cjs → chunk-2VMLNKHT.cjs} +92 -92
- package/dist/{chunk-BSFWVTSR.cjs.map → chunk-2VMLNKHT.cjs.map} +1 -1
- package/dist/{chunk-ABWRISRK.cjs → chunk-3FCDRLW3.cjs} +4 -3
- package/dist/chunk-3FCDRLW3.cjs.map +1 -0
- package/dist/{chunk-MXACRKAN.js → chunk-C2HL5236.js} +4 -4
- package/dist/{chunk-MXACRKAN.js.map → chunk-C2HL5236.js.map} +1 -1
- package/dist/{chunk-5YNME6AH.cjs → chunk-GXGIISFS.cjs} +5 -5
- package/dist/{chunk-5YNME6AH.cjs.map → chunk-GXGIISFS.cjs.map} +1 -1
- package/dist/{chunk-H363KMJR.js → chunk-J4ZP76IL.js} +4 -3
- package/dist/chunk-J4ZP76IL.js.map +1 -0
- package/dist/{chunk-33USHRV5.cjs → chunk-NXMNBFHM.cjs} +567 -39
- package/dist/chunk-NXMNBFHM.cjs.map +1 -0
- package/dist/{chunk-USUUAYTE.js → chunk-OI75LGIB.js} +5 -5
- package/dist/{chunk-USUUAYTE.js.map → chunk-OI75LGIB.js.map} +1 -1
- package/dist/{chunk-DOGY3EAW.js → chunk-SC7EWGHB.js} +543 -17
- package/dist/chunk-SC7EWGHB.js.map +1 -0
- package/dist/index.cjs +39 -39
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +5 -5
- package/dist/loader.css +1 -1
- package/dist/present.cjs +5 -5
- package/dist/present.d.cts +2 -2
- package/dist/present.d.ts +2 -2
- package/dist/present.js +5 -5
- package/dist/three.cjs +15 -9
- package/dist/three.cjs.map +1 -1
- package/dist/three.d.cts +5 -1
- package/dist/three.d.ts +5 -1
- package/dist/three.js +10 -4
- package/dist/three.js.map +1 -1
- package/dist/{types-kt7DQKfO.d.cts → types-BZngm4nT.d.cts} +48 -5
- package/dist/{types-kt7DQKfO.d.ts → types-BZngm4nT.d.ts} +48 -5
- package/docs/api.md +14 -1
- package/docs/dsl.md +39 -3
- package/llms-full.txt +107 -6
- package/package.json +1 -1
- package/skills/pixi-effects/SKILL.md +4 -2
- package/skills/pixi-effects/reference/cheatsheet.md +2 -0
- package/skills/pixi-effects/reference/pitfalls.md +6 -0
- package/skills/pixi-effects/reference/recipes.md +42 -0
- package/skills/pixi-effects/template.html +15 -8
- package/dist/Composition-464AWDV6.cjs +0 -16
- package/dist/Composition-5U63LMPX.js +0 -7
- package/dist/Spans-DUR2W5EH.cjs.map +0 -1
- package/dist/Spans-W5VJRMGC.js.map +0 -1
- package/dist/chunk-33USHRV5.cjs.map +0 -1
- package/dist/chunk-ABWRISRK.cjs.map +0 -1
- package/dist/chunk-DOGY3EAW.js.map +0 -1
- package/dist/chunk-GUDLIAIG.cjs.map +0 -1
- package/dist/chunk-H363KMJR.js.map +0 -1
- package/dist/chunk-PBMDZT2T.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { CompositionSequence } from './chunk-OI75LGIB.js';
|
|
2
|
+
import './chunk-SC7EWGHB.js';
|
|
3
|
+
import './chunk-K3XOEC3C.js';
|
|
4
|
+
import './chunk-C2HL5236.js';
|
|
5
|
+
import './chunk-J4ZP76IL.js';
|
|
6
|
+
import './chunk-WGRWFQOB.js';
|
|
7
|
+
//# sourceMappingURL=Composition-7D6ERUVY.js.map
|
|
8
|
+
//# sourceMappingURL=Composition-7D6ERUVY.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"Composition-7D6ERUVY.js"}
|
package/dist/Controller.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as Movie } from './Movie-
|
|
1
|
+
import { M as Movie } from './Movie-DogzDBuW.cjs';
|
|
2
2
|
import 'pixi.js';
|
|
3
3
|
import './soundEntry-DT13DNt8.cjs';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-BZngm4nT.cjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The look of the bar. Each key sets a CSS custom property on the bar (so you can also set `--mc-accent` … in your own CSS, on the
|
package/dist/Controller.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { M as Movie } from './Movie-
|
|
1
|
+
import { M as Movie } from './Movie-Y7iHg2V8.js';
|
|
2
2
|
import 'pixi.js';
|
|
3
3
|
import './soundEntry-DT13DNt8.js';
|
|
4
|
-
import './types-
|
|
4
|
+
import './types-BZngm4nT.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* The look of the bar. Each key sets a CSS custom property on the bar (so you can also set `--mc-accent` … in your own CSS, on the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Application } from 'pixi.js';
|
|
2
2
|
import { A as AudioReport, a as AudioInspectOptions } from './soundEntry-DT13DNt8.cjs';
|
|
3
|
-
import { a as Stop, A as AssetSpec, C as CompositionSpec } from './types-
|
|
3
|
+
import { a as Stop, A as AssetSpec, C as CompositionSpec } from './types-BZngm4nT.cjs';
|
|
4
4
|
|
|
5
5
|
type EaseFn = (p: number) => number;
|
|
6
6
|
|
|
@@ -149,8 +149,8 @@ interface CanvasRow {
|
|
|
149
149
|
ok: boolean;
|
|
150
150
|
/** Why not, in a sentence (empty when ok). */
|
|
151
151
|
problem: string;
|
|
152
|
-
/** Which kind of layer drew it: a `canvas`, a `three` or a `
|
|
153
|
-
kind: 'canvas' | 'three' | 'scene3d';
|
|
152
|
+
/** Which kind of layer drew it: a `canvas`, a `three`, a `scene3d` or a `scene2d` layer (all are held to "a function of the time"). */
|
|
153
|
+
kind: 'canvas' | 'three' | 'scene3d' | 'scene2d';
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/** One kind of issue, with how many frames it was seen in. Issues that differ only by numbers are one kind. */
|
|
@@ -243,8 +243,8 @@ interface PickHit {
|
|
|
243
243
|
/** Names (or `type#index`) from the root, joined by `/`: the same as `movie.inspect()`'s `path`. */
|
|
244
244
|
path: string;
|
|
245
245
|
type: string;
|
|
246
|
-
/** `'flat'`: a 2D layer; `'card'`: a `threeD` layer (its projected card); `'scene3d'`: a `scene3d` layer, and `scene3d` says what the ray met; `'three'`: a `three` layer, and `three` says what the ray met. */
|
|
247
|
-
kind: 'flat' | 'card' | 'scene3d' | 'three';
|
|
246
|
+
/** `'flat'`: a 2D layer; `'card'`: a `threeD` layer (its projected card); `'scene2d'`: a `scene2d` layer, and `scene2d` says which of its objects is under the point; `'scene3d'`: a `scene3d` layer, and `scene3d` says what the ray met; `'three'`: a `three` layer, and `three` says what the ray met. */
|
|
247
|
+
kind: 'flat' | 'card' | 'scene3d' | 'scene2d' | 'three';
|
|
248
248
|
/** The point asked about, in canvas pixels. */
|
|
249
249
|
point: {
|
|
250
250
|
x: number;
|
|
@@ -276,6 +276,21 @@ interface PickHit {
|
|
|
276
276
|
} | null;
|
|
277
277
|
};
|
|
278
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* A `scene2d` layer: the top object of its scene under the point (its label, or its nearest labelled ancestor's, or `''`), the node itself, and the point in the layer's own
|
|
281
|
+
* pixels. `grab().move(x, y)` takes the pointer in canvas pixels and gives where it is in the node's parent's pixels and how far that is from where it was grabbed (`delta`).
|
|
282
|
+
*/
|
|
283
|
+
scene2d?: {
|
|
284
|
+
object: string;
|
|
285
|
+
node: unknown;
|
|
286
|
+
point: [number, number];
|
|
287
|
+
grab: () => {
|
|
288
|
+
move: (x: number, y: number) => {
|
|
289
|
+
point: [number, number];
|
|
290
|
+
delta: [number, number];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
279
294
|
/** A `three` layer: what the ray through that point met first: the object (its name, or `''`), where (three's own units), and how far from the camera. */
|
|
280
295
|
three?: {
|
|
281
296
|
object: unknown;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Application } from 'pixi.js';
|
|
2
2
|
import { A as AudioReport, a as AudioInspectOptions } from './soundEntry-DT13DNt8.js';
|
|
3
|
-
import { a as Stop, A as AssetSpec, C as CompositionSpec } from './types-
|
|
3
|
+
import { a as Stop, A as AssetSpec, C as CompositionSpec } from './types-BZngm4nT.js';
|
|
4
4
|
|
|
5
5
|
type EaseFn = (p: number) => number;
|
|
6
6
|
|
|
@@ -149,8 +149,8 @@ interface CanvasRow {
|
|
|
149
149
|
ok: boolean;
|
|
150
150
|
/** Why not, in a sentence (empty when ok). */
|
|
151
151
|
problem: string;
|
|
152
|
-
/** Which kind of layer drew it: a `canvas`, a `three` or a `
|
|
153
|
-
kind: 'canvas' | 'three' | 'scene3d';
|
|
152
|
+
/** Which kind of layer drew it: a `canvas`, a `three`, a `scene3d` or a `scene2d` layer (all are held to "a function of the time"). */
|
|
153
|
+
kind: 'canvas' | 'three' | 'scene3d' | 'scene2d';
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
/** One kind of issue, with how many frames it was seen in. Issues that differ only by numbers are one kind. */
|
|
@@ -243,8 +243,8 @@ interface PickHit {
|
|
|
243
243
|
/** Names (or `type#index`) from the root, joined by `/`: the same as `movie.inspect()`'s `path`. */
|
|
244
244
|
path: string;
|
|
245
245
|
type: string;
|
|
246
|
-
/** `'flat'`: a 2D layer; `'card'`: a `threeD` layer (its projected card); `'scene3d'`: a `scene3d` layer, and `scene3d` says what the ray met; `'three'`: a `three` layer, and `three` says what the ray met. */
|
|
247
|
-
kind: 'flat' | 'card' | 'scene3d' | 'three';
|
|
246
|
+
/** `'flat'`: a 2D layer; `'card'`: a `threeD` layer (its projected card); `'scene2d'`: a `scene2d` layer, and `scene2d` says which of its objects is under the point; `'scene3d'`: a `scene3d` layer, and `scene3d` says what the ray met; `'three'`: a `three` layer, and `three` says what the ray met. */
|
|
247
|
+
kind: 'flat' | 'card' | 'scene3d' | 'scene2d' | 'three';
|
|
248
248
|
/** The point asked about, in canvas pixels. */
|
|
249
249
|
point: {
|
|
250
250
|
x: number;
|
|
@@ -276,6 +276,21 @@ interface PickHit {
|
|
|
276
276
|
} | null;
|
|
277
277
|
};
|
|
278
278
|
};
|
|
279
|
+
/**
|
|
280
|
+
* A `scene2d` layer: the top object of its scene under the point (its label, or its nearest labelled ancestor's, or `''`), the node itself, and the point in the layer's own
|
|
281
|
+
* pixels. `grab().move(x, y)` takes the pointer in canvas pixels and gives where it is in the node's parent's pixels and how far that is from where it was grabbed (`delta`).
|
|
282
|
+
*/
|
|
283
|
+
scene2d?: {
|
|
284
|
+
object: string;
|
|
285
|
+
node: unknown;
|
|
286
|
+
point: [number, number];
|
|
287
|
+
grab: () => {
|
|
288
|
+
move: (x: number, y: number) => {
|
|
289
|
+
point: [number, number];
|
|
290
|
+
delta: [number, number];
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
};
|
|
279
294
|
/** A `three` layer: what the ray through that point met first: the object (its name, or `''`), where (three's own units), and how far from the camera. */
|
|
280
295
|
three?: {
|
|
281
296
|
object: unknown;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
3
|
+
var chunk2VMLNKHT_cjs = require('./chunk-2VMLNKHT.cjs');
|
|
4
|
+
var chunkNXMNBFHM_cjs = require('./chunk-NXMNBFHM.cjs');
|
|
5
|
+
require('./chunk-VQXZ2NOI.cjs');
|
|
6
|
+
require('./chunk-GXGIISFS.cjs');
|
|
7
|
+
require('./chunk-3FCDRLW3.cjs');
|
|
7
8
|
require('./chunk-DOLTCXCL.cjs');
|
|
8
9
|
|
|
9
10
|
// src/sequences/Spans.ts
|
|
@@ -12,12 +13,12 @@ var strip = (props) => {
|
|
|
12
13
|
const { visibleChars: _gone, ...rest } = props;
|
|
13
14
|
return rest;
|
|
14
15
|
};
|
|
15
|
-
var SpansSequence = class extends
|
|
16
|
+
var SpansSequence = class extends chunk2VMLNKHT_cjs.CompositionSequence {
|
|
16
17
|
_meta;
|
|
17
18
|
_count = { value: 0, visibleChars: 0 };
|
|
18
19
|
constructor(spec, parent, root) {
|
|
19
20
|
super(spec, parent, root);
|
|
20
|
-
this._meta =
|
|
21
|
+
this._meta = chunkNXMNBFHM_cjs.spansMeta.get(spec);
|
|
21
22
|
}
|
|
22
23
|
/** `visibleChars` is the group's own counter, not a property to write on the container. */
|
|
23
24
|
displayProps() {
|
|
@@ -33,8 +34,8 @@ var SpansSequence = class extends chunkBSFWVTSR_cjs.CompositionSequence {
|
|
|
33
34
|
if (!this._meta?.typed) return;
|
|
34
35
|
const scope = this.scope();
|
|
35
36
|
const first = this.spec.initial?.visibleChars;
|
|
36
|
-
this._count.visibleChars = first === void 0 ? 0 :
|
|
37
|
-
|
|
37
|
+
this._count.visibleChars = first === void 0 ? 0 : chunkNXMNBFHM_cjs.resolveNumber(first, scope);
|
|
38
|
+
chunkNXMNBFHM_cjs.bindCounterKeyframes(timeline, this._count, "visibleChars", () => this._distribute(), this.spec.keyframes ?? [], this.duration, offset + this.at, scope);
|
|
38
39
|
this._distribute();
|
|
39
40
|
}
|
|
40
41
|
/** Every piece shows its part of the first N characters of the whole text. */
|
|
@@ -43,7 +44,7 @@ var SpansSequence = class extends chunkBSFWVTSR_cjs.CompositionSequence {
|
|
|
43
44
|
const total = Math.max(0, Math.floor(this._count.visibleChars));
|
|
44
45
|
let i = 0;
|
|
45
46
|
for (const child of this._children) {
|
|
46
|
-
if (!(child instanceof
|
|
47
|
+
if (!(child instanceof chunkNXMNBFHM_cjs.TextSequence)) continue;
|
|
47
48
|
const p = pieces[i++];
|
|
48
49
|
if (p) child.setVisibleChars(Math.min(p.length, Math.max(0, total - p.start)));
|
|
49
50
|
}
|
|
@@ -51,5 +52,5 @@ var SpansSequence = class extends chunkBSFWVTSR_cjs.CompositionSequence {
|
|
|
51
52
|
};
|
|
52
53
|
|
|
53
54
|
exports.SpansSequence = SpansSequence;
|
|
54
|
-
//# sourceMappingURL=Spans-
|
|
55
|
-
//# sourceMappingURL=Spans-
|
|
55
|
+
//# sourceMappingURL=Spans-OBNYI6LJ.cjs.map
|
|
56
|
+
//# sourceMappingURL=Spans-OBNYI6LJ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sequences/Spans.ts"],"names":["CompositionSequence","spansMeta","resolveNumber","bindCounterKeyframes","TextSequence"],"mappings":";;;;;;;;;;AAQA,IAAM,KAAA,GAAQ,CAAC,KAAA,KAAgD;AAC7D,EAAA,IAAI,CAAC,KAAA,IAAS,EAAE,cAAA,IAAkB,QAAQ,OAAO,KAAA;AACjD,EAAA,MAAM,EAAE,YAAA,EAAc,KAAA,EAAO,GAAG,MAAK,GAAI,KAAA;AACzC,EAAA,OAAO,IAAA;AACT,CAAA;AAEO,IAAM,aAAA,GAAN,cAA4BA,qCAAA,CAAoB;AAAA,EACpC,KAAA;AAAA,EACA,MAAA,GAAuB,EAAE,KAAA,EAAO,CAAA,EAAG,cAAc,CAAA,EAAE;AAAA,EAEpE,WAAA,CAAY,IAAA,EAAoB,MAAA,EAAiC,IAAA,EAAwB;AACvF,IAAA,KAAA,CAAM,IAAA,EAAM,QAAQ,IAAI,CAAA;AACxB,IAAA,IAAA,CAAK,KAAA,GAAQC,2BAAA,CAAU,GAAA,CAAI,IAAI,CAAA;AAAA,EACjC;AAAA;AAAA,EAGmB,YAAA,GAAyH;AAC1I,IAAA,MAAM,CAAA,GAAI,MAAM,YAAA,EAAa;AAC7B,IAAA,IAAI,CAAC,IAAA,CAAK,KAAA,EAAO,KAAA,EAAO,OAAO,CAAA;AAC/B,IAAA,OAAO;AAAA,MACL,OAAA,EAAS,KAAA,CAAM,CAAA,CAAE,OAA4B,CAAA;AAAA,MAC7C,SAAA,EAAW,EAAE,SAAA,EAAW,GAAA,CAAI,SAAO,EAAE,GAAG,EAAA,EAAI,GAAA,EAAK,KAAA,CAAM,EAAA,CAAG,GAAG,CAAA,EAAG,EAAA,EAAI,KA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A,CAAgB,IAAA,CAAK,IAAI,CAAA,CAAE,MAAA,EAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,KAAA,GAAQ,CAAA,CAAE,KAAK,CAAC,CAAC,CAAA;AAAA,IAC/E;AAAA,EACF;AACF","file":"Spans-OBNYI6LJ.cjs","sourcesContent":["// The sequence behind a text layer with `spans`: a composition of ordinary text layers (see src/text/spans.ts) that also owns the typewriter\n// (`visibleChars`) of the whole text: it counts over every character of every piece, and tells each piece how many of its own to show.\nimport { CompositionSequence } from './Composition';\nimport { TextSequence, bindCounterKeyframes, resolveNumber, type CounterState } from './Text';\nimport { spansMeta, type SpansMeta } from '../text/spans';\nimport type { CompositionShape, SequenceSpec, Props } from '../types';\nimport type { Timeline } from '../core/timelineEngine';\n\nconst strip = (props: Props | undefined): Props | undefined => {\n if (!props || !('visibleChars' in props)) return props;\n const { visibleChars: _gone, ...rest } = props as Record<string, unknown>;\n return rest as unknown as Props;\n};\n\nexport class SpansSequence extends CompositionSequence {\n private readonly _meta: SpansMeta | undefined;\n private readonly _count: CounterState = { value: 0, visibleChars: 0 };\n\n constructor(spec: SequenceSpec, parent: CompositionShape | null, root: CompositionShape) {\n super(spec, parent, root);\n this._meta = spansMeta.get(spec);\n }\n\n /** `visibleChars` is the group's own counter, not a property to write on the container. */\n protected override displayProps(): { initial: CompositionSequence['spec']['initial']; keyframes: CompositionSequence['spec']['keyframes'] } {\n const p = super.displayProps();\n if (!this._meta?.typed) return p;\n return {\n initial: strip(p.initial as Props | undefined) as never,\n keyframes: p.keyframes?.map(kf => ({ ...kf, set: strip(kf.set), to: strip(kf.to), from: strip(kf.from) })),\n };\n }\n\n override bindTimeline(timeline: Timeline, offset = 0): void {\n super.bindTimeline(timeline, offset);\n if (!this._meta?.typed) return;\n const scope = this.scope();\n const first = (this.spec.initial as Record<string, unknown> | undefined)?.visibleChars;\n this._count.visibleChars = first === undefined ? 0 : resolveNumber(first, scope); // like a text: it starts at 0 once it is animated\n bindCounterKeyframes(timeline, this._count, 'visibleChars', () => this._distribute(), this.spec.keyframes ?? [], this.duration!, offset + this.at, scope);\n this._distribute();\n }\n\n /** Every piece shows its part of the first N characters of the whole text. */\n private _distribute(): void {\n const pieces = this._meta!.pieces;\n const total = Math.max(0, Math.floor(this._count.visibleChars));\n let i = 0;\n for (const child of this._children) {\n if (!(child instanceof TextSequence)) continue;\n const p = pieces[i++];\n if (p) child.setVisibleChars(Math.min(p.length, Math.max(0, total - p.start)));\n }\n }\n}\n"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { CompositionSequence } from './chunk-
|
|
2
|
-
import { spansMeta, resolveNumber, bindCounterKeyframes, TextSequence } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
1
|
+
import { CompositionSequence } from './chunk-OI75LGIB.js';
|
|
2
|
+
import { spansMeta, resolveNumber, bindCounterKeyframes, TextSequence } from './chunk-SC7EWGHB.js';
|
|
3
|
+
import './chunk-K3XOEC3C.js';
|
|
4
|
+
import './chunk-C2HL5236.js';
|
|
5
|
+
import './chunk-J4ZP76IL.js';
|
|
5
6
|
import './chunk-WGRWFQOB.js';
|
|
6
7
|
|
|
7
8
|
// src/sequences/Spans.ts
|
|
@@ -49,5 +50,5 @@ var SpansSequence = class extends CompositionSequence {
|
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
export { SpansSequence };
|
|
52
|
-
//# sourceMappingURL=Spans-
|
|
53
|
-
//# sourceMappingURL=Spans-
|
|
53
|
+
//# sourceMappingURL=Spans-WRQPIDPO.js.map
|
|
54
|
+
//# sourceMappingURL=Spans-WRQPIDPO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/sequences/Spans.ts"],"names":[],"mappings":";;;;;;;;AAQA,IAAM,KAAA,GAAQ,CAAC,KAAA,KAAgD;AAC7D,EAAA,IAAI,CAAC,KAAA,IAAS,EAAE,cAAA,IAAkB,QAAQ,OAAO,KAAA;AACjD,E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,EAAiD,YAAA;AAC1E,IAAA,IAAA,CAAK,OAAO,YAAA,GAAe,KAAA,KAAU,SAAY,CAAA,GAAI,aAAA,CAAc,OAAO,KAAK,CAAA;AAC/E,IAAA,oBAAA,CAAqB,UAAU,IAAA,CAAK,MAAA,EAAQ,gBAAgB,MAAM,IAAA,CAAK,aAAY,EAAG,IAAA,CAAK,IAAA,CAAK,SAAA,IAAa,EAAC,EAAG,IAAA,CAAK,UAAW,MAAA,GAAS,IAAA,CAAK,IAAI,KAAK,CAAA;AACxJ,IAAA,IAAA,CAAK,WAAA,EAAY;AAAA,EACnB;AAAA;AAAA,EAGQ,WAAA,GAAoB;AAC1B,IAAA,MAAM,MAAA,GAAS,KAAK,KAAA,CAAO,MAAA;AAC3B,IAAA,MAAM,KAAA,GAAQ,KAAK,GAAA,CAAI,CAAA,EAAG,KAAK,KAAA,CAAM,IAAA,CAAK,MAAA,CAAO,YAAY,CAAC,CAAA;AAC9D,IAAA,IAAI,CAAA,GAAI,CAAA;AACR,IAAA,KAAA,MAAW,KAAA,IAAS,KAAK,SAAA,EAAW;AAClC,MAAA,IAAI,EAAE,iBAAiB,YAAA,CAAA,EAAe;AACtC,MAAA,MAAM,CAAA,GAAI,OAAO,CAAA,EAAG,CAAA;AACpB,MAAA,IAAI,CAAA,EAAG,KAAA,CAAM,eAAA,CAAgB,IAAA,CAAK,IAAI,CAAA,CAAE,MAAA,EAAQ,IAAA,CAAK,GAAA,CAAI,CAAA,EAAG,KAAA,GAAQ,CAAA,CAAE,KAAK,CAAC,CAAC,CAAA;AAAA,IAC/E;AAAA,EACF;AACF","file":"Spans-WRQPIDPO.js","sourcesContent":["// The sequence behind a text layer with `spans`: a composition of ordinary text layers (see src/text/spans.ts) that also owns the typewriter\n// (`visibleChars`) of the whole text: it counts over every character of every piece, and tells each piece how many of its own to show.\nimport { CompositionSequence } from './Composition';\nimport { TextSequence, bindCounterKeyframes, resolveNumber, type CounterState } from './Text';\nimport { spansMeta, type SpansMeta } from '../text/spans';\nimport type { CompositionShape, SequenceSpec, Props } from '../types';\nimport type { Timeline } from '../core/timelineEngine';\n\nconst strip = (props: Props | undefined): Props | undefined => {\n if (!props || !('visibleChars' in props)) return props;\n const { visibleChars: _gone, ...rest } = props as Record<string, unknown>;\n return rest as unknown as Props;\n};\n\nexport class SpansSequence extends CompositionSequence {\n private readonly _meta: SpansMeta | undefined;\n private readonly _count: CounterState = { value: 0, visibleChars: 0 };\n\n constructor(spec: SequenceSpec, parent: CompositionShape | null, root: CompositionShape) {\n super(spec, parent, root);\n this._meta = spansMeta.get(spec);\n }\n\n /** `visibleChars` is the group's own counter, not a property to write on the container. */\n protected override displayProps(): { initial: CompositionSequence['spec']['initial']; keyframes: CompositionSequence['spec']['keyframes'] } {\n const p = super.displayProps();\n if (!this._meta?.typed) return p;\n return {\n initial: strip(p.initial as Props | undefined) as never,\n keyframes: p.keyframes?.map(kf => ({ ...kf, set: strip(kf.set), to: strip(kf.to), from: strip(kf.from) })),\n };\n }\n\n override bindTimeline(timeline: Timeline, offset = 0): void {\n super.bindTimeline(timeline, offset);\n if (!this._meta?.typed) return;\n const scope = this.scope();\n const first = (this.spec.initial as Record<string, unknown> | undefined)?.visibleChars;\n this._count.visibleChars = first === undefined ? 0 : resolveNumber(first, scope); // like a text: it starts at 0 once it is animated\n bindCounterKeyframes(timeline, this._count, 'visibleChars', () => this._distribute(), this.spec.keyframes ?? [], this.duration!, offset + this.at, scope);\n this._distribute();\n }\n\n /** Every piece shows its part of the first N characters of the whole text. */\n private _distribute(): void {\n const pieces = this._meta!.pieces;\n const total = Math.max(0, Math.floor(this._count.visibleChars));\n let i = 0;\n for (const child of this._children) {\n if (!(child instanceof TextSequence)) continue;\n const p = pieces[i++];\n if (p) child.setVisibleChars(Math.min(p.length, Math.max(0, total - p.start)));\n }\n }\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkGXGIISFS_cjs = require('./chunk-GXGIISFS.cjs');
|
|
4
|
+
require('./chunk-3FCDRLW3.cjs');
|
|
5
5
|
require('./chunk-DOLTCXCL.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
|
+
chunkGXGIISFS_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-2IDILRN6.cjs.map
|
|
94
|
+
//# sourceMappingURL=blendModes-2IDILRN6.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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AA,CAAQ,GAAA,CAAI,MAAM,CAAC,CAAA;AACnB,EAAAC,kBAAA,CAAW,IAAI,CAAU,CAAA;AAC3B;AAEO,IAAM,SAAA,GAA+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,EAAAC,uCAAA,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-2IDILRN6.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-C2HL5236.js';
|
|
2
|
+
import './chunk-J4ZP76IL.js';
|
|
3
3
|
import './chunk-WGRWFQOB.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-4QH44GOL.js.map
|
|
90
|
+
//# sourceMappingURL=blendModes-4QH44GOL.js.map
|
|
@@ -1 +1 @@
|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,CAAI,CAAA;AAAA,EAC9J;AACF","file":"blendModes-4QH44GOL.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"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CompositionSequence, maskSourceOf } from './chunk-
|
|
1
|
+
import { CompositionSequence, maskSourceOf } from './chunk-OI75LGIB.js';
|
|
2
|
+
import { EXPRESSION_NAMES, createTimeline, lengthen, loadAssetBundle, ensureFilterLibrary, checkEase, parseEase, homeDistance, DEFAULT_FOV, random, noise, flattenSvgPath, trimPolylines, rand, DEG, timeRemapOf, contentLength, resolveAt, parseSpring, springDuration, spansMeta } from './chunk-SC7EWGHB.js';
|
|
2
3
|
import { loadMediabunny } from './chunk-K3XOEC3C.js';
|
|
3
|
-
import { EXPRESSION_NAMES, createTimeline, lengthen, ensureFilterLibrary, checkEase, parseEase, homeDistance, DEFAULT_FOV, random, noise, flattenSvgPath, trimPolylines, rand, DEG, timeRemapOf, contentLength, resolveAt, parseSpring, springDuration, spansMeta } from './chunk-DOGY3EAW.js';
|
|
4
4
|
import { analyzeAudio, fft, resampleThrough, playSpan, measureLoudness } from './chunk-G4PXCV2B.js';
|
|
5
|
-
import { usesAdvancedBlend, enableAdvancedBlend } from './chunk-
|
|
6
|
-
import { describeLayer } from './chunk-
|
|
5
|
+
import { usesAdvancedBlend, enableAdvancedBlend } from './chunk-C2HL5236.js';
|
|
6
|
+
import { describeLayer } from './chunk-J4ZP76IL.js';
|
|
7
7
|
import { warnUnknownOptions, suggestName } from './chunk-WGRWFQOB.js';
|
|
8
|
-
import { extensions, CullerPlugin, Application, Container, Rectangle, Culler, BindGroup, CanvasTextMetrics, TextStyle,
|
|
8
|
+
import { extensions, CullerPlugin, Application, Container, Rectangle, Culler, BindGroup, CanvasTextMetrics, TextStyle, Filter, Texture, UniformGroup, GpuProgram, GlProgram, defaultFilterVert, Assets, Text, CanvasTextGenerator, CanvasPool } from 'pixi.js';
|
|
9
9
|
|
|
10
10
|
// src/core/gpuShare.ts
|
|
11
11
|
function sharedGpuOf(renderer) {
|
|
@@ -22,63 +22,6 @@ function sharedGpuOf(renderer) {
|
|
|
22
22
|
}
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
var registered = false;
|
|
26
|
-
function ensureLoadersRegistered(audioContext) {
|
|
27
|
-
if (registered) return;
|
|
28
|
-
registered = true;
|
|
29
|
-
extensions.add({
|
|
30
|
-
extension: { type: ExtensionType.LoadParser, name: "pixi-effects-audio" },
|
|
31
|
-
test: (url) => /\.(mp3|wav|ogg)$/i.test(url),
|
|
32
|
-
async load(url) {
|
|
33
|
-
const res = await fetch(url);
|
|
34
|
-
if (!res.ok) throw new Error(`pixi-effects: failed to load ${url}: ${res.statusText}`);
|
|
35
|
-
const buffer = await res.arrayBuffer();
|
|
36
|
-
const audioBuffer = await audioContext.decodeAudioData(buffer);
|
|
37
|
-
return { audioBuffer, duration: audioBuffer.duration };
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
extensions.add({
|
|
41
|
-
extension: { type: ExtensionType.LoadParser, name: "pixi-effects-video", priority: 1 },
|
|
42
|
-
test: (url) => /\.(mp4|webm|mov|mkv)$/i.test(url),
|
|
43
|
-
async load(url) {
|
|
44
|
-
const [M, blob] = await Promise.all([loadMediabunny(), fetch(url).then((r) => r.blob())]);
|
|
45
|
-
const { Input, BlobSource, ALL_FORMATS, Output, WavOutputFormat, BufferTarget, Conversion, VideoSampleSink } = M;
|
|
46
|
-
const input = new Input({ source: new BlobSource(blob), formats: ALL_FORMATS });
|
|
47
|
-
const videoTrack = await input.getPrimaryVideoTrack();
|
|
48
|
-
if (!videoTrack || !await videoTrack.canDecode()) {
|
|
49
|
-
throw new Error("pixi-effects: video track cannot be decoded");
|
|
50
|
-
}
|
|
51
|
-
const audioTrack = await input.getPrimaryAudioTrack();
|
|
52
|
-
const videoDuration = await videoTrack.computeDuration();
|
|
53
|
-
const audioDuration = audioTrack ? await audioTrack.computeDuration() : 0;
|
|
54
|
-
let audioBuffer = null;
|
|
55
|
-
if (audioTrack) {
|
|
56
|
-
try {
|
|
57
|
-
const out = new Output({ format: new WavOutputFormat(), target: new BufferTarget() });
|
|
58
|
-
const conv = await Conversion.init({ input, output: out, video: { discard: true } });
|
|
59
|
-
await conv.execute();
|
|
60
|
-
audioBuffer = await audioContext.decodeAudioData(out.target.buffer);
|
|
61
|
-
} catch (e) {
|
|
62
|
-
console.warn("pixi-effects: audio extraction failed:", e);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
videoTrack,
|
|
67
|
-
audioBuffer,
|
|
68
|
-
videoDuration,
|
|
69
|
-
audioDuration,
|
|
70
|
-
duration: Math.max(videoDuration, audioDuration),
|
|
71
|
-
sink: new VideoSampleSink(videoTrack)
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
}
|
|
76
|
-
async function loadAssetBundle(assets, audioContext, onProgress) {
|
|
77
|
-
ensureLoadersRegistered(audioContext);
|
|
78
|
-
const bundle = assets.map((a) => ({ alias: a.name, src: a.src }));
|
|
79
|
-
Assets.addBundle("pixi-effects", bundle);
|
|
80
|
-
return await Assets.loadBundle("pixi-effects", onProgress);
|
|
81
|
-
}
|
|
82
25
|
|
|
83
26
|
// src/core/AudioMixer.ts
|
|
84
27
|
async function mixdown(audios, totalDuration, sampleRate = 44100, pace) {
|
|
@@ -1671,9 +1614,9 @@ function canvasReport(root) {
|
|
|
1671
1614
|
const { differs, drawMs, threw } = seq.checkDeterminism(moments);
|
|
1672
1615
|
const name = describeLayer(seq.spec);
|
|
1673
1616
|
const type = seq.spec.type;
|
|
1674
|
-
const kind = type === "three" ? "three" : type === "scene3d" ? "scene3d" : "canvas";
|
|
1617
|
+
const kind = type === "three" ? "three" : type === "scene3d" ? "scene3d" : type === "scene2d" ? "scene2d" : "canvas";
|
|
1675
1618
|
const drawn = kind === "canvas" ? "draw threw" : "update or render threw";
|
|
1676
|
-
const problem = threw.length ? `${name} could not draw at ${threw.map((t) => `${t} s`).join(", ")} (its ${drawn}, or the layer failed to build): ${kind === "canvas" ? "it shows a magenta checkerboard there; the warning above says why" : "the warning above says why"}, so the layer cannot be called deterministic` : differs.length ? `${name} does not draw the same picture for the same time (checked at ${differs.map(describeDiff).join(", ")}; drawn in two orders after one draw that was thrown away): ` + (kind === "three" ? "usually its update uses Math.random, Date.now, a clock, or state that builds up from call to call: a mixer advanced with mixer.update(dt) is one (pose a clip with mixer.setTime(t), or threeGltf(url).pose(t)), and so is a value moved by the time since the last call. A skinned model of your own (not loaded by threeGltf) that moves and casts a shadow does it too: three culls a skinned mesh by a bounding sphere that does not follow it, so set mesh.frustumCulled = false. Set every object from t, so playback, a seek and an export agree" : kind === "scene3d" ? "usually its update keeps state from call to call (a value moved by the time since the last call), uses Math.random or a clock, or a model's player or a particle system runs on its own clock (pose a clip with model.player.getState(name).gotoAndStop(t)), or a MotionBlurEffect reads the camera of the frame drawn before. Set every object from t, so playback, a seek and an export agree" : "usually its draw uses Math.random, Date.now or state that outlives the call (a value it keeps from the last call), so playback, a seek and an export would not agree: use info.random() (seeded) and derive everything from t. If it uses none of these, look at the canvases it draws from: make sprites and masks with info.canvas(w, h) (not document.createElement) and draw them into the picture before the strokes that depend on them") : "";
|
|
1619
|
+
const problem = threw.length ? `${name} could not draw at ${threw.map((t) => `${t} s`).join(", ")} (its ${drawn}, or the layer failed to build): ${kind === "canvas" ? "it shows a magenta checkerboard there; the warning above says why" : "the warning above says why"}, so the layer cannot be called deterministic` : differs.length ? `${name} does not draw the same picture for the same time (checked at ${differs.map(describeDiff).join(", ")}; drawn in two orders after one draw that was thrown away): ` + (kind === "three" ? "usually its update uses Math.random, Date.now, a clock, or state that builds up from call to call: a mixer advanced with mixer.update(dt) is one (pose a clip with mixer.setTime(t), or threeGltf(url).pose(t)), and so is a value moved by the time since the last call. A skinned model of your own (not loaded by threeGltf) that moves and casts a shadow does it too: three culls a skinned mesh by a bounding sphere that does not follow it, so set mesh.frustumCulled = false. Set every object from t, so playback, a seek and an export agree" : kind === "scene3d" ? "usually its update keeps state from call to call (a value moved by the time since the last call), uses Math.random or a clock, or a model's player or a particle system runs on its own clock (pose a clip with model.player.getState(name).gotoAndStop(t)), or a MotionBlurEffect reads the camera of the frame drawn before. Set every object from t, so playback, a seek and an export agree" : kind === "scene2d" ? "usually its update keeps state from call to call (a value moved by the time since the last call, a position added to instead of set), uses Math.random or a clock, or something runs on PixiJS's ticker (a Ticker.shared.add of your own, a video texture). Set every object from t, so playback, a seek and an export agree" : "usually its draw uses Math.random, Date.now or state that outlives the call (a value it keeps from the last call), so playback, a seek and an export would not agree: use info.random() (seeded) and derive everything from t. If it uses none of these, look at the canvases it draws from: make sprites and masks with info.canvas(w, h) (not document.createElement) and draw them into the picture before the strokes that depend on them") : "";
|
|
1677
1620
|
out.push({ name: seq.spec.name ?? name, moments, drawMs, ok: !differs.length && !threw.length, problem, kind });
|
|
1678
1621
|
}
|
|
1679
1622
|
if (seq instanceof CompositionSequence) walk3(seq);
|
|
@@ -2009,7 +1952,14 @@ function pickScene(root, x, y, opts = {}, deps = {}) {
|
|
|
2009
1952
|
}
|
|
2010
1953
|
const point = at;
|
|
2011
1954
|
let hit = null;
|
|
2012
|
-
|
|
1955
|
+
const scene2d = seq.pick2d;
|
|
1956
|
+
if (typeof scene2d === "function" && !threeD) {
|
|
1957
|
+
const found2 = scene2d.call(seq, point);
|
|
1958
|
+
if (found2) {
|
|
1959
|
+
const s2 = seq;
|
|
1960
|
+
hit = { name, path, type: seq.spec.type, kind: "scene2d", point, scene2d: { object: found2.object, node: found2.node, point: found2.point, grab: () => ({ move: s2.dragFrom(found2.node, point) }) } };
|
|
1961
|
+
}
|
|
1962
|
+
} else if (threeD) {
|
|
2013
1963
|
if (quad && pointInQuad(quad, d.toLocal(point).x, d.toLocal(point).y)) hit = { name, path, type: seq.spec.type, kind: "card", point };
|
|
2014
1964
|
} else {
|
|
2015
1965
|
const local = d.toLocal(point);
|
|
@@ -2108,12 +2058,26 @@ function reusePoolOf(old) {
|
|
|
2108
2058
|
const key = seq.reuseKey();
|
|
2109
2059
|
if (key !== null) free.set(key, [...free.get(key) ?? [], seq]);
|
|
2110
2060
|
});
|
|
2111
|
-
|
|
2061
|
+
const borrowers = [];
|
|
2062
|
+
return {
|
|
2063
|
+
claim: (key, by) => {
|
|
2064
|
+
const d = free.get(key)?.shift() ?? null;
|
|
2065
|
+
if (d && by) borrowers.push(by);
|
|
2066
|
+
return d;
|
|
2067
|
+
},
|
|
2068
|
+
borrowers
|
|
2069
|
+
};
|
|
2112
2070
|
}
|
|
2113
|
-
function commitReuse(root) {
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2071
|
+
function commitReuse(root, pool) {
|
|
2072
|
+
const done = /* @__PURE__ */ new Set();
|
|
2073
|
+
const commit = (seq) => {
|
|
2074
|
+
if (!done.has(seq) && borrower(seq)) {
|
|
2075
|
+
done.add(seq);
|
|
2076
|
+
seq.commitReuse();
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
walk(root, commit);
|
|
2080
|
+
for (const seq of pool?.borrowers ?? []) commit(seq);
|
|
2117
2081
|
}
|
|
2118
2082
|
|
|
2119
2083
|
// src/core/hover.ts
|
|
@@ -3141,6 +3105,7 @@ var Movie = class {
|
|
|
3141
3105
|
if (!root || !app) throw new Error("pixi-effects: movie.rebuild() needs a ready movie \u2014 await movie.init(...) first");
|
|
3142
3106
|
const who = `movie.${reason === "vars" ? "setVars" : "rebuild"}()`;
|
|
3143
3107
|
let sequence = null;
|
|
3108
|
+
let reusePool = null;
|
|
3144
3109
|
const alive = () => {
|
|
3145
3110
|
if (this._initState !== "ready") throw new Error("pixi-effects: the movie was destroyed while it was being rebuilt");
|
|
3146
3111
|
};
|
|
@@ -3170,7 +3135,8 @@ var Movie = class {
|
|
|
3170
3135
|
if (change.composition !== void 0) for (const w of lintVars(change.composition, vars)) console.warn(w);
|
|
3171
3136
|
changed = changed || sizeChanged || change.composition !== void 0 || reason === "rebuild";
|
|
3172
3137
|
if (!changed) return { reason, ms: 0, audio: "none", frame: this.currentFrame, playing: this.isPlaying, unchanged: true };
|
|
3173
|
-
|
|
3138
|
+
reusePool = reusePoolOf(this._rootSequence);
|
|
3139
|
+
sequence = await this._construct(composition, vars, width, height, void 0, this._resized || sizeChanged, reusePool);
|
|
3174
3140
|
alive();
|
|
3175
3141
|
const timeline = createTimeline({ paused: true, defaults: { ease: "none" } });
|
|
3176
3142
|
lengthen(timeline, this.duration);
|
|
@@ -3210,7 +3176,7 @@ var Movie = class {
|
|
|
3210
3176
|
if (old?.target) root.removeChild(old.target);
|
|
3211
3177
|
if (sequence.target) root.addChild(sequence.target);
|
|
3212
3178
|
this._rootSequence = sequence;
|
|
3213
|
-
commitReuse(sequence);
|
|
3179
|
+
commitReuse(sequence, reusePool);
|
|
3214
3180
|
this.timeline = timeline;
|
|
3215
3181
|
this._timeFilters = collectTimeFilters(sequence);
|
|
3216
3182
|
const loud = quietUnbind();
|
|
@@ -5051,5 +5017,5 @@ function withFade(spec, opts) {
|
|
|
5051
5017
|
}
|
|
5052
5018
|
|
|
5053
5019
|
export { Movie, animateText, audioEnvelope, bpmEnvelope, cameraPath, computeEnvelope, dismissLoader, failLoader, followPath, kenBurns, measureText, musicBuffer, musicEnvelope, musicEvents, orbit, parseEase2 as parseEase, particles, react, resolveLoader, samplePath, splitText, stagger, wiggle, withFade };
|
|
5054
|
-
//# sourceMappingURL=chunk-
|
|
5055
|
-
//# sourceMappingURL=chunk-
|
|
5020
|
+
//# sourceMappingURL=chunk-24MVJFW4.js.map
|
|
5021
|
+
//# sourceMappingURL=chunk-24MVJFW4.js.map
|