melonjs 19.9.1 → 20.1.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 (276) hide show
  1. package/README.md +25 -14
  2. package/build/application/application.d.ts +70 -16
  3. package/build/application/application.d.ts.map +1 -1
  4. package/build/application/defaultApplicationSettings.d.ts +2 -2
  5. package/build/application/settings.d.ts +150 -53
  6. package/build/application/settings.d.ts.map +1 -1
  7. package/build/camera/camera2d.d.ts +1 -1
  8. package/build/camera/camera2d.d.ts.map +1 -1
  9. package/build/camera/camera3d.d.ts +13 -11
  10. package/build/camera/camera3d.d.ts.map +1 -1
  11. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  12. package/build/camera/effects/mask_effect.d.ts.map +1 -1
  13. package/build/const.d.ts +55 -26
  14. package/build/const.d.ts.map +1 -1
  15. package/build/geometries/box3d.d.ts +156 -0
  16. package/build/geometries/box3d.d.ts.map +1 -0
  17. package/build/index.d.ts +34 -24
  18. package/build/index.d.ts.map +1 -1
  19. package/build/index.js +22171 -8029
  20. package/build/index.js.map +4 -4
  21. package/build/lang/deprecated.d.ts +4 -4
  22. package/build/lang/deprecated.d.ts.map +1 -1
  23. package/build/level/gltf/GLTFModel.d.ts +4 -0
  24. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  25. package/build/level/gltf/GLTFScene.d.ts +42 -6
  26. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  27. package/build/level/gltf/srgb.d.ts +20 -0
  28. package/build/level/gltf/srgb.d.ts.map +1 -0
  29. package/build/level/level.d.ts +21 -2
  30. package/build/level/level.d.ts.map +1 -1
  31. package/build/lighting/light3d.d.ts +61 -13
  32. package/build/lighting/light3d.d.ts.map +1 -1
  33. package/build/loader/loader.d.ts +49 -21
  34. package/build/loader/loader.d.ts.map +1 -1
  35. package/build/loader/parsers/gltf.d.ts.map +1 -1
  36. package/build/loader/parsers/mtl.d.ts +18 -0
  37. package/build/loader/parsers/mtl.d.ts.map +1 -1
  38. package/build/loader/parsers/obj.d.ts +49 -0
  39. package/build/loader/parsers/obj.d.ts.map +1 -1
  40. package/build/loader/parsers/pbr.d.ts +63 -0
  41. package/build/loader/parsers/pbr.d.ts.map +1 -0
  42. package/build/loader/parsers/shader.d.ts +32 -24
  43. package/build/loader/parsers/shader.d.ts.map +1 -1
  44. package/build/physics/adapter.d.ts +86 -1
  45. package/build/physics/adapter.d.ts.map +1 -1
  46. package/build/physics/broadphase/octree.d.ts +35 -0
  47. package/build/physics/broadphase/octree.d.ts.map +1 -1
  48. package/build/physics/builtin/body.d.ts +123 -15
  49. package/build/physics/builtin/body.d.ts.map +1 -1
  50. package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
  51. package/build/physics/builtin/detector.d.ts +186 -1
  52. package/build/physics/builtin/detector.d.ts.map +1 -1
  53. package/build/physics/builtin/raycast.d.ts.map +1 -1
  54. package/build/physics/builtin/sat3d.d.ts +59 -0
  55. package/build/physics/builtin/sat3d.d.ts.map +1 -0
  56. package/build/physics/response.d.ts +32 -0
  57. package/build/physics/response.d.ts.map +1 -1
  58. package/build/physics/world.d.ts +1 -0
  59. package/build/physics/world.d.ts.map +1 -1
  60. package/build/renderable/container.d.ts +1 -0
  61. package/build/renderable/container.d.ts.map +1 -1
  62. package/build/renderable/groundshadow.d.ts +92 -0
  63. package/build/renderable/groundshadow.d.ts.map +1 -0
  64. package/build/renderable/instanced_mesh.d.ts +286 -0
  65. package/build/renderable/instanced_mesh.d.ts.map +1 -0
  66. package/build/renderable/mesh.d.ts +242 -23
  67. package/build/renderable/mesh.d.ts.map +1 -1
  68. package/build/renderable/renderable.d.ts +6 -4
  69. package/build/renderable/renderable.d.ts.map +1 -1
  70. package/build/renderable/sprite3d.d.ts +17 -6
  71. package/build/renderable/sprite3d.d.ts.map +1 -1
  72. package/build/renderable/text/text.d.ts.map +1 -1
  73. package/build/system/device.d.ts +11 -40
  74. package/build/system/device.d.ts.map +1 -1
  75. package/build/system/platform.d.ts +0 -16
  76. package/build/system/platform.d.ts.map +1 -1
  77. package/build/utils/utils.d.ts +2 -0
  78. package/build/utils/utils.d.ts.map +1 -1
  79. package/build/video/canvas/canvas_renderer.d.ts +22 -16
  80. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  81. package/build/video/{webgl/effects → effects}/blur.d.ts +2 -2
  82. package/build/video/effects/blur.d.ts.map +1 -0
  83. package/build/video/{webgl/effects → effects}/chromaticAberration.d.ts +2 -2
  84. package/build/video/effects/chromaticAberration.d.ts.map +1 -0
  85. package/build/video/{webgl/effects → effects}/colorMatrix.d.ts +3 -3
  86. package/build/video/effects/colorMatrix.d.ts.map +1 -0
  87. package/build/video/{webgl/effects → effects}/desaturate.d.ts +1 -1
  88. package/build/video/effects/desaturate.d.ts.map +1 -0
  89. package/build/video/{webgl/effects → effects}/dissolve.d.ts +2 -2
  90. package/build/video/effects/dissolve.d.ts.map +1 -0
  91. package/build/video/{webgl/effects → effects}/dropShadow.d.ts +2 -2
  92. package/build/video/effects/dropShadow.d.ts.map +1 -0
  93. package/build/video/{webgl/effects → effects}/flash.d.ts +2 -2
  94. package/build/video/effects/flash.d.ts.map +1 -0
  95. package/build/video/{webgl/effects → effects}/glow.d.ts +2 -2
  96. package/build/video/effects/glow.d.ts.map +1 -0
  97. package/build/video/effects/glsl_realization.d.ts +18 -0
  98. package/build/video/effects/glsl_realization.d.ts.map +1 -0
  99. package/build/video/{webgl/effects → effects}/hologram.d.ts +2 -2
  100. package/build/video/effects/hologram.d.ts.map +1 -0
  101. package/build/video/{webgl/effects → effects}/invert.d.ts +1 -1
  102. package/build/video/effects/invert.d.ts.map +1 -0
  103. package/build/video/{webgl/effects → effects}/outline.d.ts +2 -2
  104. package/build/video/effects/outline.d.ts.map +1 -0
  105. package/build/video/{webgl/effects → effects}/pixelate.d.ts +2 -2
  106. package/build/video/effects/pixelate.d.ts.map +1 -0
  107. package/build/video/{webgl/effects → effects}/radialGradient.d.ts +3 -4
  108. package/build/video/effects/radialGradient.d.ts.map +1 -0
  109. package/build/video/{webgl/effects → effects}/scanline.d.ts +2 -2
  110. package/build/video/effects/scanline.d.ts.map +1 -0
  111. package/build/video/{webgl/effects → effects}/sepia.d.ts +1 -1
  112. package/build/video/effects/sepia.d.ts.map +1 -0
  113. package/build/video/{webgl → effects}/shadereffect.d.ts +133 -25
  114. package/build/video/effects/shadereffect.d.ts.map +1 -0
  115. package/build/video/{webgl/effects → effects}/shine.d.ts +2 -2
  116. package/build/video/effects/shine.d.ts.map +1 -0
  117. package/build/video/{webgl/effects → effects}/tintPulse.d.ts +2 -2
  118. package/build/video/effects/tintPulse.d.ts.map +1 -0
  119. package/build/video/{webgl/effects → effects}/vignette.d.ts +2 -2
  120. package/build/video/effects/vignette.d.ts.map +1 -0
  121. package/build/video/{webgl/effects → effects}/wave.d.ts +2 -2
  122. package/build/video/effects/wave.d.ts.map +1 -0
  123. package/build/video/effects/wgsl/layout.d.ts +28 -0
  124. package/build/video/effects/wgsl/layout.d.ts.map +1 -0
  125. package/build/video/effects/wgsl/parse.d.ts +9 -0
  126. package/build/video/effects/wgsl/parse.d.ts.map +1 -0
  127. package/build/video/effects/wgsl/scaffold.d.ts +43 -0
  128. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -0
  129. package/build/video/effects/wgsl_realization.d.ts +83 -0
  130. package/build/video/effects/wgsl_realization.d.ts.map +1 -0
  131. package/build/video/gpu/batcher.d.ts +71 -0
  132. package/build/video/gpu/batcher.d.ts.map +1 -0
  133. package/build/video/gpu/instancerecord.d.ts +164 -0
  134. package/build/video/gpu/instancerecord.d.ts.map +1 -0
  135. package/build/video/gpu/meshchunk.d.ts +49 -0
  136. package/build/video/gpu/meshchunk.d.ts.map +1 -0
  137. package/build/video/gpu/meshvertex.d.ts +54 -0
  138. package/build/video/gpu/meshvertex.d.ts.map +1 -0
  139. package/build/video/gpu/primitives.d.ts +60 -0
  140. package/build/video/gpu/primitives.d.ts.map +1 -0
  141. package/build/video/gpu/quadcorners.d.ts +11 -0
  142. package/build/video/gpu/quadcorners.d.ts.map +1 -0
  143. package/build/video/gpu/textureslots.d.ts +122 -0
  144. package/build/video/gpu/textureslots.d.ts.map +1 -0
  145. package/build/video/gpu/texturestore.d.ts +139 -0
  146. package/build/video/gpu/texturestore.d.ts.map +1 -0
  147. package/build/video/gpu/topology.d.ts +43 -0
  148. package/build/video/gpu/topology.d.ts.map +1 -0
  149. package/build/video/gpu/vertexformat.d.ts +72 -0
  150. package/build/video/gpu/vertexformat.d.ts.map +1 -0
  151. package/build/video/gradient.d.ts +14 -5
  152. package/build/video/gradient.d.ts.map +1 -1
  153. package/build/video/renderer.d.ts +153 -8
  154. package/build/video/renderer.d.ts.map +1 -1
  155. package/build/video/rendertarget/canvasrendertarget.d.ts +7 -6
  156. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  157. package/build/video/rendertarget/render_target_pool.d.ts +2 -2
  158. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  159. package/build/video/rendertarget/webglrendertarget.d.ts +38 -2
  160. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  161. package/build/video/rendertarget/webgpurendertarget.d.ts +83 -0
  162. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -0
  163. package/build/video/texture/atlas.d.ts.map +1 -1
  164. package/build/video/texture/cache.d.ts +20 -2
  165. package/build/video/texture/cache.d.ts.map +1 -1
  166. package/build/video/texture/noise_texture2d.d.ts +2 -2
  167. package/build/video/utils/autodetect.d.ts.map +1 -1
  168. package/build/video/video.d.ts +1 -55
  169. package/build/video/video.d.ts.map +1 -1
  170. package/build/video/webgl/batchers/batcher.d.ts +132 -35
  171. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  172. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +14 -0
  173. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  174. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +63 -36
  175. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  176. package/build/video/webgl/batchers/material_batcher.d.ts +29 -20
  177. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  178. package/build/video/webgl/batchers/mesh_batcher.d.ts +308 -14
  179. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  180. package/build/video/webgl/batchers/primitive_batcher.d.ts +2 -2
  181. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  182. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -2
  183. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  184. package/build/video/webgl/buffer/index.d.ts +1 -1
  185. package/build/video/webgl/buffer/instance_buffer.d.ts +54 -0
  186. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -0
  187. package/build/video/webgl/buffer/retained_geometry.d.ts +83 -0
  188. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -0
  189. package/build/video/webgl/buffer/uniformblock.d.ts +81 -0
  190. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -0
  191. package/build/video/webgl/buffer/vertexstate.d.ts +101 -0
  192. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -0
  193. package/build/video/webgl/glshader.d.ts +101 -8
  194. package/build/video/webgl/glshader.d.ts.map +1 -1
  195. package/build/video/webgl/lighting/constants.d.ts +20 -8
  196. package/build/video/webgl/lighting/constants.d.ts.map +1 -1
  197. package/build/video/webgl/lighting/pack.d.ts +1 -1
  198. package/build/video/webgl/lighting/pack3d.d.ts +27 -11
  199. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  200. package/build/video/webgl/lighting/std140.d.ts +110 -0
  201. package/build/video/webgl/lighting/std140.d.ts.map +1 -0
  202. package/build/video/webgl/shaders/multitexture-lit.d.ts +7 -3
  203. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  204. package/build/video/webgl/texture/store.d.ts +52 -0
  205. package/build/video/webgl/texture/store.d.ts.map +1 -0
  206. package/build/video/webgl/utils/maxtextures.d.ts +37 -0
  207. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -0
  208. package/build/video/webgl/utils/samplercache.d.ts +69 -0
  209. package/build/video/webgl/utils/samplercache.d.ts.map +1 -0
  210. package/build/video/webgl/utils/string.d.ts +16 -0
  211. package/build/video/webgl/utils/string.d.ts.map +1 -1
  212. package/build/video/webgl/utils/topology.d.ts +24 -0
  213. package/build/video/webgl/utils/topology.d.ts.map +1 -0
  214. package/build/video/webgl/utils/vertexformat.d.ts +27 -0
  215. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -0
  216. package/build/video/webgl/webgl_renderer.d.ts +148 -30
  217. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  218. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +40 -0
  219. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -0
  220. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +82 -0
  221. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -0
  222. package/build/video/webgpu/batchers/mesh_batcher.d.ts +301 -0
  223. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -0
  224. package/build/video/webgpu/batchers/primitive_batcher.d.ts +39 -0
  225. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -0
  226. package/build/video/webgpu/batchers/quad_batcher.d.ts +143 -0
  227. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -0
  228. package/build/video/webgpu/batchers/webgpu_batcher.d.ts +70 -0
  229. package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -0
  230. package/build/video/webgpu/buffer/arena.d.ts +64 -0
  231. package/build/video/webgpu/buffer/arena.d.ts.map +1 -0
  232. package/build/video/webgpu/buffer/instance_buffer.d.ts +65 -0
  233. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -0
  234. package/build/video/webgpu/buffer/retained_geometry.d.ts +55 -0
  235. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -0
  236. package/build/video/webgpu/buffer/uniformring.d.ts +68 -0
  237. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -0
  238. package/build/video/webgpu/effect_binding.d.ts +17 -0
  239. package/build/video/webgpu/effect_binding.d.ts.map +1 -0
  240. package/build/video/webgpu/pipeline/bindgroups.d.ts +36 -0
  241. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -0
  242. package/build/video/webgpu/pipeline/cache.d.ts +173 -0
  243. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -0
  244. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +90 -0
  245. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -0
  246. package/build/video/webgpu/shaders/mesh-instanced.d.ts +60 -0
  247. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -0
  248. package/build/video/webgpu/texture/compressed.d.ts +33 -0
  249. package/build/video/webgpu/texture/compressed.d.ts.map +1 -0
  250. package/build/video/webgpu/texture/frametexture.d.ts +65 -0
  251. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -0
  252. package/build/video/webgpu/texture/store.d.ts +149 -0
  253. package/build/video/webgpu/texture/store.d.ts.map +1 -0
  254. package/build/video/webgpu/webgpu_renderer.d.ts +536 -0
  255. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -0
  256. package/package.json +2 -2
  257. package/build/video/webgl/effects/blur.d.ts.map +0 -1
  258. package/build/video/webgl/effects/chromaticAberration.d.ts.map +0 -1
  259. package/build/video/webgl/effects/colorMatrix.d.ts.map +0 -1
  260. package/build/video/webgl/effects/desaturate.d.ts.map +0 -1
  261. package/build/video/webgl/effects/dissolve.d.ts.map +0 -1
  262. package/build/video/webgl/effects/dropShadow.d.ts.map +0 -1
  263. package/build/video/webgl/effects/flash.d.ts.map +0 -1
  264. package/build/video/webgl/effects/glow.d.ts.map +0 -1
  265. package/build/video/webgl/effects/hologram.d.ts.map +0 -1
  266. package/build/video/webgl/effects/invert.d.ts.map +0 -1
  267. package/build/video/webgl/effects/outline.d.ts.map +0 -1
  268. package/build/video/webgl/effects/pixelate.d.ts.map +0 -1
  269. package/build/video/webgl/effects/radialGradient.d.ts.map +0 -1
  270. package/build/video/webgl/effects/scanline.d.ts.map +0 -1
  271. package/build/video/webgl/effects/sepia.d.ts.map +0 -1
  272. package/build/video/webgl/effects/shine.d.ts.map +0 -1
  273. package/build/video/webgl/effects/tintPulse.d.ts.map +0 -1
  274. package/build/video/webgl/effects/vignette.d.ts.map +0 -1
  275. package/build/video/webgl/effects/wave.d.ts.map +0 -1
  276. package/build/video/webgl/shadereffect.d.ts.map +0 -1
