melonjs 20.12.0 → 20.14.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 (185) hide show
  1. package/README.md +66 -22
  2. package/build/application/application.d.ts +6 -1
  3. package/build/application/application.d.ts.map +1 -1
  4. package/build/application/header.d.ts.map +1 -1
  5. package/build/application/resize.d.ts.map +1 -1
  6. package/build/application/settings.d.ts +13 -8
  7. package/build/application/settings.d.ts.map +1 -1
  8. package/build/audio/audio.d.ts +8 -4
  9. package/build/audio/audio.d.ts.map +1 -1
  10. package/build/audio/backend/engine.d.ts.map +1 -1
  11. package/build/audio/playback.d.ts +2 -2
  12. package/build/audio/playback.d.ts.map +1 -1
  13. package/build/audio/spatial.d.ts.map +1 -1
  14. package/build/audio/types.d.ts +15 -5
  15. package/build/audio/types.d.ts.map +1 -1
  16. package/build/camera/camera2d.d.ts +12 -9
  17. package/build/camera/camera2d.d.ts.map +1 -1
  18. package/build/camera/camera3d.d.ts +11 -8
  19. package/build/camera/camera3d.d.ts.map +1 -1
  20. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  21. package/build/geometries/ellipse.d.ts +3 -0
  22. package/build/geometries/ellipse.d.ts.map +1 -1
  23. package/build/geometries/line.d.ts.map +1 -1
  24. package/build/geometries/path2d.d.ts +9 -8
  25. package/build/geometries/path2d.d.ts.map +1 -1
  26. package/build/geometries/polygon.d.ts +2 -1
  27. package/build/geometries/polygon.d.ts.map +1 -1
  28. package/build/index.d.ts +14 -3
  29. package/build/index.d.ts.map +1 -1
  30. package/build/index.js +50215 -45051
  31. package/build/index.js.map +4 -4
  32. package/build/input/gamepad.d.ts.map +1 -1
  33. package/build/input/keyboard.d.ts.map +1 -1
  34. package/build/input/pointerevent.d.ts.map +1 -1
  35. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  36. package/build/level/level.d.ts.map +1 -1
  37. package/build/level/tiled/TMXLayer.d.ts +50 -15
  38. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  39. package/build/level/tiled/TMXTileMap.d.ts +14 -4
  40. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  41. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  42. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  43. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  44. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  45. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +1 -0
  46. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  47. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  48. package/build/level/tiled/renderer/TMXRenderer.d.ts +7 -3
  49. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  50. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  51. package/build/lighting/light3d.d.ts +55 -0
  52. package/build/lighting/light3d.d.ts.map +1 -1
  53. package/build/loader/cache.d.ts +146 -97
  54. package/build/loader/cache.d.ts.map +1 -1
  55. package/build/loader/internal-types.d.ts +69 -0
  56. package/build/loader/internal-types.d.ts.map +1 -0
  57. package/build/loader/loader.d.ts +589 -253
  58. package/build/loader/loader.d.ts.map +1 -1
  59. package/build/loader/parsers/audio.d.ts.map +1 -1
  60. package/build/loader/parsers/fontface.d.ts.map +1 -1
  61. package/build/loader/parsers/gltf.d.ts.map +1 -1
  62. package/build/loader/parsers/tmx.d.ts.map +1 -1
  63. package/build/math/color.d.ts +4 -0
  64. package/build/math/color.d.ts.map +1 -1
  65. package/build/math/math.d.ts +6 -1
  66. package/build/math/math.d.ts.map +1 -1
  67. package/build/math/noise.d.ts +16 -16
  68. package/build/math/noise.d.ts.map +1 -1
  69. package/build/math/observableVector2d.d.ts +6 -6
  70. package/build/math/observableVector2d.d.ts.map +1 -1
  71. package/build/math/observableVector3d.d.ts +8 -8
  72. package/build/math/observableVector3d.d.ts.map +1 -1
  73. package/build/particles/emitter.d.ts +15 -3
  74. package/build/particles/emitter.d.ts.map +1 -1
  75. package/build/particles/particle.d.ts +6 -0
  76. package/build/particles/particle.d.ts.map +1 -1
  77. package/build/particles/settings.d.ts +22 -5
  78. package/build/particles/settings.d.ts.map +1 -1
  79. package/build/physics/adapter.d.ts +64 -25
  80. package/build/physics/adapter.d.ts.map +1 -1
  81. package/build/physics/builtin/body.d.ts +23 -4
  82. package/build/physics/builtin/body.d.ts.map +1 -1
  83. package/build/physics/builtin/builtin-adapter.d.ts +25 -3
  84. package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
  85. package/build/physics/builtin/detector.d.ts.map +1 -1
  86. package/build/physics/builtin/raycast.d.ts.map +1 -1
  87. package/build/physics/world.d.ts +40 -10
  88. package/build/physics/world.d.ts.map +1 -1
  89. package/build/renderable/container.d.ts +41 -6
  90. package/build/renderable/container.d.ts.map +1 -1
  91. package/build/renderable/draggable.d.ts.map +1 -1
  92. package/build/renderable/frameAnimation.d.ts.map +1 -1
  93. package/build/renderable/instanced_mesh.d.ts +16 -14
  94. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  95. package/build/renderable/mesh.d.ts +62 -5
  96. package/build/renderable/mesh.d.ts.map +1 -1
  97. package/build/renderable/renderable.d.ts.map +1 -1
  98. package/build/renderable/sprite.d.ts +4 -2
  99. package/build/renderable/sprite.d.ts.map +1 -1
  100. package/build/renderable/text/bitmaptext.d.ts +12 -3
  101. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  102. package/build/renderable/text/text.d.ts +147 -4
  103. package/build/renderable/text/text.d.ts.map +1 -1
  104. package/build/renderable/text/textmetrics.d.ts +10 -2
  105. package/build/renderable/text/textmetrics.d.ts.map +1 -1
  106. package/build/renderable/text/textstyle.d.ts.map +1 -1
  107. package/build/renderable/trigger.d.ts +5 -0
  108. package/build/renderable/trigger.d.ts.map +1 -1
  109. package/build/renderable/ui/panelpaint.d.ts +5 -1
  110. package/build/renderable/ui/panelpaint.d.ts.map +1 -1
  111. package/build/renderable/ui/progressbar.d.ts +267 -95
  112. package/build/renderable/ui/progressbar.d.ts.map +1 -1
  113. package/build/renderable/ui/uibaseelement.d.ts +443 -50
  114. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  115. package/build/renderable/ui/uicheckbox.d.ts +383 -0
  116. package/build/renderable/ui/uicheckbox.d.ts.map +1 -0
  117. package/build/renderable/ui/uifocus.d.ts +6 -0
  118. package/build/renderable/ui/uifocus.d.ts.map +1 -0
  119. package/build/renderable/ui/uilabel.d.ts +31 -0
  120. package/build/renderable/ui/uilabel.d.ts.map +1 -0
  121. package/build/renderable/ui/uipanel.d.ts +589 -116
  122. package/build/renderable/ui/uipanel.d.ts.map +1 -1
  123. package/build/renderable/ui/uiskin.d.ts +25 -0
  124. package/build/renderable/ui/uiskin.d.ts.map +1 -0
  125. package/build/renderable/ui/uislider.d.ts +518 -0
  126. package/build/renderable/ui/uislider.d.ts.map +1 -0
  127. package/build/renderable/ui/uispriteelement.d.ts +161 -85
  128. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  129. package/build/renderable/ui/uitextbutton.d.ts +369 -63
  130. package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
  131. package/build/state/stage.d.ts.map +1 -1
  132. package/build/system/device.d.ts +11 -2
  133. package/build/system/device.d.ts.map +1 -1
  134. package/build/system/fullscreen.d.ts.map +1 -1
  135. package/build/system/pool.d.ts.map +1 -1
  136. package/build/system/save.d.ts +2 -1
  137. package/build/system/save.d.ts.map +1 -1
  138. package/build/tweens/tween.d.ts +5 -2
  139. package/build/tweens/tween.d.ts.map +1 -1
  140. package/build/utils/fetchdata.d.ts.map +1 -1
  141. package/build/utils/utils.d.ts.map +1 -1
  142. package/build/video/canvas/canvas_renderer.d.ts +16 -19
  143. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  144. package/build/video/canvas_factory.d.ts.map +1 -1
  145. package/build/video/effects/shadereffect.d.ts +127 -0
  146. package/build/video/effects/shadereffect.d.ts.map +1 -1
  147. package/build/video/renderer.d.ts +20 -4
  148. package/build/video/renderer.d.ts.map +1 -1
  149. package/build/video/renderstate.d.ts +26 -3
  150. package/build/video/renderstate.d.ts.map +1 -1
  151. package/build/video/utils/tessellation.d.ts +11 -0
  152. package/build/video/utils/tessellation.d.ts.map +1 -1
  153. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  154. package/build/video/webgl/webgl_renderer.d.ts +3 -6
  155. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  156. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
  157. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
  158. package/build/video/webgpu/webgpu_renderer.d.ts +3 -6
  159. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  160. package/package.json +1 -1
  161. package/skills/melonjs/SKILL.md +41 -17
  162. package/skills/melonjs-20-migration/SKILL.md +50 -7
  163. package/skills/melonjs-3d/SKILL.md +138 -38
  164. package/skills/melonjs-3d-assets/SKILL.md +83 -33
  165. package/skills/melonjs-audio/SKILL.md +62 -19
  166. package/skills/melonjs-camera-and-drawing/SKILL.md +135 -8
  167. package/skills/melonjs-deployment/SKILL.md +92 -14
  168. package/skills/melonjs-display-and-scaling/SKILL.md +8 -3
  169. package/skills/melonjs-effects-and-shaders/SKILL.md +47 -15
  170. package/skills/melonjs-events/SKILL.md +6 -3
  171. package/skills/melonjs-getting-started/SKILL.md +6 -2
  172. package/skills/melonjs-input/SKILL.md +102 -16
  173. package/skills/melonjs-lighting/SKILL.md +13 -1
  174. package/skills/melonjs-loading-assets/SKILL.md +255 -39
  175. package/skills/melonjs-math/SKILL.md +26 -8
  176. package/skills/melonjs-particles-and-trails/SKILL.md +77 -9
  177. package/skills/melonjs-performance/SKILL.md +18 -8
  178. package/skills/melonjs-physics/SKILL.md +435 -128
  179. package/skills/melonjs-plugins/SKILL.md +50 -11
  180. package/skills/melonjs-renderables/SKILL.md +31 -7
  181. package/skills/melonjs-renderer-backends/SKILL.md +38 -17
  182. package/skills/melonjs-scenes-and-state/SKILL.md +45 -5
  183. package/skills/melonjs-sprites-and-animation/SKILL.md +37 -2
  184. package/skills/melonjs-tilemaps/SKILL.md +149 -17
  185. package/skills/melonjs-ui-and-text/SKILL.md +674 -42
