melonjs 20.3.0 → 20.4.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 (442) hide show
  1. package/README.md +19 -19
  2. package/build/application/application.d.ts +0 -17
  3. package/build/application/application.d.ts.map +1 -1
  4. package/build/application/settings.d.ts +3 -0
  5. package/build/application/settings.d.ts.map +1 -1
  6. package/build/audio/audio.d.ts.map +1 -1
  7. package/build/audio/backend/engine.d.ts +0 -19
  8. package/build/audio/backend/engine.d.ts.map +1 -1
  9. package/build/audio/backend/sound.d.ts +1 -51
  10. package/build/audio/backend/sound.d.ts.map +1 -1
  11. package/build/audio/backend/spatial.d.ts.map +1 -1
  12. package/build/audio/backend/types.d.ts +11 -1
  13. package/build/audio/backend/types.d.ts.map +1 -1
  14. package/build/audio/backend/voice.d.ts +0 -25
  15. package/build/audio/backend/voice.d.ts.map +1 -1
  16. package/build/audio/playback.d.ts.map +1 -1
  17. package/build/audio/procedural.d.ts.map +1 -1
  18. package/build/audio/state.d.ts +6 -79
  19. package/build/audio/state.d.ts.map +1 -1
  20. package/build/camera/camera2d.d.ts +0 -68
  21. package/build/camera/camera2d.d.ts.map +1 -1
  22. package/build/camera/camera3d.d.ts +86 -79
  23. package/build/camera/camera3d.d.ts.map +1 -1
  24. package/build/camera/effects/fade_effect.d.ts +0 -5
  25. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  26. package/build/camera/effects/mask_effect.d.ts +0 -5
  27. package/build/camera/effects/mask_effect.d.ts.map +1 -1
  28. package/build/camera/fog.d.ts +118 -0
  29. package/build/camera/fog.d.ts.map +1 -0
  30. package/build/geometries/box3d.d.ts +0 -28
  31. package/build/geometries/box3d.d.ts.map +1 -1
  32. package/build/geometries/ellipse.d.ts +0 -20
  33. package/build/geometries/ellipse.d.ts.map +1 -1
  34. package/build/geometries/observablePoint.d.ts +0 -3
  35. package/build/geometries/observablePoint.d.ts.map +1 -1
  36. package/build/geometries/path2d.d.ts +0 -19
  37. package/build/geometries/path2d.d.ts.map +1 -1
  38. package/build/geometries/polygon.d.ts +0 -12
  39. package/build/geometries/polygon.d.ts.map +1 -1
  40. package/build/geometries/roundrect.d.ts +0 -18
  41. package/build/geometries/roundrect.d.ts.map +1 -1
  42. package/build/geometries/sphere.d.ts +0 -9
  43. package/build/geometries/sphere.d.ts.map +1 -1
  44. package/build/geometries/toarccanvas.d.ts.map +1 -1
  45. package/build/index.d.ts +1 -0
  46. package/build/index.d.ts.map +1 -1
  47. package/build/index.js +2652 -413
  48. package/build/index.js.map +3 -3
  49. package/build/input/gamepad.d.ts.map +1 -1
  50. package/build/input/pointer.d.ts +0 -4
  51. package/build/input/pointer.d.ts.map +1 -1
  52. package/build/input/pointerevent.d.ts +0 -6
  53. package/build/input/pointerevent.d.ts.map +1 -1
  54. package/build/lang/deprecated.d.ts.map +1 -1
  55. package/build/level/gltf/GLTFModel.d.ts +0 -81
  56. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  57. package/build/level/gltf/GLTFScene.d.ts +1 -44
  58. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  59. package/build/level/gltf/gltf_sampler.d.ts +1 -48
  60. package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
  61. package/build/level/level.d.ts +195 -113
  62. package/build/level/level.d.ts.map +1 -1
  63. package/build/level/tiled/TMXGroup.d.ts +1 -65
  64. package/build/level/tiled/TMXGroup.d.ts.map +1 -1
  65. package/build/level/tiled/TMXLayer.d.ts +0 -44
  66. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  67. package/build/level/tiled/TMXObject.d.ts +1 -136
  68. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  69. package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
  70. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  71. package/build/level/tiled/TMXTile.d.ts +1 -30
  72. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  73. package/build/level/tiled/TMXTileMap.d.ts +0 -10
  74. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  75. package/build/level/tiled/TMXTileset.d.ts +0 -113
  76. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  77. package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
  78. package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
  79. package/build/level/tiled/TMXUtils.d.ts +1 -43
  80. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  81. package/build/level/tiled/factories/shape.d.ts +1 -7
  82. package/build/level/tiled/factories/shape.d.ts.map +1 -1
  83. package/build/level/tiled/factories/text.d.ts +1 -7
  84. package/build/level/tiled/factories/text.d.ts.map +1 -1
  85. package/build/level/tiled/factories/tile.d.ts +1 -7
  86. package/build/level/tiled/factories/tile.d.ts.map +1 -1
  87. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
  88. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  89. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
  90. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  91. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
  92. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  93. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
  94. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  95. package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
  96. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  97. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  98. package/build/level/tiled/renderer/autodetect.d.ts +1 -6
  99. package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
  100. package/build/lighting/light2d.d.ts +0 -25
  101. package/build/lighting/light2d.d.ts.map +1 -1
  102. package/build/lighting/light3d.d.ts +0 -16
  103. package/build/lighting/light3d.d.ts.map +1 -1
  104. package/build/loader/loader.d.ts +42 -33
  105. package/build/loader/loader.d.ts.map +1 -1
  106. package/build/loader/loadingscreen.d.ts +0 -33
  107. package/build/loader/loadingscreen.d.ts.map +1 -1
  108. package/build/loader/parsers/aseprite.d.ts +0 -13
  109. package/build/loader/parsers/aseprite.d.ts.map +1 -1
  110. package/build/loader/parsers/audio.d.ts +1 -30
  111. package/build/loader/parsers/audio.d.ts.map +1 -1
  112. package/build/loader/parsers/binary.d.ts +1 -10
  113. package/build/loader/parsers/binary.d.ts.map +1 -1
  114. package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
  115. package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
  116. package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
  117. package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
  118. package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
  119. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
  120. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
  121. package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
  122. package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
  123. package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
  124. package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
  125. package/build/loader/parsers/fontface.d.ts +1 -13
  126. package/build/loader/parsers/fontface.d.ts.map +1 -1
  127. package/build/loader/parsers/gltf.d.ts +1 -70
  128. package/build/loader/parsers/gltf.d.ts.map +1 -1
  129. package/build/loader/parsers/image.d.ts +1 -22
  130. package/build/loader/parsers/image.d.ts.map +1 -1
  131. package/build/loader/parsers/json.d.ts +1 -10
  132. package/build/loader/parsers/json.d.ts.map +1 -1
  133. package/build/loader/parsers/mtl.d.ts +1 -28
  134. package/build/loader/parsers/mtl.d.ts.map +1 -1
  135. package/build/loader/parsers/obj.d.ts +1 -59
  136. package/build/loader/parsers/obj.d.ts.map +1 -1
  137. package/build/loader/parsers/pbr.d.ts +1 -62
  138. package/build/loader/parsers/pbr.d.ts.map +1 -1
  139. package/build/loader/parsers/script.d.ts +1 -10
  140. package/build/loader/parsers/script.d.ts.map +1 -1
  141. package/build/loader/parsers/shader.d.ts +1 -52
  142. package/build/loader/parsers/shader.d.ts.map +1 -1
  143. package/build/loader/parsers/tmx.d.ts +1 -10
  144. package/build/loader/parsers/tmx.d.ts.map +1 -1
  145. package/build/loader/parsers/video.d.ts +1 -10
  146. package/build/loader/parsers/video.d.ts.map +1 -1
  147. package/build/math/color.d.ts.map +1 -1
  148. package/build/math/noise.d.ts +0 -40
  149. package/build/math/noise.d.ts.map +1 -1
  150. package/build/math/observableVector2d.d.ts +0 -3
  151. package/build/math/observableVector2d.d.ts.map +1 -1
  152. package/build/math/observableVector3d.d.ts +0 -3
  153. package/build/math/observableVector3d.d.ts.map +1 -1
  154. package/build/math/vector2d.d.ts +0 -6
  155. package/build/math/vector2d.d.ts.map +1 -1
  156. package/build/math/vertex.d.ts +25 -0
  157. package/build/math/vertex.d.ts.map +1 -1
  158. package/build/particles/emitter.d.ts +0 -65
  159. package/build/particles/emitter.d.ts.map +1 -1
  160. package/build/particles/particle.d.ts +0 -81
  161. package/build/particles/particle.d.ts.map +1 -1
  162. package/build/physics/bounds.d.ts +0 -1
  163. package/build/physics/bounds.d.ts.map +1 -1
  164. package/build/physics/broadphase/broadphase.d.ts +0 -7
  165. package/build/physics/broadphase/broadphase.d.ts.map +1 -1
  166. package/build/physics/broadphase/octree.d.ts +0 -91
  167. package/build/physics/broadphase/octree.d.ts.map +1 -1
  168. package/build/physics/broadphase/quadtree.d.ts +0 -47
  169. package/build/physics/broadphase/quadtree.d.ts.map +1 -1
  170. package/build/physics/builtin/body.d.ts +2 -65
  171. package/build/physics/builtin/body.d.ts.map +1 -1
  172. package/build/physics/builtin/detector.d.ts +0 -312
  173. package/build/physics/builtin/detector.d.ts.map +1 -1
  174. package/build/physics/builtin/sat.d.ts +1 -48
  175. package/build/physics/builtin/sat.d.ts.map +1 -1
  176. package/build/physics/builtin/sat3d.d.ts +1 -56
  177. package/build/physics/builtin/sat3d.d.ts.map +1 -1
  178. package/build/physics/collision.d.ts +0 -2
  179. package/build/physics/collision.d.ts.map +1 -1
  180. package/build/physics/response.d.ts +0 -1
  181. package/build/physics/response.d.ts.map +1 -1
  182. package/build/physics/world.d.ts.map +1 -1
  183. package/build/renderable/anchorPoint.d.ts +1 -73
  184. package/build/renderable/anchorPoint.d.ts.map +1 -1
  185. package/build/renderable/animation.d.ts +0 -7
  186. package/build/renderable/animation.d.ts.map +1 -1
  187. package/build/renderable/colorlayer.d.ts +0 -5
  188. package/build/renderable/colorlayer.d.ts.map +1 -1
  189. package/build/renderable/container.d.ts +0 -55
  190. package/build/renderable/container.d.ts.map +1 -1
  191. package/build/renderable/draggable.d.ts +0 -5
  192. package/build/renderable/draggable.d.ts.map +1 -1
  193. package/build/renderable/dragndrop.d.ts +1 -12
  194. package/build/renderable/dragndrop.d.ts.map +1 -1
  195. package/build/renderable/entity/entity.d.ts +0 -8
  196. package/build/renderable/entity/entity.d.ts.map +1 -1
  197. package/build/renderable/frameAnimation.d.ts +0 -41
  198. package/build/renderable/frameAnimation.d.ts.map +1 -1
  199. package/build/renderable/groundshadow.d.ts +1 -91
  200. package/build/renderable/groundshadow.d.ts.map +1 -1
  201. package/build/renderable/imagelayer.d.ts +0 -29
  202. package/build/renderable/imagelayer.d.ts.map +1 -1
  203. package/build/renderable/instanced_mesh.d.ts +26 -104
  204. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  205. package/build/renderable/mesh.d.ts +130 -141
  206. package/build/renderable/mesh.d.ts.map +1 -1
  207. package/build/renderable/nineslicesprite.d.ts +0 -4
  208. package/build/renderable/nineslicesprite.d.ts.map +1 -1
  209. package/build/renderable/renderable.d.ts +1 -44
  210. package/build/renderable/renderable.d.ts.map +1 -1
  211. package/build/renderable/sprite.d.ts +0 -45
  212. package/build/renderable/sprite.d.ts.map +1 -1
  213. package/build/renderable/sprite3d.d.ts +0 -95
  214. package/build/renderable/sprite3d.d.ts.map +1 -1
  215. package/build/renderable/text/bitmaptext.d.ts +0 -14
  216. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  217. package/build/renderable/text/bitmaptextdata.d.ts +0 -22
  218. package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
  219. package/build/renderable/text/glyph.d.ts +1 -39
  220. package/build/renderable/text/glyph.d.ts.map +1 -1
  221. package/build/renderable/text/text.d.ts +0 -20
  222. package/build/renderable/text/text.d.ts.map +1 -1
  223. package/build/renderable/text/textstyle.d.ts +1 -5
  224. package/build/renderable/text/textstyle.d.ts.map +1 -1
  225. package/build/renderable/trail.d.ts +0 -29
  226. package/build/renderable/trail.d.ts.map +1 -1
  227. package/build/renderable/trigger.d.ts +0 -6
  228. package/build/renderable/trigger.d.ts.map +1 -1
  229. package/build/renderable/ui/uibaseelement.d.ts +0 -40
  230. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  231. package/build/renderable/ui/uispriteelement.d.ts +0 -35
  232. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  233. package/build/state/stage.d.ts +0 -66
  234. package/build/state/stage.d.ts.map +1 -1
  235. package/build/state/state.d.ts.map +1 -1
  236. package/build/system/device.d.ts +0 -12
  237. package/build/system/device.d.ts.map +1 -1
  238. package/build/system/dom.d.ts +1 -8
  239. package/build/system/dom.d.ts.map +1 -1
  240. package/build/system/legacy_pool.d.ts +1 -6
  241. package/build/system/legacy_pool.d.ts.map +1 -1
  242. package/build/system/platform.d.ts +0 -1
  243. package/build/system/platform.d.ts.map +1 -1
  244. package/build/system/pool.d.ts +0 -9
  245. package/build/system/pool.d.ts.map +1 -1
  246. package/build/system/save.d.ts.map +1 -1
  247. package/build/system/timer.d.ts +0 -20
  248. package/build/system/timer.d.ts.map +1 -1
  249. package/build/tweens/tween.d.ts +0 -62
  250. package/build/tweens/tween.d.ts.map +1 -1
  251. package/build/utils/array-multimap.d.ts +1 -13
  252. package/build/utils/array-multimap.d.ts.map +1 -1
  253. package/build/utils/decode.d.ts.map +1 -1
  254. package/build/utils/fetchdata.d.ts +1 -31
  255. package/build/utils/fetchdata.d.ts.map +1 -1
  256. package/build/utils/utils.d.ts +0 -13
  257. package/build/utils/utils.d.ts.map +1 -1
  258. package/build/video/blendmodes.d.ts +1 -106
  259. package/build/video/blendmodes.d.ts.map +1 -1
  260. package/build/video/buffer/index.d.ts +1 -39
  261. package/build/video/buffer/index.d.ts.map +1 -1
  262. package/build/video/buffer/vertex.d.ts +1 -82
  263. package/build/video/buffer/vertex.d.ts.map +1 -1
  264. package/build/video/canvas/canvas_renderer.d.ts +2 -23
  265. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  266. package/build/video/canvas_factory.d.ts +1 -24
  267. package/build/video/canvas_factory.d.ts.map +1 -1
  268. package/build/video/effects/blendEffect.d.ts +0 -54
  269. package/build/video/effects/blendEffect.d.ts.map +1 -1
  270. package/build/video/effects/colorMatrix.d.ts +0 -10
  271. package/build/video/effects/colorMatrix.d.ts.map +1 -1
  272. package/build/video/effects/glsl_realization.d.ts +1 -17
  273. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  274. package/build/video/effects/radialGradient.d.ts +0 -1
  275. package/build/video/effects/radialGradient.d.ts.map +1 -1
  276. package/build/video/effects/shadereffect.d.ts +0 -113
  277. package/build/video/effects/shadereffect.d.ts.map +1 -1
  278. package/build/video/effects/wgsl/layout.d.ts +1 -27
  279. package/build/video/effects/wgsl/layout.d.ts.map +1 -1
  280. package/build/video/effects/wgsl/parse.d.ts +1 -8
  281. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  282. package/build/video/effects/wgsl/scaffold.d.ts +1 -42
  283. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  284. package/build/video/effects/wgsl_realization.d.ts +1 -82
  285. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  286. package/build/video/gpu/batcher.d.ts +1 -13
  287. package/build/video/gpu/batcher.d.ts.map +1 -1
  288. package/build/video/gpu/instancerecord.d.ts +1 -163
  289. package/build/video/gpu/instancerecord.d.ts.map +1 -1
  290. package/build/video/gpu/meshchunk.d.ts +1 -48
  291. package/build/video/gpu/meshchunk.d.ts.map +1 -1
  292. package/build/video/gpu/meshvertex.d.ts +1 -53
  293. package/build/video/gpu/meshvertex.d.ts.map +1 -1
  294. package/build/video/gpu/primitives.d.ts +1 -59
  295. package/build/video/gpu/primitives.d.ts.map +1 -1
  296. package/build/video/gpu/quadcorners.d.ts +1 -10
  297. package/build/video/gpu/quadcorners.d.ts.map +1 -1
  298. package/build/video/gpu/textureslots.d.ts +1 -121
  299. package/build/video/gpu/textureslots.d.ts.map +1 -1
  300. package/build/video/gpu/texturestore.d.ts +1 -138
  301. package/build/video/gpu/texturestore.d.ts.map +1 -1
  302. package/build/video/gpu/topology.d.ts.map +1 -1
  303. package/build/video/gpu/vertexformat.d.ts +0 -28
  304. package/build/video/gpu/vertexformat.d.ts.map +1 -1
  305. package/build/video/gradient.d.ts +0 -81
  306. package/build/video/gradient.d.ts.map +1 -1
  307. package/build/video/renderer.d.ts +21 -102
  308. package/build/video/renderer.d.ts.map +1 -1
  309. package/build/video/renderstate.d.ts +0 -51
  310. package/build/video/renderstate.d.ts.map +1 -1
  311. package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
  312. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  313. package/build/video/rendertarget/render_target_pool.d.ts +1 -82
  314. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  315. package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
  316. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  317. package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
  318. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  319. package/build/video/texture/atlas.d.ts +1 -75
  320. package/build/video/texture/atlas.d.ts.map +1 -1
  321. package/build/video/texture/cache.d.ts +0 -136
  322. package/build/video/texture/cache.d.ts.map +1 -1
  323. package/build/video/texture/frametexture.d.ts +1 -71
  324. package/build/video/texture/frametexture.d.ts.map +1 -1
  325. package/build/video/texture/noise_texture2d.d.ts +0 -43
  326. package/build/video/texture/noise_texture2d.d.ts.map +1 -1
  327. package/build/video/texture/parser/aseprite.d.ts +1 -8
  328. package/build/video/texture/parser/aseprite.d.ts.map +1 -1
  329. package/build/video/texture/parser/spritesheet.d.ts +1 -8
  330. package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
  331. package/build/video/texture/parser/texturepacker.d.ts +1 -8
  332. package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
  333. package/build/video/texture/resource.d.ts +0 -9
  334. package/build/video/texture/resource.d.ts.map +1 -1
  335. package/build/video/texture/texture2d.d.ts +0 -11
  336. package/build/video/texture/texture2d.d.ts.map +1 -1
  337. package/build/video/utils/autodetect.d.ts +1 -5
  338. package/build/video/utils/autodetect.d.ts.map +1 -1
  339. package/build/video/webgl/batchers/batcher.d.ts +0 -55
  340. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  341. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
  342. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  343. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
  344. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  345. package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
  346. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  347. package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
  348. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  349. package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
  350. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  351. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
  352. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  353. package/build/video/webgl/buffer/index.d.ts +1 -36
  354. package/build/video/webgl/buffer/index.d.ts.map +1 -1
  355. package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
  356. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
  357. package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
  358. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
  359. package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
  360. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
  361. package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
  362. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
  363. package/build/video/webgl/glshader.d.ts +0 -49
  364. package/build/video/webgl/glshader.d.ts.map +1 -1
  365. package/build/video/webgl/lighting/pack3d.d.ts +1 -47
  366. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  367. package/build/video/webgl/lighting/std140.d.ts +1 -109
  368. package/build/video/webgl/lighting/std140.d.ts.map +1 -1
  369. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
  370. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  371. package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
  372. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  373. package/build/video/webgl/shaders/multitexture.d.ts +1 -9
  374. package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
  375. package/build/video/webgl/texture/store.d.ts +1 -50
  376. package/build/video/webgl/texture/store.d.ts.map +1 -1
  377. package/build/video/webgl/utils/attributes.d.ts +1 -11
  378. package/build/video/webgl/utils/attributes.d.ts.map +1 -1
  379. package/build/video/webgl/utils/maxtextures.d.ts +1 -36
  380. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
  381. package/build/video/webgl/utils/precision.d.ts +1 -14
  382. package/build/video/webgl/utils/precision.d.ts.map +1 -1
  383. package/build/video/webgl/utils/program.d.ts +1 -5
  384. package/build/video/webgl/utils/program.d.ts.map +1 -1
  385. package/build/video/webgl/utils/samplercache.d.ts +1 -68
  386. package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
  387. package/build/video/webgl/utils/string.d.ts +1 -21
  388. package/build/video/webgl/utils/string.d.ts.map +1 -1
  389. package/build/video/webgl/utils/topology.d.ts +1 -23
  390. package/build/video/webgl/utils/topology.d.ts.map +1 -1
  391. package/build/video/webgl/utils/uniforms.d.ts +1 -25
  392. package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
  393. package/build/video/webgl/utils/vertexformat.d.ts +1 -26
  394. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
  395. package/build/video/webgl/webgl_renderer.d.ts +22 -285
  396. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  397. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
  398. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
  399. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
  400. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
  401. package/build/video/webgpu/batchers/mesh_batcher.d.ts +1 -230
  402. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  403. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
  404. package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -82
  405. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  406. package/build/video/webgpu/buffer/arena.d.ts +1 -63
  407. package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
  408. package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
  409. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
  410. package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
  411. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
  412. package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
  413. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
  414. package/build/video/webgpu/effect_binding.d.ts +1 -16
  415. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  416. package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
  417. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
  418. package/build/video/webgpu/pipeline/cache.d.ts +1 -163
  419. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
  420. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
  421. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  422. package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
  423. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
  424. package/build/video/webgpu/texture/compressed.d.ts +1 -32
  425. package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
  426. package/build/video/webgpu/texture/frametexture.d.ts +1 -62
  427. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
  428. package/build/video/webgpu/texture/store.d.ts +1 -147
  429. package/build/video/webgpu/texture/store.d.ts.map +1 -1
  430. package/build/video/webgpu/webgpu_renderer.d.ts +0 -88
  431. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  432. package/package.json +5 -4
  433. package/skills/melonjs/SKILL.md +1 -1
  434. package/skills/melonjs-3d/SKILL.md +301 -2
  435. package/skills/melonjs-3d-assets/SKILL.md +25 -6
  436. package/skills/melonjs-audio/SKILL.md +21 -0
  437. package/skills/melonjs-camera-and-drawing/SKILL.md +4 -0
  438. package/skills/melonjs-effects-and-shaders/SKILL.md +2 -1
  439. package/skills/melonjs-loading-assets/SKILL.md +30 -1
  440. package/skills/melonjs-performance/SKILL.md +5 -0
  441. package/skills/melonjs-tilemaps/SKILL.md +31 -11
  442. package/skills/melonjs-ui-and-text/SKILL.md +17 -127