@@ -1,3 +1,52 @@
1
+ /**
2
+ * Parse a Wavefront OBJ file into geometry data.
3
+ * Supports: `v` (vertex positions), `vt` (texture coordinates),
4
+ * `f` (faces in `v`, `v/vt`, `v/vt/vn`, or `v//vn` format),
5
+ * `mtllib` (material library reference),
6
+ * `usemtl` (material group boundaries — emitted as `groups[]`).
7
+ *
8
+ * Features:
9
+ * - Quad and n-gon triangulation (fan from first vertex)
10
+ * - Automatic CW → CCW winding correction via signed volume test
11
+ * - V texture coordinate flipped for OpenGL convention (OBJ has origin at bottom-left)
12
+ * - Single-pass parsing with direct vertex unification (no intermediate arrays)
13
+ * - Material grouping: each `usemtl` switch emits a new `groups[]` entry
14
+ * pointing to a slice of the unified `indices` buffer, so callers
15
+ * (e.g. `Mesh`) can render each group with its own material without
16
+ * touching the geometry. A model with no `usemtl` directives produces
17
+ * a single group with `materialName: null`.
18
+ *
19
+ * `vn` (vertex normals) are consumed: a face referencing them
20
+ * (`v//vn` or `v/vt/vn`) produces unified vertices carrying the authored
21
+ * normal, so an OBJ model lights under `Light3d` exactly as the same model
22
+ * imported from glTF does. Every vertex WITHOUT a usable authored normal
23
+ * gets one GENERATED from face geometry — angle-weighted, accumulated per
24
+ * source position and normalized, i.e. smooth across UV and material seams
25
+ * — after the winding correction below, so the result follows the final
26
+ * triangle orientation rather than the authored one. That rule is
27
+ * per-vertex, so a file mixing normalled and un-normalled faces, or one
28
+ * carrying an out-of-range `vn`, still comes out fully normalled.
29
+ *
30
+ * Parsed but ignored: `g` (groups), `s` (smooth shading — generated normals
31
+ * are smooth across the whole mesh, so a model relying on hard edges from
32
+ * smoothing groups will read softer than authored),
33
+ * `o` (object name).
34
+ *
35
+ * @param {string} text - raw OBJ file contents
36
+ * @returns {object} parsed geometry with `vertices` (Float32Array),
37
+ * `uvs` (Float32Array), `normals` (Float32Array), `indices`
38
+ * (Uint16Array, widening to Uint32Array past 65 536 vertices),
39
+ * `vertexCount` (number),
40
+ * `mtllib` (string|null), and `groups`
41
+ * (Array<{materialName: string|null, start: number, count: number}>).
42
+ * `groups` follows the glTF convention — each entry is a
43
+ * contiguous slice of the shared `indices` buffer that draws as one
44
+ * submesh against a single material. Single-material models still
45
+ * produce a `groups` array of length 1, so consumers don't need a
46
+ * special case.
47
+ * @ignore
48
+ */
49
+ export function parseOBJ(text: string): object;
1
50
  /**
2
51
  * parse/preload a Wavefront OBJ file
3
52
  * @param {loader.Asset} data - asset data
@@ -1 +1 @@
1
- {"version":3,"file":"obj.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/obj.js"],"names":[],"mappings":"AAoQA;;;;;;;;GAQG;AACH,iCAPW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CAuBlB"}
1
+ {"version":3,"file":"obj.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/obj.js"],"names":[],"mappings":"AAqEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,+BAdW,MAAM,GACJ,MAAM,CAkZlB;AAED;;;;;;;;GAQG;AACH,iCAPW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CAuBlB"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Mapping authored metallic/roughness onto the lit mesh path's Blinn-Phong
3
+ * terms (#1575).
4
+ *
5
+ * Two formats describe the same material concept — glTF's
6
+ * `pbrMetallicRoughness` and MTL's `Pr` / `Pm` extension, both of which
7
+ * Blender writes by default — and both land here so the two cannot drift
8
+ * apart. What they land ON is a stylized half-Lambert shading model, not a
9
+ * microfacet BRDF, so this is deliberately an APPROXIMATION: the point is to
10
+ * recover the "is this surface glossy, and what colour does it glint"
11
+ * information the asset already carries, rather than to be energy-correct.
12
+ *
13
+ * An explicitly authored specular (`Ks` + `Ns`) always wins over this — it
14
+ * says exactly what the artist wanted, where metallic/roughness only implies
15
+ * it.
16
+ * @ignore
17
+ */
18
+ /**
19
+ * The exponent a mirror-smooth surface is clamped to. The Blinn-Phong
20
+ * exponent runs away as roughness approaches 0, and a highlight narrower
21
+ * than a pixel only aliases.
22
+ * @ignore
23
+ */
24
+ export declare const MAX_SHININESS = 256;
25
+ /**
26
+ * The specular reflectance of a non-metal, the standard value used by every
27
+ * metallic/roughness workflow. Metals reflect their own base colour instead.
28
+ * @ignore
29
+ */
30
+ export declare const DIELECTRIC_F0 = 0.04;
31
+ /**
32
+ * The result of the mapping: a specular colour and exponent ready to hand to
33
+ * a {@link Mesh}, or `undefined` / `0` when the material implies no
34
+ * highlight at all.
35
+ * @ignore
36
+ */
37
+ export interface SpecularTerms {
38
+ /** specular colour `[r, g, b]`, or `undefined` for none */
39
+ specular: number[] | undefined;
40
+ /** specular exponent; `0` disables the term outright */
41
+ shininess: number;
42
+ }
43
+ /**
44
+ * Map a metallic/roughness pair onto a Blinn-Phong specular colour and
45
+ * exponent.
46
+ *
47
+ * - **roughness → exponent** through the usual Blinn-Phong/GGX bridge,
48
+ * `2 / a^4 - 2` for `a = roughness^2`. A roughness of 1 — which is the
49
+ * glTF default, and what a matte material declares — lands on exactly 0,
50
+ * so a material that says nothing gets no highlight and shades exactly as
51
+ * it did before this existed.
52
+ * - **metallic → tint**, interpolating from the dielectric reflectance to
53
+ * the material's own base colour. Chrome glints in its own hue while
54
+ * plaster gets a faint neutral sheen, which is the visible half of the
55
+ * metal/non-metal distinction.
56
+ * @param roughness - authored roughness (0..1); absent or malformed reads as 1
57
+ * @param metallic - authored metalness (0..1); absent or malformed reads as 1
58
+ * @param baseColor - the material's base colour, `[r, g, b, a?]`
59
+ * @returns the specular terms, inert when the material implies no highlight
60
+ * @ignore
61
+ */
62
+ export declare function specularFromMetallicRoughness(roughness: unknown, metallic: unknown, baseColor?: number[]): SpecularTerms;
63
+ //# sourceMappingURL=pbr.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbr.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/pbr.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH;;;;;GAKG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AAEjC;;;;GAIG;AACH,eAAO,MAAM,aAAa,OAAO,CAAC;AAElC;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC7B,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC/B,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAC;CAClB;AAgBD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,6BAA6B,CAC5C,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,OAAO,EACjB,SAAS,GAAE,MAAM,EAAiB,GAChC,aAAa,CAaf"}
@@ -1,39 +1,47 @@
1
1
  /**
2
2
  * compile a shader asset's source into its shared, loader-owned instance:
3
3
  * a fragment body (the `apply()` convention) compiles into a
4
- * {@link ShaderEffect}; a full `{vertex, fragment}` program pair compiles
5
- * into a raw {@link GLShader} — for the advanced paths that take one (a
6
- * `Mesh` custom shader, `renderer.customShader`, a custom batcher).
7
- * Program pairs are WebGL-only: under the Canvas renderer a pair asset
8
- * stores `null` (with a warning) — a raw GL program has no canvas analog,
9
- * unlike ShaderEffect's inert Canvas stub.
10
- * @param {string|{vertex: string, fragment: string, precision?: string}} source - the fragment body, or a complete program pair
11
- * @returns {ShaderEffect|GLShader|null} the compiled asset, flagged `shared`
12
- * @throws if called before `video.init()` (no renderer to compile against)
4
+ * {@link ShaderEffect}; a complete program — a `{vertex, fragment}` GLSL
5
+ * pair and/or a `wgsl` full module, either omittable — compiles into a
6
+ * {@link GLShader} carrying whichever realizations were declared, for the
7
+ * hosted paths that take one (a `Mesh` custom shader,
8
+ * `renderer.customShader`, a custom batcher). The active renderer hosts
9
+ * the realization it speaks; a shader without one for this backend is
10
+ * inert — assigning it degrades to built-in shading, never fails.
11
+ * @param {string|object} source - the fragment body (or `{glsl, wgsl}`
12
+ * bodies), or a complete program: `{vertex, fragment, wgsl?, precision?}`
13
+ * @returns {ShaderEffect|GLShader} the compiled asset, flagged `shared`
14
+ * @throws if called before any `app.init()` resolved (no renderer to compile against)
13
15
  * @ignore
14
16
  */
