melonjs 20.3.0 → 20.5.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 (454) 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 +7 -2
  18. package/build/audio/procedural.d.ts.map +1 -1
  19. package/build/audio/state.d.ts +6 -79
  20. package/build/audio/state.d.ts.map +1 -1
  21. package/build/audio/types.d.ts +22 -0
  22. package/build/audio/types.d.ts.map +1 -1
  23. package/build/camera/camera2d.d.ts +28 -68
  24. package/build/camera/camera2d.d.ts.map +1 -1
  25. package/build/camera/camera3d.d.ts +110 -82
  26. package/build/camera/camera3d.d.ts.map +1 -1
  27. package/build/camera/effects/fade_effect.d.ts +0 -5
  28. package/build/camera/effects/fade_effect.d.ts.map +1 -1
  29. package/build/camera/effects/mask_effect.d.ts +0 -5
  30. package/build/camera/effects/mask_effect.d.ts.map +1 -1
  31. package/build/camera/fog.d.ts +118 -0
  32. package/build/camera/fog.d.ts.map +1 -0
  33. package/build/geometries/box3d.d.ts +0 -28
  34. package/build/geometries/box3d.d.ts.map +1 -1
  35. package/build/geometries/ellipse.d.ts +0 -20
  36. package/build/geometries/ellipse.d.ts.map +1 -1
  37. package/build/geometries/observablePoint.d.ts +0 -3
  38. package/build/geometries/observablePoint.d.ts.map +1 -1
  39. package/build/geometries/path2d.d.ts +0 -19
  40. package/build/geometries/path2d.d.ts.map +1 -1
  41. package/build/geometries/polygon.d.ts +7 -13
  42. package/build/geometries/polygon.d.ts.map +1 -1
  43. package/build/geometries/roundrect.d.ts +0 -18
  44. package/build/geometries/roundrect.d.ts.map +1 -1
  45. package/build/geometries/sphere.d.ts +0 -9
  46. package/build/geometries/sphere.d.ts.map +1 -1
  47. package/build/geometries/toarccanvas.d.ts.map +1 -1
  48. package/build/index.d.ts +5 -0
  49. package/build/index.d.ts.map +1 -1
  50. package/build/index.js +3697 -563
  51. package/build/index.js.map +4 -4
  52. package/build/input/gamepad.d.ts.map +1 -1
  53. package/build/input/pointer.d.ts +0 -4
  54. package/build/input/pointer.d.ts.map +1 -1
  55. package/build/input/pointerevent.d.ts +0 -6
  56. package/build/input/pointerevent.d.ts.map +1 -1
  57. package/build/lang/deprecated.d.ts.map +1 -1
  58. package/build/level/gltf/GLTFModel.d.ts +44 -82
  59. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  60. package/build/level/gltf/GLTFScene.d.ts +1 -44
  61. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  62. package/build/level/gltf/gltf_sampler.d.ts +1 -48
  63. package/build/level/gltf/gltf_sampler.d.ts.map +1 -1
  64. package/build/level/level.d.ts +195 -113
  65. package/build/level/level.d.ts.map +1 -1
  66. package/build/level/tiled/TMXGroup.d.ts +1 -65
  67. package/build/level/tiled/TMXGroup.d.ts.map +1 -1
  68. package/build/level/tiled/TMXLayer.d.ts +0 -44
  69. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  70. package/build/level/tiled/TMXObject.d.ts +1 -136
  71. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  72. package/build/level/tiled/TMXObjectFactory.d.ts +1 -40
  73. package/build/level/tiled/TMXObjectFactory.d.ts.map +1 -1
  74. package/build/level/tiled/TMXTile.d.ts +1 -30
  75. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  76. package/build/level/tiled/TMXTileMap.d.ts +0 -10
  77. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  78. package/build/level/tiled/TMXTileset.d.ts +0 -113
  79. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  80. package/build/level/tiled/TMXTilesetGroup.d.ts +0 -1
  81. package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
  82. package/build/level/tiled/TMXUtils.d.ts +1 -43
  83. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  84. package/build/level/tiled/factories/shape.d.ts +1 -7
  85. package/build/level/tiled/factories/shape.d.ts.map +1 -1
  86. package/build/level/tiled/factories/text.d.ts +1 -7
  87. package/build/level/tiled/factories/text.d.ts.map +1 -1
  88. package/build/level/tiled/factories/tile.d.ts +1 -7
  89. package/build/level/tiled/factories/tile.d.ts.map +1 -1
  90. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +0 -60
  91. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  92. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +0 -42
  93. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  94. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +0 -5
  95. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -1
  96. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +0 -31
  97. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  98. package/build/level/tiled/renderer/TMXRenderer.d.ts +2 -2
  99. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  100. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  101. package/build/level/tiled/renderer/autodetect.d.ts +1 -6
  102. package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
  103. package/build/lighting/light2d.d.ts +0 -25
  104. package/build/lighting/light2d.d.ts.map +1 -1
  105. package/build/lighting/light3d.d.ts +20 -63
  106. package/build/lighting/light3d.d.ts.map +1 -1
  107. package/build/loader/loader.d.ts +146 -37
  108. package/build/loader/loader.d.ts.map +1 -1
  109. package/build/loader/loadingscreen.d.ts +0 -33
  110. package/build/loader/loadingscreen.d.ts.map +1 -1
  111. package/build/loader/parsers/aseprite.d.ts +0 -13
  112. package/build/loader/parsers/aseprite.d.ts.map +1 -1
  113. package/build/loader/parsers/audio.d.ts +1 -30
  114. package/build/loader/parsers/audio.d.ts.map +1 -1
  115. package/build/loader/parsers/binary.d.ts +1 -10
  116. package/build/loader/parsers/binary.d.ts.map +1 -1
  117. package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
  118. package/build/loader/parsers/compressed_textures/parseDDS.d.ts +1 -7
  119. package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
  120. package/build/loader/parsers/compressed_textures/parseKTX.d.ts +1 -7
  121. package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
  122. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +1 -7
  123. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
  124. package/build/loader/parsers/compressed_textures/parsePKM.d.ts +1 -7
  125. package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
  126. package/build/loader/parsers/compressed_textures/parsePVR.d.ts +1 -7
  127. package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
  128. package/build/loader/parsers/fontface.d.ts +1 -13
  129. package/build/loader/parsers/fontface.d.ts.map +1 -1
  130. package/build/loader/parsers/gltf.d.ts +1 -70
  131. package/build/loader/parsers/gltf.d.ts.map +1 -1
  132. package/build/loader/parsers/image.d.ts +1 -22
  133. package/build/loader/parsers/image.d.ts.map +1 -1
  134. package/build/loader/parsers/json.d.ts +1 -10
  135. package/build/loader/parsers/json.d.ts.map +1 -1
  136. package/build/loader/parsers/mtl.d.ts +1 -28
  137. package/build/loader/parsers/mtl.d.ts.map +1 -1
  138. package/build/loader/parsers/obj.d.ts +1 -59
  139. package/build/loader/parsers/obj.d.ts.map +1 -1
  140. package/build/loader/parsers/pbr.d.ts +1 -62
  141. package/build/loader/parsers/pbr.d.ts.map +1 -1
  142. package/build/loader/parsers/script.d.ts +1 -10
  143. package/build/loader/parsers/script.d.ts.map +1 -1
  144. package/build/loader/parsers/shader.d.ts +1 -52
  145. package/build/loader/parsers/shader.d.ts.map +1 -1
  146. package/build/loader/parsers/tmx.d.ts +1 -10
  147. package/build/loader/parsers/tmx.d.ts.map +1 -1
  148. package/build/loader/parsers/video.d.ts +1 -10
  149. package/build/loader/parsers/video.d.ts.map +1 -1
  150. package/build/math/color.d.ts.map +1 -1
  151. package/build/math/noise.d.ts +0 -40
  152. package/build/math/noise.d.ts.map +1 -1
  153. package/build/math/observableVector2d.d.ts +0 -3
  154. package/build/math/observableVector2d.d.ts.map +1 -1
  155. package/build/math/observableVector3d.d.ts +0 -3
  156. package/build/math/observableVector3d.d.ts.map +1 -1
  157. package/build/math/vector2d.d.ts +0 -6
  158. package/build/math/vector2d.d.ts.map +1 -1
  159. package/build/math/vertex.d.ts +25 -0
  160. package/build/math/vertex.d.ts.map +1 -1
  161. package/build/particles/emitter.d.ts +0 -65
  162. package/build/particles/emitter.d.ts.map +1 -1
  163. package/build/particles/particle.d.ts +0 -81
  164. package/build/particles/particle.d.ts.map +1 -1
  165. package/build/physics/bounds.d.ts +0 -1
  166. package/build/physics/bounds.d.ts.map +1 -1
  167. package/build/physics/broadphase/broadphase.d.ts +0 -7
  168. package/build/physics/broadphase/broadphase.d.ts.map +1 -1
  169. package/build/physics/broadphase/octree.d.ts +0 -91
  170. package/build/physics/broadphase/octree.d.ts.map +1 -1
  171. package/build/physics/broadphase/quadtree.d.ts +0 -47
  172. package/build/physics/broadphase/quadtree.d.ts.map +1 -1
  173. package/build/physics/builtin/body.d.ts +2 -65
  174. package/build/physics/builtin/body.d.ts.map +1 -1
  175. package/build/physics/builtin/detector.d.ts +0 -312
  176. package/build/physics/builtin/detector.d.ts.map +1 -1
  177. package/build/physics/builtin/sat.d.ts +1 -48
  178. package/build/physics/builtin/sat.d.ts.map +1 -1
  179. package/build/physics/builtin/sat3d.d.ts +1 -56
  180. package/build/physics/builtin/sat3d.d.ts.map +1 -1
  181. package/build/physics/collision.d.ts +0 -2
  182. package/build/physics/collision.d.ts.map +1 -1
  183. package/build/physics/response.d.ts +0 -1
  184. package/build/physics/response.d.ts.map +1 -1
  185. package/build/physics/world.d.ts.map +1 -1
  186. package/build/renderable/anchorPoint.d.ts +1 -73
  187. package/build/renderable/anchorPoint.d.ts.map +1 -1
  188. package/build/renderable/animation.d.ts +21 -13
  189. package/build/renderable/animation.d.ts.map +1 -1
  190. package/build/renderable/colorlayer.d.ts +0 -5
  191. package/build/renderable/colorlayer.d.ts.map +1 -1
  192. package/build/renderable/container.d.ts +27 -60
  193. package/build/renderable/container.d.ts.map +1 -1
  194. package/build/renderable/draggable.d.ts +0 -5
  195. package/build/renderable/draggable.d.ts.map +1 -1
  196. package/build/renderable/dragndrop.d.ts +1 -12
  197. package/build/renderable/dragndrop.d.ts.map +1 -1
  198. package/build/renderable/entity/entity.d.ts +0 -8
  199. package/build/renderable/entity/entity.d.ts.map +1 -1
  200. package/build/renderable/frameAnimation.d.ts +0 -41
  201. package/build/renderable/frameAnimation.d.ts.map +1 -1
  202. package/build/renderable/groundshadow.d.ts +1 -91
  203. package/build/renderable/groundshadow.d.ts.map +1 -1
  204. package/build/renderable/imagelayer.d.ts +0 -29
  205. package/build/renderable/imagelayer.d.ts.map +1 -1
  206. package/build/renderable/instanced_mesh.d.ts +55 -108
  207. package/build/renderable/instanced_mesh.d.ts.map +1 -1
  208. package/build/renderable/mesh.d.ts +257 -231
  209. package/build/renderable/mesh.d.ts.map +1 -1
  210. package/build/renderable/nineslicesprite.d.ts +0 -4
  211. package/build/renderable/nineslicesprite.d.ts.map +1 -1
  212. package/build/renderable/renderable.d.ts +18 -44
  213. package/build/renderable/renderable.d.ts.map +1 -1
  214. package/build/renderable/sprite.d.ts +0 -45
  215. package/build/renderable/sprite.d.ts.map +1 -1
  216. package/build/renderable/sprite3d.d.ts +12 -97
  217. package/build/renderable/sprite3d.d.ts.map +1 -1
  218. package/build/renderable/text/bitmaptext.d.ts +32 -21
  219. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  220. package/build/renderable/text/bitmaptextdata.d.ts +0 -22
  221. package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
  222. package/build/renderable/text/glyph.d.ts +1 -39
  223. package/build/renderable/text/glyph.d.ts.map +1 -1
  224. package/build/renderable/text/text.d.ts +75 -20
  225. package/build/renderable/text/text.d.ts.map +1 -1
  226. package/build/renderable/text/textmetrics.d.ts +2 -0
  227. package/build/renderable/text/textmetrics.d.ts.map +1 -1
  228. package/build/renderable/text/textstyle.d.ts +1 -5
  229. package/build/renderable/text/textstyle.d.ts.map +1 -1
  230. package/build/renderable/trail.d.ts +0 -29
  231. package/build/renderable/trail.d.ts.map +1 -1
  232. package/build/renderable/trigger.d.ts +0 -6
  233. package/build/renderable/trigger.d.ts.map +1 -1
  234. package/build/renderable/ui/uibaseelement.d.ts +0 -40
  235. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  236. package/build/renderable/ui/uispriteelement.d.ts +0 -35
  237. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  238. package/build/state/stage.d.ts +5 -50
  239. package/build/state/stage.d.ts.map +1 -1
  240. package/build/state/state.d.ts.map +1 -1
  241. package/build/system/device.d.ts +1 -13
  242. package/build/system/device.d.ts.map +1 -1
  243. package/build/system/dom.d.ts +1 -8
  244. package/build/system/dom.d.ts.map +1 -1
  245. package/build/system/legacy_pool.d.ts +1 -6
  246. package/build/system/legacy_pool.d.ts.map +1 -1
  247. package/build/system/platform.d.ts +0 -1
  248. package/build/system/platform.d.ts.map +1 -1
  249. package/build/system/pool.d.ts +0 -9
  250. package/build/system/pool.d.ts.map +1 -1
  251. package/build/system/save.d.ts +44 -1
  252. package/build/system/save.d.ts.map +1 -1
  253. package/build/system/timer.d.ts +0 -20
  254. package/build/system/timer.d.ts.map +1 -1
  255. package/build/tweens/tween.d.ts +0 -62
  256. package/build/tweens/tween.d.ts.map +1 -1
  257. package/build/utils/array-multimap.d.ts +1 -13
  258. package/build/utils/array-multimap.d.ts.map +1 -1
  259. package/build/utils/decode.d.ts.map +1 -1
  260. package/build/utils/fetchdata.d.ts +1 -31
  261. package/build/utils/fetchdata.d.ts.map +1 -1
  262. package/build/utils/utils.d.ts +0 -13
  263. package/build/utils/utils.d.ts.map +1 -1
  264. package/build/video/blendmodes.d.ts +1 -106
  265. package/build/video/blendmodes.d.ts.map +1 -1
  266. package/build/video/buffer/index.d.ts +1 -39
  267. package/build/video/buffer/index.d.ts.map +1 -1
  268. package/build/video/buffer/vertex.d.ts +1 -82
  269. package/build/video/buffer/vertex.d.ts.map +1 -1
  270. package/build/video/canvas/canvas_renderer.d.ts +2 -23
  271. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  272. package/build/video/canvas_factory.d.ts +1 -24
  273. package/build/video/canvas_factory.d.ts.map +1 -1
  274. package/build/video/effects/blendEffect.d.ts +0 -54
  275. package/build/video/effects/blendEffect.d.ts.map +1 -1
  276. package/build/video/effects/colorMatrix.d.ts +0 -10
  277. package/build/video/effects/colorMatrix.d.ts.map +1 -1
  278. package/build/video/effects/glsl_realization.d.ts +1 -17
  279. package/build/video/effects/glsl_realization.d.ts.map +1 -1
  280. package/build/video/effects/mesh_splice.d.ts +2 -0
  281. package/build/video/effects/mesh_splice.d.ts.map +1 -0
  282. package/build/video/effects/radialGradient.d.ts +0 -1
  283. package/build/video/effects/radialGradient.d.ts.map +1 -1
  284. package/build/video/effects/shadereffect.d.ts +12 -241
  285. package/build/video/effects/shadereffect.d.ts.map +1 -1
  286. package/build/video/effects/wgsl/layout.d.ts +1 -27
  287. package/build/video/effects/wgsl/layout.d.ts.map +1 -1
  288. package/build/video/effects/wgsl/parse.d.ts +1 -8
  289. package/build/video/effects/wgsl/parse.d.ts.map +1 -1
  290. package/build/video/effects/wgsl/scaffold.d.ts +1 -42
  291. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -1
  292. package/build/video/effects/wgsl_realization.d.ts +1 -82
  293. package/build/video/effects/wgsl_realization.d.ts.map +1 -1
  294. package/build/video/gpu/batcher.d.ts +1 -13
  295. package/build/video/gpu/batcher.d.ts.map +1 -1
  296. package/build/video/gpu/instancerecord.d.ts +1 -163
  297. package/build/video/gpu/instancerecord.d.ts.map +1 -1
  298. package/build/video/gpu/meshchunk.d.ts +1 -48
  299. package/build/video/gpu/meshchunk.d.ts.map +1 -1
  300. package/build/video/gpu/meshvertex.d.ts +1 -53
  301. package/build/video/gpu/meshvertex.d.ts.map +1 -1
  302. package/build/video/gpu/primitives.d.ts +1 -59
  303. package/build/video/gpu/primitives.d.ts.map +1 -1
  304. package/build/video/gpu/quadcorners.d.ts +1 -10
  305. package/build/video/gpu/quadcorners.d.ts.map +1 -1
  306. package/build/video/gpu/textureslots.d.ts +1 -121
  307. package/build/video/gpu/textureslots.d.ts.map +1 -1
  308. package/build/video/gpu/texturestore.d.ts +1 -138
  309. package/build/video/gpu/texturestore.d.ts.map +1 -1
  310. package/build/video/gpu/topology.d.ts.map +1 -1
  311. package/build/video/gpu/vertexformat.d.ts +0 -28
  312. package/build/video/gpu/vertexformat.d.ts.map +1 -1
  313. package/build/video/gradient.d.ts +15 -77
  314. package/build/video/gradient.d.ts.map +1 -1
  315. package/build/video/renderer.d.ts +21 -102
  316. package/build/video/renderer.d.ts.map +1 -1
  317. package/build/video/renderstate.d.ts +0 -51
  318. package/build/video/renderstate.d.ts.map +1 -1
  319. package/build/video/rendertarget/canvasrendertarget.d.ts +0 -10
  320. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  321. package/build/video/rendertarget/render_target_pool.d.ts +1 -82
  322. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  323. package/build/video/rendertarget/webglrendertarget.d.ts +1 -64
  324. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  325. package/build/video/rendertarget/webgpurendertarget.d.ts +0 -8
  326. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -1
  327. package/build/video/texture/atlas.d.ts +1 -75
  328. package/build/video/texture/atlas.d.ts.map +1 -1
  329. package/build/video/texture/cache.d.ts +0 -136
  330. package/build/video/texture/cache.d.ts.map +1 -1
  331. package/build/video/texture/frametexture.d.ts +1 -71
  332. package/build/video/texture/frametexture.d.ts.map +1 -1
  333. package/build/video/texture/noise_texture2d.d.ts +101 -77
  334. package/build/video/texture/noise_texture2d.d.ts.map +1 -1
  335. package/build/video/texture/parser/aseprite.d.ts +1 -8
  336. package/build/video/texture/parser/aseprite.d.ts.map +1 -1
  337. package/build/video/texture/parser/spritesheet.d.ts +1 -8
  338. package/build/video/texture/parser/spritesheet.d.ts.map +1 -1
  339. package/build/video/texture/parser/texturepacker.d.ts +1 -8
  340. package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
  341. package/build/video/texture/resource.d.ts +0 -9
  342. package/build/video/texture/resource.d.ts.map +1 -1
  343. package/build/video/texture/texture2d.d.ts +0 -11
  344. package/build/video/texture/texture2d.d.ts.map +1 -1
  345. package/build/video/utils/autodetect.d.ts +1 -5
  346. package/build/video/utils/autodetect.d.ts.map +1 -1
  347. package/build/video/webgl/batchers/batcher.d.ts +0 -55
  348. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  349. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +0 -14
  350. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  351. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +0 -72
  352. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  353. package/build/video/webgl/batchers/material_batcher.d.ts +0 -89
  354. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  355. package/build/video/webgl/batchers/mesh_batcher.d.ts +14 -343
  356. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  357. package/build/video/webgl/batchers/primitive_batcher.d.ts +0 -10
  358. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  359. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -30
  360. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  361. package/build/video/webgl/buffer/index.d.ts +1 -36
  362. package/build/video/webgl/buffer/index.d.ts.map +1 -1
  363. package/build/video/webgl/buffer/instance_buffer.d.ts +1 -53
  364. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -1
  365. package/build/video/webgl/buffer/retained_geometry.d.ts +1 -81
  366. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -1
  367. package/build/video/webgl/buffer/uniformblock.d.ts +1 -80
  368. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -1
  369. package/build/video/webgl/buffer/vertexstate.d.ts +1 -100
  370. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -1
  371. package/build/video/webgl/glshader.d.ts +7 -51
  372. package/build/video/webgl/glshader.d.ts.map +1 -1
  373. package/build/video/webgl/lighting/pack3d.d.ts +1 -47
  374. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  375. package/build/video/webgl/lighting/std140.d.ts +1 -109
  376. package/build/video/webgl/lighting/std140.d.ts.map +1 -1
  377. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts +1 -103
  378. package/build/video/webgl/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  379. package/build/video/webgl/shaders/multitexture-lit.d.ts +1 -26
  380. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  381. package/build/video/webgl/shaders/multitexture.d.ts +1 -9
  382. package/build/video/webgl/shaders/multitexture.d.ts.map +1 -1
  383. package/build/video/webgl/texture/store.d.ts +1 -50
  384. package/build/video/webgl/texture/store.d.ts.map +1 -1
  385. package/build/video/webgl/utils/attributes.d.ts +1 -11
  386. package/build/video/webgl/utils/attributes.d.ts.map +1 -1
  387. package/build/video/webgl/utils/maxtextures.d.ts +1 -36
  388. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -1
  389. package/build/video/webgl/utils/precision.d.ts +1 -14
  390. package/build/video/webgl/utils/precision.d.ts.map +1 -1
  391. package/build/video/webgl/utils/program.d.ts +1 -5
  392. package/build/video/webgl/utils/program.d.ts.map +1 -1
  393. package/build/video/webgl/utils/samplercache.d.ts +1 -68
  394. package/build/video/webgl/utils/samplercache.d.ts.map +1 -1
  395. package/build/video/webgl/utils/string.d.ts +1 -21
  396. package/build/video/webgl/utils/string.d.ts.map +1 -1
  397. package/build/video/webgl/utils/topology.d.ts +1 -23
  398. package/build/video/webgl/utils/topology.d.ts.map +1 -1
  399. package/build/video/webgl/utils/uniforms.d.ts +1 -25
  400. package/build/video/webgl/utils/uniforms.d.ts.map +1 -1
  401. package/build/video/webgl/utils/vertexformat.d.ts +1 -26
  402. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -1
  403. package/build/video/webgl/webgl_renderer.d.ts +22 -285
  404. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  405. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +0 -6
  406. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -1
  407. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +0 -8
  408. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -1
  409. package/build/video/webgpu/batchers/mesh_batcher.d.ts +7 -231
  410. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -1
  411. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -1
  412. package/build/video/webgpu/batchers/quad_batcher.d.ts +0 -82
  413. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -1
  414. package/build/video/webgpu/buffer/arena.d.ts +1 -63
  415. package/build/video/webgpu/buffer/arena.d.ts.map +1 -1
  416. package/build/video/webgpu/buffer/instance_buffer.d.ts +1 -64
  417. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -1
  418. package/build/video/webgpu/buffer/retained_geometry.d.ts +1 -54
  419. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -1
  420. package/build/video/webgpu/buffer/uniformring.d.ts +1 -67
  421. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -1
  422. package/build/video/webgpu/effect_binding.d.ts +1 -16
  423. package/build/video/webgpu/effect_binding.d.ts.map +1 -1
  424. package/build/video/webgpu/pipeline/bindgroups.d.ts +1 -32
  425. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -1
  426. package/build/video/webgpu/pipeline/cache.d.ts +1 -163
  427. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -1
  428. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +1 -87
  429. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -1
  430. package/build/video/webgpu/shaders/mesh-instanced.d.ts +1 -43
  431. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -1
  432. package/build/video/webgpu/texture/compressed.d.ts +1 -32
  433. package/build/video/webgpu/texture/compressed.d.ts.map +1 -1
  434. package/build/video/webgpu/texture/frametexture.d.ts +1 -62
  435. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -1
  436. package/build/video/webgpu/texture/store.d.ts +1 -147
  437. package/build/video/webgpu/texture/store.d.ts.map +1 -1
  438. package/build/video/webgpu/webgpu_renderer.d.ts +1 -88
  439. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -1
  440. package/package.json +5 -4
  441. package/skills/melonjs/SKILL.md +1 -1
  442. package/skills/melonjs-3d/SKILL.md +453 -5
  443. package/skills/melonjs-3d-assets/SKILL.md +164 -6
  444. package/skills/melonjs-audio/SKILL.md +38 -0
  445. package/skills/melonjs-camera-and-drawing/SKILL.md +49 -0
  446. package/skills/melonjs-effects-and-shaders/SKILL.md +95 -2
  447. package/skills/melonjs-loading-assets/SKILL.md +127 -2
  448. package/skills/melonjs-performance/SKILL.md +60 -1
  449. package/skills/melonjs-physics/SKILL.md +78 -0
  450. package/skills/melonjs-renderables/SKILL.md +63 -1
  451. package/skills/melonjs-renderer-backends/SKILL.md +19 -0
  452. package/skills/melonjs-scenes-and-state/SKILL.md +56 -0
  453. package/skills/melonjs-tilemaps/SKILL.md +31 -11
  454. package/skills/melonjs-ui-and-text/SKILL.md +131 -117