@@ -1 +1 @@
1
- {"version":3,"file":"gamepad.d.ts","sourceRoot":"","sources":["../../src/input/gamepad.ts"],"names":[],"mappings":"AAWA,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,OAAO,EAAE,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AEG;AACH,eAAO,MAAM,OAAO;IACnB;;;;;;;;OAQG;;;;;;;;;;;IAYH;;;;;;;;;;;OAWG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BM,CAAC;AAEX;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE;IAAE,IAAI,EAAE,SAAS,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,EACtE,OAAO,EAAE,MAAM,GACb,IAAI,CAuDN;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAKjE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAEtD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,iBAAiB,EAAE,CAC/B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,KAC5B,IAAiB,CAAC"}
@@ -135,10 +135,6 @@ declare class Pointer extends Bounds {
135
135
  */
136
136
  locked: boolean;
137
137
  bind: (number | null)[];
138
- /**
139
- * @ignore
140
- */
141
- constructor(x?: number, y?: number, w?: number, h?: number);
142
138
  /**
143
139
  * initialize the Pointer object using the given Event Object
144
140
  * @param event - the original Event object
@@ -1 +1 @@
1
- {"version":3,"file":"pointer.d.ts","sourceRoot":"","sources":["../../src/input/pointer.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAUhD;;GAEG;AACH,cAAM,OAAQ,SAAQ,MAAM;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC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AAE,MAAM,CAAC;IAEf;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B;;OAEG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAGhB,IAAI,EAAE,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC;IA+CxB;;;;;;;;OAQG;IACH,QAAQ,CACP,KAAK,EAAE,KAAK,EACZ,KAAK,GAAE,MAAU,EACjB,KAAK,GAAE,MAAU,EACjB,OAAO,GAAE,MAAU,EACnB,OAAO,GAAE,MAAU,EACnB,SAAS,GAAE,MAAU,GACnB,IAAI;CAqEP;AAED,eAAe,OAAO,CAAC"}
@@ -1,11 +1,5 @@
1
- import type Application from "../application/application.ts";
2
1
  import type { Vector2d } from "../math/vector2d.ts";
3
2
  import Pointer from "./pointer.ts";
4
- /**
5
- * reference to the active application instance
6
- * @ignore
7
- */
8
- export declare let _app: Application;
9
3
  /**
10
4
  * the default target element for pointer events (usually the canvas element in which the game is rendered)
11
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"pointerevent.d.ts","sourceRoot":"","sources":["../../src/input/pointerevent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,WAAW,MAAM,+BAA+B,CAAC;AAE7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAepD,OAAO,OAAO,MAAM,cAAc,CAA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;;;;;;;;GAkCG;AACH,wBAAgB,oBAAoB,CACnC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,EACX,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,GAC5C,IAAI,CAsCN;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAClC,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,GAAG,EACX,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,GAAG,IAAI,GAC7C,IAAI,CAiCN;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,GAAG,GAAG,IAAI,CAMzD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAO5C;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAMzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/lang/deprecated.js"],"names":[],"mappings":"AA0JA;;;;;;;;GAQG;AACH,4CAHW,OAAO,QAsBjB;AAED;;;;;;GAMG;AACH,uCAeC;AAhMD;;;GAGG;AACH;IACC;;;;;;;;;OASG;IACH,mBATW,MAAM,UACN,MAAM,cAEd;QAA4B,OAAO;QACN,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAIA;CACD;AA8BD;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;AAED;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;AAED;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;;+BA9F8B,6CAA6C;6BAC/C,oCAAoC;6BACpC,8CAA8C;wBACnD,yCAAyC"}
1
+ {"version":3,"file":"deprecated.d.ts","sourceRoot":"","sources":["../../src/lang/deprecated.js"],"names":[],"mappings":"AAsJA;;;;;;;;GAQG;AACH,4CAHW,OAAO,QAsBjB;AAED;;;;;;GAMG;AACH,uCAeC;AA5LD;;;GAGG;AACH;IACC;;;;;;;;;OASG;IACH,mBATW,MAAM,UACN,MAAM,cAEd;QAA4B,OAAO;QACN,WAAW;QACX,eAAe;QACf,kBAAkB;QAClB,SAAS;KACxC,EAIA;CACD;AA0BD;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;AAED;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;AAED;;;GAGG;AACH;IACC,0BAA0B;IAC1B,qBADY,GAAG,EAAE,EAIhB;CACD;;+BA1F8B,6CAA6C;6BAC/C,oCAAoC;6BACpC,8CAA8C;wBACnD,yCAAyC"}
@@ -1,5 +1,4 @@
1
1
  /**
2
- * @classdesc
3
2
  * A rig-driven 3D model loaded from an animated glTF/GLB asset. Unlike a static
4
3
  * {@link GLTFScene} (which flattens each node into an independent {@link Mesh}),
5
4
  * a `GLTFModel` keeps the node **hierarchy** intact so a parent transform
@@ -36,25 +35,6 @@ export default class GLTFModel extends Container {
36
35
  castGroundShadow?: boolean | undefined;
37
36
  shadowGroundY?: number | undefined;
38
37
  });
39
- _zSign: number;
40
- /** the node hierarchy keyed by glTF node index @ignore */
41
- _nodes: any;
42
- /** root node indices @ignore */
43
- _roots: any;
44
- /** glTF node index → its part Mesh instances (one per primitive) @ignore */
45
- _meshByNode: {};
46
- /** glTF node index → cached rest (bind-pose) local matrix @ignore */
47
- _restMatrix: {};
48
- /**
49
- * glTF node index → its world matrix, a persistent 16-element buffer
50
- * recomputed in place every pose (a child reads its parent's buffer
51
- * during the DFS, so each node needs its own). Preallocated here so the
52
- * per-frame pose path allocates nothing.
53
- * @ignore
54
- */
55
- _world: {};
56
- /** name → clip `{ name, duration, channelsByNode, animatedNodes }` @ignore */
57
- anim: {};
58
38
  /**
59
39
  * playback multiplier for the current animation (1 = authored speed).
60
40
  * @type {number}
@@ -67,21 +47,6 @@ export default class GLTFModel extends Container {
67
47
  * @default false
68
48
  */
69
49
  animationpause: boolean;
70
- /**
71
- * a callback fired each time the current animation completes a cycle.
72
- * @type {Function}
73
- * @default undefined
74
- */
75
- /** @ignore */
76
- current: {
77
- name: undefined;
78
- time: number;
79
- length: number;
80
- };
81
- /** loop-completion callback (built from the options) @ignore */
82
- resetAnim: (() => unknown) | (() => false | undefined) | (() => boolean) | (() => void) | undefined;
83
- /** set when a `loop:false` clip has finished its single cycle @ignore */
84
- _animDone: boolean;
85
50
  /**
86
51
  * the names of every animation clip defined by the source asset.
87
52
  * @returns {string[]}
@@ -141,52 +106,6 @@ export default class GLTFModel extends Container {
141
106
  * @returns {GLTFModel} this, for chaining
142
107
  */
143
108
  stop(): GLTFModel;
144
- /**
145
- * Sample the active clip (if any) and propagate world transforms down the
146
- * node tree, writing each part mesh's placement. Nodes the current clip does
147
- * not animate use their cached rest matrix.
148
- * @ignore
149
- */
150
- /**
151
- * Whether this model is still alive.
152
- *
153
- * `update()` hands control to user code — `onended`, and the completion
154
- * callback behind `resetAnim` — and then poses the hierarchy. A callback
155
- * that removed the model (a death animation removing its own model is the
156
- * obvious case) has had `Renderable.destroy()` run, which releases `pos` to
157
- * the pool and leaves it undefined on every part. `_pose()` writes
158
- * `mesh.pos`, so it must not run on a torn-down model.
159
- *
160
- * `pos` and not `ancestor`: a model that was never added to a container is
161
- * perfectly poseable, and several callers do exactly that.
162
- * @ignore
163
- * @returns {boolean} true while the model can still be posed
164
- */
165
- _isLive(): boolean;
166
- _pose(): void;
167
- /**
168
- * DFS one node: compose its local matrix, multiply by the parent world,
169
- * apply to its meshes, recurse into children.
170
- * @ignore
171
- */
172
- _visit(idx: any, parentWorld: any, clip: any, t: any): void;
173
- /**
174
- * The node's local matrix: sampled TRS when the active clip animates it
175
- * (starting from the rest pose, overriding only the animated components),
176
- * otherwise the cached rest matrix.
177
- * @returns {number[]} 16-element column-major matrix
178
- * @ignore
179
- */
180
- _localMatrix(idx: any, clip: any, t: any): number[];
181
- /**
182
- * Split a node's world matrix into the renderable placement a {@link Mesh}'s
183
- * Camera3d path expects: the translation (scaled, Y/Z-bridged) becomes
184
- * `pos`/`depth`, the rotation+scale becomes `currentTransform` (translation
185
- * zeroed). Mirrors the static {@link GLTFScene} center-split, recomputed per
186
- * frame.
187
- * @ignore
188
- */
189
- _applyWorldToMesh(mesh: any, world: any): void;
190
109
  }