15
- export function compileShaderAsset(source: string | {
16
- vertex: string;
17
- fragment: string;
18
- precision?: string;
19
- }): ShaderEffect | GLShader | null;
17
+ export function compileShaderAsset(source: string | object): ShaderEffect | GLShader;
20
18
  /**
21
19
  * parse/preload a shader asset, from a `src` URL (or data: URI) or inline
22
- * GLSL via the `data` field. Two source shapes are accepted:
20
+ * source via the `data` field. Three source shapes are accepted:
23
21
  *
24
22
  * - a GLSL **fragment body** following the ShaderEffect convention (uniform
25
23
  * declarations + `vec4 apply(vec4, vec2)`) → compiles into a shared
26
24
  * {@link ShaderEffect};
27
- * - a complete **program pair** — `src: {vertex: url, fragment: url}` or
28
- * `data: {vertex: glsl, fragment: glsl}` — → compiles into a shared raw
29
- * {@link GLShader}, for the advanced paths that take one (a `Mesh`
30
- * custom shader, `renderer.customShader`, a custom batcher).
25
+ * - a **dual-language body** — `src: {glsl: url, wgsl: url}` or
26
+ * `data: {glsl: source, wgsl: source}`, either language omittable — →
27
+ * a shared {@link ShaderEffect} carrying one body per shading language;
28
+ * the renderer compiles the matching one, and when none matches the
29
+ * preload still succeeds with an inert (`enabled === false`) effect;
30
+ * - a complete **program** — `src: {vertex: url, fragment: url}` (GLSL
31
+ * pair), `src: {wgsl: url}` where the WGSL declares its own `@vertex`
32
+ * entry point (a complete module), or both together for a dual-backend
33
+ * asset — → compiles into a shared raw {@link GLShader} carrying the
34
+ * declared realizations (`isWebGL` / `isWebGPU`), for the hosted paths
35
+ * that take one (a `Mesh` custom shader, `renderer.customShader`, a
36
+ * custom batcher); the active renderer hosts the realization it speaks
37
+ * and a missing one degrades to built-in shading.
31
38
  *
32
39
  * Always compiled AT LOAD TIME, so the GLSL compile cost lands in the
33
- * loading screen and compile errors carry the asset name. `video.init()`
34
- * is an inherent precondition of the preload flow (the loading screen
35
- * itself needs the renderer, and a failed init throws and halts) —
36
- * loading a shader without it fails with a clear error.
40
+ * loading screen and compile errors carry the asset name. An initialized
41
+ * Application (`await app.init()`) is an inherent precondition of the
42
+ * preload flow (the loading screen itself needs the renderer, and a failed
43
+ * init rejects and halts) — loading a shader without it fails with a clear
44
+ * error.
37
45
  * @param {loader.Asset} data - asset data
38
46
  * @param {Function} [onload] - function to be called when the resource is loaded
39
47
  * @param {Function} [onerror] - function to be called in case of error
@@ -42,6 +50,6 @@ export function compileShaderAsset(source: string | {
42
50
  * @ignore
43
51
  */
