melonjs 20.2.0 → 20.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 (140) hide show
  1. package/README.md +86 -8
  2. package/build/application/settings.d.ts +3 -2
  3. package/build/application/settings.d.ts.map +1 -1
  4. package/build/audio/audio.d.ts +2 -2
  5. package/build/audio/audio.d.ts.map +1 -1
  6. package/build/audio/backend/buffer.d.ts +26 -0
  7. package/build/audio/backend/buffer.d.ts.map +1 -0
  8. package/build/audio/backend/cache.d.ts +2 -0
  9. package/build/audio/backend/cache.d.ts.map +1 -0
  10. package/build/audio/backend/core.d.ts +24 -0
  11. package/build/audio/backend/core.d.ts.map +1 -0
  12. package/build/audio/backend/engine.d.ts +54 -0
  13. package/build/audio/backend/engine.d.ts.map +1 -0
  14. package/build/audio/backend/sound.d.ts +79 -0
  15. package/build/audio/backend/sound.d.ts.map +1 -0
  16. package/build/audio/backend/spatial.d.ts +191 -0
  17. package/build/audio/backend/spatial.d.ts.map +1 -0
  18. package/build/audio/backend/types.d.ts +97 -0
  19. package/build/audio/backend/types.d.ts.map +1 -0
  20. package/build/audio/backend/voice.d.ts +33 -0
  21. package/build/audio/backend/voice.d.ts.map +1 -0
  22. package/build/audio/playback.d.ts +49 -4
  23. package/build/audio/playback.d.ts.map +1 -1
  24. package/build/audio/{backend.d.ts → state.d.ts} +13 -11
  25. package/build/audio/state.d.ts.map +1 -0
  26. package/build/audio/types.d.ts +93 -1
  27. package/build/audio/types.d.ts.map +1 -1
  28. package/build/camera/camera3d.d.ts +5 -5
  29. package/build/const.d.ts +2 -2
  30. package/build/index.d.ts.map +1 -1
  31. package/build/index.js +8793 -10171
  32. package/build/index.js.map +4 -4
  33. package/build/input/input.d.ts +19 -0
  34. package/build/input/input.d.ts.map +1 -1
  35. package/build/lang/deprecated.d.ts +4 -2
  36. package/build/lang/deprecated.d.ts.map +1 -1
  37. package/build/level/gltf/GLTFScene.d.ts +12 -0
  38. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  39. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  40. package/build/loader/loader.d.ts +4 -40
  41. package/build/loader/loader.d.ts.map +1 -1
  42. package/build/loader/parsers/audio.d.ts +31 -0
  43. package/build/loader/parsers/audio.d.ts.map +1 -0
  44. package/build/loader/parsers/shader.d.ts.map +1 -1
  45. package/build/physics/adapter.d.ts +3 -3
  46. package/build/physics/builtin/body.d.ts +23 -24
  47. package/build/physics/builtin/body.d.ts.map +1 -1
  48. package/build/physics/builtin/detector.d.ts +1 -1
  49. package/build/plugin/plugin.d.ts +9 -1
  50. package/build/plugin/plugin.d.ts.map +1 -1
  51. package/build/polyfill/index.d.ts +1 -4
  52. package/build/polyfill/index.d.ts.map +1 -1
  53. package/build/renderable/mesh.d.ts +16 -0
  54. package/build/renderable/mesh.d.ts.map +1 -1
  55. package/build/renderable/renderable.d.ts +16 -10
  56. package/build/renderable/renderable.d.ts.map +1 -1
  57. package/build/renderable/sprite.d.ts +7 -7
  58. package/build/renderable/sprite.d.ts.map +1 -1
  59. package/build/state/stage.d.ts +4 -2
  60. package/build/state/stage.d.ts.map +1 -1
  61. package/build/system/event.d.ts +1 -1
  62. package/build/system/platform.d.ts +21 -1
  63. package/build/system/platform.d.ts.map +1 -1
  64. package/build/utils/fetchdata.d.ts.map +1 -0
  65. package/build/video/blendmodes.d.ts +1 -1
  66. package/build/video/canvas/canvas_renderer.d.ts +5 -2
  67. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  68. package/build/video/effects/blur.d.ts +4 -4
  69. package/build/video/effects/blur.d.ts.map +1 -1
  70. package/build/video/effects/chromaticAberration.d.ts +5 -5
  71. package/build/video/effects/chromaticAberration.d.ts.map +1 -1
  72. package/build/video/effects/colorMatrix.d.ts +5 -5
  73. package/build/video/effects/colorMatrix.d.ts.map +1 -1
  74. package/build/video/effects/desaturate.d.ts +5 -5
  75. package/build/video/effects/desaturate.d.ts.map +1 -1
  76. package/build/video/effects/dissolve.d.ts +4 -4
  77. package/build/video/effects/dissolve.d.ts.map +1 -1
  78. package/build/video/effects/dropShadow.d.ts +5 -5
  79. package/build/video/effects/dropShadow.d.ts.map +1 -1
  80. package/build/video/effects/flash.d.ts +4 -4
  81. package/build/video/effects/flash.d.ts.map +1 -1
  82. package/build/video/effects/glow.d.ts +5 -5
  83. package/build/video/effects/glow.d.ts.map +1 -1
  84. package/build/video/effects/hologram.d.ts +4 -4
  85. package/build/video/effects/hologram.d.ts.map +1 -1
  86. package/build/video/effects/invert.d.ts +5 -5
  87. package/build/video/effects/invert.d.ts.map +1 -1
  88. package/build/video/effects/outline.d.ts +6 -6
  89. package/build/video/effects/outline.d.ts.map +1 -1
  90. package/build/video/effects/pixelate.d.ts +4 -4
  91. package/build/video/effects/pixelate.d.ts.map +1 -1
  92. package/build/video/effects/radialGradient.d.ts +2 -2
  93. package/build/video/effects/scanline.d.ts +6 -6
  94. package/build/video/effects/scanline.d.ts.map +1 -1
  95. package/build/video/effects/sepia.d.ts +5 -5
  96. package/build/video/effects/sepia.d.ts.map +1 -1
  97. package/build/video/effects/shadereffect.d.ts +12 -10
  98. package/build/video/effects/shadereffect.d.ts.map +1 -1
  99. package/build/video/effects/shine.d.ts +3 -3
  100. package/build/video/effects/shine.d.ts.map +1 -1
  101. package/build/video/effects/tintPulse.d.ts +4 -4
  102. package/build/video/effects/tintPulse.d.ts.map +1 -1
  103. package/build/video/effects/vignette.d.ts +6 -6
  104. package/build/video/effects/vignette.d.ts.map +1 -1
  105. package/build/video/effects/wave.d.ts +4 -4
  106. package/build/video/effects/wave.d.ts.map +1 -1
  107. package/build/video/texture/atlas.d.ts +1 -1
  108. package/build/video/webgl/glshader.d.ts +2 -2
  109. package/build/video/webgl/webgl_renderer.d.ts +2 -1
  110. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  111. package/build/video/webgpu/webgpu_renderer.d.ts +2 -1
  112. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  113. package/package.json +5 -9
  114. package/skills/AGENTS.md +67 -0
  115. package/skills/melonjs/SKILL.md +156 -0
  116. package/skills/melonjs-20-migration/SKILL.md +160 -0
  117. package/skills/melonjs-3d/SKILL.md +226 -0
  118. package/skills/melonjs-3d-assets/SKILL.md +239 -0
  119. package/skills/melonjs-audio/SKILL.md +215 -0
  120. package/skills/melonjs-camera-and-drawing/SKILL.md +171 -0
  121. package/skills/melonjs-deployment/SKILL.md +113 -0
  122. package/skills/melonjs-effects-and-shaders/SKILL.md +177 -0
  123. package/skills/melonjs-events/SKILL.md +159 -0
  124. package/skills/melonjs-getting-started/SKILL.md +183 -0
  125. package/skills/melonjs-input/SKILL.md +166 -0
  126. package/skills/melonjs-lighting/SKILL.md +139 -0
  127. package/skills/melonjs-loading-assets/SKILL.md +157 -0
  128. package/skills/melonjs-particles-and-trails/SKILL.md +136 -0
  129. package/skills/melonjs-performance/SKILL.md +178 -0
  130. package/skills/melonjs-physics/SKILL.md +321 -0
  131. package/skills/melonjs-plugins/SKILL.md +191 -0
  132. package/skills/melonjs-renderables/SKILL.md +214 -0
  133. package/skills/melonjs-renderer-backends/SKILL.md +173 -0
  134. package/skills/melonjs-scenes-and-state/SKILL.md +180 -0
  135. package/skills/melonjs-sprites-and-animation/SKILL.md +173 -0
  136. package/skills/melonjs-tilemaps/SKILL.md +193 -0
  137. package/skills/melonjs-ui-and-text/SKILL.md +175 -0
  138. package/build/audio/backend.d.ts.map +0 -1
  139. package/build/loader/parsers/fetchdata.d.ts.map +0 -1
  140. /package/build/{loader/parsers → utils}/fetchdata.d.ts +0 -0