191
110
  import Container from "../../renderable/container.js";
192
111
  import type { AnimationOptions } from "../../renderable/animation.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"GLTFModel.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFModel.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH;IACC;;;;;;;;OAQG;IACH,kBARW,MAAM,YAEd;QAAyB,KAAK;QACJ,WAAW;QACX,GAAG;QACH,gBAAgB;QACjB,aAAa;KACxC,EA2LA;IA/KA,eAAoD;IAepD,0DAA0D;IAC1D,YAA8B;IAC9B,gCAAgC;IAChC,YAA8B;IAC9B,4EAA4E;IAC5E,gBAAqB;IACrB,qEAAqE;IACrE,gBAAqB;IACrB;;;;;;OAMG;IACH,WAAgB;IA+FhB,8EAA8E;IAC9E,SAAc;IAiBd;;;;OAIG;IACH,gBAHU,MAAM,CAGO;IAEvB;;;;OAIG;IACH,gBAHU,OAAO,CAGU;IAE3B;;;;OAIG;IAIH,cAAc;IACd;;;;MAAsD;IACtD,gEAAgE;IAChE,oGAA0B;IAC1B,yEAAyE;IACzE,mBAAsB;IAOvB;;;;;OAKG;IACH,qBAJa,MAAM,EAAE,CAMpB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;;;;;;;;OAeG;IACH,0BAXW,MAAM,YACN,MAAM,cAAU,gBAAgB,iBAChC,OAAO,GACL,SAAS,CAgErB;IAED;;;;;;;;;;;;;OAaG;IACH,YATW,MAAM,YACN,MAAM,cAAU,gBAAgB,GAC9B,SAAS,CAarB;IAED;;;;OAIG;IACH,SAFa,SAAS,CAKrB;IAED;;;;;;OAMG;IACH,QAFa,SAAS,CAarB;IAkDD;;;;;OAKG;IACH;;;;;;;;;;;;;;OAcG;IACH,WAFa,OAAO,CAInB;IAED,cAMC;IAED;;;;OAIG;IACH,4DAqBC;IAED;;;;;;OAMG;IACH,2CAHa,MAAM,EAAE,CAwCpB;IAED;;;;;;;OAOG;IACH,+CASC;CACD;sBAnjBqB,+BAA+B;sCAUhB,+BAA+B"}