44
52
  export function preloadShader(data: loader.Asset, onload?: Function, onerror?: Function, settings?: Object): number;
45
- import ShaderEffect from "../../video/webgl/shadereffect.js";
53
+ import ShaderEffect from "../../video/effects/shadereffect.js";
46
54
  import GLShader from "../../video/webgl/glshader.js";
47
55
  //# sourceMappingURL=shader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shader.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/shader.js"],"names":[],"mappings":"AAeA;;;;;;;;;;;;;GAaG;AACH,2CALW,MAAM,GAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAC,GAC3D,YAAY,GAAC,QAAQ,GAAC,IAAI,CAuCtC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,oCAPW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CAqGlB;yBA1LwB,mCAAmC;qBADvC,+BAA+B"}
1
+ {"version":3,"file":"shader.d.ts","sourceRoot":"","sources":["../../../src/loader/parsers/shader.js"],"names":[],"mappings":"AA6BA;;;;;;;;;;;;;;;GAeG;AACH,2CANW,MAAM,GAAC,MAAM,GAEX,YAAY,GAAC,QAAQ,CAqDjC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,oCAPW,MAAM,CAAC,KAAK,oDAGZ,MAAM,GACJ,MAAM,CAgHlB;yBA9OwB,qCAAqC;qBACzC,+BAA+B"}
@@ -14,8 +14,93 @@ import type World from "./world.js";
14
14
  * platforms, elevators).
