pixi-effects 0.49.0 → 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.
Files changed (80) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +8 -7
  3. package/ai/chat-template.html +4 -4
  4. package/ai/tools/check.mjs +6 -6
  5. package/dist/3d.cjs +17 -13
  6. package/dist/3d.cjs.map +1 -1
  7. package/dist/3d.d.cts +3 -1
  8. package/dist/3d.d.ts +3 -1
  9. package/dist/3d.js +9 -5
  10. package/dist/3d.js.map +1 -1
  11. package/dist/Composition-47U5U637.cjs +16 -0
  12. package/dist/{Composition-464AWDV6.cjs.map → Composition-47U5U637.cjs.map} +1 -1
  13. package/dist/Composition-GVWWLFDL.js +7 -0
  14. package/dist/{Composition-5U63LMPX.js.map → Composition-GVWWLFDL.js.map} +1 -1
  15. package/dist/Controller.d.cts +2 -2
  16. package/dist/Controller.d.ts +2 -2
  17. package/dist/{Movie-BxB7bauG.d.cts → Movie-DogzDBuW.d.cts} +20 -5
  18. package/dist/{Movie-6EWOz6Yw.d.ts → Movie-Y7iHg2V8.d.ts} +20 -5
  19. package/dist/{Spans-W5VJRMGC.js → Spans-3SEZSTQV.js} +6 -6
  20. package/dist/{Spans-W5VJRMGC.js.map → Spans-3SEZSTQV.js.map} +1 -1
  21. package/dist/{Spans-DUR2W5EH.cjs → Spans-R426NVY3.cjs} +11 -11
  22. package/dist/{Spans-DUR2W5EH.cjs.map → Spans-R426NVY3.cjs.map} +1 -1
  23. package/dist/{blendModes-NC76DNVX.cjs → blendModes-2IDILRN6.cjs} +5 -5
  24. package/dist/{blendModes-NC76DNVX.cjs.map → blendModes-2IDILRN6.cjs.map} +1 -1
  25. package/dist/{blendModes-ZOBLPSR3.js → blendModes-4QH44GOL.js} +4 -4
  26. package/dist/{blendModes-ZOBLPSR3.js.map → blendModes-4QH44GOL.js.map} +1 -1
  27. package/dist/{chunk-ABWRISRK.cjs → chunk-3FCDRLW3.cjs} +4 -3
  28. package/dist/chunk-3FCDRLW3.cjs.map +1 -0
  29. package/dist/{chunk-MXACRKAN.js → chunk-C2HL5236.js} +4 -4
  30. package/dist/{chunk-MXACRKAN.js.map → chunk-C2HL5236.js.map} +1 -1
  31. package/dist/{chunk-5YNME6AH.cjs → chunk-GXGIISFS.cjs} +5 -5
  32. package/dist/{chunk-5YNME6AH.cjs.map → chunk-GXGIISFS.cjs.map} +1 -1
  33. package/dist/{chunk-H363KMJR.js → chunk-J4ZP76IL.js} +4 -3
  34. package/dist/chunk-J4ZP76IL.js.map +1 -0
  35. package/dist/{chunk-BSFWVTSR.cjs → chunk-O2MD3L4J.cjs} +92 -92
  36. package/dist/{chunk-BSFWVTSR.cjs.map → chunk-O2MD3L4J.cjs.map} +1 -1
  37. package/dist/{chunk-DOGY3EAW.js → chunk-SSVHAF3Q.js} +470 -17
  38. package/dist/chunk-SSVHAF3Q.js.map +1 -0
  39. package/dist/{chunk-USUUAYTE.js → chunk-TXNQLMRT.js} +5 -5
  40. package/dist/{chunk-USUUAYTE.js.map → chunk-TXNQLMRT.js.map} +1 -1
  41. package/dist/{chunk-PBMDZT2T.js → chunk-UTUUOQ47.js} +39 -16
  42. package/dist/chunk-UTUUOQ47.js.map +1 -0
  43. package/dist/{chunk-33USHRV5.cjs → chunk-VVUSZVP7.cjs} +493 -39
  44. package/dist/chunk-VVUSZVP7.cjs.map +1 -0
  45. package/dist/{chunk-GUDLIAIG.cjs → chunk-YOKRPAKA.cjs} +82 -59
  46. package/dist/chunk-YOKRPAKA.cjs.map +1 -0
  47. package/dist/index.cjs +35 -35
  48. package/dist/index.d.cts +3 -3
  49. package/dist/index.d.ts +3 -3
  50. package/dist/index.js +5 -5
  51. package/dist/loader.css +1 -1
  52. package/dist/present.cjs +5 -5
  53. package/dist/present.d.cts +2 -2
  54. package/dist/present.d.ts +2 -2
  55. package/dist/present.js +5 -5
  56. package/dist/three.cjs +13 -9
  57. package/dist/three.cjs.map +1 -1
  58. package/dist/three.d.cts +3 -1
  59. package/dist/three.d.ts +3 -1
  60. package/dist/three.js +8 -4
  61. package/dist/three.js.map +1 -1
  62. package/dist/{types-kt7DQKfO.d.cts → types-BZngm4nT.d.cts} +48 -5
  63. package/dist/{types-kt7DQKfO.d.ts → types-BZngm4nT.d.ts} +48 -5
  64. package/docs/api.md +4 -1
  65. package/docs/dsl.md +35 -1
  66. package/llms-full.txt +91 -3
  67. package/package.json +1 -1
  68. package/skills/pixi-effects/SKILL.md +2 -1
  69. package/skills/pixi-effects/reference/cheatsheet.md +2 -0
  70. package/skills/pixi-effects/reference/pitfalls.md +6 -0
  71. package/skills/pixi-effects/reference/recipes.md +42 -0
  72. package/skills/pixi-effects/template.html +8 -7
  73. package/dist/Composition-464AWDV6.cjs +0 -16
  74. package/dist/Composition-5U63LMPX.js +0 -7
  75. package/dist/chunk-33USHRV5.cjs.map +0 -1
  76. package/dist/chunk-ABWRISRK.cjs.map +0 -1
  77. package/dist/chunk-DOGY3EAW.js.map +0 -1
  78. package/dist/chunk-GUDLIAIG.cjs.map +0 -1
  79. package/dist/chunk-H363KMJR.js.map +0 -1
  80. package/dist/chunk-PBMDZT2T.js.map +0 -1