package/README.md CHANGED
@@ -47,27 +47,35 @@ Graphics
47
47
  - Since 20.0 the aging WebGL 1 path is retired and WebGL 2 is the baseline; devices offering only WebGL 1 fall back to the Canvas renderer under `AUTO`
48
48
  - Extensible batcher system for custom rendering pipelines, with backend-neutral vertex formats and draw topologies (declare a layout once, describe it to either GPU backend)
49
49
  - High DPI resolution & Canvas advanced auto scaling
50
- - Sprite with 9-slice scaling option and frame animation
51
- - Built-in effects such as tinting, masking, and the full set of CSS-style blend modes (normal, none, additive, multiply, screen, exclusion, darken, lighten, overlay, hard-light, color-dodge, color-burn, soft-light, difference) — all of them supported identically on WebGPU, WebGL 2 and Canvas since 20.2
50
+ - Sprite with 9-slice scaling option and frame animation (with per-frame callbacks)
51
+ - `Sprite3d` billboards, turning to face a `Camera3d` (cylindrical or spherical), for 2.5D characters and props
52
+ - Built-in effects such as tinting, masking, and the full set of CSS-style blend modes (normal, none, additive, multiply, screen, exclusion, darken, lighten, overlay, hard-light, color-dodge, color-burn, soft-light, difference) — supported identically on WebGPU, WebGL 2 and Canvas since 20.2, except `none`, which Canvas cannot do and draws as `normal`
52
53
  - Standard spritesheet, single and multiple Packed Textures support
53
54
  - Compressed texture support (DDS, KTX, KTX2, PVR, PKM) with automatic format detection and fallback
54
55
  - Hardware antialiasing (`antiAlias: true`) on both GPU backends — and it survives post-processing, since the offscreen targets a post-effect chain renders into are multisampled to match
55
56
  - Procedural noise textures: `Noise` (simplex/perlin/value/cellular, fBm / ridged / ping-pong fractal, domain warp; renderer-free and CPU-samplable for heightmaps, terrain, and spawn jitter) and `NoiseTexture2d` — bake a noise field into a sprite image, a `Gradient` color ramp, or a live-animated tangent-space normal map for lit water and surfaces; unified under a new `Texture2d` base alongside `TextureAtlas`
56
- - 3D mesh rendering with OBJ/MTL model loading, multi-material support, hardware depth testing, and perspective projection via `Camera3d` — retained-mode geometry, uploaded to the GPU once and re-drawn from there, so moving, rotating, scaling or re-tinting a mesh costs no vertex upload and no per-vertex CPU work at all
57
+ - 3D mesh rendering with OBJ/MTL model loading, multi-material support, hardware depth testing, and perspective projection via `Camera3d` — retained-mode geometry, uploaded to the GPU once and re-drawn from there, so moving, rotating, scaling or re-tinting a mesh costs no vertex upload and no per-vertex CPU work at all. 3D is built for the GPU backends; the Canvas fallback still draws a mesh under a 2D camera, as a last resort
57
58
  - Mipmapped and anisotropically-filtered mesh textures on both GPU backends, so distant and grazing-angle geometry stops shimmering (opt out per mesh with `textureFilter: "nearest"` for crisp pixel-art models)