15
15
  */
16
16
  export type BodyType = "static" | "dynamic" | "kinematic";
17
- /** Collision shape that a physics body may be composed of. */
17
+ /**
18
+ * Collision shape that a physics body may be composed of.
19
+ *
20
+ * A shape may also carry its own optional collision settings, which refine the
21
+ * body's rather than replacing them — `collisionType`, `collisionMask`,
22
+ * `isTrigger` and `isActive`. See {@link Body#addShape} for the semantics.
23
+ *
24
+ * Adapter support: the builtin and planck adapters honour them (planck maps
25
+ * them onto per-fixture filters, which Box2D provides natively). The matter
26
+ * adapter does NOT — its `collisionFilter` and `isSensor` belong to a body, not
27
+ * to the parts it is built from, so per-shape values are ignored there.
28
+ */
18
29
  export type BodyShape = Rect | Ellipse | Polygon;
30
+ /**
31
+ * One overlapping SHAPE pair, passed to the shape-level collision lifecycle
32
+ * hooks (`onShapeCollisionStart`, `onShapeCollisionActive`,
33
+ * `onShapeCollisionEnd`).
34
+ *
35
+ * **Why this exists alongside `CollisionResponse`.** A body may collide with
36
+ * another through several shapes at once. `onCollision` and the
37
+ * `onCollision*` lifecycle report ONE contact per body pair — the one chosen
38
+ * for physical resolution — so a footprint contact can mask a simultaneous
39
+ * hurtbox contact. These hooks report every overlapping pair, without changing
40
+ * which one resolves.
41
+ *
42
+ * **Opt-in.** The detector only enumerates shape pairs when an object declares
43
+ * at least one of these handlers. Declaring none costs nothing.
44
+ *
45
+ * **Supported on every backend.** The builtin detector enumerates shape pairs
46
+ * directly; `@melonjs/planck-adapter` and `@melonjs/matter-adapter` map one
47
+ * melonJS shape onto one native collider and their engines already report
48
+ * contacts per collider pair, so both dispatch these natively. The adapters
49
+ * supply `normal` and `depth` rather than the full SAT vector set, matching
50
+ * what they already provide to `onCollision`.
51
+ *
52
+ * **Receiver-symmetric**, exactly like `CollisionResponse`: `a` and `shapeA`
53
+ * are always the side whose handler is firing, `b` and `shapeB` the partner.
54
+ *
55
+ * **Do not retain it.** The object is pooled and reused across pairs and
56
+ * frames. Copy anything needed beyond the handler call.
57
+ * @example
58
+ * onShapeCollisionStart(contact, other) {
59
+ * // which of MY shapes was hit
60
+ * if (contact.indexShapeA === HURTBOX && contact.isTrigger) {
61
+ * this.takeHit(other, contact.normal);
62
+ * }
63
+ * }
64
+ */
65
+ export interface ShapeCollisionContact {
66
+ /** the renderable whose handler is firing — always `=== this`. */
67
+ a: Renderable;
68
+ /** the partner renderable — always `=== other`. */
69
+ b: Renderable;
70
+ /** the receiver's own shape in this contact. */
71
+ shapeA: BodyShape;
72
+ /** the partner's shape in this contact. */
73
+ shapeB: BodyShape;
74
+ /** index of `shapeA` in the receiver's `body.shapes`. */
75
+ indexShapeA: number;
76
+ /** index of `shapeB` in the partner's `body.shapes`. */
77
+ indexShapeB: number;
78
+ /** true when either shape is a trigger, so the pair contributes no push-out. */
79
+ isTrigger: boolean;
80
+ /** penetration depth. Zero in `onShapeCollisionEnd`, where the shapes have separated. */
81
+ overlap: number;
82
+ /** alias of `overlap`. */
83
+ depth: number;
84
+ /** minimum translation vector for the receiver. */
85
+ overlapV: {
86
+ x: number;
87
+ y: number;
88
+ };
89
+ /** contact normal in the legacy `overlapN` convention. */
90
+ overlapN: {
91
+ x: number;
92
+ y: number;
93
+ };
94
+ /** contact normal oriented for the receiver. */
95
+ normal: {
96
+ x: number;
97
+ y: number;
98
+ };
99
+ /** Z components, non-zero only for a `Box3d` pair that resolved along Z. */
100
+ overlapZ: number;
101
+ overlapNZ: number;
102
+ normalZ: number;
103
+ }
19
104
  /**
20
105
  * Collision response passed to the modern collision lifecycle hooks
21
106
  * (`onCollisionStart`, `onCollisionActive`, `onCollisionEnd`) on every
@@ -1 +1 @@
1
- {"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/physics/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AAEpC;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAE1D,8DAA8D;AAC9D,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,WAAW,iBAAiB;IACjC,kEAAkE;IAClE,CAAC,EAAE,UAAU,CAAC;IACd,mDAAmD;IACnD,CAAC,EAAE,UAAU,CAAC;IACd;;;;;;;;OAQG;IACH,MAAM,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjC,8EAA8E;IAC9E,KAAK,EAAE,MAAM,CAAC;IACd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;;;;;OAuCG;IACH,WAAW,CAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC;IAC7D,WAAW,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC;IAE3C;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAErE;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,SAAS,SAAS,EAAE,CAAC;CAC5D"}
@@ -143,6 +143,41 @@ export default class Octree implements Broadphase<OctreeItem> {
143
143
  * @returns octant index (0-7) or -1
144
144
  */