1
+ {"version":3,"file":"GLTFModel.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFModel.js"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;;;GAmBG;AACH;IACC;;;;;;;;OAQG;IACH,kBARW,MAAM,YAEd;QAAyB,KAAK;QACJ,WAAW;QACX,GAAG;QACH,gBAAgB;QACjB,aAAa;KACxC,EAgOA;IAnNA;;;OAGG;IACH,eAAoD;IAepD;;;;OAIG;IACH,YAA8B;IAC9B;;;;OAIG;IACH,YAA8B;IAC9B;;;;OAIG;IACH,gBAAqB;IACrB;;;;OAIG;IACH,gBAAqB;IACrB;;;;;;;OAOG;IACH,WAAgB;IA+FhB;;;;OAIG;IACH,SAAc;IAiBd;;;;OAIG;IACH,gBAHU,MAAM,CAGO;IAEvB;;;;OAIG;IACH,gBAHU,OAAO,CAGU;IAE3B;;;;OAIG;IAIH;;;OAGG;IACH;;;;MAAsD;IACtD;;;;OAIG;IACH,oGAA0B;IAC1B;;;;OAIG;IACH,mBAAsB;IAOvB;;;;;OAKG;IACH,qBAJa,MAAM,EAAE,CAMpB;IAED;;;;OAIG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;;;;;;;;;;;;;;OAeG;IACH,0BAXW,MAAM,YACN,MAAM,cAAU,gBAAgB,iBAChC,OAAO,GACL,SAAS,CAgErB;IAED;;;;;;;;;;;;;OAaG;IACH,YATW,MAAM,YACN,MAAM,cAAU,gBAAgB,GAC9B,SAAS,CAarB;IAED;;;;OAIG;IACH,SAFa,SAAS,CAKrB;IAED;;;;;;OAMG;IACH,QAFa,SAAS,CAarB;IAkDD;;;;;;OAMG;IACH;;;;;;;;;;;;;;;OAeG;IACH,WAFa,OAAO,CAInB;IAED;;;OAGG;IACH,cAMC;IAED;;;;;OAKG;IACH,4DAqBC;IAED;;;;;;;OAOG;IACH,2CAJa,MAAM,EAAE,CAyCpB;IAED;;;;;;;;OAQG;IACH,+CASC;CACD;sBAhmBqB,+BAA+B;sCAUhB,+BAA+B"}
@@ -1,27 +1,5 @@
1
+
1
2
  /**
2
- * Fill an {@link InstancedMesh}'s records from an
3
- * `EXT_mesh_gpu_instancing` node's per-instance TRS arrays.
4
- *
5
- * The records are written in the node's own (glTF, Y-up, right-handed)
6
- * space, **verbatim** — no scene scale, no axis bridge. That is not a
7
- * simplification but the consequence of where the instance transform sits
8
- * in the chain the shader evaluates:
9
- *
10
- * clip = projection × view × model(group) × instance × vertex
11
- *
12
- * The group's model matrix already carries the scene scale and the Y/Z
13
- * bridge, and it is applied AFTER the instance transform — so an instance
14
- * expressed in the same space as the vertices comes out placed correctly.
15
- * Pre-scaling or pre-bridging the records here applies both twice (which
16
- * put the first version of this forest 26× too far out, and well outside
17
- * the far plane).
18
- * @param {InstancedMesh} mesh - the mesh to fill
19
- * @param {object} instances - `{count, translation, rotation, scale}`
20
- * @ignore
21
- */
22
- export function fillInstances(mesh: InstancedMesh, instances: object): void;
23
- /**
24
- * @classdesc
25
3
  * A loadable 3D scene parsed from a glTF / GLB asset. Instances are created
26
4
  * and registered with the {@link level} director (usually automatically by
27
5
  * the preloader), so a glTF scene loads with the same one-call ergonomics as
@@ -106,27 +84,6 @@ export default class GLTFScene {
106
84
  castGroundShadow?: boolean | undefined;
107
85
  shadowGroundY?: number | undefined;
108
86
  }): void;
109
- /**
110
- * Add the scene's authored lights — directional, point and spot — (plus a soft ambient fill) to
111
- * the world as {@link Light3d} renderables, so the meshes are lit by the
112
- * same sun set up in the authoring tool (Blender etc.). Shared by the static
113
- * and animated paths. The lights are ordinary world children — the level
114
- * director's `container.reset()` removes them on the next load, exactly like
115
- * {@link Light2d}, so there's nothing to track or tear down here.
116
- * @param {Container} container - the target container the lights are added to
117
- * @param {number} zSign - the Y-up→Y-down Z bridge sign (rightHanded → -1)
118
- * @param {number} scale - the scene's world scale (positions/ranges follow it)
119
- * @param {object} options - the `addTo` options (`lights` toggle)
120
- * @ignore
121
- */
122
- _addLights(container: Container, zSign: number, scale: number, options: object): void;
123
- /**
124
- * Director cleanup hook (parity with `TMXTileMap.destroy`). Nothing to do —
125
- * the meshes and lights are ordinary world children, removed by the
126
- * director's `container.reset()` on the next load.
127
- * @ignore
128
- */
129
- destroy(): void;
130
87
  }