59
+ - Crisp or smooth, application-wide: `textureFilter` (`"nearest"`, `"linear"`, or `"linear-mipmap"`, which mipmaps sprites, text and tile layers too), and integer scaling with letterboxing (`scaleRounding: "integer"`) for pixel art
60
+ - 3D mesh materials: tangent-space normal maps, specular, emissive, alpha cutout, per-vertex colors, and a back-to-front transparent pass for glass and additive glows; GPU instancing draws one mesh many times in one call (`InstancedMesh`, and glTF `EXT_mesh_gpu_instancing`)
58
61
  - Lighting, in 2D and 3D:
59
- - **2D** — `Light2d` as a first-class `Renderable` (multiple dynamic lights, radial-gradient falloff, illumination-only mode, procedural rendering via `drawLight`), plus optional per-pixel normal-map shading on sprites for 3D-looking dynamic lights
62
+ - **2D** — `Light2d` as a first-class `Renderable` (multiple dynamic lights, radial-gradient falloff, adjustable edge `softness`, illumination-only mode, procedural rendering via `drawLight`), plus optional per-pixel normal-map shading and specular highlights (`shininess`) on sprites for 3D-looking dynamic lights
60
63
  - **3D** — `Light3d` directional, point, spot and ambient lights, added to the world like `Light2d` (half-Lambert diffuse + ambient fill, quadratic falloff and cone angles on the punctual types, runtime-manipulable for day/night), auto-loaded from a glTF scene's authored suns and lamps
61
64
  - up to **32 simultaneous lights** on either path, with light data travelling in a uniform buffer — a static light rig costs zero GPU state changes per frame
62
- - Ground ("blob") shadows for 3D objects — **on by default** — so characters and props read as standing on the floor instead of hovering. An ellipse matching the caster's own footprint and rotation, shrinking and fading with height above the ground; one extra draw per object, and **one for an entire `InstancedMesh` scatter regardless of instance count**. Shaped by the light rather than always straight down: `shadowLight` points a blob at a `Light3d` and is re-read every draw, so a day/night cycle carries every shadow with it, while `shadowOffset` slides it out from the caster's feet, `shadowStretch` lengthens it for a low sun, `shadowScale` sizes it independently of the object, and `shadowGroundNormal` lays it on a floor that is not level. All of them work on an `InstancedMesh` too, as one value for the whole set. Controllable per object, per glTF scene (`level.load(name, { castGroundShadow, shadowLight, … })`) or application-wide. Deliberately not shadow mapping: it answers "where is this standing", which is what a 2.5D scene needs
63
- - Built-in shader effects (Flash, Outline, Glow, Bloom, ToneMapping, Dissolve, CRT, Hologram, etc.) with multi-pass chaining via `addPostEffect()`, plus custom shader support on both GPU backends: `ShaderEffect` for per-sprite fragment effects (GLSL and/or WGSL bodies) and complete custom mesh shader programs via `mesh.shader` (a dual-language `GLShader`: GLSL pair and/or WGSL module)
65
+ - Ground ("blob") shadows for 3D objects — **on by default** — so characters and props read as standing on the floor instead of hovering. An ellipse matching the caster's own footprint and rotation, shrinking and fading with height above the ground; one extra draw per object, and **one for an entire `InstancedMesh` scatter regardless of instance count**. Shaped by the light rather than always straight down: `shadowLight` points a blob at a `Light3d` and is re-read every draw, so a day/night cycle carries every shadow with it, while `shadowOffset` slides it out from the caster's feet, `shadowStretch` lengthens it for a low sun, `shadowScale` sizes it independently of the object, `shadowGroundNormal` lays it on a floor that is not level, and `shadowGroundPoint` on ground that is not flat at all, such as a planet. All of them work on an `InstancedMesh` too, as one value for the whole set. Controllable per object, per glTF scene (`level.load(name, { castGroundShadow, shadowLight, … })`) or application-wide. Deliberately not shadow mapping: it answers "where is this standing", which is what a 2.5D scene needs
66
+ - Built-in shader effects (Flash, Outline, Glow, Bloom, ToneMapping, Dissolve, CRT, Hologram, Shine, Vignette, Squish, Sway, etc.) with multi-pass chaining via `addPostEffect()`, on sprites, cameras and meshes alike, plus custom shader support on both GPU backends: `ShaderEffect` for per-sprite fragment effects (GLSL and/or WGSL bodies) and complete custom mesh shader programs via `mesh.shader` (a dual-language `GLShader`: GLSL pair and/or WGSL module)
64
67
  - Optional HDR rendering (`hdr: true`) — the camera's render targets become half-float, so additive light stops saturating on every write and `BloomEffect` thresholds on genuinely over-bright pixels instead of merely bright ones, with `ToneMappingEffect` and a `toneMapping` setting to compress the result back into display range when your art calls for it. Off by default and additive: nothing is inserted into your effect chain, so turning it on does not restyle a game whose look is built on clipped whites. On WebGPU it goes one step further — `hdrOutput: true` presents the frame in the display's own dynamic range rather than clamping it to SDR at the last step
65
- - Trail renderable for fading, tapering ribbons behind moving objects (speed lines, sword slashes, magic trails)
66
- - System & Bitmap Text with built-in typewriter effect
68
+ - Screen-space effects (refraction, heat haze, water): `renderer.toFrameTexture()` captures the frame for a `ShaderEffect` to sample, through the `screen_texture` / `screen_uv` built-ins
69
+ - Shaders preloaded like any other asset, and the built-in shader programs compiled behind the loading screen (`prewarm`), so the first frame of an effect does not stall
70
+ - `Trail` and `Trail3d` renderables for fading, tapering ribbons behind moving objects (speed lines, sword slashes, magic trails)
71
+ - System & Bitmap Text with built-in typewriter effect, per-glyph wave, shake and color effects on `BitmapText` (`glyphEffect`), gradient fills, and outline order and corner joins
72
+ - Vector drawing through `Path2D`, from SVG path strings, with holes and compound fills
73
+ - Automatic depth sorting by y or x that stays right as things move (`autoSort`), with a per-renderable `sortOffset`
67
74
  - Video sprite playback
68
75
 
69
76
  Sound