145
145
  getIndex(item: OctreeItem): number;
146
+ /**
147
+ * Classify an item into one of this node's four x/y quadrants,
148
+ * **ignoring z entirely**. Returns the near-half octant index
149
+ * (0-3, so `+ 4` gives the far-half sibling), or -1 when the item
150
+ * straddles a midpoint or lies outside this node in x/y.
151
+ *
152
+ * Split out of {@link Octree.getIndex} for {@link Octree.retrieve},
153
+ * whose consumers all decide overlap in the XY plane and therefore
154
+ * need x/y pruning WITHOUT a depth opinion. Routing that through
155
+ * `getIndex` instead would reject the item from its own z-sibling
156
+ * on the depth out-of-bounds guard, collapsing that entire subtree
157
+ * into an unpruned walk — measured at ~10× the nodes visited on a
158
+ * depth-spread scene.
159
+ *
160
+ * Boundary convention: a midpoint belongs to the RIGHT / BOTTOM
161
+ * child, and an item whose far edge merely touches a midpoint still
162
+ * counts as wholly inside the near side — `<=` / `>=` rather than
163
+ * strict, because an item sitting exactly ON a midpoint lies wholly
164
+ * within one child and must descend. Only a genuine STRADDLE
165
+ * belongs at this level.
166
+ *
167
+ * This matters more than it looks: the root box is origin-centred,
168
+ * so its midpoints are (0, 0, 0) — the default `pos` of every
169
+ * renderable. Under strict comparisons an entire gameplay plane
170
+ * classified as -1 and sat unpartitioned at the root.
171
+ *
172
+ * Safety: two items separated by a midpoint cannot overlap. If A
173
+ * lies left (`A.right <= mid`) and B lies right (`B.left >= mid`)
174
+ * then `A.right <= B.left`, and touching edges are not an overlap
175
+ * under the engine's strict bounds test.
176
+ * @param item - the object to classify
177
+ * @returns near-half octant index (0-3) or -1
178
+ * @ignore
179
+ */
180
+ _quadrantXY(item: OctreeItem): number;
146
181
  /**
147
182
  * Insert the given object container into the node — recursively
148
183
  * walks `Container.getChildren()` and inserts each non-kinematic
@@ -1 +1 @@
1
- {"version":3,"file":"octree.d.ts","sourceRoot":"","sources":["../../../src/physics/broadphase/octree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEpD,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAUlD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IAC1B,SAAS,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1E,mBAAmB,CAAC,IAAI;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5D;;;;OAIG;IACH,GAAG,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAA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aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAepC,cAAc;IACd,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,OAAO;CAavE;AAED;;;;;;GAMG;AACH,UAAU,gBAAiB,SAAQ,UAAU;IAC5C,QAAQ,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC;IAC3C,WAAW,CAAC,EAAE,MAAM,gBAAgB,EAAE,CAAC;CACvC;AAED,cAAc;AACd,KAAK,aAAa,GAAG;IAAE,WAAW,IAAI,gBAAgB,EAAE,CAAA;CAAE,CAAC;AAC3D,cAAc;AACd,KAAK,qBAAqB,GAAG;IAAE,WAAW,CAAC,IAAI,gBAAgB,EAAE,CAAA;CAAE,CAAC"}
@@ -1,12 +1,3 @@
1
- /**
2
- * @import Entity from "../../renderable/entity/entity.js";
3
- * @import Container from "../../renderable/container.js";
4
- * @import Renderable from "../../renderable/renderable.js";
5
- * @import Sprite from "../../renderable/sprite.js";
6
- * @import NineSliceSprite from "../../renderable/nineslicesprite.js";
7
- * @import {Vector2d} from "../../math/vector2d.js";
8
- * @import ResponseObject from "../response.js";
9
- **/
10
1
  /**
11
2
  * a Generic Physic Body Object with some physic properties and behavior functionality, to add as a member of a Renderable.
12
3
  * @category Physics
@@ -185,6 +176,60 @@ export default class Body {
185
176
  * @default <490,490>
186
177
  */