131
88
  import InstancedMesh from "../../renderable/instanced_mesh.js";
132
89
  //# sourceMappingURL=GLTFScene.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GLTFScene.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFScene.js"],"names":[],"mappings":"AAuWA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oCAJW,aAAa,aACb,MAAM,QAwChB;AAvZD;;;;;;;;;;GAUG;AACH;IACC;;OAEG;IACH,qBAFW,MAAM,EAkBhB;IAfA;;;OAGG;IACH,MAFU,MAAM,CAEG;IACnB;;;OAGG;IACH,QAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,MAFU,MAAM,CAEY;IAG7B;;;;OAIG;IACH,cAFa,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,qBAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,iBAhCW,SAAS,YAEjB;QAAyB,KAAK;QACJ,WAAW;QAEX,MAAM;QAQP,mBAAmB;QAQlB,gBAAgB;QAMjB,aAAa;KAIxC,QA4KA;IAED;;;;;;;;;;;;OAYG;IACH,sBANW,SAAS,SACT,MAAM,SACN,MAAM,WACN,MAAM,QAqEhB;IAED;;;;;OAKG;IACH,gBAAY;CACZ;0BAjWyB,oCAAoC"}
1
+ {"version":3,"file":"GLTFScene.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/GLTFScene.js"],"names":[],"mappings":"AAwWA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,oCALW,aAAa,aACb,MAAM,QAyChB;AAzZD;;;;;;;;;GASG;AACH;IACC;;OAEG;IACH,qBAFW,MAAM,EAkBhB;IAfA;;;OAGG;IACH,MAFU,MAAM,CAEG;IACnB;;;OAGG;IACH,QAFU,MAAM,CAEI;IACpB;;;OAGG;IACH,MAFU,MAAM,CAEY;IAG7B;;;;OAIG;IACH,cAFa,MAAM,GAAC,SAAS,CAI5B;IAED;;;;OAIG;IACH,qBAEC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;IACH,iBAhCW,SAAS,YAEjB;QAAyB,KAAK;QACJ,WAAW;QAEX,MAAM;QAQP,mBAAmB;QAQlB,gBAAgB;QAMjB,aAAa;KAIxC,QA4KA;IAED;;;;;;;;;;;;;OAaG;IACH,sBAPW,SAAS,SACT,MAAM,SACN,MAAM,WACN,MAAM,QAsEhB;IAED;;;;;;OAMG;IACH,gBAAY;CACZ;0BAlWyB,oCAAoC"}
@@ -1,49 +1,2 @@
1
- /**
2
- * Locate the keyframe interval for time `t` in the (ascending) `times` array.
3
- * Clamps to the endpoints — glTF animations do not extrapolate beyond their
4
- * first/last keyframe. Returns the bracketing indices and the 0..1 blend factor.
5
- *
6
- * The returned object is **reused** across calls (read/copy its fields
7
- * immediately; don't retain the reference).
8
- * @param {ArrayLike<number>} times - keyframe times, ascending
9
- * @param {number} t - sample time (same units as `times`, i.e. seconds)
10
- * @returns {{ i0: number, i1: number, alpha: number }} reused result object
11
- * @ignore
12
- */
13
- export function findKeyframe(times: ArrayLike<number>, t: number): {
14
- i0: number;
15
- i1: number;
16
- alpha: number;
17
- };
18
- /**
19
- * Spherical-linear interpolation between two quaternions stored in `values` at
20
- * component offsets `o0` and `o1`. Picks the shortest arc (sign-flips the second
21
- * quaternion when the dot is negative) and falls back to normalized-lerp for
22
- * nearly-parallel inputs (where `sin(theta)` underflows). Result is normalized.
23
- * @param {ArrayLike<number>} values - flat quaternion buffer (xyzw per key)
24
- * @param {number} o0 - offset of the first quaternion
25
- * @param {number} o1 - offset of the second quaternion
26
- * @param {number} t - blend factor 0..1
27
- * @param {number[]} out - 4-element [x,y,z,w] result
28
- * @ignore
29
- */
30
- export function slerpQuat(values: ArrayLike<number>, o0: number, o1: number, t: number, out: number[]): number[];
31
- /**
32
- * Sample one animation channel at time `t`, writing `channel.stride` components
33
- * into `out`. Rotation channels (stride 4) use {@link slerpQuat}; translation /
34
- * scale (stride 3) use component-wise linear interpolation. `STEP` holds the
35
- * lower keyframe; `CUBICSPLINE` uses the keyframe value (its tangents are
36
- * ignored — a deliberate Tier-1 approximation, not full spline evaluation).
37
- * @param {{times: ArrayLike<number>, values: ArrayLike<number>, stride: number, interpolation: string}} channel
38
- * @param {number} t - sample time in seconds
39
- * @param {number[]} out - destination, at least `channel.stride` long
40
- * @returns {number[]} `out`
41
- * @ignore
42
- */
43
- export function sampleChannel(channel: {
44
- times: ArrayLike<number>;
45
- values: ArrayLike<number>;
46
- stride: number;
47
- interpolation: string;
48
- }, t: number, out: number[]): number[];
1
+
49
2
  //# sourceMappingURL=gltf_sampler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gltf_sampler.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/gltf_sampler.js"],"names":[],"mappings":"AAiBA;;;;;;;;;;;GAWG;AACH,oCALW,SAAS,CAAC,MAAM,CAAC,KACjB,MAAM,GACJ;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAkCrD;AAED;;;;;;;;;;;GAWG;AACH,kCAPW,SAAS,CAAC,MAAM,CAAC,MACjB,MAAM,MACN,MAAM,KACN,MAAM,OACN,MAAM,EAAE,YA+ClB;AAED;;;;;;;;;;;GAWG;AACH,uCANW;IAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,KAC5F,MAAM,OACN,MAAM,EAAE,GACN,MAAM,EAAE,CAwBpB"}
