pixi-effects 0.1.0 → 0.3.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 (45) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +117 -7
  3. package/ai/SKILL.md +44 -0
  4. package/ai/reference/cheatsheet.md +120 -0
  5. package/ai/reference/pitfalls.md +54 -0
  6. package/ai/reference/recipes.md +375 -0
  7. package/ai/template.html +82 -0
  8. package/ai/tools/save-image.py +24 -0
  9. package/dist/Base-BDw6dKRB.d.cts +92 -0
  10. package/dist/Base-Ba4Ta4ap.d.ts +92 -0
  11. package/dist/Composition-6FDH5OPM.cjs +13 -0
  12. package/dist/Composition-6FDH5OPM.cjs.map +1 -0
  13. package/dist/Composition-FEYAUMFI.js +4 -0
  14. package/dist/Composition-FEYAUMFI.js.map +1 -0
  15. package/dist/Controller.d.cts +2 -1
  16. package/dist/Controller.d.ts +2 -1
  17. package/dist/Movie-DMpaT67V.d.ts +179 -0
  18. package/dist/Movie-W8ISiEBB.d.cts +179 -0
  19. package/dist/chunk-DIJG2RSF.js +370 -0
  20. package/dist/chunk-DIJG2RSF.js.map +1 -0
  21. package/dist/chunk-PN5A6QA7.js +2031 -0
  22. package/dist/chunk-PN5A6QA7.js.map +1 -0
  23. package/dist/chunk-SIRVULFF.cjs +2049 -0
  24. package/dist/chunk-SIRVULFF.cjs.map +1 -0
  25. package/dist/chunk-ZL262ZRM.cjs +372 -0
  26. package/dist/chunk-ZL262ZRM.cjs.map +1 -0
  27. package/dist/index.cjs +371 -1798
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +95 -24
  30. package/dist/index.d.ts +95 -24
  31. package/dist/index.js +364 -1796
  32. package/dist/index.js.map +1 -1
  33. package/dist/three.cjs +161 -0
  34. package/dist/three.cjs.map +1 -0
  35. package/dist/three.d.cts +79 -0
  36. package/dist/three.d.ts +79 -0
  37. package/dist/three.js +157 -0
  38. package/dist/three.js.map +1 -0
  39. package/dist/{Movie-Bp66rkaC.d.cts → types-3c8Vymgw.d.cts} +84 -81
  40. package/dist/{Movie-Bp66rkaC.d.ts → types-3c8Vymgw.d.ts} +84 -81
  41. package/docs/api.md +333 -0
  42. package/docs/dsl.md +1017 -0
  43. package/llms-full.txt +1966 -0
  44. package/llms.txt +30 -0
  45. package/package.json +19 -7