187
178
  public maxVel: Vector2d;
179
+ /**
180
+ * The current velocity of the body along the depth axis.
181
+ *
182
+ * Z arrives as **scalars beside** `vel` / `force` / `friction` /
183
+ * `maxVel` rather than by widening them to {@link Vector3d}, because
184
+ * `Vector3d` is not a subclass of {@link Vector2d}: retyping them —
185
+ * or the {@link Body#getVelocity} vector they hand back — would break
186
+ * every existing 2D consumer. They stay exactly as they were.
187
+ *
188
+ * All four default to the inert value, so a body that never touches
189
+ * them integrates z by `+= 0` and behaves identically to 19.x. Only a
190
+ * body carrying a {@link Box3d} shape can be pushed back along z by
191
+ * the solver.
192
+ * @public
193
+ * @type {number}
194
+ * @default 0
195
+ * @see Body#forceZ
196
+ * @see Box3d
197
+ */
198
+ public velZ: number;
199
+ /**
200
+ * body force to apply along the depth axis in the current step.
201
+ * @public
202
+ * @type {number}
203
+ * @default 0
204
+ * @see Body#velZ
205
+ */
206
+ public forceZ: number;
207
+ /**
208
+ * body friction along the depth axis.
209
+ * @public
210
+ * @type {number}
211
+ * @default 0
212
+ * @see Body#setFriction
213
+ */
214
+ public frictionZ: number;
215
+ /**
216
+ * max velocity along the depth axis (to limit body velocity).
217
+ * @public
218
+ * @type {number}
219
+ * @default 490
220
+ * @see Body#setMaxVelocity
221
+ */
222
+ public maxVelZ: number;
223
+ /**
224
+ * `true` when at least one of this body's shapes is a {@link Box3d},
225
+ * i.e. this body has a depth extent and can be resolved along z.
226
+ * Maintained by {@link Body#addShape} / {@link Body#removeShape}.
227
+ * @readonly
228
+ * @public
229
+ * @type {boolean}
230
+ * @default false
231
+ */
232
+ public readonly hasDepth: boolean;
188
233
  /**
189
234
  * Either this body is a static body or not.
190
235
  * A static body is completely fixed and can never change position or angle.
@@ -422,15 +467,75 @@ export default class Body {
422
467
  /**
423
468
  * add a collision shape to this body <br>
424
469
  * (note: me.Rect objects will be converted to me.Polygon before being added)
470
+ *
471
+ * A shape may carry its own collision settings, which refine the body's
472
+ * (see {@link Body#collisionType} / {@link Body#collisionMask}). All are
473
+ * optional, and their defaults are the behaviour a shape has always had:
474
+ *
475
+ * | property | default | effect |
476
+ * |---|---|---|
477
+ * | `collisionType` | inherit body | this shape's own category |
478
+ * | `collisionMask` | inherit body | what this shape collides with |
479
+ * | `isActive` | `true` | `false` removes the shape from collision entirely — no test, no contact, no events — without removing it from the body |
480
+ * | `isTrigger` | `false` | `true` still collides and still fires events, but skips the position correction (per-shape {@link Body#isSensor}) |
481
+ *
482
+ * A shape can only NARROW what its body allows, never widen it: the body's
483
+ * type/mask are still checked first, so a permissive shape on a restrictive
484
+ * body collides with nothing.
485
+ *
486
+ * A trigger removes only ITSELF from the solver. If a solid shape on the
487
+ * same body also overlaps, that contact still pushes out — the narrowphase
488
+ * prefers a solid pair over a trigger pair, so the outcome does not depend
489
+ * on the order shapes were added. `response.isTriggerContact` reports
490
+ * whether a given contact exists only through trigger shapes.
491
+ *
492
+ * `isActive: false` removes the shape from the narrowphase AND from
493
+ * raycasts. It does not shrink the body's `bounds` — those stay
494
+ * conservative, so toggling a shape never resizes the body in the
495
+ * broadphase — nor does it clear `hasDepth` for a `Box3d`.
496
+ *
497
+ * Supported by the builtin and planck adapters. The matter adapter filters
498
+ * per body only and ignores these. Note that under planck, the body-wide
499
+ * setters (`setCollisionType`, `setCollisionMask`, `setSensor`) write every
500
+ * fixture and so overwrite per-shape values.
425
501
  * @param {Rect|Polygon|Line|Ellipse|Point|Point[]|Bounds|object} shape - a shape or JSON object
426
502
  * @returns {number} the shape array length
427
503
  * @example
428
504
  * // add a rectangle shape
429
505
  * this.body.addShape(new me.Rect(0, 0, image.width, image.height));
506
+ * @example
507
+ * // a character whose feet collide with terrain and whose torso is a hurtbox
508
+ * const feet = new me.Rect(0, 24, 32, 8);
509
+ * feet.collisionMask = me.collision.types.WORLD_SHAPE;
510
+ * const torso = new me.Rect(0, 0, 32, 24);
511
+ * torso.collisionMask = me.collision.types.ENEMY_OBJECT;
512
+ * torso.isTrigger = true; // detect hits, never get pushed by them
513
+ * this.body.addShape(feet);
514
+ * this.body.addShape(torso);
430
515
  * // add a shape from a JSON object
431
516
  * this.body.addShape(me.loader.getJSON("shapesdef").banana);
432
517
  */
