pixi-effects 0.48.2 → 0.50.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +53 -8
- package/ai/chat-template.html +8 -4
- package/ai/tools/check.mjs +6 -6
- package/dist/3d.cjs +967 -0
- package/dist/3d.cjs.map +1 -0
- package/dist/3d.d.cts +305 -0
- package/dist/3d.d.ts +305 -0
- package/dist/3d.js +960 -0
- package/dist/3d.js.map +1 -0
- package/dist/Canvas-BfZkAFJm.d.cts +12 -0
- package/dist/Canvas-BfZkAFJm.d.ts +12 -0
- package/dist/Composition-47U5U637.cjs +16 -0
- package/dist/{Composition-TJ5D7Z63.cjs.map → Composition-47U5U637.cjs.map} +1 -1
- package/dist/Composition-GVWWLFDL.js +7 -0
- package/dist/{Composition-5FKV2IBP.js.map → Composition-GVWWLFDL.js.map} +1 -1
- package/dist/Controller.d.cts +2 -2
- package/dist/Controller.d.ts +2 -2
- package/dist/{Movie-svZQF-9Z.d.cts → Movie-DogzDBuW.d.cts} +36 -5
- package/dist/{Movie--qSYKgAQ.d.ts → Movie-Y7iHg2V8.d.ts} +36 -5
- package/dist/{Spans-6A3VLHRH.js → Spans-3SEZSTQV.js} +6 -6
- package/dist/{Spans-6A3VLHRH.js.map → Spans-3SEZSTQV.js.map} +1 -1
- package/dist/{Spans-5ENZ3XGS.cjs → Spans-R426NVY3.cjs} +11 -11
- package/dist/{Spans-5ENZ3XGS.cjs.map → Spans-R426NVY3.cjs.map} +1 -1
- package/dist/{blendModes-V5XHC7U4.cjs → blendModes-2IDILRN6.cjs} +5 -5
- package/dist/{blendModes-V5XHC7U4.cjs.map → blendModes-2IDILRN6.cjs.map} +1 -1
- package/dist/{blendModes-535EMYGK.js → blendModes-4QH44GOL.js} +4 -4
- package/dist/{blendModes-535EMYGK.js.map → blendModes-4QH44GOL.js.map} +1 -1
- package/dist/{chunk-NGJXVJB7.cjs → chunk-3FCDRLW3.cjs} +5 -3
- package/dist/chunk-3FCDRLW3.cjs.map +1 -0
- package/dist/{chunk-JBDBICS2.js → chunk-C2HL5236.js} +4 -4
- package/dist/{chunk-JBDBICS2.js.map → chunk-C2HL5236.js.map} +1 -1
- package/dist/{chunk-WYR2AU4W.cjs → chunk-GXGIISFS.cjs} +5 -5
- package/dist/{chunk-WYR2AU4W.cjs.map → chunk-GXGIISFS.cjs.map} +1 -1
- package/dist/{chunk-BFRWSV3R.js → chunk-J4ZP76IL.js} +5 -4
- package/dist/chunk-J4ZP76IL.js.map +1 -0
- package/dist/{chunk-CCPJD76D.cjs → chunk-O2MD3L4J.cjs} +93 -93
- package/dist/chunk-O2MD3L4J.cjs.map +1 -0
- package/dist/{chunk-IVKI6CPH.js → chunk-SSVHAF3Q.js} +483 -20
- package/dist/chunk-SSVHAF3Q.js.map +1 -0
- package/dist/{chunk-6D4W2KZQ.js → chunk-TXNQLMRT.js} +6 -6
- package/dist/chunk-TXNQLMRT.js.map +1 -0
- package/dist/{chunk-RCKLUCB7.js → chunk-UTUUOQ47.js} +46 -20
- package/dist/chunk-UTUUOQ47.js.map +1 -0
- package/dist/{chunk-Z3DM4ETD.cjs → chunk-VVUSZVP7.cjs} +507 -42
- package/dist/chunk-VVUSZVP7.cjs.map +1 -0
- package/dist/{chunk-45ALIMAF.cjs → chunk-YOKRPAKA.cjs} +89 -63
- package/dist/chunk-YOKRPAKA.cjs.map +1 -0
- package/dist/index.cjs +35 -35
- 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/{music-P4JRT73P.js → music-ATX22VAT.js} +3 -3
- package/dist/{music-P4JRT73P.js.map → music-ATX22VAT.js.map} +1 -1
- package/dist/{music-XQEPBIDT.cjs → music-OFVM3PYH.cjs} +3 -3
- package/dist/{music-XQEPBIDT.cjs.map → music-OFVM3PYH.cjs.map} +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 +13 -10
- package/dist/three.cjs.map +1 -1
- package/dist/three.d.cts +4 -12
- package/dist/three.d.ts +4 -12
- package/dist/three.js +8 -5
- package/dist/three.js.map +1 -1
- package/dist/{types-CTSrPvY3.d.cts → types-BZngm4nT.d.cts} +48 -5
- package/dist/{types-CTSrPvY3.d.ts → types-BZngm4nT.d.ts} +48 -5
- package/docs/api.md +45 -2
- package/docs/dsl.md +115 -1
- package/llms-full.txt +307 -6
- package/package.json +19 -3
- package/skills/pixi-effects/SKILL.md +4 -2
- package/skills/pixi-effects/reference/cheatsheet.md +4 -0
- package/skills/pixi-effects/reference/pitfalls.md +20 -0
- package/skills/pixi-effects/reference/recipes.md +119 -1
- package/skills/pixi-effects/template.html +14 -8
- package/dist/Composition-5FKV2IBP.js +0 -7
- package/dist/Composition-TJ5D7Z63.cjs +0 -16
- package/dist/chunk-45ALIMAF.cjs.map +0 -1
- package/dist/chunk-6D4W2KZQ.js.map +0 -1
- package/dist/chunk-BFRWSV3R.js.map +0 -1
- package/dist/chunk-CCPJD76D.cjs.map +0 -1
- package/dist/chunk-IVKI6CPH.js.map +0 -1
- package/dist/chunk-NGJXVJB7.cjs.map +0 -1
- package/dist/chunk-RCKLUCB7.js.map +0 -1
- package/dist/chunk-Z3DM4ETD.cjs.map +0 -1
package/dist/three.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkVVUSZVP7_cjs = require('./chunk-VVUSZVP7.cjs');
|
|
4
|
+
require('./chunk-3FCDRLW3.cjs');
|
|
5
5
|
require('./chunk-DOLTCXCL.cjs');
|
|
6
6
|
var pixi_js = require('pixi.js');
|
|
7
7
|
var three$1 = require('three');
|
|
@@ -169,8 +169,7 @@ function releaseThree(kind) {
|
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
// src/three/ThreeSequence.ts
|
|
172
|
-
var
|
|
173
|
-
var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
172
|
+
var ThreeSequence = class extends chunkVVUSZVP7_cjs.Sequence {
|
|
174
173
|
_renderer = null;
|
|
175
174
|
/** The renderer this layer draws with (`'webgl'` or `'webgpu'`), once it is built. */
|
|
176
175
|
renderer = null;
|
|
@@ -191,6 +190,8 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
191
190
|
_borrowed = null;
|
|
192
191
|
/** True once another layer owns this layer's state: destroying this one must not let it go. */
|
|
193
192
|
_donated = false;
|
|
193
|
+
/** What setup left on the objects the keyframes reach, shared with a layer that takes the scene over (core/setupValues.ts). */
|
|
194
|
+
_setupValues = new chunkVVUSZVP7_cjs.SetupValues();
|
|
194
195
|
/** Things to do just before every draw (the 2D layers shown on meshes: `threeLayerTexture`), and those layers' handles. Both go with the state to a layer that takes it over. */
|
|
195
196
|
_drawHooks = /* @__PURE__ */ new Set();
|
|
196
197
|
_layerTextures = [];
|
|
@@ -228,10 +229,10 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
228
229
|
if (this.duration === void 0) {
|
|
229
230
|
this.duration = this.parent?.duration ?? this.root.duration;
|
|
230
231
|
}
|
|
231
|
-
if (typeof spec.update === "function" && NOT_PURE.test(spec.update.toString())) {
|
|
232
|
+
if (typeof spec.update === "function" && chunkVVUSZVP7_cjs.NOT_PURE.test(spec.update.toString())) {
|
|
232
233
|
console.warn(`pixi-effects: three layer${spec.name ? ` "${spec.name}"` : ""}: update calls Math.random, Date.now, performance.now or new Date, so it is not deterministic: the same frame would draw differently in playback, in a seek and in an export. Derive the value from t`);
|
|
233
234
|
}
|
|
234
|
-
const scope =
|
|
235
|
+
const scope = chunkVVUSZVP7_cjs.buildScope(this, this.parent, this.root);
|
|
235
236
|
const width = resolveDim(spec.width, scope) ?? this.parent?.width ?? this.root.width;
|
|
236
237
|
const height = resolveDim(spec.height, scope) ?? this.parent?.height ?? this.root.height;
|
|
237
238
|
const resolution = spec.resolution ?? 1;
|
|
@@ -241,7 +242,7 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
241
242
|
this._gpu = kind === "webgpu";
|
|
242
243
|
this.renderer = kind;
|
|
243
244
|
this._key = spec.reuse === false || !spec.name ? null : JSON.stringify([spec.name, idOf(spec.setup), width, height, resolution, antialias, kind, spec.shareGpu !== false && !!this.root.gpu, !!spec.followCamera, !!spec.followLights, !!spec.followFog]);
|
|
244
|
-
const donor = this._key !== null ? this.root.reuse?.claim(this._key) : null;
|
|
245
|
+
const donor = this._key !== null ? this.root.reuse?.claim(this._key, this) : null;
|
|
245
246
|
if (donor && donor._lendable()) {
|
|
246
247
|
this._borrow(donor, width, height, spec.name);
|
|
247
248
|
return;
|
|
@@ -380,6 +381,7 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
380
381
|
this._camera = d._camera;
|
|
381
382
|
this._ctx = d._ctx;
|
|
382
383
|
this._objects = d._objects;
|
|
384
|
+
this._setupValues = d._setupValues;
|
|
383
385
|
this._rt = d._rt;
|
|
384
386
|
this._sharedTexture = d._sharedTexture;
|
|
385
387
|
this._texture = d._texture;
|
|
@@ -398,6 +400,7 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
398
400
|
commitReuse() {
|
|
399
401
|
const d = this._borrowed;
|
|
400
402
|
if (!d) return;
|
|
403
|
+
this._setupValues.restore();
|
|
401
404
|
d._donated = true;
|
|
402
405
|
d._tracked = false;
|
|
403
406
|
this._borrowed = null;
|
|
@@ -729,7 +732,7 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
729
732
|
this._warnPath(path, `no property "${prop}"`);
|
|
730
733
|
return null;
|
|
731
734
|
}
|
|
732
|
-
return { target: obj, prop };
|
|
735
|
+
return this._borrowed ? this._setupValues.view(obj, prop, () => this._borrowed !== null) : (this._setupValues.note(obj, prop), { target: obj, prop });
|
|
733
736
|
}
|
|
734
737
|
_warnPath(path, why) {
|
|
735
738
|
if (this._warnedPaths.has(path)) return;
|
|
@@ -800,7 +803,7 @@ var ThreeSequence = class extends chunkZ3DM4ETD_cjs.Sequence {
|
|
|
800
803
|
function resolveDim(v, scope) {
|
|
801
804
|
if (v === void 0) return void 0;
|
|
802
805
|
if (typeof v === "number") return v;
|
|
803
|
-
return
|
|
806
|
+
return chunkVVUSZVP7_cjs.evaluateExpr(v, scope);
|
|
804
807
|
}
|
|
805
808
|
var ids = /* @__PURE__ */ new WeakMap();
|
|
806
809
|
var lastId = 0;
|
|
@@ -1093,7 +1096,7 @@ function registerThree(options = {}) {
|
|
|
1093
1096
|
const kind = options.renderer ?? "webgl";
|
|
1094
1097
|
checkRendererKind(kind, "registerThree's renderer");
|
|
1095
1098
|
setPageRenderer(kind);
|
|
1096
|
-
|
|
1099
|
+
chunkVVUSZVP7_cjs.registerSequenceType("three", ThreeSequence);
|
|
1097
1100
|
}
|
|
1098
1101
|
function three(spec) {
|
|
1099
1102
|
return spec;
|