@docyrus/animaguru 0.6.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 (198) hide show
  1. package/NOTICE.md +256 -0
  2. package/README.md +241 -0
  3. package/dist/animaguru.js +27338 -0
  4. package/package.json +37 -0
  5. package/skills/animaguru/SKILL.md +115 -0
  6. package/skills/animaguru-advertising/SKILL.md +25 -0
  7. package/skills/animaguru-advertising/references/brand-bumper.md +11 -0
  8. package/skills/animaguru-advertising/references/comparison.md +11 -0
  9. package/skills/animaguru-advertising/references/creator-testimonial.md +11 -0
  10. package/skills/animaguru-advertising/references/editorial-advertorial.md +11 -0
  11. package/skills/animaguru-advertising/references/game-reward.md +11 -0
  12. package/skills/animaguru-advertising/references/offer-promotion.md +11 -0
  13. package/skills/animaguru-advertising/references/product-launch.md +11 -0
  14. package/skills/animaguru-advertising/references/product-proof.md +11 -0
  15. package/skills/animaguru-analog-film-tape/SKILL.md +29 -0
  16. package/skills/animaguru-analog-film-tape/references/recipe.md +23 -0
  17. package/skills/animaguru-animated-data-visualization/SKILL.md +39 -0
  18. package/skills/animaguru-animated-data-visualization/references/data-contract.md +16 -0
  19. package/skills/animaguru-animated-data-visualization/references/variants.md +17 -0
  20. package/skills/animaguru-art-deco-motion/SKILL.md +29 -0
  21. package/skills/animaguru-art-deco-motion/references/recipe.md +22 -0
  22. package/skills/animaguru-ascii-crt/SKILL.md +29 -0
  23. package/skills/animaguru-ascii-crt/references/recipe.md +22 -0
  24. package/skills/animaguru-blueprint-drafting/SKILL.md +29 -0
  25. package/skills/animaguru-blueprint-drafting/references/recipe.md +22 -0
  26. package/skills/animaguru-cartoon-character-animation/SKILL.md +35 -0
  27. package/skills/animaguru-cartoon-character-animation/references/variants.md +17 -0
  28. package/skills/animaguru-cutout-animation/SKILL.md +33 -0
  29. package/skills/animaguru-cutout-animation/references/production-recipe.md +37 -0
  30. package/skills/animaguru-cutout-animation/references/variants.md +17 -0
  31. package/skills/animaguru-cutout-animation/references/visual-style.md +34 -0
  32. package/skills/animaguru-dark-tech-stage/SKILL.md +29 -0
  33. package/skills/animaguru-dark-tech-stage/references/recipe.md +23 -0
  34. package/skills/animaguru-diagram-formula-motion/SKILL.md +36 -0
  35. package/skills/animaguru-diagram-formula-motion/references/variants.md +17 -0
  36. package/skills/animaguru-engraved-relief-print/SKILL.md +29 -0
  37. package/skills/animaguru-engraved-relief-print/references/recipe.md +24 -0
  38. package/skills/animaguru-flat-vector-motion/SKILL.md +35 -0
  39. package/skills/animaguru-flat-vector-motion/references/variants.md +17 -0
  40. package/skills/animaguru-general-video/SKILL.md +20 -0
  41. package/skills/animaguru-general-video/references/ambient-loop.md +11 -0
  42. package/skills/animaguru-general-video/references/music-lyrics.md +11 -0
  43. package/skills/animaguru-general-video/references/short-film.md +11 -0
  44. package/skills/animaguru-general-video/references/titles-event.md +11 -0
  45. package/skills/animaguru-general-video/references/visual-essay.md +11 -0
  46. package/skills/animaguru-generative-light-signal/SKILL.md +29 -0
  47. package/skills/animaguru-generative-light-signal/references/recipe.md +23 -0
  48. package/skills/animaguru-glass-mosaic/SKILL.md +29 -0
  49. package/skills/animaguru-glass-mosaic/references/recipe.md +23 -0
  50. package/skills/animaguru-halftone-editorial/SKILL.md +29 -0
  51. package/skills/animaguru-halftone-editorial/references/recipe.md +23 -0
  52. package/skills/animaguru-holographic-scan/SKILL.md +29 -0
  53. package/skills/animaguru-holographic-scan/references/recipe.md +22 -0
  54. package/skills/animaguru-interface-motion/SKILL.md +36 -0
  55. package/skills/animaguru-interface-motion/references/screen-mapping.md +16 -0
  56. package/skills/animaguru-interface-motion/references/variants.md +17 -0
  57. package/skills/animaguru-isometric-worlds/SKILL.md +35 -0
  58. package/skills/animaguru-isometric-worlds/references/variants.md +17 -0
  59. package/skills/animaguru-kinetic-typography/SKILL.md +35 -0
  60. package/skills/animaguru-kinetic-typography/references/variants.md +17 -0
  61. package/skills/animaguru-miniature-diorama/SKILL.md +29 -0
  62. package/skills/animaguru-miniature-diorama/references/recipe.md +23 -0
  63. package/skills/animaguru-painterly-depth-animation/SKILL.md +35 -0
  64. package/skills/animaguru-painterly-depth-animation/references/variants.md +17 -0
  65. package/skills/animaguru-paper-popup/SKILL.md +29 -0
  66. package/skills/animaguru-paper-popup/references/recipe.md +22 -0
  67. package/skills/animaguru-photo-footage-editorial/SKILL.md +29 -0
  68. package/skills/animaguru-photo-footage-editorial/references/recipe.md +23 -0
  69. package/skills/animaguru-pixel-art-animation/SKILL.md +36 -0
  70. package/skills/animaguru-pixel-art-animation/references/variants.md +17 -0
  71. package/skills/animaguru-portal-zoom/SKILL.md +29 -0
  72. package/skills/animaguru-portal-zoom/references/recipe.md +21 -0
  73. package/skills/animaguru-risograph-print/SKILL.md +29 -0
  74. package/skills/animaguru-risograph-print/references/recipe.md +23 -0
  75. package/skills/animaguru-sand-drawing/SKILL.md +29 -0
  76. package/skills/animaguru-sand-drawing/references/recipe.md +21 -0
  77. package/skills/animaguru-shadow-theatre/SKILL.md +29 -0
  78. package/skills/animaguru-shadow-theatre/references/recipe.md +23 -0
  79. package/skills/animaguru-silkscreen-poster/SKILL.md +29 -0
  80. package/skills/animaguru-silkscreen-poster/references/recipe.md +22 -0
  81. package/skills/animaguru-stop-motion-objects/SKILL.md +29 -0
  82. package/skills/animaguru-stop-motion-objects/references/recipe.md +23 -0
  83. package/skills/animaguru-studio-product-reveal/SKILL.md +29 -0
  84. package/skills/animaguru-studio-product-reveal/references/recipe.md +23 -0
  85. package/skills/animaguru-video/SKILL.md +79 -0
  86. package/skills/animaguru-whiteboard-line-drawing/SKILL.md +34 -0
  87. package/skills/animaguru-whiteboard-line-drawing/references/variants.md +17 -0
  88. package/templates/video/AGENTS.md +34 -0
  89. package/templates/video/CLAUDE.md +19 -0
  90. package/templates/video/README.md +101 -0
  91. package/templates/video/VIDEO-STYLE-NOTICES.txt +54 -0
  92. package/templates/video/film.config.json +10 -0
  93. package/templates/video/gitignore +11 -0
  94. package/templates/video/index.html +14 -0
  95. package/templates/video/package.json +28 -0
  96. package/templates/video/public/brand/logo-mark.svg +5 -0
  97. package/templates/video/scripts/build.mjs +12 -0
  98. package/templates/video/scripts/export-html.mjs +12 -0
  99. package/templates/video/scripts/export-mp4.mjs +209 -0
  100. package/templates/video/scripts/html-export-plugin.mjs +35 -0
  101. package/templates/video/scripts/html-export.mjs +54 -0
  102. package/templates/video/scripts/install-example.mjs +32 -0
  103. package/templates/video/scripts/review-analysis.mjs +29 -0
  104. package/templates/video/scripts/review-audio.mjs +24 -0
  105. package/templates/video/scripts/review.mjs +37 -0
  106. package/templates/video/scripts/starter-film.sha256 +1 -0
  107. package/templates/video/shared/locales/en/export.json +10 -0
  108. package/templates/video/shared/locales/en/film.json +42 -0
  109. package/templates/video/shared/locales/en/player.json +31 -0
  110. package/templates/video/shared/locales/en/style-studies.json +168 -0
  111. package/templates/video/shared/locales/en/timeline.json +33 -0
  112. package/templates/video/src/assets.ts +4 -0
  113. package/templates/video/src/download.ts +27 -0
  114. package/templates/video/src/exporter.ts +70 -0
  115. package/templates/video/src/film-resources.ts +29 -0
  116. package/templates/video/src/film.ts +132 -0
  117. package/templates/video/src/main.ts +219 -0
  118. package/templates/video/src/resource-timeline.ts +193 -0
  119. package/templates/video/src/review.ts +50 -0
  120. package/templates/video/src/studies/film.ts +26 -0
  121. package/templates/video/src/studies/media.ts +46 -0
  122. package/templates/video/src/studies/model.ts +60 -0
  123. package/templates/video/src/studies/pixi-renderer.ts +121 -0
  124. package/templates/video/src/studies/scenes.ts +410 -0
  125. package/templates/video/src/studies/timing.ts +53 -0
  126. package/templates/video/src/studies/variants.ts +39 -0
  127. package/templates/video/src/style.css +111 -0
  128. package/templates/video/src/timeline-model.ts +55 -0
  129. package/templates/video/style-source-provenance.json +11 -0
  130. package/templates/video/tsconfig.json +15 -0
  131. package/templates/video/vite.config.mjs +9 -0
  132. package/vendor/pixijs-skills/LICENSE +21 -0
  133. package/vendor/pixijs-skills/provenance.json +79 -0
  134. package/vendor/pixijs-skills/skills/pixijs/SKILL.md +66 -0
  135. package/vendor/pixijs-skills/skills/pixijs/references/index.md +136 -0
  136. package/vendor/pixijs-skills/skills/pixijs-accessibility/SKILL.md +224 -0
  137. package/vendor/pixijs-skills/skills/pixijs-application/SKILL.md +293 -0
  138. package/vendor/pixijs-skills/skills/pixijs-application/references/application-options.md +314 -0
  139. package/vendor/pixijs-skills/skills/pixijs-assets/SKILL.md +303 -0
  140. package/vendor/pixijs-skills/skills/pixijs-assets/references/background.md +137 -0
  141. package/vendor/pixijs-skills/skills/pixijs-assets/references/bundles.md +122 -0
  142. package/vendor/pixijs-skills/skills/pixijs-assets/references/caching.md +143 -0
  143. package/vendor/pixijs-skills/skills/pixijs-assets/references/compressed-textures.md +120 -0
  144. package/vendor/pixijs-skills/skills/pixijs-assets/references/fonts.md +205 -0
  145. package/vendor/pixijs-skills/skills/pixijs-assets/references/gif.md +171 -0
  146. package/vendor/pixijs-skills/skills/pixijs-assets/references/manifests.md +175 -0
  147. package/vendor/pixijs-skills/skills/pixijs-assets/references/progress.md +142 -0
  148. package/vendor/pixijs-skills/skills/pixijs-assets/references/resolution.md +142 -0
  149. package/vendor/pixijs-skills/skills/pixijs-assets/references/spritesheet.md +119 -0
  150. package/vendor/pixijs-skills/skills/pixijs-assets/references/svg.md +132 -0
  151. package/vendor/pixijs-skills/skills/pixijs-assets/references/video.md +158 -0
  152. package/vendor/pixijs-skills/skills/pixijs-blend-modes/SKILL.md +215 -0
  153. package/vendor/pixijs-skills/skills/pixijs-color/SKILL.md +299 -0
  154. package/vendor/pixijs-skills/skills/pixijs-core-concepts/SKILL.md +132 -0
  155. package/vendor/pixijs-skills/skills/pixijs-core-concepts/references/render-loop.md +216 -0
  156. package/vendor/pixijs-skills/skills/pixijs-core-concepts/references/renderers.md +287 -0
  157. package/vendor/pixijs-skills/skills/pixijs-create/SKILL.md +276 -0
  158. package/vendor/pixijs-skills/skills/pixijs-custom-rendering/SKILL.md +405 -0
  159. package/vendor/pixijs-skills/skills/pixijs-custom-rendering/references/advanced-gpu.md +244 -0
  160. package/vendor/pixijs-skills/skills/pixijs-custom-rendering/references/uniform-types.md +94 -0
  161. package/vendor/pixijs-skills/skills/pixijs-environments/SKILL.md +243 -0
  162. package/vendor/pixijs-skills/skills/pixijs-events/SKILL.md +387 -0
  163. package/vendor/pixijs-skills/skills/pixijs-filters/SKILL.md +300 -0
  164. package/vendor/pixijs-skills/skills/pixijs-html-source/SKILL.md +228 -0
  165. package/vendor/pixijs-skills/skills/pixijs-math/SKILL.md +489 -0
  166. package/vendor/pixijs-skills/skills/pixijs-migration-v8/SKILL.md +415 -0
  167. package/vendor/pixijs-skills/skills/pixijs-performance/SKILL.md +489 -0
  168. package/vendor/pixijs-skills/skills/pixijs-scene-container/SKILL.md +345 -0
  169. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/SKILL.md +243 -0
  170. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/constructor-options.md +155 -0
  171. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/container-hierarchy.md +232 -0
  172. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/layers.md +145 -0
  173. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/masking.md +129 -0
  174. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/render-groups.md +140 -0
  175. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/scene-management.md +169 -0
  176. package/vendor/pixijs-skills/skills/pixijs-scene-core-concepts/references/transforms.md +198 -0
  177. package/vendor/pixijs-skills/skills/pixijs-scene-dom-container/SKILL.md +193 -0
  178. package/vendor/pixijs-skills/skills/pixijs-scene-gif/SKILL.md +233 -0
  179. package/vendor/pixijs-skills/skills/pixijs-scene-graphics/SKILL.md +576 -0
  180. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/SKILL.md +141 -0
  181. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/references/mesh-perspective.md +189 -0
  182. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/references/mesh-plane.md +159 -0
  183. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/references/mesh-rope.md +176 -0
  184. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/references/mesh-simple.md +144 -0
  185. package/vendor/pixijs-skills/skills/pixijs-scene-mesh/references/mesh.md +213 -0
  186. package/vendor/pixijs-skills/skills/pixijs-scene-particle-container/SKILL.md +323 -0
  187. package/vendor/pixijs-skills/skills/pixijs-scene-sprite/SKILL.md +120 -0
  188. package/vendor/pixijs-skills/skills/pixijs-scene-sprite/references/animated-sprite.md +262 -0
  189. package/vendor/pixijs-skills/skills/pixijs-scene-sprite/references/nineslice-sprite.md +202 -0
  190. package/vendor/pixijs-skills/skills/pixijs-scene-sprite/references/sprite.md +181 -0
  191. package/vendor/pixijs-skills/skills/pixijs-scene-sprite/references/tiling-sprite.md +216 -0
  192. package/vendor/pixijs-skills/skills/pixijs-scene-text/SKILL.md +136 -0
  193. package/vendor/pixijs-skills/skills/pixijs-scene-text/references/bitmap-text.md +232 -0
  194. package/vendor/pixijs-skills/skills/pixijs-scene-text/references/html-text.md +192 -0
  195. package/vendor/pixijs-skills/skills/pixijs-scene-text/references/split-bitmap-text.md +187 -0
  196. package/vendor/pixijs-skills/skills/pixijs-scene-text/references/split-text.md +168 -0
  197. package/vendor/pixijs-skills/skills/pixijs-scene-text/references/text.md +311 -0
  198. package/vendor/pixijs-skills/skills/pixijs-ticker/SKILL.md +292 -0