433
- addShape(shape: Rect | Polygon | Line | Ellipse | Point | Point[] | Bounds | object): number;
518
+ /**
519
+ * Give a stored shape its per-shape collision settings, carrying them over
520
+ * from the source object when `addShape` converted it (a `Rect` and a
521
+ * `Bounds` both become a `Polygon`, so anything set on the original would
522
+ * otherwise be dropped on the floor).
523
+ *
524
+ * Every field is written explicitly, including the defaults. That is not
525
+ * tidiness: converted shapes come from `polygonPool`, whose reset restores
526
+ * only position and vertices — a recycled instance would otherwise arrive
527
+ * still carrying the previous owner's `isTrigger` or mask and quietly
528
+ * change how an unrelated body collides.
529
+ *
530
+ * Idempotent, because `removeShape` re-adds every surviving shape through
531
+ * `addShape` and must not disturb their settings.
532
+ * @param {object} stored - the shape as held in `this.shapes`
533
+ * @param {object} [source] - the object passed to `addShape`; omitted when
534
+ * the shape was built here from a pool and has no user-supplied original
535
+ * @private
536
+ */
537
+ private _initShapeCollision;
538
+ addShape(shape: any): number;
434
539
  /**
435
540
  * Recompute the default `pseudoInertia` from the current bounds.
436
541
  * Uses the moment-of-inertia formula for a unit-mass rectangle —
@@ -481,10 +586,10 @@ export default class Body {
481
586
  getBounds(): Bounds;
482
587
  /**
483
588
  * remove the specified shape from the body shape list
484
- * @param {Polygon|Line|Ellipse} shape - a shape object
589
+ * @param {Polygon|Line|Ellipse|Box3d} shape - a shape object
485
590
  * @returns {number} the shape array length
486
591
  */
487
- removeShape(shape: Polygon | Line | Ellipse): number;
592
+ removeShape(shape: Polygon | Line | Ellipse | Box3d): number;
488
593
  /**
489
594
  * remove the shape at the given index from the body shape list
490
595
  * @param {number} index - the shape object at the specified index
@@ -565,14 +670,16 @@ export default class Body {
565
670
  * cap the body velocity (body.maxVel property) to the specified value<br>
566
671
  * @param {number} x - max velocity on x axis
567
672
  * @param {number} y - max velocity on y axis
673
+ * @param {number} [z] - max velocity on the depth axis; left unchanged when omitted, so existing two-argument calls keep their behaviour
568
674
  */
569
- setMaxVelocity(x: number, y: number): void;
675
+ setMaxVelocity(x: number, y: number, z?: number): void;
570
676
  /**
571
677
  * set the body default friction
572
678
  * @param {number} x - horizontal friction
573
679
  * @param {number} y - vertical friction
680
+ * @param {number} [z] - depth friction; left unchanged when omitted, so existing two-argument calls keep their behaviour
574
681
  */
575
- setFriction(x?: number, y?: number): void;
682
+ setFriction(x?: number, y?: number, z?: number): void;
576
683
  /**
577
684
  * Updates the parent's position as well as computes the new body's velocity based
578
685
  * on the values of force/friction. Velocity changes are proportional to the
@@ -604,6 +711,7 @@ import { Line } from "../../geometries/line.ts";
604
711
  import { Ellipse } from "../../geometries/ellipse.ts";
605
712
  import { Point } from "../../geometries/point.ts";
606
713
  import { Vector2d } from "../../math/vector2d.ts";
607
- import { Rect } from "../../geometries/rectangle.ts";
714
+ import { Box3d } from "../../geometries/box3d.ts";
608
715
  import type ResponseObject from "../response.js";
716
+ import { Rect } from "../../geometries/rectangle.ts";
609
717
  //# sourceMappingURL=body.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../src/physics/builtin/body.js"],"names":[],"mappings":"AAaA;;;;;;;;IAQI;AAEJ;;;;GAIG;AACH;IACC;;;;OAIG;IACH,sBAJW,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,WAClD,IAAI,GAAC,IAAI,EAAE,GAAC,OAAO,GAAC,OAAO,EAAE,GAAC,IAAI,GAAC,IAAI,EAAE,GAAC,OAAO,GAAC,OAAO,EAAE,GAAC,KAAK,GAAC,KAAK,EAAE,GAAC,MAAM,GAAC,MAAM,EAAE,GAAC,MAAM,2BAkS1G;IA9RA;;;;;;OAMG;IACH,iBAHU,UAAU,GAAC,SAAS,GAAC,MAAM,GAAC,MAAM,GAAC,eAAe,CAGpC;IAGvB;;;;OAIG;IACH,eAFU,MAAM,CAEc;IAI9B;;;;;;;;OAQG;IACH,QAFU,CAAC,OAAO,GAAC,IAAI,GAAC,OAAO,GAAC,KAAK,CAAC,EAAE,CAExB;IAGjB;;;;;;;OAOG;IACH,eAJU,MAAM,CAI+B;IAE/C;;;;;;;;;OASG;IACH,sBAPU,MAAM,CAOiC;IAGhD;;;;;;;OAOG;IACH,YAHU,QAAQ,CAGW;IAK7B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,cAlBU,QAAQ,CAkBa;IAK/B;;;;;OAKG;IACH,iBAHU,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