70
- - Web Audio support with 3D spatial audio and stereo panning, plus a procedural tone/noise API. The playback backend began as [howler.js](https://howlerjs.com) and is now a customized derivative vendored into the engine, so this is **not** a runtime dependency (see `src/audio/backend/LICENSE`)
77
+ - Web Audio support with 3D spatial audio and stereo panning, plus a procedural tone/noise API. Sounds can be placed in the world or follow a renderable, heard from a listener that tracks the camera or the player (`audio.play(name, { follow })`, `audio.setListener()`). The playback backend began as [howler.js](https://howlerjs.com) and is now a customized derivative vendored into the engine, so this is **not** a runtime dependency (see `src/audio/backend/LICENSE`)
78
+ - Audio sprites: named regions of one file, played as sounds or looped as a track region
71
79
  - Built-in procedural audio primitives (envelope-shaped oscillators, white/pink/brown noise) for SFX without sample assets
72
80
  - Direct `AudioContext` / master-gain accessors for custom WebAudio graphs that mix with the engine's master volume / mute
73
81
 
@@ -77,26 +85,33 @@ Physics
77
85
  - Raycast, AABB and sphere region queries with precise entry geometry, including 3D raycasts (`raycast3d`)
78
86
  - Collision lifecycle hooks on every `Renderable`
79
87
  - Collision filtering for optimized automatic collision detection
80
- - Multiple shapes per body for complex hitboxes
81
- - Pluggable `PhysicsAdapter` interface for custom physics via official adapters
88
+ - Multiple shapes per body, each with its own collision type, mask and trigger flag, and per-shape contact events (`onShapeCollisionStart`, …): a hitbox and a hurtbox on one body
89
+ - Sensor bodies, which report contacts without pushing anything (`isSensor`)
90
+ - 3D collision shapes (`Box3d`, `Sphere`) that push back along Z, for 2.5D
91
+ - Collision shapes exported from PhysicsEditor, named in a `bodyDef` and loaded on every adapter
92
+ - Pluggable `PhysicsAdapter` interface, with three official rigid-body adapters: [matter](https://github.com/melonjs/melonJS/tree/master/packages/matter-adapter), [planck (Box2D)](https://github.com/melonjs/melonJS/tree/master/packages/planck-adapter) and [Rapier](https://github.com/melonjs/melonJS/tree/master/packages/rapier2d-adapter), switchable while the game runs with `world.setAdapter()` (see [Physics Adapters](#physics-adapters))
82
93
 
83
94
  Input
84
95
  - Mouse and Touch device support (with mouse emulation)
85
- - Gamepad support with button and axes binding
96
+ - Gamepad support with button and axes binding, vibration, and active-pad detection
86
97
  - Keyboard event handling with key binding system
87
98
  - Device motion & accelerometer support
88
99
 
89
100
  Camera
90
101
  - Multi-camera support (split-screen, minimaps, multiple viewports)
91
- - Optional perspective camera (`Camera3d`) with frustum culling for 2.5D / 3D-projected scenes — drop-in subclass of the default 2D camera
102
+ - Optional perspective camera (`Camera3d`) with frustum culling for 2.5D / 3D-projected scenes — drop-in subclass of the default 2D camera — with distance fog (linear or exp2, with height falloff), roll, and `worldToScreen()` to pin HUD elements to 3D points
103
+ - Per-camera visibility layers (`visibilityLayer`, `cullMask`): a minimap without particles, a light shown in one camera only
92
104
  - Camera follow with configurable deadzone and frame-rate-independent damping
93
- - Built-in shake, fade, flash, and mask-based transition effects
105
+ - Built-in camera shake, fade and flash, and screen transitions: a fade, a mask in any shape, and a pixelate (WebGL and WebGPU); custom effects through `CameraEffect`
94
106
  - Per-camera post-processing pipeline with stackable shader effects and color grading (ColorMatrix)
95
107
 
96
108
  UI
97
109
  - `UIBaseElement` / `UISpriteElement` containers for clickable, hoverable and holdable elements with full pointer-event wiring
98
110
  - `Draggable` / `DropTarget` for drag-and-drop with configurable overlap or contains-check
99
- - `UITextButton` text button with hover, press, and key-bind support — built on `BitmapText`
111
+ - `UITextButton` text button with hover, press, key-bind and `onClick` support, a nine-slice `skin`, on a `Text` or `BitmapText` label
112
+ - `UIPanel` that lays out its children in a column, a row or a grid, scrolls them, and takes a nine-slice skin, a title and a drop shadow, and can be dragged
113
+ - `UICheckbox` (a radio button with a `group`), `UISlider`, and `ProgressBar`
114
+ - Keyboard and gamepad navigation between widgets, `enabled` states, and a hover and press bounce
100
115
 
101
116
  Scenes
102
117
  - Load a scene in one call with `level.load(name)` — 2D Tiled maps and 3D glTF scenes alike, auto-registered on preload
@@ -116,6 +131,7 @@ Scenes
116
131
  - Flipped & rotated Tiles
117
132
  - Dynamic Layer and Object/Group ordering
118
133
  - Dynamic Entity loading via an extensible object factory registry — register custom handlers for any Tiled class name without modifying engine code
134
+ - Tile objects take the class set on their tile in the tileset, and inherit its properties
119
135
  - Shape based Tile collision support
120
136
  - glTF / GLB 3D scenes — load an authored 3D scene with `level.load(...)`, the same one call as a Tiled map
121
137
  - The whole scene loads at once — meshes, materials, cameras and lights — viewed under a `Camera3d`
@@ -126,17 +142,19 @@ Scenes
126
142
  - Works with any glTF authoring tool (Blender, Maya, 3ds Max, Cinema 4D, …)
127
143
 
128
144
  Assets
129
- - Asynchronous asset loading with progress tracking
145
+ - Asynchronous asset loading with progress tracking, awaitable (`await loader.preload(...)`), and asynchronous `level.load`
146
+ - Asset bundles, loaded and freed together: `loader.preload({ common: [...], level1: [...] })`, then `loader.load("level1")` / `loader.unload("level1")`; an asset shared by several bundles is fetched once
130
147
  - A fully customizable preloader
131
- - Support for images, JSON, TMX/TSX, glTF / GLB 3D scenes, `.aseprite` / `.ase` binary, audio, video, binary and fonts
148
+ - Support for images, JSON, TMX/TSX, glTF / GLB 3D scenes, OBJ / MTL models, shaders, `.aseprite` / `.ase` binary, audio, video, JavaScript, binary and fonts, and custom types through `loader.setParser()`
132
149
 
133
150
  Core
134
151
  - `Application` class as the modern entry point — construct it, then `await app.init()` (asynchronous since 20.0, so the WebGPU device can be acquired) — with built-in pause, resume, and `freeze()` (hit-stop) primitives
135
152
  - A state manager (to easily manage loading, menu, options, in-game state)
136
153
  - Tween effects with multiple easing functions (Quadratic, Cubic, Elastic, Bounce, etc.) and Bezier/Catmull-Rom interpolation
137
- - Transition effects
138
- - Pooling support for object recycling
139
- - Particle system with `ParticleEmitter` (emission rate, lifetime, velocity, gravity, blend modes), and a reference space so particles can be measured from the emitter, from the world, or from any container — a moving emitter leaves a trail instead of dragging its cloud along
154
+ - Screen transitions between states: `state.transition("fade" | "mask" | "pixelate")`
155
+ - Steady motion on 60 and 120 Hz displays (`syncToDisplay`), and fullscreen (`app.requestFullscreen()`)
156
+ - Pooling support for object recycling, with typed pools (`createPool()`)
157
+ - Particle system with `ParticleEmitter` (emission rate, lifetime, velocity, gravity, blend modes, sprite-sheet frames, tint over life, 3D emission in a cone or a volume, removal once finished), and a reference space so particles can be measured from the emitter, from the world, or from any container — a moving emitter leaves a trail instead of dragging its cloud along, and a [Particle Editor](https://melonjs.github.io/melonJS/examples/#/particle-editor) to tune effects live and copy the code
140
158
  - EventEmitter based event system
141
159
  - Persistent data storage (save/load via localStorage)
142
160
  - Plugin system for extending engine capabilities
@@ -180,6 +198,7 @@ Examples
180
198
  * [Platformer](https://melonjs.github.io/melonJS/examples/#/platformer) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/platformer))
181
199
  * [Isometric Dungeon](https://melonjs.github.io/melonJS/examples/#/isometric-dungeon) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/isometricDungeon))
182
200
  * [SVG Shapes](https://melonjs.github.io/melonJS/examples/#/svg-shapes) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/svgShapes))
201
+ * [Particle Editor](https://melonjs.github.io/melonJS/examples/#/particle-editor) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/particleEditor)) — tune a `ParticleEmitter` live in 2D or 3D, from presets or a random roll, and copy the matching code or JSON
183
202
  * [Graphics](https://melonjs.github.io/melonJS/examples/#/graphics) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/graphics))
184
203
  * [Hello World](https://melonjs.github.io/melonJS/examples/#/hello-world) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/helloWorld))
185
204
  * [Hello WebGPU](https://melonjs.github.io/melonJS/examples/#/webgpu) ([source](https://github.com/melonjs/melonJS/tree/master/packages/examples/src/examples/webgpu)) — the WebGPU backend in action, with the renderer negotiation surfaced on screen
@@ -255,10 +274,13 @@ If you wish to develop your own plugin, we also provide a [plugin template](http
255
274
 
256
275
  Physics Adapters
257
276
  -------------------------------------------------------------------------------
258
- Since 19.5, melonJS exposes a `PhysicsAdapter` interface so the same game code can run on either the built-in SAT physics (default) or a third-party rigid-body engine, selected via the `physic` option on `Application`. Two official adapter packages, maintained by the melonJS team:
277
+ Since 19.5, melonJS exposes a `PhysicsAdapter` interface so the same game code can run on either the built-in SAT physics (default) or a third-party rigid-body engine, selected via the `physic` option on `Application` (and switched later with `world.setAdapter()`). Every adapter is made the same way, with `await XAdapter.create(options)`. Three official adapter packages, maintained by the melonJS team:
259
278
 
260
- - **[@melonjs/matter-adapter](https://github.com/melonjs/melonJS/tree/master/packages/matter-adapter)** — [matter-js](https://brm.io/matter-js/) integration. Rotational dynamics, constraints (springs / hinges / pins), sleeping bodies, continuous collision detection, raycasts. Showcased by the [Matter Platformer](https://melonjs.github.io/melonJS/examples/#/platformer-matter) and [Pool (Matter)](https://melonjs.github.io/melonJS/examples/#/pool-matter) examples.
279
+ - **[@melonjs/matter-adapter](https://github.com/melonjs/melonJS/tree/master/packages/matter-adapter)** — [matter-js](https://brm.io/matter-js/) integration. Rotational dynamics, constraints (springs / hinges / pins), sleeping bodies, raycasts. Showcased by the [Matter Platformer](https://melonjs.github.io/melonJS/examples/#/platformer-matter) and [Pool (Matter)](https://melonjs.github.io/melonJS/examples/#/pool-matter) examples.
261
280
  - **[@melonjs/planck-adapter](https://github.com/melonjs/melonJS/tree/master/packages/planck-adapter)** — [planck.js](https://piqnt.com/planck.js/) integration (faithful Box2D 2.3.0 port). Native joints, CCD bullet flag, sleeping bodies, native raycasts, per-body gravity scale. Showcased by the [Neon Plinko (Planck)](https://melonjs.github.io/melonJS/examples/#/plinko-planck) example.
281
+ - **[@melonjs/rapier2d-adapter](https://github.com/melonjs/melonJS/tree/master/packages/rapier2d-adapter)** — [Rapier](https://rapier.rs) 2D integration, compiled to WebAssembly. Many bodies at once, per-body continuous collision detection, joints, a character controller, native raycasts. Selectable in the [Physics Shapes](https://melonjs.github.io/melonJS/examples/#/physics-shapes) and [Line Collision](https://melonjs.github.io/melonJS/examples/#/line-collision) examples.
282
+
283
+ Not sure which one fits your game? Stay on the built-in physics for platformers, top-down games, shoot-'em-ups and 2.5D with height; reach for an adapter when the game needs rotation that collides, stacking, joints or real friction. The [physics skill](https://github.com/melonjs/melonJS/blob/master/packages/melonjs/skills/melonjs-physics/SKILL.md#picking-one) has the table, game type by game type.
262
284
 
263
285
  See the [Migrating to the Physics Adapter API](https://github.com/melonjs/melonJS/wiki/Migrating-to-the-Physics-Adapter-API), [Switching Physics Adapters](https://github.com/melonjs/melonJS/wiki/Switching-Physics-Adapters), and [BuiltinAdapter Quirks](https://github.com/melonjs/melonJS/wiki/BuiltinAdapter-Quirks) wiki pages for migration guides and the per-adapter behaviour table.
264
286
 
@@ -327,6 +349,28 @@ Transpiling costs some size and speed: private class members become `WeakMap`
327
349
  lookups, which are on hot paths in the renderer. Only reach for it if you have
328
350
  users on browsers that need it.
329
351
 
352
+ ### Running without a DOM (experimental)
353
+
354
+ melonJS also runs where there is no `document` to put a canvas in: on
355
+ [nx.js](https://github.com/TooTallNate/nx.js) (the Nintendo Switch homebrew
356
+ framework), or rendering in a Web Worker. Hand the Application the canvas to
357
+ draw to:
358
+
359
+ ```javascript
360
+ const app = new Application(1280, 720, {
361
+ canvas: screen, // nx.js's display; an OffscreenCanvas in a worker
362
+ renderer: video.AUTO,
363
+ scale: 1,
364
+ });
365
+ await app.init();
366
+ ```
367
+
368
+ This is tested against a simulation of nx.js built from its source, not yet on
369
+ Switch hardware. Some things differ there: Tiled maps must be JSON, sizing is
370
+ fixed rather than fitted to a page, and a worker gets no input or sound of its
371
+ own. The [deployment skill](https://github.com/melonjs/melonJS/blob/master/packages/melonjs/skills/melonjs-deployment/SKILL.md#runtimes-with-no-dom-nxjs-web-workers)
372
+ lists them.
373
+
330
374
  Building with AI agents
331
375
  -------------------------------------------------------------------------------
332
376
 
@@ -38,7 +38,11 @@ import type { ApplicationSettings, ResolvedApplicationSettings } from "./setting
38
38
  */
39
39
  export default class Application {
40
40
  /**
41
- * the parent HTML element holding the main canvas of this application
41
+ * the parent HTML element holding the main canvas of this application.
42
+ *
43
+ * `undefined` in a runtime with no DOM (a Web Worker, or nx.js on the
44
+ * Nintendo Switch), where the canvas given in `settings.canvas` is the
45
+ * display itself and is not attached to anything.
42
46
  */
43
47
  parentElement: HTMLElement;
44
48
  /**
@@ -231,6 +235,7 @@ export default class Application {
231
235
  updateFrameRate(): void;
232
236
  /**
233
237
  * Returns the parent HTML Element holding the main canvas of this application
238
+ * (`undefined` in a runtime with no DOM, see {@link Application#parentElement})
234
239
  * @returns the parent HTML element
235
240
  */
236
241
  getParentElement(): HTMLElement;
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application/application.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAGpD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AA8BxC,OAAO,KAAK,QAAQ,MAAM,wBAAwB,CAAC;AAQnD,OAAO,KAAK,EACX,mBAAmB,EACnB,2BAA2B,EAC3B,MAAM,eAAe,CAAC;AAiEvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,MAAM,CAAC,OAAO,OAAO,WAAW;IAC/B;;OAEG;IACH,aAAa,EAAE,WAAW,CAAC;IAE3B;;OAEG;IACH,QAAQ,EAAG,QAAQ,CAAC;IAEpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,QAAQ,EAAG,QAAQ,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;;OAKG;IACH,UAAU,EAAE,mBAAmB,CAAC;IAEhC;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,EAAE,2BAA2B,CAAC;IAEtC;;;;;;OAMG;IACH,WAAW,EAAE,OAAO,CAAC;IAarB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAC;IAGpB,OAAO,EAAE,OAAO,CAAC;IAGjB,aAAa,EAAE,OAAO,CAAC;IAGvB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAGlB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,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;OAiCG;IACH,iBAAiB,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI;IAgB1C;;;;;;;;;;;;;OAaG;IACH,cAAc,IAAI,IAAI;IActB;;;;;OAKG;IACH,IAAI,MAAM,IAAI,iBAAiB,CAE9B;IAED;;;;;;;OAOG;IACH,MAAM,IAAI,IAAI;IAId;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,YAAY,GAAE,OAAc,GAAG,IAAI;IAmE3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;;;;;OAMG;IACH,KAAK,CAAC,KAAK,GAAE,OAAe,GAAG,IAAI;IAInC;;;OAGG;IACH,MAAM,CAAC,KAAK,GAAE,OAAe,GAAG,IAAI;IAIpC;;;;;;;;;;;;;;;;;;OAkBG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,GAAE,OAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAoE/D;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAoE1B;;OAEG;IACH,IAAI,IAAI,IAAI;CA0CZ;AAED;;;;;GAKG;AACH,eAAO,IAAI,IAAI,EAAE,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA+CpD"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AA2ChD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA+CpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/application/resize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAkChD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CA4GhD"}
1
+ {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/application/resize.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAsChD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CA8GhD"}
@@ -14,8 +14,10 @@ type BlendMode = "normal" | "multiply" | "lighter" | "additive" | "screen" | "da
14
14
  *
15
15
  * - `"builtin"` (default): auto-construct a {@link BuiltinAdapter} with default options.
16
16
  * - `"none"`: keep an adapter for API compatibility but skip the per-frame `step()` call (frozen world).
17
- * - `PhysicsAdapter` instance: use the given adapter (e.g. `new BuiltinAdapter({ gravity })`,
18
- * or `new MatterAdapter()` from `@melonjs/matter-adapter`).
17
+ * - `PhysicsAdapter` instance: use the given adapter, made with the
18
+ * `create()` every adapter class has (e.g. `await MatterAdapter.create()`
19
+ * from `@melonjs/matter-adapter`, or `await BuiltinAdapter.create({ gravity })`).
20
+ * See {@link PhysicsAdapterClass}.
19
21
  * - `{ adapter: PhysicsAdapter }`: explicit form, reserved for future per-app physics options.
20
22
  */
21
23
  type PhysicsType = "builtin" | "none" | PhysicsAdapter | {
@@ -44,8 +46,10 @@ export type ApplicationSettings = {
44
46
  * GPU, perf-caveat failure, etc.) — fail fast rather than render a
45
47
  * stuck blank canvas.
46
48
  * - {@link CANVAS} — the HTML5 Canvas backend. No programmable
47
- * pipeline: no shaders/lighting, no Camera3d/depth path (meshes
48
- * only render on the CPU-projected 2D-camera path).
49
+ * pipeline: no shaders/lighting, no Camera3d/depth path. A mesh
50
+ * under a 2D camera still renders, CPU-projected, as a last-resort
51
+ * fallback; anything built on meshes should target WebGL 2 or
52
+ * WebGPU.
49
53
  *
50
54
  * Or pass a custom `Renderer` subclass instance for full control.
51
55
  * @default AUTO
@@ -54,7 +58,7 @@ export type ApplicationSettings = {
54
58
  /**
55
59
  * how the canvas is scaled to the page. A number is a fixed multiplier applied to the design resolution and nothing is measured; `"auto"` scales to the available space every time the window changes, using {@link ApplicationSettings.scaleMethod} to decide how and {@link ApplicationSettings.scaleTarget} to decide what is measured.
56
60
  *
57
- * `scaleMethod`, `scaleTarget` and {@link ApplicationSettings.scaleRounding} apply to `"auto"` only. With a fixed number they are ignored.
61
+ * `scaleMethod`, `scaleTarget` and {@link ApplicationSettings.scaleRounding} apply to automatic scaling only. Naming a `scaleMethod` other than `"manual"` turns automatic scaling on as well, and a fixed number is then ignored.
58
62
  * @default 1
59
63
  * @see ApplicationSettings.scaleMethod
60
64
  * @see ApplicationSettings.scaleTarget
@@ -64,7 +68,7 @@ export type ApplicationSettings = {
64
68
  /**
65
69
  * how automatic scaling uses the space available to it. Applies when {@link ApplicationSettings.scale} is `"auto"`.
66
70
  *
67
- * The distinction that decides which to pick is whether the DESIGN RESOLUTION moves. `"fit"` keeps it and scales the whole frame to the largest factor that fits, leaving the rest as margin, so the game always sees exactly the world it was authored for. Every other mode calls `renderer.resize()`, so the design resolution follows the container and the game sees MORE or LESS of the world on a different window: `"fill-min"` / `"fill-max"` keep the aspect ratio while doing so, `"flex"` / `"flex-width"` / `"flex-height"` resize one or both axes, and `"stretch"` scales each axis independently so the aspect ratio is not preserved. `"manual"` does nothing automatic.
71
+ * The distinction that decides which to pick is whether the DESIGN RESOLUTION moves. `"fit"` keeps it and scales the whole frame to the largest factor that fits, leaving the rest as margin, so the game always sees exactly the world it was authored for. Every other mode calls `renderer.resize()`, so the design resolution follows the container and the game sees MORE or LESS of the world on a different window: `"fill-min"` / `"fill-max"` keep the aspect ratio while doing so, `"flex"` / `"flex-width"` / `"flex-height"` resize one or both axes, and `"stretch"` scales each axis independently so the aspect ratio is not preserved. `"manual"`, the default, leaves it to {@link ApplicationSettings.scale}: with a number nothing is automatic, and with `"auto"` it scales as `"fit"`.
68
72
  *
69
73
  * A game whose layout assumes a known frame wants `"fit"`. A game that should reveal more world on a larger window wants one of the others, and has to cope with a viewport whose size it did not choose.
70
74
  * @default "manual"
@@ -412,8 +416,9 @@ export type ApplicationSettings = {
412
416
  * - `"builtin"` (default) — the built-in SAT physics adapter
413
417
  * - `"none"` — disables physics; `World.step` skips the simulation,
414
418
  * the world container behaves like a pure scene graph
415
- * - a `PhysicsAdapter` instance — e.g. `new MatterAdapter()` from
416
- * `@melonjs/matter-adapter`, or any third-party adapter
419
+ * - a `PhysicsAdapter` instance — e.g. `await MatterAdapter.create()`
420
+ * from `@melonjs/matter-adapter`, or any third-party adapter (see
421
+ * {@link PhysicsAdapterClass})
417
422
  * - `{ adapter: PhysicsAdapter }` — explicit form, reserved for
418
423
  * future per-app physics options
419
424
  *
@@ -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,GACV,SAAS,GACT,UAAU,GACV,QAAQ,GACR,QAAQ,GACR,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A2B,GAAG,mBAAmB,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,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"}
@@ -91,9 +91,10 @@ export declare function disable(): void;
91
91
  * MP3 drops out for a moment at each loop there: a region of the loop's exact
92
92
  * length keeps it gapless.
93
93
  * @param sound_name - Audio track name (case-sensitive).
94
- * @param volumeOrOptions - Playback volume, `0.0..1.0` (defaults to the
95
- * current global volume), or a {@link TrackOptions} object with `volume`
96
- * and the `sprite` region to loop on.
94
+ * @param volumeOrOptions - The track's own volume, `0.0..1.0` (defaults to
95
+ * `1`; the global volume set with {@link setVolume} scales it on top), or a
96
+ * {@link TrackOptions} object with `volume` and the `sprite` region to loop
97
+ * on.
97
98
  * @returns The sound instance ID.
98
99
  * @throws {Error} when no clip of that name is loaded, raised before anything
99
100
  * is stopped, so a mistyped name cannot silence the music already playing.
@@ -143,7 +144,10 @@ export declare function resumeTrack(): void;
143
144
  */
144
145
  export declare function getCurrentTrack(): string | null;
145
146
  /**
146
- * Set the default global volume.
147
+ * Set the global volume: the master level every sound plays through, those
148
+ * already playing included. A sound's own volume, given to {@link play} or
149
+ * {@link playTrack}, is scaled by it, so at `0.5` a sound played at `0.8` is
150
+ * heard at `0.4`.
147
151
  * @param volume - Volume value, `0.0..1.0`.
148
152
  * @category Audio
149
153
  */
@@ -1 +1 @@
1
- {"version":3,"file":"audio.d.ts","sourceRoot":"","sources":["../../src/audio/audio.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAcH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,OAAO,EACN,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,MAAM,EACN,KAAK,EACL,IAAI,EACJ,OAAO,EACP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IAmCd,YAAY,IAAI,IAAI;IA+EpB,YAAY,IAAI,IAAI;IA6GpB,iBAAiB,IAAI,4BAA4B;IAoCjD,kBAAkB,CAAC,KAAK,EAAE,4BAA4B,GAAG,IAAI;IAQ7D,YAAY,IAAI,IAAI;IAwCpB,WAAW,IAAI,IAAI;CAyEnB"}
@@ -32,8 +32,8 @@ export declare function load(sound: SoundAsset, onloadcb?: () => void, onerrorcb
32
32
  * {@link PlayOptions} object. The object form is the only way to name a
33
33
  * sprite region; the boolean form is unchanged.
34
34
  * @param onend - Called when the sound instance ends playing.
35
- * @param volume - Playback volume, `0.0..1.0`. Defaults to the current
36
- * global volume.
35
+ * @param volume - This sound's own volume, `0.0..1.0`. Defaults to `1`.
36
+ * The global volume ({@link setVolume}) scales every sound on top of it.
37
37
  * @returns The sound instance ID.
38
38
  * @example
39
39
  * // play the "cling" audio clip
@@ -1 +1 @@
1
- {"version":3,"file":"playback.d.ts","sourceRoot":"","sources":["../../src/audio/playback.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAmBH,OAAO,KAAK,EACX,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,UAAU,EACV,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CACnB,KAAK,EAAE,UAAU,EACjB,QAAQ,CAAC,EAAE,MAAM,IAAI,EACrB,SAAS,CAAC,EAAE,MAAM,IAAI,EACtB,QAAQ,GAAE,YAAiB,GACzB,MAAM,CAsFR;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,IAAI,CACnB,UAAU,EAAE,MAAM,EAClB,aAAa,GAAE,OAAO,GAAG,WAAmB,EAC5C,KAAK,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,EAC3B,MAAM,CAAC,EAAE,MAAM,GACb,MAAM,CA+DR;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CACnB,UAAU,EAAE,MAAM,EAClB,IAA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,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAIzC"}
1
+ {"version":3,"file":"spatial.d.ts","sourceRoot":"","sources":["../../src/audio/spatial.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAY1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AA6OnD,kBAAkB;AAClB,wBAAgB,QAAQ,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACrD,kBAAkB;AAClB,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;AAkCjE,kBAAkB;AAClB,wBAAgB,mBAAmB,IAAI;IACtC,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;IACN,MAAM;CACN,CAAC;AACF,kBAAkB;AAClB,wBAAgB,mBAAmB,CAClC,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,GACR,IAAI,CAAC;AAyCR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,GAAG,IAAI,CAS3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,gBAAgB,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,CAErD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAIzC"}
@@ -312,11 +312,17 @@ export interface PlayOptions {
312
312
  loop?: boolean | undefined;
313
313
  /** Called when this instance finishes playing. */
314
314
  onend?: (() => void) | undefined;
315
- /** Playback volume, `0.0..1.0`. Defaults to the current global volume. */
315
+ /**
316
+ * This sound's own volume, `0.0..1.0`. Defaults to `1`. The global
317
+ * volume ({@link audio.setVolume | `audio.setVolume`}) scales it on top.
318
+ */
316
319
  volume?: number | undefined;
317
320
  /**
318
321
  * Place this sound at a renderable and keep it there, re-reading its world
319
- * position every frame. Tracking stops when the renderable is destroyed.
322
+ * position every frame. Tracking stops when the renderable is destroyed,
323
+ * or when it leaves the world back to the pool that built it (see
324
+ * `createPool`). A renderable moved to another container, or removed
325
+ * with `keepalive`, is still followed.
320
326
  *
321
327
  * Positions are WORLD pixels, with `+y` down like everything else in
322
328
  * melonJS; the Y flip Web Audio wants is applied for you. Sounds placed
@@ -344,8 +350,9 @@ export interface PlayOptions {
344
350
  z?: number;
345
351
  } | undefined;
346
352
  /**
347
- * Stop the sound when the renderable it follows is destroyed, rather than
348
- * leaving it playing where the renderable was. Defaults to `false`.
353
+ * Stop the sound when the renderable it follows is destroyed, or leaves
354
+ * the world back to its pool, rather than leaving it playing where the
355
+ * renderable was. Defaults to `false`.
349
356
  *
350
357
  * Note that stopping discards the playback id, so keep this `false` for a
351
358
  * looping sound you intend to reposition and resume later.
@@ -386,7 +393,10 @@ export interface SoundEvents {
386
393
  * @category Audio
387
394
  */
388
395
  export interface TrackOptions {
389
- /** Playback volume, `0.0..1.0`. Defaults to the current global volume. */
396
+ /**
397
+ * This sound's own volume, `0.0..1.0`. Defaults to `1`. The global
398
+ * volume ({@link audio.setVolume | `audio.setVolume`}) scales it on top.
399
+ */
390
400
  volume?: number | undefined;
391
401
  /**
392
402
  * Name of a region declared in the clip's `sprite` map: the track loops on
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/audio/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,UAAU;IA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E,MAAM,GAAG,SAAS,CAAC;CAC5B"}
@@ -194,15 +194,6 @@ export default class Camera2d extends Renderable {
194
194
  * @param maxY - end y offset
195
195
  */
196
196
  constructor(minX: number, minY: number, maxX: number, maxY: number);
197
- /**
198
- * the zoom level of this camera.
199
- * Values less than 1 zoom out (show more of the world),
200
- * values greater than 1 zoom in (show less of the world).
201
- * @default 1
202
- * @example
203
- * // zoom out to show the full level in a 180x100 minimap
204
- * camera.zoom = Math.min(180 / levelWidth, 100 / levelHeight);
205
- */
206
197
  /**
207
198
  * Roll this camera in the screen plane, in radians — the 2D spelling of
208
199
  * {@link Camera3d#roll}, so a helper that banks "a camera" works on either.
@@ -231,6 +222,16 @@ export default class Camera2d extends Renderable {
231
222
  */
232
223
  get roll(): number;
233
224
  set roll(value: number);
225
+ /**
226
+ * the zoom level of this camera.
227
+ * Values less than 1 zoom out (show more of the world),
228
+ * values greater than 1 zoom in (show less of the world).
229
+ * A value of 0 or less is taken as 1.
230
+ * @default 1
231
+ * @example
232
+ * // zoom out to show the full level in a 180x100 minimap
233
+ * camera.zoom = Math.min(180 / levelWidth, 100 / levelHeight);
234
+ */
234
235
  get zoom(): number;
235
236
  set zoom(value: number);
236
237
  /**
@@ -402,6 +403,8 @@ export default class Camera2d extends Renderable {
402
403
  * Screen coordinates are in canvas pixels: on a zoomed camera, or one
403
404
  * drawn in a corner of the screen (see {@link screenX}), they are
404
405
  * measured from where the camera is drawn, and scaled by its zoom.
406
+ * The world coordinates are those of the world's children, where this
407
+ * camera draws them: the inverse of {@link Camera2d#worldToLocal}.
405
408
  * @param x - the x coordinate of the local point to be converted
406
409
  * @param y - the y coordinate of the local point to be converted
407
410
  * @param [v] - an optional vector object where to set the converted value
@@ -1 +1 @@
1
- {"version":3,"file":"camera2d.d.ts","sourceRoot":"","sources":["../../src/camera/camera2d.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,E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;;;OAMG;IACH,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAQ9C;;;OAGG;IACH,OAAO,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI;IAQjC;;;;;OAKG;IACH,SAAS,CAAC,GAAG,EAAE,UAAU,EAAE,QAAQ,GAAE,OAAsB,GAAG,OAAO;IA0BrE;;;;;;;;;OASG;IACH,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,MAAM;IAIrC;;;;;;;;;;;OAWG;IACH,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ;IAgB1D;;;;;;;OAOG;IACH,YAAY,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,GAAG,QAAQ;CAqW1D"}
@@ -420,12 +420,13 @@ export default class Camera3d extends Camera2d {
420
420
  */
421
421
  setLookAt(target: Vector3d, up?: Vector3d): this;
422
422
  /**
423
- * Set the target-local follow offset. Called once when configuring
424
- * a follow-cam (e.g. behind-and-above third person:
425
- * `setFollowOffset(0, -2, -8)`).
426
- * @param x - target-local x offset
427
- * @param y - target-local y offset
428
- * @param z - target-local z offset
423
+ * Set the follow offset, in world space: the camera sits at
424
+ * `target.pos + followOffset`, whichever way the target faces. Called
425
+ * once when configuring a follow-cam (e.g. behind-and-above third
426
+ * person: `setFollowOffset(0, -2, -8)`).
427
+ * @param x - world-space x offset
428
+ * @param y - world-space y offset
429
+ * @param z - world-space z offset
429
430
  * @returns this camera
430
431
  */
431
432
  setFollowOffset(x: number, y: number, z: number): this;
@@ -439,8 +440,10 @@ export default class Camera3d extends Camera2d {
439
440
  * rotates with the camera's pitch / yaw, not a fixed axis-aligned
440
441
  * rect at the camera's x / y. Camera3d substitutes plane-based
441
442
  * frustum culling — each non-floating renderable's bounding sphere
442
- * is tested against the six frustum planes that were extracted in
443
- * the most recent `update()` call. Floating elements (HUD / UI)
443
+ * is tested against the six frustum planes of the camera as it is
444
+ * now: they are rebuilt in `update()`, and again here if the camera
445
+ * was moved, turned or re-projected since (a frame culls the world
446
+ * before it updates the camera). Floating elements (HUD / UI)
444
447
  * still use Camera2d's 2D rect test because their bounds are
445
448
  * screen-space and the perspective transform doesn't apply to them.
446
449
  * @param obj - the renderable to test
@@ -1 +1 @@
1
- {"version":3,"file":"camera3d.d.ts","sourceRoot":"","sources":["../../src/camera/camera3d.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,EAAuB,UAAU,EAAE,MAAM,UAAU,CAAC;AAChE,OAAO,OAAO,EAAE,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAE5D,YAAY,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAqIhE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8DG;AACH,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,QAAQ;IAC7C;;;;;;;OAOG;IACH,OAAgB,aAAa,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,OAAO,CAAW;IAEnE;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAC;IAsEjB;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;;;;;;;;;;;;;;;OAgBG;IACH,IAAa,IAAI,IAAI,MAAM,CAE1B;IAED,IAAa,IAAI,CAAC,K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EAAE,QAAQ,EACf,GAAG,GAAE,QAAyB,GAC5B,QAAQ,GAAG,IAAI;CAuFlB"}
@@ -1 +1 @@
1
- {"version":3,"file":"fade_effect.d.ts","sourceRoot":"","sources":["../../../src/camera/effects/fade_effect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,uBAAuB,CAAC;AAE/C,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,gBAAgB,CAAC;AAC3C,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAE9C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IACnD;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC;IAEb;;OAEG;IACH,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IASxB;;;;;;;OAOG;gBAEF,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE;QACR,KAAK,EAAE,KAAK,GAAG,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,SAAS,CAAC,EAAE,IAAI,GAAG,KAAK,GAAG,SAAS,CAAC;QACrC,UAAU,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;KACtC;IA4BO,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAY7D,MAAM,IAAI,IAAI;IASd,OAAO,IAAI,IAAI;CAgBxB"}
1
+ {"version":3,"file":"fade_effect.d.ts","sourceRoot":"","sources":["../../../src/camera/effects/fade_effect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,KAAK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