package/llms.txt ADDED
@@ -0,0 +1,30 @@
1
+ # pixi-effects
2
+
3
+ > Declarative motion graphics and video for the web. Describe a video as plain objects (text, shapes, images, video, audio, nested compositions, a 2.5D camera, optional three.js), play it in a canvas, export MP4 / WebM / MOV. Built on PixiJS v8, GSAP and mediabunny. Written to be authored by AI: no per-frame code.
4
+
5
+ Rules that cause most failures (details in the skill and pitfalls):
6
+
7
+ - Keyframe `at` is measured from the start of its own layer (negative = back from the layer's end). A layer's `at` and a transition's `at` are composition time.
8
+ - Layers are hidden, not removed, after their lifespan; z-order is array order (later = on top).
9
+ - Angles are degrees; +z is toward the viewer; any number can be an expression such as 'GW/2 - w/2'.
10
+ - Anchors: rect/circle/ellipse are centred, text and image are top-left, compositions use pivotX/pivotY.
11
+ - Verify by looking: seek with `await movie.gotoFrame(n, true)`, check at least 5 timestamps, and read `window.__logs` (library warnings are instructions).
12
+
13
+ ## Start here
14
+
15
+ - [Skill: workflow and rules](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/SKILL.md): how to build, check and export a video; read first
16
+ - [Cheatsheet](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/reference/cheatsheet.md): every layer type, prop, default and convention on one page
17
+ - [Recipes](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/reference/recipes.md): tested building blocks (kinetic type, lower-third, count-up, bar chart, 2.5D title, camera orbit, slideshow with transitions, three.js)
18
+ - [Pitfalls](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/reference/pitfalls.md): real mistakes made by AI authors, with fixes
19
+ - [Starter template](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/ai/template.html): copy this file to begin
20
+
21
+ ## Reference
22
+
23
+ - [DSL reference](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/docs/dsl.md): composition, sequences, 3D layers and camera, keyframes, expressions, filters, transitions, presets
24
+ - [API reference](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/docs/api.md): Movie, Controller, events, render options, pixi-effects/three
25
+ - [README](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/README.md): install, CDN import map, quickstart
26
+
27
+ ## Optional
28
+
29
+ - [Everything above in one file](https://raw.githubusercontent.com/yjmtmtk/pixi-effects/main/llms-full.txt)
30
+ - [Live demos and playground](https://yjmtmtk.github.io/pixi-effects/)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixi-effects",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Declarative composition and video rendering for the web. Built on PixiJS v8.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -11,15 +11,20 @@
11
11
  "./controller": {
12
12
  "import": { "types": "./dist/Controller.d.ts", "default": "./dist/Controller.js" },
13
13
  "require": { "types": "./dist/Controller.d.cts", "default": "./dist/Controller.cjs" }
14
+ },
15
+ "./three": {
16
+ "import": { "types": "./dist/three.d.ts", "default": "./dist/three.js" },
17
+ "require": { "types": "./dist/three.d.cts", "default": "./dist/three.cjs" }
14
18
  }
15
19
  },
16
20
  "main": "./dist/index.cjs",
17
21
  "module": "./dist/index.js",
18
22
  "types": "./dist/index.d.ts",
19
- "files": ["dist", "README.md", "LICENSE"],
23
+ "files": ["dist", "ai", "docs/dsl.md", "docs/api.md", "llms.txt", "llms-full.txt", "CHANGELOG.md", "README.md", "LICENSE"],
20
24
  "keywords": [
21
25
  "pixi", "pixijs", "video", "composition", "compositing", "rendering",
22
- "after-effects", "motion-graphics", "timeline", "webgl", "gsap", "keyframe", "typescript"
26
+ "after-effects", "motion-graphics", "timeline", "webgl", "gsap", "keyframe", "typescript",
27
+ "three", "threejs"
23
28
  ],
24
29
  "license": "MIT",
25
30
  "author": "tefista <tefista.dev@gmail.com>",
@@ -33,14 +38,19 @@
33
38
  "test": "vitest run",
34
39
  "test:watch": "vitest",
35
40
  "typecheck": "tsc --noEmit",
36
- "prepublishOnly": "npm run typecheck && npm test && npm run build"
41
+ "build:ai": "node scripts/build-llms.mjs",
42
+ "prepublishOnly": "npm run build:ai && npm run typecheck && npm test && npm run build"
37
43
  },
38
44
  "dependencies": {
39
- "mediabunny": "^1.43.0"
45
+ "mediabunny": "^1.61.3"
40
46
  },
41
47
  "peerDependencies": {
42
48
  "gsap": "^3.12.0",
43
- "pixi.js": "^8.0.0"
49
+ "pixi.js": "^8.0.0",
50
+ "three": ">=0.150.0"
51
+ },
52
+ "peerDependenciesMeta": {
53
+ "three": { "optional": true }
44
54
  },
45
55
  "devDependencies": {
46
56
  "tsup": "^8.0.0",
@@ -48,7 +58,9 @@
48
58
  "vitest": "^2.1.0",
49
59
  "happy-dom": "^15.0.0",
50
60
  "gsap": "^3.12.0",
51
- "pixi.js": "^8.16.0"
61
+ "pixi.js": "^8.22.0",
62
+ "three": "^0.185.1",
63
+ "@types/three": "^0.185.0"
52
64
  },
53
65
  "engines": { "node": ">=18" }
54
66
  }