1
+ {"version":3,"file":"gltf_sampler.d.ts","sourceRoot":"","sources":["../../../src/level/gltf/gltf_sampler.js"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;GAYG;AACH,oCANW,SAAS,CAAC,MAAM,CAAC,KACjB,MAAM,GACJ;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAmCrD;AAED;;;;;;;;;;;;GAYG;AACH,kCARW,SAAS,CAAC,MAAM,CAAC,MACjB,MAAM,MACN,MAAM,KACN,MAAM,OACN,MAAM,EAAE,YAgDlB;AAED;;;;;;;;;;;;GAYG;AACH,uCAPW;IAAC,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAC,KAC5F,MAAM,OACN,MAAM,EAAE,GACN,MAAM,EAAE,CAyBpB"}
@@ -1,8 +1,6 @@
1
1
  export namespace level {
2
2
  /**
3
3
  * add a level into the game manager (usually called by the preloader)
4
- * @name add
5
- * @memberof level
6
4
  * @public
7
5
  * @param {string} format - level format ("tmx" for Tiled maps, "gltf" / "glb" for 3D scenes)
8
6
  * @param {string} levelId - the level id (or name)
@@ -11,76 +9,58 @@ export namespace level {
11
9
  */
12
10
  function add(format: string, levelId: string, callback?: Function): boolean;
13
11
  /**
14
- * load a level into the game manager<br>
12
+ * load a level into the game manager, and return a promise that settles once
13
+ * it is actually in the world<br>
15
14
  * (will also create all level defined entities, etc..)
16
- * @name load
17
- * @memberof level
18
- * @public
15
+ *
16
+ * `options.onLoaded` still fires, so the two forms mix freely. An unknown
17
+ * `levelId` throws SYNCHRONOUSLY rather than rejecting — that is a typo, not
18
+ * a load failure, and it should not need `await` to surface.
19
+ * @overload
19
20
  * @param {string} levelId - level id
20
- * @param {object} [options] - additional optional parameters
21
- * @param {Container} [options.container=game.world] - container in which to load the specified level
22
- * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded
23
- * @param {boolean} [options.flatten=game.mergeGroup] - (TMX only) if true, flatten all objects into the given container
24
- * @param {boolean} [options.setViewportBounds=true] - (TMX only) if true, set the viewport bounds to the map size
25
- * @param {number} [options.scale=1] - (glTF/GLB only) pixels per glTF unit applied to the whole scene
26
- * @param {boolean} [options.rightHanded=true] - (glTF/GLB only) convert the right-handed (Y-up) source to the engine's Y-down via a rotation rather than a mirror
27
- * @param {boolean} [options.lights=true] - (glTF/GLB only) add the scene's authored `KHR_lights_punctual` lights (plus a soft ambient fill) as {@link Light3d} world children; each carries its authored name for `getChildByName` lookups
28
- * @param {number} [options.lightIntensityScale] - (glTF/GLB only) multiply each light's authored physical intensity (lux/candela) by this factor instead of normalizing it to 1 — see {@link GLTFScene#addTo}
29
- * @param {boolean} [options.castGroundShadow] - (glTF/GLB only) give this scene's meshes a ground shadow ({@link Mesh#castGroundShadow}). Overrides the application's `castGroundShadow` setting for this scene, in both directions; omit it to inherit. As a scene-wide opt-in it skips nodes with no vertical extent — a scene's ground plane is exactly that, and shadowing it with itself smears a blob across the whole floor
30
- * @param {number} [options.shadowGroundY] - (glTF/GLB only) world Y of the floor those shadows land on ({@link Mesh#shadowGroundY}); omit it and each blob sits at its own object's base at full strength, which is right for a scene whose props already rest on the ground
31
- * @returns {boolean} true if the level was successfully loaded
21
+ * @param {LevelLoadOptions & { async: true }} options - load options, with `async` set
22
+ * @returns {Promise<boolean>} resolves `true` once the level is in the world
32
23
  * @example
33
- * // the game assets to be be preloaded
34
- * // TMX maps
35
- * let resources = [
36
- * {name: "a4_level1", type: "tmx", src: "data/level/a4_level1.tmx"},
37
- * {name: "a4_level2", type: "tmx", src: "data/level/a4_level2.tmx"},
38
- * {name: "a4_level3", type: "tmx", src: "data/level/a4_level3.tmx"},
39
- * // ...
40
- * ];
24
+ * await me.loader.preload(game.assets);
25
+ * await me.level.load("a4_level1", { async: true });
26
+ * // the world is populated here
27
+ * @category Level
28
+ */
29
+ function load(levelId: string, options: LevelLoadOptions & {
30
+ async: true;
31
+ }): Promise<boolean>;
32
+ /**
33
+ * load a level into the game manager<br>
34
+ * (will also create all level defined entities, etc..)
41
35
  *
42
- * // ...
36
+ * While the game loop is running the load is DEFERRED to a timer, so this
37
+ * returns before anything is in the world. Sequence follow-up work from
38
+ * `options.onLoaded`, from an `event.LEVEL_LOADED` listener, or by passing
39
+ * `async: true` and awaiting the promise that overload returns.
43
40
  *
44
- * // load a level into the game world
41
+ * Note that `await me.level.load(id)` without `async: true` does not await
42
+ * the load: the call returns a boolean, and `await true` resolves at once.
43
+ * @overload
44
+ * @param {string} levelId - level id
45
+ * @param {LevelLoadOptions & { async?: false }} [options] - additional optional parameters
46
+ * @returns {boolean} `true`
47
+ * @example
48
+ * // load a level
45
49
  * me.level.load("a4_level1");
46
- * ...
47
- * ...
48
- * // load a level into a specific container
49
- * let levelContainer = new me.Container();
50
- * me.level.load("a4_level2", {container:levelContainer});
51
- * // add a simple transformation
52
- * levelContainer.translate(levelContainer.width / 2, levelContainer.height / 2 );
53
- * levelContainer.rotate(0.05);
54
- * levelContainer.translate(-levelContainer.width / 2, -levelContainer.height / 2 );
55
- * // add it to the game world
56
- * app.world.addChild(levelContainer);
57
50
  *
58
- * // load a glTF/GLB scene (preloaded with type "glb") under a Camera3d:
59
- * // 50 pixels per glTF unit, authored lux/candela intensities kept at
60
- * // a 1/1000 scale instead of being normalized to 1
51
+ * // load into a specific container
52
+ * me.level.load("a4_level2", { container: levelContainer });
53
+ *
54
+ * // a glTF/GLB scene (preloaded with type "glb") under a Camera3d:
55
+ * // 50 pixels per glTF unit, authored intensities kept at a 1/1000 scale
61
56
  * me.level.load("diorama", { scale: 50, lightIntensityScale: 0.001 });
62
- * // …and give every prop in it a ground shadow landing on the floor at y = 0
63
- * // (the scene's own ground plane is skipped — it has no height to cast)
64
- * me.level.load("diorama", { scale: 50, castGroundShadow: true, shadowGroundY: 0 });
65
- * // the authored lights are world children — grab the sun for a day/night cycle
66
- * const sun = app.world.getChildByName("Sun")[0];
67
- */
68
- function load(levelId: string, options?: {
69
- container?: any;
70
- onLoaded?: Function | undefined;
71
- flatten?: boolean | undefined;
72
- setViewportBounds?: boolean | undefined;
73
- scale?: number | undefined;
74
- rightHanded?: boolean | undefined;
75
- lights?: boolean | undefined;
76
- lightIntensityScale?: number | undefined;
77
- castGroundShadow?: boolean | undefined;
78
- shadowGroundY?: number | undefined;
79
- }): boolean;
57
+ * @category Level
58
+ */
59
+ function load(levelId: string, options?: (LevelLoadOptions & {
60
+ async?: false;
61
+ }) | undefined): boolean;
80
62
  /**
81
63
  * return the current level id<br>
82
- * @name getCurrentLevelId
83
- * @memberof level
84
64
  * @public
85
65
  * @returns {string}
86
66
  */
@@ -89,69 +69,171 @@ export namespace level {
89
69
  * return the current level definition.
90
70
  * for a reference to the live instantiated level,
91
71
  * rather use the container in which it was loaded (e.g. app.world)
92
- * @name getCurrentLevel
93
- * @memberof level
94
72
  * @public
95
73
  * @returns {TMXTileMap|GLTFScene} the current level object (a TMXTileMap for Tiled maps, a GLTFScene for glTF/GLB scenes)
96
74
  */
97
75
  function getCurrentLevel(): TMXTileMap | GLTFScene;
98
76
  /**
99
- * reload the current level
100
- * @name reload
101
- * @memberof level
102
- * @public
103
- * @param {object} [options] - additional optional parameters
104
- * @param {Container} [options.container=game.world] - container in which to load the specified level
105
- * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded
106
- * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container
107
- * @returns {object} the current level
108
- */
109
- function reload(options?: {
110
- container?: any;
111
- onLoaded?: Function | undefined;
112
- flatten?: boolean | undefined;
113
- }): object;
114
- /**
115
- * load the next level
116
- * @name next
117
- * @memberof level
118
- * @public
119
- * @param {object} [options] - additional optional parameters
120
- * @param {Container} [options.container=game.world] - container in which to load the specified level
121
- * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded
122
- * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container
123
- * @returns {boolean} true if the next level was successfully loaded
124
- */
125
- function next(options?: {
126
- container?: any;
127
- onLoaded?: Function | undefined;
128
- flatten?: boolean | undefined;
129
- }): boolean;
130
- /**
131
- * load the previous level<br>
132
- * @name previous
133
- * @memberof level
134
- * @public
135
- * @param {object} [options] - additional optional parameters
136
- * @param {Container} [options.container=game.world] - container in which to load the specified level
137
- * @param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded
138
- * @param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container
139
- * @returns {boolean} true if the previous level was successfully loaded
140
- */
141
- function previous(options?: {
142
- container?: any;
143
- onLoaded?: Function | undefined;
144
- flatten?: boolean | undefined;
145
- }): boolean;
77
+ * reload the current level, and return a promise that settles once the level is in the world.
78
+ *
79
+ * @overload
80
+ * @param {LevelLoadOptions & { async: true }} options - load options, with `async` set
81
+ * @returns {Promise<boolean>} resolves `true` once the level is back in the world
82
+ * @example
83
+ * await me.level.reload({ async: true });
84
+ * @category Level
85
+ */
86
+ function reload(options: LevelLoadOptions & {
87
+ async: true;
88
+ }): Promise<boolean>;
89
+ /**
90
+ * reload the current level.
91
+ *
92
+ * While the game loop is running the load is deferred to a timer, so this
93
+ * returns before anything is in the world — see {@link level.load}.
94
+ * @overload
95
+ * @param {LevelLoadOptions & { async?: false }} [options] - additional optional parameters
96
+ * @returns {boolean} `true`
97
+ * @category Level
98
+ */
99
+ function reload(options?: (LevelLoadOptions & {
100
+ async?: false;
101
+ }) | undefined): boolean;
102
+ /**
103
+ * load the next level, and return a promise that settles once the level is in the world.
104
+ *
105
+ * With no level to go to this reports `false` WITHOUT loading anything, and
106
+ * the promise form resolves `false` rather than rejecting: running out of
107
+ * levels is an ordinary outcome, not an error.
108
+ *
109
+ * @overload
110
+ * @param {LevelLoadOptions & { async: true }} options - load options, with `async` set
111
+ * @returns {Promise<boolean>} resolves `true`, or `false` if there is no next level
112
+ * @example
113
+ * await me.level.next({ async: true });
114
+ * @category Level
115
+ */
116
+ function next(options: LevelLoadOptions & {
117
+ async: true;
118
+ }): Promise<boolean>;
119
+ /**
120
+ * load the next level.
121
+ *
122
+ * With no level to go to this reports `false` WITHOUT loading anything, and
123
+ * the promise form resolves `false` rather than rejecting: running out of
124
+ * levels is an ordinary outcome, not an error.
125
+ *
126
+ * While the game loop is running the load is deferred to a timer, so this
127
+ * returns before anything is in the world — see {@link level.load}.
128
+ * @overload
129
+ * @param {LevelLoadOptions & { async?: false }} [options] - additional optional parameters
130
+ * @returns {boolean} `true` if the next level was loaded, `false` if there is none
131
+ * @category Level
132
+ */
133
+ function next(options?: (LevelLoadOptions & {
134
+ async?: false;
135
+ }) | undefined): boolean;
136
+ /**
137
+ * load the previous level, and return a promise that settles once the level is in the world.
138
+ *
139
+ * With no level to go to this reports `false` WITHOUT loading anything, and
140
+ * the promise form resolves `false` rather than rejecting: running out of
141
+ * levels is an ordinary outcome, not an error.
142
+ *
143
+ * @overload
144
+ * @param {LevelLoadOptions & { async: true }} options - load options, with `async` set
145
+ * @returns {Promise<boolean>} resolves `true`, or `false` if there is no previous level
146
+ * @example
147
+ * await me.level.previous({ async: true });
148
+ * @category Level
149
+ */
150
+ function previous(options: LevelLoadOptions & {
151
+ async: true;
152
+ }): Promise<boolean>;
153
+ /**
154
+ * load the previous level.
155
+ *
156
+ * With no level to go to this reports `false` WITHOUT loading anything, and
157
+ * the promise form resolves `false` rather than rejecting: running out of
158
+ * levels is an ordinary outcome, not an error.
159
+ *
160
+ * While the game loop is running the load is deferred to a timer, so this
161
+ * returns before anything is in the world — see {@link level.load}.
162
+ * @overload
163
+ * @param {LevelLoadOptions & { async?: false }} [options] - additional optional parameters
164
+ * @returns {boolean} `true` if the previous level was loaded, `false` if there is none
165
+ * @category Level
166
+ */
167
+ function previous(options?: (LevelLoadOptions & {
168
+ async?: false;
169
+ }) | undefined): boolean;
146
170
  /**
147
171
  * return the amount of level preloaded
148
- * @name levelCount
149
- * @memberof level
150
172
  * @public
151
173
  * @returns {number} the amount of level preloaded
152
174
  */
153
175
  function levelCount(): number;
154
176
  }
177
+ /**
178
+ * Options accepted by every level-loading call.
179
+ *
180
+ * `async` is the switch that decides what the call HANDS BACK: leave it out and
181
+ * you get the boolean these calls have always returned, set it and you get a
182
+ * promise that settles once the level is actually in the world. Everything else
183
+ * behaves identically either way, `onLoaded` included.
184
+ *
185
+ * Awaiting a call WITHOUT `async: true` is not an error, but it is not a wait
186
+ * either: the call hands back a boolean, and `await true` resolves immediately.
187
+ * While the loop is running the load is deferred onto a timer, so it has NOT
188
+ * happened by the time such an `await` resumes. Pass the flag when you mean to
189
+ * await.
190
+ */
191
+ export type LevelLoadOptions = {
192
+ /**
193
+ * - container in which to load the specified level
194
+ */
195
+ container?: Container;
196
+ /**
197
+ * - callback for when the level is fully loaded, called in both forms
198
+ */
199
+ onLoaded?: Function;
200
+ /**
201
+ * - return a promise that settles once the level is in the world, instead of a boolean
202
+ */
203
+ async?: boolean;
204
+ /**
205
+ * - (TMX only) if true, flatten all objects into the given container
206
+ */
207
+ flatten?: boolean;
208
+ /**
209
+ * - (TMX only) if true, set the viewport bounds to the map size
210
+ */
211
+ setViewportBounds?: boolean;
212
+ /**
213
+ * - (glTF/GLB only) pixels per glTF unit applied to the whole scene
214
+ */
215
+ scale?: number;
216
+ /**
217
+ * - (glTF/GLB only) convert the right-handed (Y-up) source to the engine's Y-down via a rotation rather than a mirror
218
+ */
219
+ rightHanded?: boolean;
220
+ /**
221
+ * - (glTF/GLB only) add the scene's authored `KHR_lights_punctual` lights (plus a soft ambient fill) as {@link Light3d} world children
222
+ */
223
+ lights?: boolean;
224
+ /**
225
+ * - (glTF/GLB only) multiply each light's authored physical intensity by this factor instead of normalizing it to 1
226
+ */
227
+ lightIntensityScale?: number;
228
+ /**
229
+ * - (glTF/GLB only) give every mesh in the scene a ground shadow; omit to inherit the application's `castGroundShadow` setting (on by default)
230
+ */
231
+ castGroundShadow?: boolean;
232
+ /**
233
+ * - (glTF/GLB only) world Y the ground shadows land on
234
+ */
235
+ shadowGroundY?: number;
236
+ };
155
237
  import TMXTileMap from "./tiled/TMXTileMap.js";
156
238
  import GLTFScene from "./gltf/GLTFScene.js";
157
239
  //# sourceMappingURL=level.d.ts.map