package/README.md CHANGED
@@ -5,19 +5,18 @@ melonJS 2
5
5
  [![Build Status](https://github.com/melonjs/melonJS/actions/workflows/main.yml/badge.svg)](https://github.com/melonjs/melonJS/actions/workflows/main.yml)
6
6
  [![NPM Package](https://img.shields.io/npm/v/melonjs)](https://www.npmjs.com/package/melonjs)
7
7
  [![NPM Downloads](https://img.shields.io/npm/dm/melonjs)](https://www.npmjs.com/package/melonjs)
8
- [![Build Size](https://badgen.net/bundlephobia/minzip/melonjs)](https://bundlephobia.com/result?p=melonjs)
9
- [![Tree-shaking](https://badgen.net/bundlephobia/tree-shaking/melonjs)](https://bundlephobia.com/result?p=melonjs)
8
+ [![Build Size](https://img.shields.io/bundlejs/size/melonjs?label=minzip)](https://bundlejs.com/?q=melonjs)
10
9
  [![jsDelivr](https://data.jsdelivr.com/v1/package/npm/melonjs/badge?style=rounded)](https://www.jsdelivr.com/package/npm/melonjs)
11
10
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE.md)
12
11
  [![Discord](https://img.shields.io/discord/608636676461428758?color=7289da&label=discord)](https://discord.gg/aur7JMk)
13
12
  [![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](CODE_OF_CONDUCT.md)
14
13
 
15
14
 
16
- A modern & lightweight HTML5 game engine
15
+ A modern & fully featured HTML5 game engine
17
16
  -------------------------------------------------------------------------------
18
17
  ![melonJS](https://melonjs.org/img/alex4-github.png)
19
18
 
20
- [melonJS](https://melonjs.org/) is an open-source 2.5D game engine designed for indie developers — perspective and orthogonal cameras, GPU-accelerated tilemap rendering, post-processing effects, custom shaders, 3D mesh support, polygon-accurate physics, modern Tiled workflows, and high performance. Runs on WebGPU, WebGL 2 or Canvas2D with automatic fallback, tree-shakeable so you only pay for what you use, and the entire engine fits in ~150 KB minzipped of vanilla JS/TS with no toolchain lock-in. Built with ES6 classes and bundled with [esbuild](https://esbuild.github.io).
19
+ [melonJS](https://melonjs.org/) is an open-source 2.5D game engine designed for indie developers — perspective and orthogonal cameras, GPU-accelerated tilemap rendering, post-processing effects, custom shaders, 3D mesh support, polygon-accurate physics, modern Tiled workflows, and high performance. Runs on WebGPU, WebGL 2 or Canvas2D with automatic fallback. The whole engine is ~250 KB minzipped of vanilla JS/TS, with no dependencies and no toolchain lock-in. Built with modern class syntax and bundled with [esbuild](https://esbuild.github.io).
21
20
 
22
21
  [melonJS](https://melonjs.org/) is licensed under the [MIT License](LICENSE.md) and actively maintained by the team at AltByte in Singapore.
23
22
 
@@ -34,7 +33,7 @@ melonJS is designed so you can **focus on making games, not on graphics plumbing
34
33
 
35
34
  - **Scenes, loaded in one call** — `level.load(name)` brings an authored scene straight into your world. [Tiled](https://www.mapeditor.org) is a first-class citizen for **2D** — orthogonal, isometric, hexagonal & staggered maps, animated tilesets, collision shapes, object properties, compressed formats, with GPU-accelerated tile rendering on the GPU backends — and **glTF / GLB** is the equivalent for **3D scenes**: author in Blender (or any DCC tool), export a `.glb`, and the whole scene — meshes, materials, cameras, lights, and node animation — loads under a `Camera3d`, no per-mesh wiring. Animated models play back through the same animation API as a 2D `Sprite`.
36
35
 
37
- - **Batteries included, hackable by design** — Get started in minutes with minimal setup. When you need to go deeper: ES6 classes throughout, a plugin system for engine extensions, and a clean architecture that's easy to extend without fighting the framework.
36
+ - **Batteries included, hackable by design** — Get started in minutes with minimal setup. When you need to go deeper: modern class-based architecture, a plugin system for engine extensions, and a clean architecture that's easy to extend without fighting the framework.
38
37
 
39
38
  About melonJS
40
39
  -------------------------------------------------------------------------------
@@ -263,7 +262,8 @@ See the [Migrating to the Physics Adapter API](https://github.com/melonjs/melonJ
263
262
  Installation
264
263
  -------------------------------------------------------------------------------
265
264
 
266
- melonJS is distributed as a tree-shakeable ES6 module with TypeScript declarations included.
265
+ melonJS is distributed as a tree-shakeable ES module with TypeScript declarations included.
266
+ The published bundle targets **ES2022** — transpile it if you need to support older browsers.
267
267
 
268
268
  Install via [npm](https://www.npmjs.com/package/melonjs) :
269
269
 
@@ -278,14 +278,92 @@ import { Application, Sprite, loader } from 'melonjs';
278
278
  Or use it directly via [jsDelivr](https://www.jsdelivr.com/package/npm/melonjs) CDN :
279
279
 
280
280
  ```html
281
- <!-- load the ES6 module bundle of melonJS v19.x -->
282
- <script type="module" src="https://cdn.jsdelivr.net/npm/melonjs@19/+esm"></script>
281
+ <!-- load the ES module bundle of melonJS v20.x -->
282
+ <script type="module" src="https://cdn.jsdelivr.net/npm/melonjs@20/+esm"></script>
283
283
  <!-- omit the version completely to get the latest one -->
284
284
  <!-- you should NOT use this in production -->
285
285
  <script type="module" src="https://cdn.jsdelivr.net/npm/melonjs/+esm"></script>
286
286
  ```
287
287
  > Note: the debug plugin is available separately as [`@melonjs/debug-plugin`](https://www.npmjs.com/package/@melonjs/debug-plugin)
288
288
 
289
+ ### Supporting older browsers
290
+
291
+ The published bundle targets ES2022, so it uses private class members and other
292
+ modern syntax. A browser that predates those cannot parse the file at all — this
293
+ fails at load, not at the point a feature is used.
294
+
295
+ To support older browsers, transpile melonJS **together with your own code**.
296
+ The usual trap is that build setups skip `node_modules` by default, which leaves
297
+ melonJS untouched no matter how low you set your target.
298
+
299
+ With [Vite](https://vite.dev) :
300
+
301
+ ```javascript
302
+ // vite.config.js
303
+ export default {
304
+ build: {
305
+ // esbuild downlevels dependencies too, melonjs included
306
+ target: "es2020",
307
+ },
308
+ };
309
+ ```
310
+
311
+ With Babel, make sure melonJS is not excluded :
312
+
313
+ ```javascript
314
+ // webpack.config.js
315
+ {
316
+ test: /\.js$/,
317
+ // the default `exclude: /node_modules/` would skip melonjs
318
+ exclude: /node_modules\/(?!melonjs)/,
319
+ use: "babel-loader",
320
+ }
321
+ ```
322
+
323
+ Transpiling costs some size and speed: private class members become `WeakMap`
324
+ lookups, which are on hot paths in the renderer. Only reach for it if you have
325
+ users on browsers that need it.
326
+
327
+ Building with AI agents
328
+ -------------------------------------------------------------------------------
329
+
330
+ melonJS ships **skills** — guidance files that teach AI coding assistants the
331
+ engine's conventions and, more usefully, the mistakes that fail silently rather
332
+ than raising an error.
333
+
334
+ They are installed with the package, at `node_modules/melonjs/skills/`, and are
335
+ versioned with the engine — so the guidance always matches the release you have.
336
+
337
+ **Claude Code** — install as a plugin :
338
+
339
+ ```
340
+ /plugin marketplace add melonjs/melonJS
341
+ ```
342
+
343
+ or copy the skills into a project :
344
+
345
+ ```bash
346
+ mkdir -p .claude/skills && cp -r node_modules/melonjs/skills/melonjs* .claude/skills/
347
+ ```
348
+
349
+ **Other agents** (Codex, Cursor, Gemini CLI, …) read an `AGENTS.md` from your own
350
+ project root. One ships ready to use — copy it across :
351
+
352
+ ```bash
353
+ cp node_modules/melonjs/skills/AGENTS.md ./AGENTS.md
354
+ ```
355
+
356
+ It points at the shipped skills, names the three rules that produce code which
357
+ runs and is wrong, and links the API index below. If you already have an
358
+ `AGENTS.md`, paste its sections into yours.
359
+
360
+ The skills are plain markdown and can be read by any agent, or by a human.
361
+
362
+ For anything the skills do not cover, the complete API is indexed for agents at
363
+ [llms.txt](https://melonjs.github.io/melonJS/llms.txt) — every exported class,
364
+ function and type with a one-line summary and a link to its reference page,
365
+ regenerated on every docs build.
366
+
289
367
  Community
290
368
  -------------------------------------------------------------------------------
291
369
  Join us and get help or share your projects :
@@ -207,8 +207,9 @@ export type ApplicationSettings = {
207
207
  */
208
208
  consoleHeader: boolean;
209
209
  /**
210
- * the default blend mode to use. Every renderer supports the full set —
211
- * see {@link CanvasRenderer#setBlendMode} for the list.
210
+ * the default blend mode to use. Both GPU renderers support the full set;
211
+ * the Canvas fallback supports every mode except `"none"` — see
212
+ * {@link CanvasRenderer#setBlendMode} for the list.
212
213
  * @default "normal"
213
214
  */
214
215
  blendMode: BlendMode;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/application/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,KAAK,SAAS,GACX,QAAQ,GACR,UAAU,GAC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ACd,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -14,9 +14,9 @@
14
14
  * This file owns the remaining lifecycle / track / mix / unload
15
15
  * helpers, plus the barrel re-exports that compose the namespace.
16
16
  */
17
- export { getAudioContext, getMasterGain, setStopOnAudioError, stopOnAudioError, } from "./backend.ts";
18
- export { fade, load, orientation, panner, pause, play, position, rate, resume, seek, stereo, stop, } from "./playback.ts";
17
+ export { duration, fade, load, orientation, panner, pause, play, playing, position, rate, resume, seek, state, stereo, stop, } from "./playback.ts";
19
18
  export { noise, tone } from "./procedural.ts";
19
+ export { getAudioContext, getMasterGain, setStopOnAudioError, stopOnAudioError, } from "./state.ts";
20
20
  export type { LoadSettings, NoiseFilter, NoiseOptions, PannerAttributes, SoundAsset, ToneOptions, } from "./types.ts";
21
21
  /**
22
22
  * Initialize and configure the audio module.
@@ -1 +1 @@
1
- {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/audio/audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAeH,OAAO,EACN,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,gBAAgB,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EACN,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,MAAM,EACN,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,IAAI,GACJ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAE9C,YAAY,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,WAAW,GACX,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAA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,WAAW,IAAI,IAAI,CAIlC;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAE/C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAE9C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CACnB,UAAU,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,MAAM,EACX,UAAU,GAAE,OAAc,GACxB,IAAI,CAEN;AAED;;;;;;GAMG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAE5D;AAED;;;GAGG;AACH,wBAAgB,OAAO,IAAI,IAAI,CAE9B;AAED;;;GAGG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED;;;;GAIG;AACH,wBAAgB,KAAK,IAAI,OAAO,CAE/B;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAgBlD;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,IAAI,IAAI,CAMhC"}
@@ -0,0 +1,26 @@
1
+ import type { Sound } from "./core.ts";
2
+ /**
3
+ * Fetches the bytes for an audio URL.
4
+ *
5
+ * Defaults to the engine's shared transport, which falls back to XHR for `file:`
6
+ * URLs — `fetch()` cannot read that scheme in a Cordova or Capacitor WebView.
7
+ * {@link setAudioFetcher} overrides it, for a custom transport or a test.
8
+ *
9
+ * The default is a working implementation rather than a stub that must be
10
+ * installed, because a rejection here is not reported as an error: it tells the
11
+ * backend to abandon Web Audio for that clip and fall back to a streaming HTML5
12
+ * element. An un-installed stub would therefore degrade every network clip
13
+ * silently instead of failing loudly.
14
+ */
15
+ export type AudioFetcher = (url: string, options: {
16
+ withCredentials?: boolean | undefined;
17
+ }) => Promise<ArrayBuffer>;
18
+ /**
19
+ * Install the function the backend uses to fetch audio bytes.
20
+ * @param fetcher - obtains the bytes for a URL, rejecting on failure
21
+ */
22
+ export declare const setAudioFetcher: (fetcher: AudioFetcher) => void;
23
+ export declare const loadBuffer: (self: Sound) => void;
24
+ export declare const decodeAudioData: (arraybuffer: ArrayBuffer, self: Sound) => void;
25
+ export declare const loadSound: (self: Sound, buffer?: AudioBuffer) => void;
26
+ //# sourceMappingURL=buffer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"buffer.d.ts","sourceRoot":"","sources":["../../../src/audio/backend/buffer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAIvC;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,YAAY,GAAG,CAC1B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE;IAAE,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAAE,KAC9C,OAAO,CAAC,WAAW,CAAC,CAAC;AAO1B;;;GAGG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,YAAY,SAEpD,CAAC;AAuBF,eAAO,MAAM,UAAU,GAAI,MAAM,KAAK,SAgCrC,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,aAAa,WAAW,EAAE,MAAM,KAAK,SAsBpE,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,KAAK,EAAE,SAAS,WAAW,SAiB1D,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../../src/audio/backend/cache.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Constructs the singleton engine instance and re-exports the core types.
3
+ *
4
+ * Split from `index.ts` so `voice.ts` and `sound.ts` can reach the singleton
5
+ * without importing the public barrel, which would be a cycle.
6
+ */
7
+ import { AudioEngine } from "./engine.ts";
8
+ import { Sound } from "./sound.ts";
9
+ import type { SpatialAudioEngine } from "./spatial.ts";
10
+ import { Voice } from "./voice.ts";
11
+ /**
12
+ * The global audio controller singleton.
13
+ *
14
+ * Upstream shipped spatial audio as an opt-in plugin behind a registry. There
15
+ * was only ever one plugin, so the registry was pure indirection: spatial is
16
+ * installed directly by the engine constructor and the singleton is typed
17
+ * `SpatialAudioEngine`.
18
+ */
19
+ declare const audioEngine: SpatialAudioEngine;
20
+ export { cache } from "./cache.ts";
21
+ export type { AudioBufferSourceNodeWithLegacy, EventListener, GainNodeWithBufferSource, HTMLAudioElementWithUnlocked, QueueItem, SoundOptions, WindowWithAudio, } from "./types.ts";
22
+ export { isGainNode, isHTMLAudioElement } from "./types.ts";
23
+ export { AudioEngine, audioEngine, Sound, Voice };
24
+ //# sourceMappingURL=core.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/audio/backend/core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;GAOG;AACH,QAAA,MAAM,WAAW,EAAwB,kBAAkB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,YAAY,EACX,+BAA+B,EAC/B,aAAa,EACb,wBAAwB,EACxB,4BAA4B,EAC5B,SAAS,EACT,YAAY,EACZ,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,54 @@
1
+ import type { Sound } from "./sound.ts";
2
+ import { type HTMLAudioElementWithUnlocked } from "./types.ts";
3
+ export declare class AudioEngine {
4
+ _counter: number;
5
+ _html5AudioPool: HTMLAudioElement[];
6
+ html5PoolSize: number;
7
+ _codecs: Record<string, boolean>;
8
+ sounds: Sound[];
9
+ _muted: boolean;
10
+ _volume: number;
11
+ _canPlayEvent: string;
12
+ _navigator: Navigator | null;
13
+ masterGain: GainNode | null;
14
+ noAudio: boolean;
15
+ usingWebAudio: boolean;
16
+ autoSuspend: boolean;
17
+ ctx: AudioContext | null;
18
+ autoUnlock: boolean;
19
+ state: string;
20
+ _audioUnlocked: boolean;
21
+ _scratchBuffer: AudioBuffer | null;
22
+ _suspendTimer: ReturnType<typeof setTimeout> | null;
23
+ _resumeAfterSuspend?: boolean;
24
+ _mobileUnloaded?: boolean;
25
+ constructor();
26
+ volume(vol?: number): number | this;
27
+ mute(muted: boolean): this;
28
+ stop(): this;
29
+ unload(): this;
30
+ codecs(ext: string): boolean;
31
+ /**
32
+ * Create the shared `AudioContext` and master gain node if they do not exist
33
+ * yet, and return the context.
34
+ *
35
+ * Idempotent: with a context already live this returns it untouched. It used
36
+ * to be a free function in `helpers/` that reached back into the singleton,
37
+ * with no internal guard — so six call sites each carried their own
38
+ * `if (!ctx)` check to stop a second context being built and the first
39
+ * leaked.
40
+ *
41
+ * Browsers create a context in the `suspended` state until a user gesture
42
+ * resumes it, so building one early costs nothing and plays nothing.
43
+ * @returns the shared context, or `null` when Web Audio is unavailable
44
+ */
45
+ ensureContext(): AudioContext | null;
46
+ _setup(): this;
47
+ _setupCodecs(): this;
48
+ _unlockAudio(): void;
49
+ _obtainHtml5Audio(): HTMLAudioElementWithUnlocked;
50
+ _releaseHtml5Audio(audio: HTMLAudioElementWithUnlocked): this;
51
+ _autoSuspend(): void;
52
+ _autoResume(): void;
53
+ }
54
+ //# sourceMappingURL=engine.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/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AG,IAAI;IAmCpC,MAAM,IAAI,IAAI;IAmCd,YAAY,IAAI,IAAI;IAqEpB,YAAY,IAAI,IAAI;IAiGpB,iBAAiB,IAAI,4BAA4B;IAoCjD,kBAAkB,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI;IAQ7D,YAAY,IAAI,IAAI;IA6CpB,WAAW,IAAI,IAAI;CAsDnB"}
@@ -0,0 +1,79 @@
1
+ import { type EventListener, type HTMLAudioElementWithUnlocked, type QueueItem, type SoundOptions } from "./types.ts";
2
+ import { Voice } from "./voice.ts";
3
+ declare class Sound {
4
+ _autoplay: boolean;
5
+ _format: string[];
6
+ _html5: boolean;
7
+ _muted: boolean;
8
+ _loop: boolean;
9
+ _pool: number;
10
+ _preload: boolean | "metadata";
11
+ _rate: number;
12
+ _sprite: Record<string, [number, number, boolean?]>;
13
+ _src: string | string[];
14
+ _volume: number;
15
+ _xhr: {
16
+ method: string;
17
+ headers?: HeadersInit | undefined;
18
+ withCredentials: boolean;
19
+ };
20
+ _duration: number;
21
+ _state: string;
22
+ _sounds: Voice[];
23
+ _endTimers: Record<number, ReturnType<typeof setTimeout>>;
24
+ _queue: QueueItem[];
25
+ _playLock: boolean;
26
+ _webAudio: boolean;
27
+ _onend: EventListener[];
28
+ _onfade: EventListener[];
29
+ _onload: EventListener[];
30
+ _onloaderror: EventListener[];
31
+ _onplayerror: EventListener[];
32
+ _onpause: EventListener[];
33
+ _onplay: EventListener[];
34
+ _onstop: EventListener[];
35
+ _onmute: EventListener[];
36
+ _onvolume: EventListener[];
37
+ _onrate: EventListener[];
38
+ _onseek: EventListener[];
39
+ _onunlock: EventListener[];
40
+ _onresume: EventListener[];
41
+ constructor(o: SoundOptions);
42
+ init(o: SoundOptions): this;
43
+ load(): this;
44
+ play(sprite?: string | number, internal?: boolean): number | null;
45
+ pause(id?: number, internal?: boolean): this;
46
+ stop(id?: number, internal?: boolean): this;
47
+ mute(muted: boolean, id?: number): boolean | this;
48
+ volume(): number;
49
+ volume(vol: number, id?: number, internal?: boolean): this;
50
+ fade(from: number, to: number, len: number, id?: number): this;
51
+ _startFadeInterval(sound: Voice, from: number, to: number, len: number, _id: number, isGroup: boolean): void;
52
+ _stopFade(id: number): this;
53
+ loop(): boolean;
54
+ loop(loop: boolean, id?: number): this;
55
+ rate(): number;
56
+ rate(rate: number, id?: number): this;
57
+ seek(): number;
58
+ seek(seek: number, id?: number): this;
59
+ playing(id?: number): boolean;
60
+ duration(id?: number): number;
61
+ state(): string;
62
+ unload(): null;
63
+ on(event: string, fn: (...args: unknown[]) => void, id?: number, once?: boolean): this;
64
+ off(event: string, fn?: (...args: unknown[]) => void, id?: number): this;
65
+ once(event: string, fn: (...args: unknown[]) => void, id?: number): this;
66
+ _emit(event: string, id?: number | null, msg?: string): this;
67
+ _loadQueue(event?: string): this;
68
+ _ended(sound: Voice): this;
69
+ _clearTimer(id: number): this;
70
+ _soundById(id: number): Voice | null;
71
+ _inactiveSound(): Voice;
72
+ _drain(): void;
73
+ _getSoundIds(id?: number): number[];
74
+ _refreshBuffer(sound: Voice): this;
75
+ _cleanBuffer(node: any): this;
76
+ _clearSound(node: HTMLAudioElementWithUnlocked): void;
77
+ }
78
+ export { Sound };
79
+ //# sourceMappingURL=sound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sound.d.ts","sourceRoot":"","sources":["../../../src/audio/backend/sound.ts"],"names":[],"mappings":"AAKA,OAAO,EACN,KAAK,aAAa,EAClB,KAAK,4BAA4B,EAGjC,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,cAAM,KAAK;IACV,SAAS,EAAE,OAAO,CAAS;IAC3B,OAAO,EAAE,MAAM,EAAE,CAAM;IACvB,MAAM,EAAE,OAAO,CAAS;IACxB,MAAM,EAAE,OAAO,CAAS;IACxB,KAAK,EAAE,OAAO,CAAS;IACvB,KAAK,EAAE,MAAM,CAAK;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AAG,IAAI;CAIrD;AAED,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,191 @@
1
+ import type { SoundOptions } from "./core.ts";
2
+ import { type AudioEngine, type Sound, type Voice } from "./core.ts";
3
+ /**
4
+ * Extended SoundOptions with spatial audio properties.
5
+ * Use this interface when creating a Sound instance with spatial audio capabilities.
6
+ * @example
7
+ * ```typescript
8
+ * const sound = new Sound({
9
+ * src: ['sound.mp3'],
10
+ * pos: [10, 20, 30],
11
+ * stereo: 0.5,
12
+ * distanceModel: 'inverse'
13
+ * } as SpatialSoundOptions);
14
+ * ```
15
+ */
16
+ /** Panner attributes a spatial sound can be configured with. */
17
+ export interface PannerAttrOptions {
18
+ /** Inner angle of the sound cone in degrees. */
19
+ coneInnerAngle: number;
20
+ /** Outer angle of the sound cone in degrees. */
21
+ coneOuterAngle: number;
22
+ /** Gain value outside the outer cone (0.0 to 1.0). */
23
+ coneOuterGain: number;
24
+ /** Distance model algorithm. */
25
+ distanceModel: "linear" | "inverse" | "exponential";
26
+ /** Maximum distance for the distance model. */
27
+ maxDistance: number;
28
+ /** Panning model algorithm. */
29
+ panningModel: "equalpower" | "HRTF";
30
+ /** Reference distance for the distance model. */
31
+ refDistance: number;
32
+ /** Rolloff factor for the distance model. */
33
+ rolloffFactor: number;
34
+ }
35
+ export interface SpatialSoundOptions extends SoundOptions {
36
+ /** 3D position of the sound source [x, y, z]. */
37
+ pos?: [number, number, number];
38
+ /** Orientation vector of the sound source [x, y, z]. */
39
+ orientation?: [number, number, number];
40
+ /** Stereo panning value from -1.0 (left) to 1.0 (right). */
41
+ stereo?: number;
42
+ /** Inner angle of the sound cone in degrees. Default: `360` */
43
+ coneInnerAngle?: number;
44
+ /** Outer angle of the sound cone in degrees. Default: `360` */
45
+ coneOuterAngle?: number;
46
+ /** Gain value outside the outer cone. Range: 0.0 to 1.0. Default: `0` */
47
+ coneOuterGain?: number;
48
+ /** Distance model algorithm: 'linear', 'inverse', or 'exponential'. Default: `'inverse'` */
49
+ distanceModel?: "linear" | "inverse" | "exponential";
50
+ /** Maximum distance for the distance model. Default: `10000` */
51
+ maxDistance?: number;
52
+ /** Panning model: 'equalpower' or 'HRTF'. Default: `'HRTF'` */
53
+ panningModel?: "equalpower" | "HRTF";
54
+ /** Reference distance for the distance model. Default: `1` */
55
+ refDistance?: number;
56
+ /** Rolloff factor for the distance model. Default: `1` */
57
+ rolloffFactor?: number;
58
+ /** Fires when the stereo panning changes. */
59
+ onstereo?: () => void;
60
+ /** Fires when the 3D position changes. */
61
+ onpos?: () => void;
62
+ /** Fires when the orientation changes. */
63
+ onorientation?: () => void;
64
+ }
65
+ /**
66
+ * audioEngine instance with spatial audio capabilities.
67
+ * Use this type when the spatial plugin is registered to get full type safety for spatial audio methods.
68
+ * @example
69
+ * ```typescript
70
+ * import { audioEngine } from 'engine';
71
+ * import { SpatialAudioPlugin, type SpatialAudioEngine } from 'engine/plugins/spatial';
72
+ *
73
+ * audioEngine.addPlugin(new SpatialAudioPlugin());
74
+ *
75
+ * const engine: SpatialAudioEngine = audioEngine as SpatialAudioEngine;
76
+ * engine.pos(10, 20, 30); // Set listener position
77
+ * engine.orientation(0, 0, -1, 0, 1, 0); // Set listener orientation
78
+ * engine.stereo(0.5); // Set stereo panning
79
+ * ```
80
+ */
81
+ export type SpatialAudioEngine = AudioEngine & SpatialAudioState & {
82
+ /**
83
+ * Set or get the listener's 3D position.
84
+ * @param x - X coordinate (optional)
85
+ * @param y - Y coordinate (optional)
86
+ * @param z - Z coordinate (optional)
87
+ * @returns If called with no arguments, returns the current position [x, y, z]. Otherwise, returns the audioEngine instance for chaining.
88
+ */
89
+ pos(x?: number, y?: number, z?: number): SpatialAudioEngine | [number, number, number];
90
+ /**
91
+ * Set or get the listener's orientation.
92
+ * @param x - Forward X component (optional)
93
+ * @param y - Forward Y component (optional)
94
+ * @param z - Forward Z component (optional)
95
+ * @param xUp - Up X component (optional)
96
+ * @param yUp - Up Y component (optional)
97
+ * @param zUp - Up Z component (optional)
98
+ * @returns If called with no arguments, returns the current orientation [forwardX, forwardY, forwardZ, upX, upY, upZ]. Otherwise, returns the audioEngine instance for chaining.
99
+ */
100
+ orientation(x?: number, y?: number, z?: number, xUp?: number, yUp?: number, zUp?: number): SpatialAudioEngine | [number, number, number, number, number, number];
101
+ /**
102
+ * Set or get the stereo panning value.
103
+ * @param pan - Panning value from -1.0 (left) to 1.0 (right) (optional)
104
+ * @returns If called with no arguments, returns the current panning value. Otherwise, returns the audioEngine instance for chaining.
105
+ */
106
+ stereo(pan?: number): SpatialAudioEngine;
107
+ };
108
+ /**
109
+ * Sound instance with spatial audio capabilities.
110
+ * Use this type when the spatial plugin is registered to get full type safety for spatial audio methods.
111
+ * @example
112
+ * ```typescript
113
+ * import { Sound } from 'engine';
114
+ * import { SpatialAudioPlugin, type SpatialSound, type SpatialSoundOptions } from 'engine/plugins/spatial';
115
+ *
116
+ * audioEngine.addPlugin(new SpatialAudioPlugin());
117
+ *
118
+ * const sound: SpatialSound = new Sound({
119
+ * src: ['sound.mp3'],
120
+ * pos: [10, 20, 30]
121
+ * } as SpatialSoundOptions) as SpatialSound;
122
+ *
123
+ * sound.pos(5, 10, 15); // Set sound position
124
+ * sound.stereo(0.5); // Set stereo panning
125
+ * sound.orientation(0, 1, 0); // Set sound orientation
126
+ * ```
127
+ */
128
+ export type SpatialSound = Sound & SpatialSoundState & {
129
+ /**
130
+ * Set or get the sound's 3D position.
131
+ * @param x - X coordinate (optional)
132
+ * @param y - Y coordinate (optional)
133
+ * @param z - Z coordinate (optional)
134
+ * @param id - Voice ID to target a specific sound instance (optional)
135
+ * @returns If called with no arguments, returns the current position [x, y, z]. Otherwise, returns the Sound instance for chaining.
136
+ */
137
+ pos(x?: number, y?: number, z?: number, id?: number): SpatialSound | [number, number, number] | null;
138
+ /**
139
+ * Set or get the sound's orientation vector.
140
+ * @param x - X component (optional)
141
+ * @param y - Y component (optional)
142
+ * @param z - Z component (optional)
143
+ * @param id - Voice ID to target a specific sound instance (optional)
144
+ * @returns If called with no arguments, returns the current orientation [x, y, z]. Otherwise, returns the Sound instance for chaining.
145
+ */
146
+ orientation(x?: number, y?: number, z?: number, id?: number): SpatialSound | [number, number, number] | null;
147
+ /**
148
+ * Set or get the stereo panning value.
149
+ * @param pan - Panning value from -1.0 (left) to 1.0 (right) (optional)
150
+ * @param id - Voice ID to target a specific sound instance (optional)
151
+ * @returns If called with no arguments, returns the current panning value. Otherwise, returns the Sound instance for chaining.
152
+ */
153
+ stereo(pan?: number, id?: number): SpatialSound | number | null;
154
+ /**
155
+ * Set or get panner node attributes.
156
+ * @param o - Panner attributes object (optional)
157
+ * @param id - Voice ID to target a specific sound instance (optional)
158
+ * @returns If called with no arguments, returns the current panner attributes. Otherwise, returns the Sound instance for chaining.
159
+ */
160
+ pannerAttr(o?: PannerAttrOptions | number, id?: number): SpatialSound | PannerAttrOptions;
161
+ };
162
+ /**
163
+ * Spatial Audio Plugin
164
+ * Adds 3D spatial audio and stereo panning capabilities to audioEngine and Sound instances
165
+ */
166
+ /**
167
+ * Initialize spatial audio when audioEngine is initialized
168
+ * This is called either:
169
+ * - When audioEngine initializes (if plugin was registered before)
170
+ * - Immediately during registration (if audioEngine is already initialized)
171
+ * @param engine - the audio engine singleton
172
+ */
173
+ export declare function installSpatialOnEngine(engine: AudioEngine): void;
174
+ /**
175
+ * Extend Sound instances with spatial audio methods
176
+ * @param sound - the sound the hook fires for
177
+ * @param options - the options the sound was constructed with
178
+ */
179
+ export declare function installSpatialOnSound(sound: Sound, options: SoundOptions): void;
180
+ /**
181
+ * Extend Voice instances with spatial audio properties
182
+ * @param voice - the individual playing instance
183
+ * @param parent - the sound the voice belongs to
184
+ */
185
+ export declare function installSpatialOnVoice(voice: Voice, parent: Sound): void;
186
+ /**
187
+ * Handle load queue for spatial audio
188
+ * @param sound - the sound the hook fires for
189
+ */
190
+ export declare function applySpatialAfterLoad(sound: Sound): void;
191
+ //# sourceMappingURL=spatial.d.ts.map
@@ -0,0 +1 @@
1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