package/dist/three.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as Sequence, b as SpaceNow, c as SequenceCommon, d as PropValue, f as PathRouters, S as SequenceSpec } from './types-kt7DQKfO.cjs';
1
+ import { e as Sequence, b as SpaceNow, c as SequenceCommon, d as PropValue, f as PathRouters, S as SequenceSpec } from './types-BZngm4nT.cjs';
2
2
  import { Renderer } from 'pixi.js';
3
3
  import { Material, Texture, Scene, Camera, WebGLRenderer, Object3D, Group, Vector3, PerspectiveCamera } from 'three';
4
4
  import { WebGPURenderer } from 'three/webgpu';
@@ -164,6 +164,8 @@ declare class ThreeSequence extends Sequence {
164
164
  private _borrowed;
165
165
  /** True once another layer owns this layer's state: destroying this one must not let it go. */
166
166
  private _donated;
167
+ /** What setup left on the objects the keyframes reach, shared with a layer that takes the scene over (core/setupValues.ts). */
168
+ private _setupValues;
167
169
  /** 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. */
168
170
  private _drawHooks;
169
171
  private _layerTextures;
package/dist/three.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { e as Sequence, b as SpaceNow, c as SequenceCommon, d as PropValue, f as PathRouters, S as SequenceSpec } from './types-kt7DQKfO.js';
1
+ import { e as Sequence, b as SpaceNow, c as SequenceCommon, d as PropValue, f as PathRouters, S as SequenceSpec } from './types-BZngm4nT.js';
2
2
  import { Renderer } from 'pixi.js';
3
3
  import { Material, Texture, Scene, Camera, WebGLRenderer, Object3D, Group, Vector3, PerspectiveCamera } from 'three';
4
4
  import { WebGPURenderer } from 'three/webgpu';
@@ -164,6 +164,8 @@ declare class ThreeSequence extends Sequence {
164
164
  private _borrowed;
165
165
  /** True once another layer owns this layer's state: destroying this one must not let it go. */
166
166
  private _donated;
167
+ /** What setup left on the objects the keyframes reach, shared with a layer that takes the scene over (core/setupValues.ts). */
168
+ private _setupValues;
167
169
  /** 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. */
168
170
  private _drawHooks;
169
171
  private _layerTextures;
package/dist/three.js CHANGED
@@ -1,5 +1,5 @@
1
- import { Sequence, NOT_PURE, buildScope, evaluateExpr, registerSequenceType } from './chunk-DOGY3EAW.js';
2
- import './chunk-H363KMJR.js';
1
+ import { Sequence, SetupValues, NOT_PURE, buildScope, evaluateExpr, registerSequenceType } from './chunk-SSVHAF3Q.js';
2
+ import './chunk-J4ZP76IL.js';
3
3
  import './chunk-WGRWFQOB.js';
4
4
  import { Texture, Sprite, TextureSource, RenderTexture, Matrix } from 'pixi.js';
5
5
  import { WebGLRenderer, Scene, PerspectiveCamera, Raycaster, Vector2, Vector3, Quaternion, Plane, Box3, RenderTarget, Group, AnimationMixer, LoopOnce, LoopRepeat, AmbientLight, DirectionalLight, SpotLight, PointLight, Color, SRGBColorSpace, Fog } from 'three';
@@ -188,6 +188,8 @@ var ThreeSequence = class extends Sequence {
188
188
  _borrowed = null;
189
189
  /** True once another layer owns this layer's state: destroying this one must not let it go. */
190
190
  _donated = false;
191
+ /** What setup left on the objects the keyframes reach, shared with a layer that takes the scene over (core/setupValues.ts). */
192
+ _setupValues = new SetupValues();
191
193
  /** 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. */
192
194
  _drawHooks = /* @__PURE__ */ new Set();
193
195
  _layerTextures = [];
@@ -238,7 +240,7 @@ var ThreeSequence = class extends Sequence {
238
240
  this._gpu = kind === "webgpu";
239
241
  this.renderer = kind;
240
242
  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]);
241
- const donor = this._key !== null ? this.root.reuse?.claim(this._key) : null;
243
+ const donor = this._key !== null ? this.root.reuse?.claim(this._key, this) : null;
242
244
  if (donor && donor._lendable()) {
243
245
  this._borrow(donor, width, height, spec.name);
244
246
  return;
@@ -377,6 +379,7 @@ var ThreeSequence = class extends Sequence {
377
379
  this._camera = d._camera;
378
380
  this._ctx = d._ctx;
379
381
  this._objects = d._objects;
382
+ this._setupValues = d._setupValues;
380
383
  this._rt = d._rt;
381
384
  this._sharedTexture = d._sharedTexture;
382
385
  this._texture = d._texture;
@@ -395,6 +398,7 @@ var ThreeSequence = class extends Sequence {
395
398
  commitReuse() {
396
399
  const d = this._borrowed;
397
400
  if (!d) return;
401
+ this._setupValues.restore();
398
402
  d._donated = true;
399
403
  d._tracked = false;
400
404
  this._borrowed = null;
@@ -726,7 +730,7 @@ var ThreeSequence = class extends Sequence {
726
730
  this._warnPath(path, `no property "${prop}"`);
727
731
  return null;
728
732
  }
729
- return { target: obj, prop };
733
+ return this._borrowed ? this._setupValues.view(obj, prop, () => this._borrowed !== null) : (this._setupValues.note(obj, prop), { target: obj, prop });
730
734
  }
731
735
  _warnPath(path, why) {
732
736
  if (this._warnedPaths.has(path)) return;