@@ -1,69 +1,8 @@
1
- /**
2
- * A renderable object for displaying textured triangle meshes.
3
- * Supports loading from Wavefront OBJ models (via `loader.preload` with type "obj")
4
- * or from raw geometry data (vertices, uvs, indices).
5
- * Includes a built-in perspective projection and supports 3D transforms
6
- * through the standard Renderable API (`rotate`, `scale`, `translate`).
7
- * Works on both GPU backends — WebGL 2 and WebGPU, with hardware depth
8
- * testing — and on the Canvas renderer via the CPU-projected 2D-camera
9
- * path (painter's algorithm, no depth buffer).
10
- *
11
- * **Retained rendering** — under a {@link Camera3d} on a GPU backend
12
- * (`renderer.supportsRetainedMesh`), the mesh's model-space geometry is
13
- * uploaded to GPU buffers **once** and every frame just draws it by
14
- * reference: placement, camera, tint, alpha and emissive all ride
15
- * per-draw uniforms, so moving, rotating, scaling or re-tinting a mesh
16
- * never re-uploads geometry (near-zero per-frame allocation). Editing
17
- * the geometry itself in place is still possible — signal it with
18
- * {@link Mesh#needsUpdate} and the GPU copy refreshes on the next draw.
19
- * Under a 2D camera (or on Canvas) the mesh instead re-projects its
20
- * vertices on the CPU each frame — same API, the camera and backend
21
- * decide the path.
22
- *
23
- * **Pivot — transforms are applied about the mesh's local origin `(0, 0, 0)`,
24
- * NOT a normalized anchor point.** Unlike a {@link Sprite} (whose
25
- * {@link Renderable#anchorPoint} recenters a `width`×`height` box), a mesh has
26
- * real vertex coordinates, so rotation and scale pivot around the model origin
27
- * the geometry is authored against — the standard convention for 3D meshes.
28
- * Place the origin where you want the pivot at authoring time (or nest the
29
- * mesh under a transformed parent to pivot elsewhere). Consequently, on the
30
- * `Camera3d` world-space path the mesh opts out of the anchor offset entirely
31
- * (see {@link Renderable#applyAnchorTransform}); the legacy 2D path still
32
- * honors `anchorPoint` for backward compatibility. Subclasses that bake the
33
- * anchor into their vertex data instead (e.g. {@link Sprite3d}, via the
34
- * internal `_anchorBaked` flag) opt out on **both** paths — for those, the
35
- * vertex bake is the single anchoring mechanism.
36
- * @category Game Objects
37
- */
38
1
  export default class Mesh extends Renderable {
39
2
  /**
40
3
  * @param {number} x - the x screen position of the mesh object
41
4
  * @param {number} y - the y screen position of the mesh object
42
- * @param {object} settings - Configuration parameters for the Mesh object
43
- * @param {string} [settings.model] - name of a preloaded OBJ model (via loader.preload with type "obj"). Vertex normals come with it — authored `vn` when the file has them, generated from face geometry when it does not — so an OBJ model can be `lit`.
44
- * @param {Float32Array|number[]} [settings.vertices] - vertex positions as x,y,z triplets (alternative to settings.model)
45
- * @param {Float32Array|number[]} [settings.uvs] - texture coordinates as u,v pairs (alternative to settings.model)
46
- * @param {Uint16Array|number[]} [settings.indices] - triangle vertex indices (alternative to settings.model)
47
- * @param {HTMLImageElement|TextureAtlas|string} [settings.texture] - the texture to apply (image name, HTMLImageElement, or TextureAtlas). If omitted and settings.material is provided, the texture is resolved from the MTL material's map_Kd. Passing this pins ONE binding over the whole model, which on a multi-material model suppresses the per-material texture split — see {@link Mesh#textureGroups}.
48
- * @param {string} [settings.material] - name of a preloaded MTL material (via loader.preload with type "mtl"). When provided, the diffuse texture (map_Kd), tint color (Kd), and opacity (d) are automatically applied. On a multi-material model each material's own `map_Kd` is bound for its own slice of the geometry (#1573) and each `Kd` is baked per-vertex, so one `Mesh` renders the whole model.
49
- * @param {number} settings.width - display width in pixels. With normalization on (the default) the model is scaled to fit this size; with `normalize: false` this is the uniform pixels-per-unit scale applied to the raw geometry.
50
- * @param {number} [settings.height] - display height in pixels (normalized models only; ignored when `normalize: false`)
51
- * @param {boolean} [settings.cullBackFaces=true] - enable backface culling
52
- * @param {boolean} [settings.normalize=true] - fit the source geometry into a `[-0.5, 0.5]` unit cube before scaling, so `width`/`height` behave like a Sprite. Set `false` to keep the geometry's real-world coordinates — required when several meshes share one coordinate space (e.g. nodes of an imported glTF scene) so their relative scale and layout are preserved.
53
- * @param {number} [settings.scale] - world-space scale (pixels per source unit) for the Camera3d path; defaults to `width`. Set this when `width`/`height` describe the renderable's world bounds (frustum culling) rather than the geometry scale — see {@link Mesh#meshScale}.
54
- * @param {boolean} [settings.rightHanded=false] - treat the source as right-handed (Y-up, e.g. glTF) under the `Camera3d` world path. The default Y-up→Y-down bridge negates Y only (a reflection, which mirrors the scene left/right); `true` negates Y **and** Z (a rotation) so chirality is preserved and the result matches the authoring tool. See {@link Mesh#rightHanded}.
55
- * @param {string} [settings.textureRepeat] - texture wrap mode (`"repeat"` / `"repeat-x"` / `"repeat-y"` / `"no-repeat"`) this mesh samples its texture with (per-mesh — it does not modify the shared texture, so other meshes/sprites using the same image are unaffected). Use `"repeat"` when the geometry's UVs fall outside the `[0, 1]` range and rely on the texture tiling (e.g. glTF assets, whose default sampler wrap is REPEAT) — otherwise the texture clamps to its edge texels and looks flat. Ignored for the white-pixel fallback. Note: REPEAT on a non-power-of-two texture requires WebGL 2.
56
- * @param {string} [settings.textureFilter] - texture magnification filter (`"nearest"` for crisp pixel-art upscaling, `"linear"` for smooth) applied to the resolved texture. Omit to keep the renderer's global `antiAlias` default. On the mesh path, linear filtering also samples a generated mip chain with trilinear minification and 4× anisotropy (distant geometry stops shimmering) — `"nearest"` opts out, keeping crisp pixel-art models on hard level-0 sampling. GPU backends only (ignored by the Canvas renderer).
57
- * @param {number} [settings.alphaCutoff=0] - alpha cutout threshold. Fragments whose final alpha is below this value are discarded (hard-edged cutout — foliage, fences, decals — with no blending or sorting). `0` disables the cutout. Set automatically by the glTF loader from a material's `alphaMode: "MASK"`. GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
58
- * @param {number[]|Float32Array} [settings.emissive] - emissive (self-illumination) color `[r, g, b]` (0..1, may exceed 1 for HDR glow) added on top of the lit/unlit color so the surface glows regardless of scene lights (neon, lava, screens). Omit / all-zero for no emission. Set automatically by the glTF loader (`emissiveFactor`) and OBJ loader (MTL `Ke`). GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
59
- * @param {boolean} [settings.lit=false] - shade this mesh with the scene's {@link Light3d} lights (the lit mesh pipeline) instead of rendering fullbright. Set automatically by the glTF importer when the scene carries a directional, point or spot light. With `lit` on and no lights present the batcher uploads a white ambient, so the result is indistinguishable from unlit.
60
- * @param {number[]|Float32Array} [settings.normals] - per-vertex normals for the lit path. An explicit value wins over the ones an OBJ or glTF source supplies; omit it and they are taken from the model (or generated).
61
- * @param {number[]|Float32Array} [settings.specular] - specular color `[r, g, b]` (0..1) for the lit path. Set by the OBJ loader from MTL `Ks`, and derived from glTF metallic/roughness.
62
- * @param {number} [settings.shininess=0] - specular exponent for the lit path (MTL `Ns`). `0` for a fully diffuse surface.
63
- * @param {string|TextureAtlas|HTMLImageElement} [settings.alphaMap] - per-texel opacity map, sampled in addition to the diffuse texture (MTL `map_d`).
64
- * @param {boolean} [settings.castGroundShadow] - give this mesh a blob ground shadow, overriding the application's `castGroundShadow` setting in both directions. Omit to inherit. Needs a GPU backend and a `Camera3d`.
65
- * @param {number} [settings.shadowGroundY] - world Y of the floor the shadow lands on. Omit and the blob sits at the object's own base at full strength; set it and the blob shrinks and fades as the object rises. Render space is Y-down, so the floor is a **greater** Y than the object above it.
66
- * @param {number} [settings.shadowOpacity=0.45] - opacity of the shadow directly beneath the object, before any height fade.
5
+ * @param {MeshSettings} settings - Configuration parameters for the Mesh object
67
6
  * @example
68
7
  * // create from OBJ + MTL (texture auto-resolved from material)
69
8
  * let mesh = new me.Mesh(0, 0, {
@@ -109,32 +48,7 @@ export default class Mesh extends Renderable {
109
48
  * // 2D rotation (Z axis, same as Sprite)
110
49
  * mesh.rotate(Math.PI / 4);
111
50
  */
112
- constructor(x: number, y: number, settings: {
113
- model?: string | undefined;
114
- vertices?: number[] | Float32Array<ArrayBufferLike> | undefined;
115
- uvs?: number[] | Float32Array<ArrayBufferLike> | undefined;
116
- indices?: number[] | Uint16Array<ArrayBufferLike> | undefined;
117
- texture?: string | HTMLImageElement | TextureAtlas | undefined;
118
- material?: string | undefined;
119
- width: number;
120
- height?: number | undefined;
121
- cullBackFaces?: boolean | undefined;
122
- normalize?: boolean | undefined;
123
- scale?: number | undefined;
124
- rightHanded?: boolean | undefined;
125
- textureRepeat?: string | undefined;
126
- textureFilter?: string | undefined;
127
- alphaCutoff?: number | undefined;
128
- emissive?: number[] | Float32Array<ArrayBufferLike> | undefined;
129
- lit?: boolean | undefined;
130
- normals?: number[] | Float32Array<ArrayBufferLike> | undefined;
131
- specular?: number[] | Float32Array<ArrayBufferLike> | undefined;
132
- shininess?: number | undefined;
133
- alphaMap?: string | HTMLImageElement | TextureAtlas | undefined;
134
- castGroundShadow?: boolean | undefined;
135
- shadowGroundY?: number | undefined;
136
- shadowOpacity?: number | undefined;
137
- });
51
+ constructor(x: number, y: number, settings: MeshSettings);
138
52
  /**
139
53
  * the original (untransformed) vertex positions as x,y,z triplets
140
54
  * @type {Float32Array}
@@ -150,7 +64,6 @@ export default class Mesh extends Renderable {
150
64
  * @type {number}
151
65
  */
152
66
  vertexCount: number;
153
- _indicesOriginal: number[];
154
67
  /**
155
68
  * the projected vertex positions.
156
69
  *
@@ -174,6 +87,17 @@ export default class Mesh extends Renderable {
174
87
  * @type {Float32Array|undefined}
175
88
  */
176
89
  originalNormals: Float32Array | undefined;
90
+ /**
91
+ * world-space normals for the current draw, recomputed from
92
+ * {@link Mesh#originalNormals} along the Camera3d path. Empty (zero) when
93
+ * the mesh has no source normals — the shader then ignores lighting.
94
+ *
95
+ * Carries the same caveat as {@link Mesh#vertices}: the WebGL
96
+ * `Camera3d` path rotates normals on the GPU and leaves this array
97
+ * untouched.
98
+ * @type {Float32Array}
99
+ */
100
+ normals: Float32Array;
177
101
  /**
178
102
  * Whether this mesh is lit by the active stage's {@link Light3d} lights.
179
103
  * When `true` it renders through the lit mesh batcher (diffuse shading
@@ -268,6 +192,102 @@ export default class Mesh extends Renderable {
268
192
  * @see Mesh#shadowGroundY
269
193
  */
270
194
  castGroundShadow: boolean | undefined;
195
+ /**
196
+ * Whether this mesh is affected by the camera's distance fog
197
+ * ({@link Camera3d#setFog}).
198
+ *
199
+ * Left **unset** (`undefined`, the default) the mesh fogs whenever the
200
+ * camera drawing it has fog — which for a scene that never enables fog
201
+ * means never. Set it to `false` and this mesh is never fogged, however
202
+ * far away it is: the escape hatch for something that has to stay
203
+ * readable at any distance, such as an objective marker or a waypoint.
204
+ * `true` is accepted for symmetry and behaves as the default.
205
+ *
206
+ * It exempts the **mesh**, not the ground shadow it casts. A blob is a
207
+ * mark on the floor and fogs with the floor it lies on — one staying
208
+ * crisp under an object whose surroundings had dissolved would read as
209
+ * a fault rather than as emphasis. The blob quad is also shared by
210
+ * every caster in the scene, so it carries no per-object state to read.
211
+ *
212
+ * Emissive surfaces fog too — light travelling through fog is
213
+ * attenuated like anything else — so a neon sign that should punch
214
+ * through wants `fog: false` rather than a brighter emissive.
215
+ * @type {boolean|undefined}
216
+ * @default undefined
217
+ * @see Camera3d#setFog
218
+ * @example
219
+ * // the world fogs; this waypoint stays readable at any distance
220
+ * camera.setFog({ near: 1200, far: 7000 });
221
+ *
222
+ * const marker = new Mesh(0, 0, {
223
+ * ...beaconGeometry,
224
+ * emissive: [1, 0.6, 0],
225
+ * fog: false,
226
+ * });
227
+ * // or afterwards, on anything already built
228
+ * marker.fog = false;
229
+ */
230
+ fog: boolean | undefined;
231
+ /**
232
+ * Whether this mesh draws in the **transparent pass** — blended,
233
+ * back-to-front, writing no depth — instead of the opaque one.
234
+ *
235
+ * Left **unset** (`undefined`, the default) the mesh goes transparent
236
+ * whenever the draw resolves to fractional alpha, so `setOpacity(0.5)`
237
+ * simply fades it. That is the useful default because the opaque path
238
+ * writes premultiplied colour with blending off: a faded mesh comes out
239
+ * *darkened toward black* rather than see-through, which is a defect
240
+ * rather than a contract — the fully transparent end of the same range
241
+ * used to paint an opaque black silhouette until it was fixed.
242
+ *
243
+ * Set it **`true`** when the transparency lives in the TEXTURE rather
244
+ * than in the opacity — a soft-edged glow, smoke, a glTF material with
245
+ * `alphaMode: "BLEND"`. The automatic check reads the draw's alpha and
246
+ * cannot see into the texture. The glTF loader does not set this for
247
+ * you: one loaded mesh can merge several materials, and this flag
248
+ * routes the whole mesh, so a `"BLEND"` material sharing geometry with
249
+ * an opaque one would drag the opaque half into the transparent pass.
250
+ * Note that `alphaCutoff` discards texels before blending sees them, so
251
+ * a soft edge needs a low cutoff (see {@link Sprite3d}, which lowers
252
+ * its default for exactly this). The cutoff thresholds the MATERIAL's
253
+ * alpha, not the drawn alpha, so a fading cutout mesh keeps its shape
254
+ * rather than disappearing at its own threshold.
255
+ *
256
+ * The pass composites premultiplied, which is what the mesh vertex
257
+ * stage always emits. A texture uploaded with straight alpha and drawn
258
+ * with `transparent: true` therefore reads slightly bright at its soft
259
+ * texels; upload it premultiplied (the default) and it is exact.
260
+ *
261
+ * {@link Renderable#blendMode} is honoured per entry, with one limit:
262
+ * the advanced modes (`"overlay"`, `"difference"`, and the rest that
263
+ * need a compositing pass) fall back to `"normal"` here on both
264
+ * backends, since the pass rasterizes directly into the target.
265
+ *
266
+ * Set it **`false`** to keep a mesh in the opaque pass however it is
267
+ * faded — it will darken rather than fade, and it will keep writing
268
+ * depth.
269
+ *
270
+ * Sorting is **per object**, by distance from the camera, so two
271
+ * intersecting or mutually enclosing transparent meshes may pop as the
272
+ * camera moves; split them, or accept it. Needs a GPU backend and a
273
+ * {@link Camera3d} — the 2D-camera path is unaffected.
274
+ * @type {boolean|undefined}
275
+ * @default undefined
276
+ * @see Renderable#blendMode
277
+ * @example
278
+ * // a ghost that fades in — nothing else needed
279
+ * ghost.setOpacity(0.4);
280
+ *
281
+ * // a glow that blends at full opacity, and additively
282
+ * const glow = new Mesh(0, 0, {
283
+ * ...quad,
284
+ * texture: glowTexture,
285
+ * transparent: true,
286
+ * blendMode: "additive",
287
+ * alphaCutoff: 0,
288
+ * });
289
+ */
290
+ transparent: boolean | undefined;
271
291
  /**
272
292
  * World Y of the floor the shadow lands on, or `undefined` (the
273
293
  * default) to mean "this object is standing on the ground" — the
@@ -293,17 +313,6 @@ export default class Mesh extends Renderable {
293
313
  * @default 0.45
294
314
  */
295
315
  shadowOpacity: number;
296
- /**
297
- * Cached horizontal half-extent used to size the shadow, resolved on
298
- * first shadowed draw. Cached because the alternative is a
299
- * `getBounds3d()` per frame per shadow, which re-bounds every source
300
- * vertex through the model matrix.
301
- * @ignore
302
- */
303
- _shadowHalfX: number;
304
- _shadowHalfZ: number;
305
- _shadowGeomVersion: number;
306
- _shadowHasHeight: boolean;
307
316
  /**
308
317
  * whether to cull back-facing triangles
309
318
  * @type {boolean}
@@ -377,9 +386,15 @@ export default class Mesh extends Renderable {
377
386
  * material has its own dedup scope in the OBJ parser), so
378
387
  * every vertex belongs to exactly one material group and
379
388
  * carries that group's color unambiguously.
380
- * @type {Uint32Array}
389
+ *
390
+ * This is also what `settings.vertexColors` and
391
+ * {@link Mesh#setVertexColor} populate, so procedural geometry
392
+ * can carry a gradient a per-object `tint` cannot express.
393
+ * `undefined` when every vertex is plain white.
394
+ * @type {Uint32Array|undefined}
395
+ * @see Mesh#setVertexColor
381
396
  */
382
- vertexColors: Uint32Array;
397
+ vertexColors: Uint32Array | undefined;
383
398
  texture: any;
384
399
  /**
385
400
  * Index ranges that each need their own diffuse texture bound, for a
@@ -430,23 +445,6 @@ export default class Mesh extends Renderable {
430
445
  * @type {Matrix3d}
431
446
  */
432
447
  projectionMatrix: Matrix3d;
433
- /** @ignore */
434
- _anchorBaked: boolean;
435
- /** @ignore */
436
- _hullPoints: Vector2d[];
437
- /** @ignore */
438
- _hullPolygon: Polygon | null;
439
- /** @ignore */
440
- _geometryVersion: number;
441
- /**
442
- * Project all vertices through projectionMatrix × currentTransform
443
- * and store the results in `this.vertices`.
444
- * @param {number} [offsetX=0] - x offset added to each projected vertex
445
- * @param {number} [offsetY=0] - y offset added to each projected vertex
446
- * @param {number} [zScale=0] - scale factor for Z output (0 = skip Z, 1000 = depth buffer range)
447
- * @ignore
448
- */
449
- _projectVertices(offsetX?: number, offsetY?: number, zScale?: number): void;
450
448
  /**
451
449
  * Signal that this mesh's geometry itself has changed — its vertices, UVs,
452
450
  * indices, normals or per-vertex colours were edited in place.
@@ -463,80 +461,29 @@ export default class Mesh extends Renderable {
463
461
  */
464
462
  set needsUpdate(value: any);
465
463
  /**
466
- * Compose this mesh's placement into a single matrix: where its model-space
467
- * geometry sits in the world.
468
- *
469
- * This is the matrix form of {@link Mesh#_projectVerticesWorld} — the same
470
- * transform, scale and axis bridge, expressed once instead of applied to
471
- * every vertex:
472
- *
473
- * `translate(pos, depth) · scale(s, -s, ±s) · currentTransform`
474
- *
475
- * The Y negation bridges Y-up geometry to the engine's Y-down world; Z is
476
- * negated too for right-handed (glTF) sources, which makes the bridge a
477
- * rotation rather than a reflection and so preserves triangle winding.
478
- * @returns {Matrix3d} the mesh's model matrix (reused instance)
479
- * @ignore
480
- */
481
- _composeModelMatrix(): Matrix3d;
482
- /** @ignore */
483
- _modelMatrix: Matrix3d | undefined;
484
- /**
485
- * Project vertices into **world space** for the Camera3d render path.
486
- * Bypasses {@link Mesh#projectionMatrix} (the self-contained
487
- * perspective that's meaningful only under Camera2d) and emits
488
- * vertices that the active 3D camera then projects via its own
489
- * view + projection matrices, the same way it does for Sprites.
490
- *
491
- * Per-vertex math: `currentTransform × originalVertex`, then a uniform
492
- * scale by `this.width`, the Y-up→Y-down bridge (negate Y, and also Z when
493
- * {@link Mesh#rightHanded} is set so the bridge is a rotation rather than a
494
- * mirror), and a translate to `(offsetX, offsetY, offsetZ)`.
495
- *
496
- * @param {number} offsetX - world X to place the mesh center at
497
- * @param {number} offsetY - world Y to place the mesh center at
498
- * @param {number} offsetZ - world Z to place the mesh center at
499
- * @ignore
500
- */
501
- _projectVerticesWorld(offsetX: number, offsetY: number, offsetZ: number): void;
502
- /**
503
- * Project {@link Mesh#originalNormals} into world space for lit shading,
504
- * storing the result in {@link Mesh#normals}. Applies the rotation/scale of
505
- * {@link Renderable#currentTransform} (no translation), the same Y-down /
506
- * `rightHanded` Y/Z bridge as {@link Mesh#_projectVerticesWorld}, then
507
- * renormalizes. No-op when the mesh has no source normals.
508
- *
509
- * Note: uses the transform's rotation/scale columns directly rather than
510
- * the inverse-transpose, so normals are exact under rotation + uniform
511
- * scale (the common case); a strongly non-uniform scale would skew them
512
- * slightly — acceptable for the diffuse lighting path.
513
- * @ignore
514
- */
515
- _projectNormalsWorld(): void;
516
- /**
517
- * Build the winding-reversed indices buffer used by the Camera3d
518
- * world-space path. Called once, lazily, the first time the mesh
519
- * draws under Camera3d. Why: the world-space path Y-flips vertices
520
- * on output (a reflection, det = -1), which inverts triangle
521
- * winding in screen space. Without the swap, `cullBackFaces: true`
522
- * would end up culling the front faces and the model would look
523
- * hollow.
524
- *
525
- * Both buffers are kept alive — `_indicesOriginal` is the original
526
- * OBJ-shared (or user-supplied) winding, `_indicesReversed` is the
527
- * Camera3d-flipped copy. `draw()` swaps `this.indices` between them
528
- * each frame based on the active camera, so a Mesh that was first
529
- * drawn under Camera3d and later re-parented to a Camera2d stage
530
- * (e.g. a level transition into a 2D minigame) gets its original
531
- * winding back and stays correctly oriented under
532
- * `cullBackFaces: true`.
533
- * @param {boolean} [needsReversedIndices=true] - build the winding-reversed index copy. `false` on the retained path, which corrects winding with `frontFace` and would otherwise duplicate the index array for nothing.
534
- * @ignore
535
- */
536
- _setupWorldSpace(needsReversedIndices?: boolean): void;
537
- _indicesReversed: any;
538
- _worldSpace: boolean | undefined;
539
- _useWorldSpace: boolean | undefined;
464
+ * Set one vertex's colour, multiplied into {@link Mesh#tint}.
465
+ *
466
+ * The mesh starts carrying per-vertex colour on the first call — every
467
+ * other vertex is white until coloured, so a mesh built without
468
+ * `settings.vertexColors` looks unchanged until you touch it.
469
+ *
470
+ * Out-of-range indices are ignored rather than throwing, matching
471
+ * {@link InstancedMesh#setInstanceColor}.
472
+ *
473
+ * Bumps {@link Mesh#needsUpdate} for you: the retained `Camera3d` path
474
+ * uploads geometry once and compares the version, so a colour written
475
+ * without it would apply on the immediate path and silently not on the
476
+ * retained one.
477
+ * @param {number} index - the vertex to colour
478
+ * @param {Color} color - the vertex colour
479
+ * @example
480
+ * // fade a procedural terrain toward the sky with distance
481
+ * for (let i = 0; i < mesh.vertexCount; i++) {
482
+ * const t = Math.min(1, mesh.originalVertices[i * 3 + 2] / 6000);
483
+ * mesh.setVertexColor(i, haze.copy(ground).lerp(sky, t));
484
+ * }
485
+ */
486
+ setVertexColor(index: number, color: Color): void;
540
487
  /**
541
488
  * The mesh's world-space 3D axis-aligned bounding box. This is the 3D analog
542
489
  * of {@link Renderable#getBounds} (which returns a flat 2D box from
@@ -552,39 +499,6 @@ export default class Mesh extends Renderable {
552
499
  * @returns {AABB3d} the world-space bounding box (reused instance)
553
500
  */
554
501
  getBounds3d(): AABB3d;
555
- /** @ignore */
556
- _bounds3d: AABB3d | undefined;
557
- /**
558
- * Whether this mesh casts a ground shadow on this draw (#1515).
559
- *
560
- * Precedence, most specific first: the mesh's own `castGroundShadow`, then
561
- * the application's `castGroundShadow` setting. A per-mesh value is an
562
- * explicit instruction and is obeyed as given; the application default is a
563
- * blanket one, so it skips meshes with no vertical extent — which is what a
564
- * ground plane is, and a flat plane lying on the floor has nothing to cast.
565
- * Read off the renderer rather than the global application instance, the
566
- * same way the `textureFilter` default is.
567
- * @param {WebGLRenderer|WebGPURenderer} renderer - the active renderer
568
- * @returns {boolean} true if a shadow should be drawn
569
- * @ignore
570
- */
571
- _castsGroundShadow(renderer: WebGLRenderer | WebGPURenderer): boolean;
572
- /**
573
- * Measure the model-space footprint the blob is built from, and whether the
574
- * geometry has any height at all — once per geometry version.
575
- * @ignore
576
- */
577
- _measureShadowFootprint(): void;
578
- /**
579
- * Draw this mesh's ground shadow: the shared blob quad, flattened onto the
580
- * ground plane beneath the object (#1515).
581
- *
582
- * The quad is shared by every shadow in the scene and its geometry is
583
- * uploaded once, so this is one draw and no allocation.
584
- * @param {WebGLRenderer} renderer - the active renderer
585
- * @ignore
586
- */
587
- _drawGroundShadow(renderer: WebGLRenderer): void;
588
502
  /**
589
503
  * Render the mesh at its current state (transforms, projection, tint) to an offscreen canvas.
590
504
  * The returned canvas can be used with `renderer.drawImage()`, as a `Sprite` image source,
@@ -608,13 +522,124 @@ export default class Mesh extends Renderable {
608
522
  * const sprite = new me.Sprite(100, 100, { image: bitmap });
609
523
  */
610
524
  toImageBitmap(): Promise<ImageBitmap>;
525
+ }
526
+ /**
527
+ * Everything {@link Mesh} takes.
528
+ *
529
+ * Split out of the constructor's own `@param` list so a subclass that
530
+ * forwards these wholesale — {@link InstancedMesh} does — can say so in its
531
+ * type, instead of restating 27 entries that would then drift apart.
532
+ */
533
+ export type MeshSettings = {
611
534
  /**
612
- * Release this mesh's GPU-resident geometry, if a renderer is holding any,
613
- * then destroy the renderable.
614
- * @ignore
535
+ * - name of a preloaded OBJ model (via loader.preload with type "obj"). Vertex normals come with it — authored `vn` when the file has them, generated from face geometry when it does not — so an OBJ model can be `lit`.
615
536
  */
616
- destroy(): void;
617
- }
537
+ model?: string;
538
+ /**
539
+ * - vertex positions as x,y,z triplets (alternative to `model`)
540
+ */
541
+ vertices?: Float32Array | number[];
542
+ /**
543
+ * - texture coordinates as u,v pairs (alternative to `model`)
544
+ */
545
+ uvs?: Float32Array | number[];
546
+ /**
547
+ * - triangle vertex indices (alternative to `model`). A `Uint32Array` is preserved as-is for meshes past 65535 vertices — which is what the glTF parser emits for them — while a plain array is materialized as `Uint16Array`
548
+ */
549
+ indices?: Uint16Array | Uint32Array | number[];
550
+ /**
551
+ * - the texture to apply (image name, HTMLImageElement, or TextureAtlas). If omitted and settings.material is provided, the texture is resolved from the MTL material's map_Kd. Passing this pins ONE binding over the whole model, which on a multi-material model suppresses the per-material texture split — see {@link Mesh#textureGroups}.
552
+ */
553
+ texture?: HTMLImageElement | HTMLCanvasElement | Texture2d | TextureAtlas | string;
554
+ /**
555
+ * - name of a preloaded MTL material (via loader.preload with type "mtl"). When provided, the diffuse texture (map_Kd), tint color (Kd), and opacity (d) are automatically applied. On a multi-material model each material's own `map_Kd` is bound for its own slice of the geometry (#1573) and each `Kd` is baked per-vertex, so one `Mesh` renders the whole model.
556
+ */
557
+ material?: string;
558
+ /**
559
+ * - display width in pixels. With normalization on (the default) the model is scaled to fit this size; with `normalize: false` this is the uniform pixels-per-unit scale applied to the raw geometry. With `normalize: false` and an explicit `scale`, an omitted `width`/`height` is derived from the GEOMETRY's own extent, the way a Sprite takes its size from its frame — a mesh that reports no extent misleads frustum culling, pointer picking and the physics broadphase alike.
560
+ */
561
+ width: number;
562
+ /**
563
+ * - display height in pixels (normalized models only; ignored when `normalize: false`)
564
+ */
565
+ height?: number;
566
+ /**
567
+ * - enable backface culling
568
+ */
569
+ cullBackFaces?: boolean;
570
+ /**
571
+ * - fit the source geometry into a `[-0.5, 0.5]` unit cube before scaling, so `width`/`height` behave like a Sprite. Set `false` to keep the geometry's real-world coordinates — required when several meshes share one coordinate space (e.g. nodes of an imported glTF scene) so their relative scale and layout are preserved.
572
+ */
573
+ normalize?: boolean;
574
+ /**
575
+ * - world-space scale (pixels per source unit) for the Camera3d path; defaults to `width`. Set this when `width`/`height` describe the renderable's world bounds (frustum culling) rather than the geometry scale — see {@link Mesh#meshScale}.
576
+ */
577
+ scale?: number;
578
+ /**
579
+ * - treat the source as right-handed (Y-up, e.g. glTF) under the `Camera3d` world path. The default Y-up→Y-down bridge negates Y only (a reflection, which mirrors the scene left/right); `true` negates Y **and** Z (a rotation) so chirality is preserved and the result matches the authoring tool. See {@link Mesh#rightHanded}.
580
+ */
581
+ rightHanded?: boolean;
582
+ /**
583
+ * - texture wrap mode (`"repeat"` / `"repeat-x"` / `"repeat-y"` / `"no-repeat"`) this mesh samples its texture with (per-mesh — it does not modify the shared texture, so other meshes/sprites using the same image are unaffected). Use `"repeat"` when the geometry's UVs fall outside the `[0, 1]` range and rely on the texture tiling (e.g. glTF assets, whose default sampler wrap is REPEAT) — otherwise the texture clamps to its edge texels and looks flat. Ignored for the white-pixel fallback. Note: REPEAT on a non-power-of-two texture requires WebGL 2.
584
+ */
585
+ textureRepeat?: string;
586
+ /**
587
+ * - texture magnification filter (`"nearest"` for crisp pixel-art upscaling, `"linear"` for smooth) applied to the resolved texture. Omit to keep the renderer's global `antiAlias` default. On the mesh path, linear filtering also samples a generated mip chain with trilinear minification and 4× anisotropy (distant geometry stops shimmering) — `"nearest"` opts out, keeping crisp pixel-art models on hard level-0 sampling. GPU backends only (ignored by the Canvas renderer).
588
+ */
589
+ textureFilter?: string;
590
+ /**
591
+ * - alpha cutout threshold. Fragments whose final alpha is below this value are discarded (hard-edged cutout — foliage, fences, decals — with no blending or sorting). `0` disables the cutout. Set automatically by the glTF loader from a material's `alphaMode: "MASK"`. GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
592
+ */
593
+ alphaCutoff?: number;
594
+ /**
595
+ * - emissive (self-illumination) color `[r, g, b]` (0..1, may exceed 1 for HDR glow) added on top of the lit/unlit color so the surface glows regardless of scene lights (neon, lava, screens). Omit / all-zero for no emission. Set automatically by the glTF loader (`emissiveFactor`) and OBJ loader (MTL `Ke`). GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
596
+ */
597
+ emissive?: number[] | Float32Array;
598
+ /**
599
+ * - shade this mesh with the scene's {@link Light3d} lights (the lit mesh pipeline) instead of rendering fullbright. Set automatically by the glTF importer when the scene carries a directional, point or spot light. With `lit` on and no lights present the batcher uploads a white ambient, so the result is indistinguishable from unlit.
600
+ */
601
+ lit?: boolean;
602
+ /**
603
+ * - per-vertex colour, one entry per vertex, multiplied into {@link Mesh#tint}. Either packed RGBA8 (`Uint32Array`, the form the batchers read — no conversion) or one {@link Color} per vertex. Omit for plain white. Lets a single mesh carry a gradient — fading a terrain toward the sky with distance, darkening a crease — which a per-object `tint` cannot express. An explicit value wins over the colours a multi-material OBJ bakes from its MTL.
604
+ */
605
+ vertexColors?: Uint32Array | Color[] | number[];
606
+ /**
607
+ * - per-vertex normals for the lit path. An explicit value wins over the ones an OBJ or glTF source supplies; omit it and they are taken from the model, or generated from the geometry when the mesh is `lit`. Generated normals average per vertex where faces share vertices (smooth shading) and equal the face normal where they do not (flat shading) — the geometry decides, not a flag.
608
+ */
609
+ normals?: number[] | Float32Array;
610
+ /**
611
+ * - specular color `[r, g, b]` (0..1) for the lit path. Set by the OBJ loader from MTL `Ks`, and derived from glTF metallic/roughness.
612
+ */
613
+ specular?: number[] | Float32Array;
614
+ /**
615
+ * - specular exponent for the lit path (MTL `Ns`). `0` for a fully diffuse surface.
616
+ */
617
+ shininess?: number;
618
+ /**
619
+ * - per-texel opacity map, sampled in addition to the diffuse texture (MTL `map_d`).
620
+ */
621
+ alphaMap?: string | TextureAtlas | HTMLImageElement;
622
+ /**
623
+ * - give this mesh a blob ground shadow, overriding the application's `castGroundShadow` setting in both directions. Omit to inherit. Needs a GPU backend and a `Camera3d`.
624
+ */
625
+ castGroundShadow?: boolean;
626
+ /**
627
+ * - draw in the transparent pass (blended, back-to-front, no depth write). Omit and a mesh goes transparent whenever its draw alpha is fractional; `true` for soft-alpha textures; `false` to stay opaque however faded
628
+ */
629
+ transparent?: boolean;
630
+ /**
631
+ * - set `false` to exempt this mesh from the camera's distance fog ({@link Camera3d#setFog}); omit to fog whenever the camera does
632
+ */
633
+ fog?: boolean;
634
+ /**
635
+ * - world Y of the floor the shadow lands on. Omit and the blob sits at the object's own base at full strength; set it and the blob shrinks and fades as the object rises. Render space is Y-down, so the floor is a **greater** Y than the object above it.
636
+ */
637
+ shadowGroundY?: number;
638
+ /**
639
+ * - opacity of the shadow directly beneath the object, before any height fade.
640
+ */
641
+ shadowOpacity?: number;
642
+ };
618
643
  import Renderable from "./renderable.js";
619
644
  import { TextureAtlas } from "./../video/texture/atlas.js";
620
645
  import { Color } from "../math/color.ts";
@@ -623,4 +648,5 @@ import { Vector2d } from "../math/vector2d.ts";
623
648
  import { Polygon } from "../geometries/polygon.ts";
624
649
  import { AABB3d } from "../physics/broadphase/aabb3d.ts";
625
650
  import type WebGLRenderer from "./../video/webgl/webgl_renderer.js";
651
+ import Texture2d from "./../video/texture/texture2d.ts";
626
652
  //# sourceMappingURL=mesh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/mesh.js"],"names":[],"mappings":"AA0OA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAwEG;IACH,eAxEW,MAAM,KACN,MAAM,YAEd;QAA0B,KAAK;QACU,QAAQ;QACR,GAAG;QACJ,OAAO;QACS,OAAO;QACrC,QAAQ;QACT,KAAK,EAAtB,MAAM;QACY,MAAM;QACL,aAAa;QACb,SAAS;QACV,KAAK;QACJ,WAAW;QACZ,aAAa;QACb,aAAa;QACb,WAAW;QACI,QAAQ;QACtB,GAAG;QACW,OAAO;QACP,QAAQ;QACvB,SAAS;QACqB,QAAQ;QACrC,gBAAgB;QACjB,aAAa;QACb,aAAa;KACvC,EAqrBF;IA3nBC;;;OAGG;IACH,kBAFU,YAAY,CAEkB;IAExC;;;OAGG;IACH,KAFU,YAAY,CAEA;IAqBtB;;;OAGG;IACH,aAFU,MAAM,CAEsB;IAmCvC,2BAAoC;IAIpC;;;;;;;;;;;;;;OAcG;IACH,UAFU,YAAY,CAEgC;IAEtD;;;;;OAKG;IACH,iBAFU,YAAY,GAAC,SAAS,CAOnB;IAcb;;;;;;;;;OASG;IACH,KAHU,OAAO,CAGe;IAEhC;;;;;;;;;OASG;IACH,aAHU,MAAM,CAIoD;IAEpE;;;;;;;;;OASG;IACH,UAFU,YAAY,GAAC,SAAS,CAEa;IAE7C;;;;;;;;;;;;OAYG;IAC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,6BAA6B;sBAXpC,kBAAkB;yBACf,qBAAqB;yBACrB,qBAAqB;wBALtB,0BAA0B;uBAY3B,iCAAiC;+BAU1B,oCAAoC;sBAP5C,iCAAiC"}
@@ -65,10 +65,6 @@ export default class NineSliceSprite extends Sprite {
65
65
  nss_height: number;
66
66
  insetx: number | undefined;
67
67
  insety: number | undefined;
68
- /**
69
- * @ignore
70
- */
71
- draw(renderer: any): void;
72
68
  }
73
69
  import Sprite from "./sprite.js";
74
70
  import type { TextureAtlas } from "./../video/texture/atlas.js";
@@ -1 +1 @@
1
- {"version":3,"file":"nineslicesprite.d.ts","sourceRoot":"","sources":["../../src/renderable/nineslicesprite.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,eAxBW,MAAM,KACN,MAAM,YAEd;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,MAAM;QACN,MAAM;QACyD,KAAK,EAAtF,gBAAgB,GAAC,iBAAiB,GAAC,YAAY,GAAC,eAAe,GAAC,MAAM;QACpD,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;QACL,IAAI;QACV,KAAK;QACL,KAAK;QACwB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;KAC3C,EA8BF;IASD,iBALU,MAAM,EAOf;IATD;;;OAGG;IACH,aAFU,MAAM,CAIf;IAYD,kBALU,MAAM,EAOf;IATD;;;OAGG;IACH,cAFU,MAAM,CAIf;IAxBA,kBAA2B;IAC3B,mBAA6B;IAE7B,2BAA6B;IAC7B,2BAA6B;IAkD9B;;OAEG;IACH,0BA6EC;CACD;mBA3MkB,aAAa;kCAKC,6BAA6B;2BADtC,oBAAoB"}
1
+ {"version":3,"file":"nineslicesprite.d.ts","sourceRoot":"","sources":["../../src/renderable/nineslicesprite.js"],"names":[],"mappings":"AAkBA;;;;;;GAMG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,eAxBW,MAAM,KACN,MAAM,YAEd;QAAyB,KAAK,EAAtB,MAAM;QACW,MAAM,EAAvB,MAAM;QACY,MAAM;QACN,MAAM;QACyD,KAAK,EAAtF,gBAAgB,GAAC,iBAAiB,GAAC,YAAY,GAAC,eAAe,GAAC,MAAM;QACpD,IAAI;QACJ,MAAM;QACN,UAAU;QACV,WAAW;QACL,IAAI;QACV,KAAK;QACL,KAAK;QACwB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;KAC3C,EA8BF;IASD,iBALU,MAAM,EAOf;IATD;;;OAGG;IACH,aAFU,MAAM,CAIf;IAYD,kBALU,MAAM,EAOf;IATD;;;OAGG;IACH,cAFU,MAAM,CAIf;IAxBA,kBAA2B;IAC3B,mBAA6B;IAE7B,2BAA6B;IAC7B,2BAA6B;IAmD9B;;;OAGG;IACH,0BA6EC;CACD;mBA7MkB,aAAa;kCAKC,6BAA6B;2BADtC,oBAAoB"}