@@ -0,0 +1,314 @@
1
+ # ApplicationOptions reference
2
+
3
+ Every option accepted by `app.init(options)`. Options come from three type sources merged into a single interface:
4
+
5
+ - `AutoDetectOptions` → base renderer options (width/height/resolution/etc.)
6
+ - `PixiMixins.ApplicationOptions` → plugin options (`resizeTo`, `autoStart`, `sharedTicker`, `culler`)
7
+ - System defaults → each renderer system (background, view, hello, GC, context, backbuffer, events, graphics) contributes its own options
8
+
9
+ Options with no default are unset unless you pass them. `Partial<ApplicationOptions>` means everything is optional.
10
+
11
+
12
+ ## View / canvas
13
+
14
+ Configures the main canvas and how it maps to CSS pixels.
15
+
16
+ | Option | Type | Default | Description |
17
+ | ------------- | --------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
18
+ | `width` | `number` | `800` | Initial width in CSS pixels. |
19
+ | `height` | `number` | `600` | Initial height in CSS pixels. |
20
+ | `canvas` | `ICanvas` | — | Existing `HTMLCanvasElement` (or `OffscreenCanvas`) to render into instead of creating one. |
21
+ | `view` | `ICanvas` | — | **Deprecated since 8.0.0.** Alias for `canvas`. |
22
+ | `resolution` | `number` | `1` | Device pixel ratio. Set to `window.devicePixelRatio` for HiDPI. |
23
+ | `autoDensity` | `boolean` | `false` | Scale CSS dimensions of the canvas so `width`/`height` stay in CSS pixels while the backing store matches `resolution`. Only honored on `HTMLCanvasElement` (ignored on `OffscreenCanvas`). |
24
+ | `antialias` | `boolean` | `false` | GPU MSAA where supported. On WebGL, this only affects the main context — use `useBackBuffer: true` if you need antialiased filtering. |
25
+ | `depth` | `boolean` | — | Allocate a depth buffer for the main view. Always on for WebGL; needed for z-ordered rendering. |
26
+ | `transient` | `boolean` | `false` | WebGPU only, with `antialias`. Discard the canvas's multisample depth/stencil buffer at the end of each pass, and its colour buffer on GPUs that aren't tile-based (tile-based GPUs already discard colour). Only for apps that never reopen the canvas pass while still needing depth or stencil: no filters or masks popping back onto it, no render with `clear: false`. |
27
+
28
+ ```ts
29
+ await app.init({
30
+ width: 1280,
31
+ height: 720,
32
+ resolution: window.devicePixelRatio,
33
+ autoDensity: true,
34
+ antialias: true,
35
+ });
36
+ ```
37
+
38
+ ## Background
39
+
40
+ Controls the clear color applied each frame.
41
+
42
+ | Option | Type | Default | Description |
43
+ | ------------------- | ------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44
+ | `backgroundColor` | `ColorSource` | `0x000000` | Canvas clear color. Accepts hex, CSS string, `[r, g, b, a]`, or any `ColorSource`. |
45
+ | `background` | `ColorSource` | — | Alias for `backgroundColor`. If both are set, `background` wins. |
46
+ | `backgroundAlpha` | `number` | `1` | Clear alpha, `0`–`1`. **Cannot be changed after init** — the backing canvas is allocated with or without alpha support based on this value. Set `< 1` now if you may ever need transparency. |
47
+ | `clearBeforeRender` | `boolean` | `true` | Clear the target before each frame. Disable only if you're drawing a full-frame background yourself (e.g. a full-screen sprite). |
48
+
49
+ ```ts
50
+ await app.init({
51
+ backgroundColor: 0x1099bb,
52
+ backgroundAlpha: 1,
53
+ });
54
+ ```
55
+
56
+ ## Renderer preference
57
+
58
+ Picks which renderer gets created.
59
+
60
+ | Option | Type | Default | Description |
61
+ | --------------- | --------------------------------------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
62
+ | `preference` | `'webgl' \| 'webgpu' \| 'canvas' \| RendererPreference[]` | `'webgl'` | Pick a preferred renderer. String = try first, then fall back through the default priority (`webgl` → `webgpu` → `canvas`). Array = try only the listed renderers, in order (acts as a blocklist too — anything not listed is excluded). See ["Array form"](#preference-array-form) below. |
63
+ | `webgl` | `Partial<WebGLOptions>` | — | Options applied **only** when the WebGL renderer is selected. Merged over the top-level options. |
64
+ | `webgpu` | `Partial<WebGPUOptions>` | — | Options applied **only** when the WebGPU renderer is selected. |
65
+ | `canvasOptions` | `Partial<CanvasOptions>` | — | Options applied **only** when the Canvas2D renderer is selected. |
66
+
67
+ ### preference: array form
68
+
69
+ Passing an array to `preference` restricts `autoDetectRenderer` to exactly the listed renderers, in the given order. Any renderer not in the array is **excluded entirely** — the array doubles as a blocklist.
70
+
71
+ ```ts
72
+ // Try WebGPU first, then fall back to WebGL. Never use Canvas2D.
73
+ await app.init({ preference: ["webgpu", "webgl"] });
74
+
75
+ // Only ever use Canvas2D (e.g. in a WebGL-disabled environment).
76
+ await app.init({ preference: ["canvas"] });
77
+
78
+ // Skip WebGPU entirely while keeping the default webgl → canvas fallback order.
79
+ await app.init({ preference: ["webgl", "canvas"] });
80
+ ```
81
+
82
+ Contrast with the string form, which falls through the **full** default priority if the first choice fails:
83
+
84
+ ```ts
85
+ // Tries webgpu, then webgl, then canvas — all three are candidates.
86
+ await app.init({ preference: "webgpu" });
87
+ ```
88
+
89
+ Use the array when you need to guarantee a renderer is never picked (e.g. WebGPU is broken on a target device, or you want to forbid Canvas2D's feature subset).
90
+
91
+
92
+ ## Shared rendering
93
+
94
+ Apply to every renderer type.
95
+
96
+ | Option | Type | Default | Description |
97
+ | ------------------------------ | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
98
+ | `roundPixels` | `boolean` | `false` | Round vertex positions to whole pixels at shader time. Eliminates subpixel shimmer for pixel-art but blurs smooth motion. |
99
+ | `skipExtensionImports` | `boolean` | `false` | Disable automatic import of default extensions. With `true`, import the subsystems you need manually (`import 'pixi.js/accessibility'`, `'pixi.js/app'`, `'pixi.js/events'`, …). Renderer loader extensions (`WebGLLoader`/`WebGPULoader`/`CanvasLoader`) are skipped too, so import any backend-specific plugin modules yourself. Used for custom tree-shaken builds. |
100
+ | `hello` | `boolean` | `false` | Log the PixiJS version and renderer type banner to the console on init. |
101
+ | `failIfMajorPerformanceCaveat` | `boolean` | `false` | Fail WebGL context creation if the browser reports major performance issues (blocklisted GPU, software fallback). Set `true` for high-performance apps that should refuse slow paths. |
102
+
103
+ ```ts
104
+ await app.init({
105
+ roundPixels: true,
106
+ hello: true,
107
+ });
108
+ ```
109
+
110
+ ## Graphics
111
+
112
+ Graphics rendering options.
113
+
114
+ | Option | Type | Default | Description |
115
+ | ------------------ | -------- | ------- | ------------------------------------------------------------------------------------------ |
116
+ | `bezierSmoothness` | `number` | `0.5` | Controls curve tessellation for Graphics bezier paths. Higher = smoother (more triangles). |
117
+
118
+ ```ts
119
+ await app.init({
120
+ bezierSmoothness: 0.75,
121
+ });
122
+ ```
123
+
124
+ ## Ticker (TickerPluginOptions)
125
+
126
+ Controls the built-in render loop.
127
+
128
+ | Option | Type | Default | Description |
129
+ | -------------- | --------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
130
+ | `autoStart` | `boolean` | `true` | Start the render loop automatically after `init()` resolves. Setting `false` disables `app.render()` being called each frame, but **does not** stop `Ticker.shared` if you've opted into `sharedTicker: true`. |
131
+ | `sharedTicker` | `boolean` | `false` | Use `Ticker.shared` instead of creating a per-Application ticker. Useful for syncing multiple apps; loses per-app control over start/stop. |
132
+
133
+ See `pixijs-ticker` for the ticker API itself.
134
+
135
+ ```ts
136
+ await app.init({
137
+ autoStart: false,
138
+ sharedTicker: false,
139
+ });
140
+
141
+ function loop() {
142
+ app.renderer.render(app.stage);
143
+ requestAnimationFrame(loop);
144
+ }
145
+ loop();
146
+ ```
147
+
148
+ ## Resize (ResizePluginOptions)
149
+
150
+ | Option | Type | Default | Description |
151
+ | ---------- | ----------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
152
+ | `resizeTo` | `Window \| HTMLElement` | `null` | Element the renderer should auto-resize to match. `window` resizes to the viewport; an element uses `clientWidth`/`clientHeight`. Leave `null` to opt out of auto-resize. |
153
+
154
+ The plugin listens for `resize` events on `window` and calls `renderer.resize()`. You can reassign `app.resizeTo` at runtime, and call `app.resize()`, `app.queueResize()`, or `app.cancelResize()` from user code.
155
+
156
+ ```ts
157
+ await app.init({
158
+ resizeTo: window,
159
+ });
160
+ ```
161
+
162
+ ## Culler (CullerPluginOptions)
163
+
164
+ Opt-in plugin (must `extensions.add(CullerPlugin)` to activate).
165
+
166
+ | Option | Type | Default | Description |
167
+ | ------------------------ | --------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
168
+ | `culler.updateTransform` | `boolean` | `false` (effectively) | Must be explicitly set to `true` to run transform updates before culling. Otherwise PixiJS skips transform updates, and cull bounds may lag one frame for moving objects. |
169
+
170
+ ```ts
171
+ import { CullerPlugin, extensions } from "pixi.js";
172
+
173
+ extensions.add(CullerPlugin);
174
+
175
+ await app.init({
176
+ culler: { updateTransform: true },
177
+ });
178
+ ```
179
+
180
+ ## Events
181
+
182
+ | Option | Type | Default | Description |
183
+ | -------------------------- | -------------------------------------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------- |
184
+ | `eventMode` | `'none' \| 'passive' \| 'auto' \| 'static' \| 'dynamic'` | `'passive'` | Default interaction mode for every container. See `pixijs-events`. |
185
+ | `eventFeatures.move` | `boolean` | `true` | Fire `pointermove`/`mousemove`/`touchmove` + `pointerover`/`pointerout`. |
186
+ | `eventFeatures.globalMove` | `boolean` | `true` | Fire `globalpointermove`/`globalmousemove`/`globaltouchmove` regardless of hit target. Expensive; turn off if you don't need it. |
187
+ | `eventFeatures.click` | `boolean` | `true` | Fire `pointerdown`/`pointerup`/`click`/`tap`. |
188
+ | `eventFeatures.wheel` | `boolean` | `true` | Fire `wheel`. |
189
+
190
+ ```ts
191
+ await app.init({
192
+ eventMode: "static",
193
+ eventFeatures: {
194
+ move: true,
195
+ globalMove: false,
196
+ click: true,
197
+ wheel: true,
198
+ },
199
+ });
200
+ ```
201
+
202
+ ## Accessibility
203
+
204
+ Accessibility options. Pass these on the top-level init options.
205
+
206
+ | Option | Type | Default | Description |
207
+ | -------------------------------------------- | --------- | ------- | ----------------------------------------------------------------------------- |
208
+ | `accessibilityOptions.enabledByDefault` | `boolean` | `false` | Enable accessibility overlays immediately instead of waiting for the Tab key. |
209
+ | `accessibilityOptions.debug` | `boolean` | `false` | Show the accessibility overlay divs visibly for debugging. |
210
+ | `accessibilityOptions.activateOnTab` | `boolean` | `true` | Activate overlays when the user presses Tab. |
211
+ | `accessibilityOptions.deactivateOnMouseMove` | `boolean` | `true` | Deactivate overlays when the mouse moves. |
212
+
213
+ See `pixijs-accessibility` for the full accessibility API.
214
+
215
+ ```ts
216
+ await app.init({
217
+ accessibilityOptions: {
218
+ enabledByDefault: true,
219
+ activateOnTab: true,
220
+ deactivateOnMouseMove: true,
221
+ },
222
+ });
223
+ ```
224
+
225
+ ## WebGL-only options
226
+
227
+ Applied when the WebGL renderer is selected.
228
+
229
+ | Option | Type | Default | Description |
230
+ | ----------------------- | ----------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
231
+ | `context` | `WebGL2RenderingContext \| null` | `null` | Use this existing WebGL context instead of creating one. Useful for hand-managing the context or integrating with other renderers. |
232
+ | `powerPreference` | `'high-performance' \| 'low-power'` | `undefined` | Hint the browser which GPU to pick on multi-GPU systems. If omitted, PixiJS internally passes `'default'` to the GPU context; `'default'` is not settable from user code. |
233
+ | `premultipliedAlpha` | `boolean` | `true` | Tell the compositor the drawing buffer contains premultiplied-alpha colors. Changing this affects blending math. |
234
+ | `preserveDrawingBuffer` | `boolean` | `false` | Keep the drawing buffer between frames. Required if you need `canvas.toDataURL()` or `canvas.toBlob()` to capture arbitrary frames. |
235
+ | `preferWebGLVersion` | `1 \| 2` | `2` | Preferred WebGL version. PixiJS v8 was designed for WebGL2 — WebGL1 is a legacy fallback. |
236
+ | `multiView` | `boolean` | `false` | Enable rendering to multiple canvases from one renderer. |
237
+ | `useBackBuffer` | `boolean` | `false` | Render to an intermediate texture instead of directly to the canvas. Required for advanced blend modes and filters that sample the backdrop. Enables `antialias` on the back buffer independently from the main context. |
238
+
239
+ ```ts
240
+ await app.init({
241
+ preference: "webgl",
242
+ webgl: {
243
+ preferWebGLVersion: 2,
244
+ useBackBuffer: true,
245
+ powerPreference: "high-performance",
246
+ },
247
+ });
248
+ ```
249
+
250
+ ## WebGPU-only options
251
+
252
+ | Option | Type | Default | Description |
253
+ | ---------------------- | ----------------------------------- | ----------- | ----------------------------------------------------------------------------------------------- |
254
+ | `powerPreference` | `'high-performance' \| 'low-power'` | `undefined` | Hint for `requestAdapter()`. |
255
+ | `forceFallbackAdapter` | `boolean` | `false` | Force the software/fallback adapter. For testing only. |
256
+ | `gpu` | `{ adapter, device }` | — | Use a pre-created `GPUAdapter` + `GPUDevice` pair. Useful for sharing a device between engines. |
257
+
258
+ ```ts
259
+ await app.init({
260
+ preference: ["webgpu", "webgl"],
261
+ webgpu: {
262
+ powerPreference: "high-performance",
263
+ },
264
+ });
265
+ ```
266
+
267
+ ## Garbage collection
268
+
269
+ All time values are milliseconds.
270
+
271
+ | Option | Type | Default | Description |
272
+ | ----------------- | --------- | ------- | ------------------------------------------------------------ |
273
+ | `gcActive` | `boolean` | `true` | Enable the unified renderer garbage collector. |
274
+ | `gcMaxUnusedTime` | `number` | `60000` | How long a resource can go unused before the GC collects it. |
275
+ | `gcFrequency` | `number` | `30000` | How often the GC sweep runs. |
276
+
277
+ ### Deprecated (GC — prefer the unified options above)
278
+
279
+ `TextureGCSystem` and `RenderableGCSystem` still accept these, but they've been deprecated since 8.15.0 in favor of `gcActive`/`gcMaxUnusedTime`/`gcFrequency`. Passing them still works for the deprecation window but logs warnings.
280
+
281
+ | Option | Deprecated since | Replacement |
282
+ | --------------------------- | ---------------- | ----------------------------------------------------------- |
283
+ | `textureGCActive` | 8.15.0 | `gcActive` |
284
+ | `textureGCMaxIdle` | 8.15.0 | `gcMaxUnusedTime` (note: this is frames; the new API is ms) |
285
+ | `textureGCCheckCountMax` | 8.15.0 | `gcFrequency` (frames → ms) |
286
+ | `textureGCAMaxIdle` | 8.3.0 | `textureGCMaxIdle` (typo fix) → now `gcMaxUnusedTime` |
287
+ | `renderableGCActive` | 8.15.0 | `gcActive` |
288
+ | `renderableGCMaxUnusedTime` | 8.15.0 | `gcMaxUnusedTime` |
289
+ | `renderableGCFrequency` | 8.15.0 | `gcFrequency` |
290
+
291
+ ```ts
292
+ await app.init({
293
+ gcActive: true,
294
+ gcMaxUnusedTime: 60_000,
295
+ gcFrequency: 30_000,
296
+ });
297
+ ```
298
+
299
+ ## Per-renderer overrides
300
+
301
+ `webgl`, `webgpu`, and `canvasOptions` are merged over the top-level options once the selected renderer is known:
302
+
303
+ ```ts
304
+ await app.init({
305
+ antialias: false,
306
+ webgl: { antialias: true, useBackBuffer: true },
307
+ webgpu: { antialias: true },
308
+ canvasOptions: {
309
+ /* canvas-specific */
310
+ },
311
+ });
312
+ ```
313
+
314
+ If WebGL wins, the renderer sees `antialias: true` + `useBackBuffer: true`. If WebGPU wins, just `antialias: true`. The three sub-keys are stripped before the options reach the renderer.
@@ -0,0 +1,303 @@
1
+ ---
2
+ name: pixijs-assets
3
+ description: "Use this skill when loading and managing resources in PixiJS v8. Covers Assets.init, Assets.load/add/unload, bundles, manifests, background loading, onProgress, caching, spritesheets, video textures, web fonts, bitmap fonts, animated GIFs, compressed textures, SVG as texture or Graphics, resolution detection, per-asset data options, and forcing a specific loader with the parser field (for extension-less URLs). Triggers on: Assets, Assets.load, Assets.init, loadBundle, manifest, backgroundLoad, Spritesheet, Cache, LoadOptions, unload, parser, loadParser, loadWebFont, loadBitmapFont, loadVideoTextures, GifSource, VideoSourceOptions."
4
+ license: MIT
5
+ ---
6
+
7
+ The `Assets` API is PixiJS's asset loader, resolver, and cache in one singleton. Use it to load textures, video, spritesheets, fonts, JSON, and other resources with format detection, resolution switching, bundle grouping, progress tracking, and GPU cleanup.
8
+
9
+ ## Quick Start
10
+
11
+ ```ts
12
+ await Assets.init({ basePath: "/static/" });
13
+
14
+ const texture = await Assets.load("bunny.png");
15
+ const sprite = new Sprite(texture);
16
+ app.stage.addChild(sprite);
17
+
18
+ const [hero, enemy] = await Assets.load(["hero.png", "enemy.png"]);
19
+
20
+ await Assets.load({
21
+ alias: "logo",
22
+ src: "logo.webp",
23
+ });
24
+
25
+ const logo = new Sprite(Assets.get("logo"));
26
+ ```
27
+
28
+ `Assets.init()` is optional but recommended for setting `basePath`, `texturePreference`, or a manifest. After init, call `Assets.load()` with a URL, alias, array, or `UnresolvedAsset`; resolved assets are cached and re-resolved by `Assets.get()`.
29
+
30
+ ## Supported file types
31
+
32
+ | Type | Extensions | Parser ID | Loader |
33
+ | ------------------- | ---------------------------------------------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
34
+ | Textures | `.png`, `.jpg`, `.jpeg`, `.webp`, `.avif` | `texture` | `loadTextures` |
35
+ | SVG | `.svg` | `svg` | `loadSvg` (see `references/svg.md`) |
36
+ | Video textures | `.mp4`, `.m4v`, `.webm`, `.ogg`, `.ogv`, `.h264`, `.avi`, `.mov` | `video` | `loadVideoTextures` (see `references/video.md`) |
37
+ | Sprite sheets | `.json` (Spritesheet format) | `spritesheet` | `spritesheetAsset` (see `references/spritesheet.md`) |
38
+ | Bitmap fonts | `.fnt`, `.xml` | `bitmap-font` | `loadBitmapFont` (loading works by default; rendering `BitmapText` requires `'pixi.js/text-bitmap'`; see `references/fonts.md`) |
39
+ | Web fonts | `.ttf`, `.otf`, `.woff`, `.woff2` | `web-font` | `loadWebFont` (see `references/fonts.md`) |
40
+ | JSON | `.json` | `json` | `loadJson` |
41
+ | Text | `.txt` | `text` | `loadTxt` |
42
+ | Compressed textures | `.basis`, `.dds`, `.ktx`, `.ktx2` | `basis`, `dds`, `ktx`, `ktx2` | See `references/compressed-textures.md` |
43
+ | Animated GIFs | `.gif` | `gif` | Requires `'pixi.js/gif'`; returns `GifSource` (see `references/gif.md`) |
44
+
45
+ The **Parser ID** column is the value you pass to the top-level `parser` field on an asset descriptor to force a specific loader. See "Forcing a parser" below.
46
+
47
+ ## Forcing a parser with `parser`
48
+
49
+ By default, PixiJS picks a loader by matching the file extension or MIME type. When your URL lacks an extension (CDN signed URLs, blob URLs, API endpoints, content-hashed paths), the resolver can't tell the loader what to do. Set the top-level `parser` field on the asset descriptor to force a specific loader:
50
+
51
+ ```ts
52
+ // Signed CDN URL with no extension
53
+ const texture = await Assets.load({
54
+ src: "https://cdn.example.com/signed/abc123?token=xyz",
55
+ parser: "texture",
56
+ });
57
+
58
+ // API endpoint that returns JSON
59
+ const data = await Assets.load({
60
+ alias: "config",
61
+ src: "https://api.example.com/v1/config",
62
+ parser: "json",
63
+ });
64
+
65
+ // Extension-less font URL with explicit family
66
+ await Assets.load({
67
+ src: "https://cdn.example.com/fonts/hero-v2",
68
+ parser: "web-font",
69
+ data: { family: "Hero", weights: ["400", "700"] },
70
+ });
71
+
72
+ // Video stream without a file extension
73
+ const clipTexture = await Assets.load({
74
+ src: "https://cdn.example.com/stream/xyz",
75
+ parser: "video",
76
+ data: { mime: "video/mp4", muted: true, playsinline: true },
77
+ });
78
+ ```
79
+
80
+ The `parser` field goes at the top level of the asset descriptor (alongside `src` and `data`), not inside `data`. It takes any parser ID from the "Supported file types" table above:
81
+
82
+ - `'texture'`, `'svg'`, `'video'`: image, SVG, and video textures
83
+ - `'json'`, `'text'`: JSON and plain text
84
+ - `'web-font'`, `'bitmap-font'`: web and bitmap fonts
85
+ - `'spritesheet'`: texture atlas JSON
86
+ - `'gif'`: animated GIFs (requires `'pixi.js/gif'`)
87
+ - `'basis'`, `'dds'`, `'ktx'`, `'ktx2'`: compressed textures (each requires its side-effect import)
88
+
89
+ ### When you need it
90
+
91
+ - **Signed CDN URLs**: `https://cdn.example.com/get?id=abc123` has no extension the loader can test against.
92
+ - **Blob or ObjectURL**: `URL.createObjectURL(blob)` produces `blob:...` URLs with no extension.
93
+ - **Custom routing**: `/api/assets/hero-v2` where the server decides the content type.
94
+ - **Content-hashed paths without suffix**: some build pipelines produce names like `/static/abc123def` instead of `/static/abc123def.png`.
95
+
96
+ If the URL _does_ have an extension, you don't need `parser`; let auto-detection do its job. Only set `parser` when detection can't work.
97
+
98
+ ### `loadParser` is deprecated
99
+
100
+ The v7 `loadParser` field still works but emits a deprecation warning. Use `parser` for new code.
101
+
102
+ ```ts
103
+ // Old (deprecated)
104
+ await Assets.load({ src: "...", loadParser: "loadTextures" });
105
+
106
+ // New
107
+ await Assets.load({ src: "...", parser: "texture" });
108
+ ```
109
+
110
+ ## Topics
111
+
112
+ Every asset workflow is covered in a reference file. Pick the one that matches the question:
113
+
114
+ | Topic | Reference | When |
115
+ | ------------------------------ | ---------------------------------------------------------------------- | ------------------------------------------- |
116
+ | Texture atlases and animations | [references/spritesheet.md](references/spritesheet.md) | Loading sprite sheets with `AnimatedSprite` |
117
+ | Video textures | [references/video.md](references/video.md) | `.mp4`, `.webm`, autoplay, looping, mobile |
118
+ | Web and bitmap fonts | [references/fonts.md](references/fonts.md) | `.woff2`, `.fnt`, font families, SDF fonts |
119
+ | Animated GIFs | [references/gif.md](references/gif.md) | `.gif`, `GifSprite`, playback control |
120
+ | Grouping assets by feature | [references/bundles.md](references/bundles.md) | `addBundle`, `loadBundle`, `unloadBundle` |
121
+ | Declaring everything upfront | [references/manifests.md](references/manifests.md) | `Assets.init({ manifest })` workflows |
122
+ | Cache lookups and cleanup | [references/caching.md](references/caching.md) | `Assets.get`, `Assets.unload`, `Cache` |
123
+ | Priming future assets | [references/background.md](references/background.md) | `backgroundLoad`, `backgroundLoadBundle` |
124
+ | Loading screens | [references/progress.md](references/progress.md) | `onProgress`, LoadOptions progress |
125
+ | GPU-compressed formats | [references/compressed-textures.md](references/compressed-textures.md) | `.ktx2`, `.basis`, `.dds`, `.ktx` |
126
+ | Vector vs raster SVG | [references/svg.md](references/svg.md) | `parseAsGraphicsContext`, texture mode |
127
+ | Retina + format detection | [references/resolution.md](references/resolution.md) | `@{1,2}x`, `format` preferences |
128
+
129
+ ## Decision guide
130
+
131
+ - **Need to load a single image?** Use `Assets.load(url)`. No setup required.
132
+ - **Loading many assets grouped by level/scene?** Use a bundle. See `references/bundles.md`.
133
+ - **Know all assets at build time?** Use a manifest in `Assets.init`. See `references/manifests.md`.
134
+ - **Need a loading bar?** Pass a progress callback to `Assets.load`. See `references/progress.md`.
135
+ - **Smooth transitions between levels?** Background-load the next level. See `references/background.md`.
136
+ - **Memory budget matters?** Use compressed textures and `Assets.unload` between screens. See `references/compressed-textures.md` and `references/caching.md`.
137
+ - **Need crisp SVG icons at any size?** Load as Graphics, not texture. See `references/svg.md`.
138
+ - **Retina + WebP/AVIF?** Configure `texturePreference` and use format patterns. See `references/resolution.md`.
139
+
140
+ ## Load options and error handling
141
+
142
+ There are two separate "options" concepts when loading assets:
143
+
144
+ 1. **`LoadOptions`**: the second argument to `Assets.load`/`loadBundle`. Controls error recovery, retries, progress, and completion callbacks across a whole load.
145
+ 2. **`data`**: a field on each asset descriptor. Forwards parser-specific options (scale mode, resolution, font family, autoplay flags, etc.) to the specific loader for that asset.
146
+
147
+ ### LoadOptions (per call)
148
+
149
+ ```ts
150
+ await Assets.load(["hero.png", "enemy.png"], {
151
+ onProgress: (p) => updateBar(p),
152
+ onError: (err, url) => {
153
+ const src = typeof url === "string" ? url : url.src;
154
+ console.warn("failed:", src, err);
155
+ },
156
+ strategy: "retry",
157
+ retryCount: 3,
158
+ retryDelay: 250,
159
+ });
160
+ ```
161
+
162
+ - `onProgress(progress)`: `[0, 1]` as assets in the call complete.
163
+ - `onError(error, url)`: `url` is `string | ResolvedAsset`. Guard before reading `.src`; when `url` is a string, `.src` is undefined.
164
+ - `strategy: 'throw' | 'skip' | 'retry'` — default `'throw'`. `'skip'` resolves with any successful assets; `'retry'` reattempts the failed ones.
165
+ - `retryCount` — default `3`, retries per asset when `strategy` is `'retry'`.
166
+ - `retryDelay` — default `250` ms between retries.
167
+
168
+ Global defaults live on `Loader.defaultOptions`, or pass `loadOptions` to `Assets.init()`.
169
+
170
+ ### `data` options (per asset)
171
+
172
+ Each loader parser reads its own options from the `data` field on the asset descriptor. Use the table below to pick the right options for each asset type:
173
+
174
+ | Asset type | `data` shape | Key options | Reference |
175
+ | ------------------ | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------- |
176
+ | Texture (image) | `TextureSourceOptions` | `resolution`, `scaleMode`, `alphaMode`, `autoGenerateMipmaps`, `antialias`, `addressMode` | `references/resolution.md` |
177
+ | SVG | `{ parseAsGraphicsContext?, resolution? }` | `parseAsGraphicsContext` for Graphics mode; `resolution` for sharper raster | `references/svg.md` |
178
+ | Video | `VideoSourceOptions` | `autoPlay`, `loop`, `muted`, `playsinline`, `preload`, `updateFPS`, `crossorigin`, `mime` | `references/video.md` |
179
+ | Web font | `LoadFontData` | `family`, `weights`, `style`, `display`, `unicodeRange`, `featureSettings` | `references/fonts.md` |
180
+ | Bitmap font | (none; auto-configured) | Distance-field detection sets scale mode and mipmaps | `references/fonts.md` |
181
+ | Spritesheet | `{ texture?, imageFilename?, ignoreMultiPack?, textureOptions?, cachePrefix? }` | `textureOptions` forwards `TextureSourceOptions` (e.g. `scaleMode`) to the atlas image; `texture` to skip image load; `imageFilename` to override the referenced image; `ignoreMultiPack` to skip multi-pack follow-ups; `cachePrefix` to namespace frames | `references/spritesheet.md` |
182
+ | GIF | `GifBufferOptions` | `fps`, `scaleMode`, `resolution`, `autoGenerateMipmaps` | `references/gif.md` |
183
+ | Compressed texture | `TextureSourceOptions` | `scaleMode`, `addressMode`, `autoGenerateMipmaps` | `references/compressed-textures.md` |
184
+ | JSON / Text | (none) | Returned as-is | — |
185
+
186
+ Example combining `LoadOptions` and `data`:
187
+
188
+ ```ts
189
+ await Assets.load(
190
+ {
191
+ alias: "hero",
192
+ src: "hero.png",
193
+ data: { scaleMode: "nearest", resolution: 2 },
194
+ },
195
+ { strategy: "retry", retryCount: 3 },
196
+ );
197
+ ```
198
+
199
+ Inside a manifest or bundle, every entry can carry its own `data`:
200
+
201
+ ```ts
202
+ await Assets.init({
203
+ manifest: {
204
+ bundles: [
205
+ {
206
+ name: "level1",
207
+ assets: [
208
+ { alias: "tiles", src: "tiles.png", data: { scaleMode: "nearest" } },
209
+ { alias: "font", src: "hero.woff2", data: { family: "Hero" } },
210
+ {
211
+ alias: "clip",
212
+ src: "intro.mp4",
213
+ data: { autoPlay: false, muted: true },
214
+ },
215
+ ],
216
+ },
217
+ ],
218
+ },
219
+ });
220
+ ```
221
+
222
+ ## Runtime configuration
223
+
224
+ `Assets.init(options)` accepts, alongside `basePath` and `manifest`:
225
+
226
+ - `defaultSearchParams` — string or `Record<string, any>` appended to every resolved URL. Useful for cache busting.
227
+ - `skipDetections: boolean` — bypass browser format detection for faster init. Requires explicit `texturePreference.format`.
228
+ - `bundleIdentifier: BundleIdentifierOptions` — customize how bundle keys resolve so the same alias can live in multiple bundles.
229
+ - `loadOptions: Partial<LoadOptions>` — set the default `strategy`, `retryCount`, `retryDelay`, and callbacks for every subsequent `Assets.load` call.
230
+ - `preferences: Partial<AssetsPreferences>` — `crossOrigin`, `preferWorkers`, `preferCreateImageBitmap`, `parseAsGraphicsContext`.
231
+
232
+ After init, preferences can still be tuned:
233
+
234
+ ```ts
235
+ Assets.setPreferences({
236
+ crossOrigin: "anonymous",
237
+ preferCreateImageBitmap: false,
238
+ });
239
+
240
+ for (const detection of Assets.detections) {
241
+ console.log(detection.extension);
242
+ }
243
+
244
+ Assets.reset();
245
+ ```
246
+
247
+ - `Assets.setPreferences(preferences)` — push new preferences to every parser that supports them.
248
+ - `Assets.detections` — getter exposing the registered `FormatDetectionParser` list; use when inspecting what formats the current environment advertises.
249
+ - `Assets.reset()` — internal full reset (resolver + loader + cache). Intended for tests so a fresh `Assets.init` can run.
250
+
251
+ ## Common Mistakes
252
+
253
+ ### [CRITICAL] Using `Texture.from(url)` to load
254
+
255
+ Wrong:
256
+
257
+ ```ts
258
+ const texture = Texture.from("https://example.com/image.png");
259
+ ```
260
+
261
+ Correct:
262
+
263
+ ```ts
264
+ const texture = await Assets.load("https://example.com/image.png");
265
+ ```
266
+
267
+ In v8, `Texture.from()` only reads the cache. It does not fetch from a URL. Use `Assets.load()` first; the return value is the texture itself.
268
+
269
+
270
+ ### [HIGH] Using positional `Assets.add` signature
271
+
272
+ Wrong:
273
+
274
+ ```ts
275
+ Assets.add("bunny", "bunny.png");
276
+ ```
277
+
278
+ Correct:
279
+
280
+ ```ts
281
+ Assets.add({ alias: "bunny", src: "bunny.png" });
282
+ ```
283
+
284
+ The positional `Assets.add(key, url)` form was removed in v8. Use the options object with `alias` and `src` properties.
285
+
286
+
287
+ ### [HIGH] Not unloading textures between levels
288
+
289
+ `Assets.load()` caches textures indefinitely. For level-based games or screens with distinct asset sets, call `Assets.unloadBundle()` when transitioning to release GPU memory.
290
+
291
+
292
+ ## API Reference
293
+
294
+ - [Assets](https://pixijs.download/release/docs/assets.Assets.html.md)
295
+ - [Loader](https://pixijs.download/release/docs/assets.Loader.html.md)
296
+ - [Resolver](https://pixijs.download/release/docs/assets.Resolver.html.md)
297
+ - [Cache](https://pixijs.download/release/docs/assets.Cache.html.md)
298
+ - [LoadOptions](https://pixijs.download/release/docs/assets.LoadOptions.html.md)
299
+ - [AssetInitOptions](https://pixijs.download/release/docs/assets.AssetInitOptions.html.md)
300
+ - [AssetsManifest](https://pixijs.download/release/docs/assets.AssetsManifest.html.md)
301
+ - [AssetsBundle](https://pixijs.download/release/docs/assets.AssetsBundle.html.md)
302
+ - [BackgroundLoader](https://pixijs.download/release/docs/assets.BackgroundLoader.html.md)
303
+ - [Spritesheet](https://pixijs.download/release/docs/assets.Spritesheet.html.md)