melonjs 19.9.1 → 20.0.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 (274) hide show
  1. package/README.md +25 -14
  2. package/build/application/application.d.ts +70 -16
  3. package/build/application/application.d.ts.map +1 -1
  4. package/build/application/defaultApplicationSettings.d.ts +2 -2
  5. package/build/application/settings.d.ts +150 -53
  6. package/build/application/settings.d.ts.map +1 -1
  7. package/build/camera/camera2d.d.ts +1 -1
  8. package/build/camera/camera2d.d.ts.map +1 -1
  9. package/build/camera/camera3d.d.ts +13 -11
  10. package/build/camera/camera3d.d.ts.map +1 -1
  11. package/build/const.d.ts +55 -26
  12. package/build/const.d.ts.map +1 -1
  13. package/build/geometries/box3d.d.ts +156 -0
  14. package/build/geometries/box3d.d.ts.map +1 -0
  15. package/build/index.d.ts +33 -23
  16. package/build/index.d.ts.map +1 -1
  17. package/build/index.js +21839 -8025
  18. package/build/index.js.map +4 -4
  19. package/build/lang/deprecated.d.ts +4 -4
  20. package/build/lang/deprecated.d.ts.map +1 -1
  21. package/build/level/gltf/GLTFModel.d.ts +4 -0
  22. package/build/level/gltf/GLTFModel.d.ts.map +1 -1
  23. package/build/level/gltf/GLTFScene.d.ts +42 -6
  24. package/build/level/gltf/GLTFScene.d.ts.map +1 -1
  25. package/build/level/gltf/srgb.d.ts +20 -0
  26. package/build/level/gltf/srgb.d.ts.map +1 -0
  27. package/build/level/level.d.ts +21 -2
  28. package/build/level/level.d.ts.map +1 -1
  29. package/build/lighting/light3d.d.ts +61 -13
  30. package/build/lighting/light3d.d.ts.map +1 -1
  31. package/build/loader/loader.d.ts +49 -21
  32. package/build/loader/loader.d.ts.map +1 -1
  33. package/build/loader/parsers/gltf.d.ts.map +1 -1
  34. package/build/loader/parsers/mtl.d.ts +18 -0
  35. package/build/loader/parsers/mtl.d.ts.map +1 -1
  36. package/build/loader/parsers/obj.d.ts +49 -0
  37. package/build/loader/parsers/obj.d.ts.map +1 -1
  38. package/build/loader/parsers/pbr.d.ts +63 -0
  39. package/build/loader/parsers/pbr.d.ts.map +1 -0
  40. package/build/loader/parsers/shader.d.ts +32 -24
  41. package/build/loader/parsers/shader.d.ts.map +1 -1
  42. package/build/physics/adapter.d.ts +12 -1
  43. package/build/physics/adapter.d.ts.map +1 -1
  44. package/build/physics/broadphase/octree.d.ts +35 -0
  45. package/build/physics/broadphase/octree.d.ts.map +1 -1
  46. package/build/physics/builtin/body.d.ts +123 -6
  47. package/build/physics/builtin/body.d.ts.map +1 -1
  48. package/build/physics/builtin/builtin-adapter.d.ts.map +1 -1
  49. package/build/physics/builtin/detector.d.ts +12 -0
  50. package/build/physics/builtin/detector.d.ts.map +1 -1
  51. package/build/physics/builtin/raycast.d.ts.map +1 -1
  52. package/build/physics/builtin/sat3d.d.ts +59 -0
  53. package/build/physics/builtin/sat3d.d.ts.map +1 -0
  54. package/build/physics/response.d.ts +32 -0
  55. package/build/physics/response.d.ts.map +1 -1
  56. package/build/physics/world.d.ts +1 -0
  57. package/build/physics/world.d.ts.map +1 -1
  58. package/build/renderable/container.d.ts +1 -0
  59. package/build/renderable/container.d.ts.map +1 -1
  60. package/build/renderable/groundshadow.d.ts +92 -0
  61. package/build/renderable/groundshadow.d.ts.map +1 -0
  62. package/build/renderable/instanced_mesh.d.ts +286 -0
  63. package/build/renderable/instanced_mesh.d.ts.map +1 -0
  64. package/build/renderable/mesh.d.ts +242 -23
  65. package/build/renderable/mesh.d.ts.map +1 -1
  66. package/build/renderable/renderable.d.ts +6 -4
  67. package/build/renderable/renderable.d.ts.map +1 -1
  68. package/build/renderable/sprite3d.d.ts +17 -6
  69. package/build/renderable/sprite3d.d.ts.map +1 -1
  70. package/build/renderable/text/text.d.ts.map +1 -1
  71. package/build/system/device.d.ts +11 -40
  72. package/build/system/device.d.ts.map +1 -1
  73. package/build/system/platform.d.ts +0 -16
  74. package/build/system/platform.d.ts.map +1 -1
  75. package/build/utils/utils.d.ts +2 -0
  76. package/build/utils/utils.d.ts.map +1 -1
  77. package/build/video/canvas/canvas_renderer.d.ts +22 -16
  78. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  79. package/build/video/{webgl/effects → effects}/blur.d.ts +2 -2
  80. package/build/video/effects/blur.d.ts.map +1 -0
  81. package/build/video/{webgl/effects → effects}/chromaticAberration.d.ts +2 -2
  82. package/build/video/effects/chromaticAberration.d.ts.map +1 -0
  83. package/build/video/{webgl/effects → effects}/colorMatrix.d.ts +3 -3
  84. package/build/video/effects/colorMatrix.d.ts.map +1 -0
  85. package/build/video/{webgl/effects → effects}/desaturate.d.ts +1 -1
  86. package/build/video/effects/desaturate.d.ts.map +1 -0
  87. package/build/video/{webgl/effects → effects}/dissolve.d.ts +2 -2
  88. package/build/video/effects/dissolve.d.ts.map +1 -0
  89. package/build/video/{webgl/effects → effects}/dropShadow.d.ts +2 -2
  90. package/build/video/effects/dropShadow.d.ts.map +1 -0
  91. package/build/video/{webgl/effects → effects}/flash.d.ts +2 -2
  92. package/build/video/effects/flash.d.ts.map +1 -0
  93. package/build/video/{webgl/effects → effects}/glow.d.ts +2 -2
  94. package/build/video/effects/glow.d.ts.map +1 -0
  95. package/build/video/effects/glsl_realization.d.ts +18 -0
  96. package/build/video/effects/glsl_realization.d.ts.map +1 -0
  97. package/build/video/{webgl/effects → effects}/hologram.d.ts +2 -2
  98. package/build/video/effects/hologram.d.ts.map +1 -0
  99. package/build/video/{webgl/effects → effects}/invert.d.ts +1 -1
  100. package/build/video/effects/invert.d.ts.map +1 -0
  101. package/build/video/{webgl/effects → effects}/outline.d.ts +2 -2
  102. package/build/video/effects/outline.d.ts.map +1 -0
  103. package/build/video/{webgl/effects → effects}/pixelate.d.ts +2 -2
  104. package/build/video/effects/pixelate.d.ts.map +1 -0
  105. package/build/video/{webgl/effects → effects}/radialGradient.d.ts +3 -4
  106. package/build/video/effects/radialGradient.d.ts.map +1 -0
  107. package/build/video/{webgl/effects → effects}/scanline.d.ts +2 -2
  108. package/build/video/effects/scanline.d.ts.map +1 -0
  109. package/build/video/{webgl/effects → effects}/sepia.d.ts +1 -1
  110. package/build/video/effects/sepia.d.ts.map +1 -0
  111. package/build/video/{webgl → effects}/shadereffect.d.ts +133 -25
  112. package/build/video/effects/shadereffect.d.ts.map +1 -0
  113. package/build/video/{webgl/effects → effects}/shine.d.ts +2 -2
  114. package/build/video/effects/shine.d.ts.map +1 -0
  115. package/build/video/{webgl/effects → effects}/tintPulse.d.ts +2 -2
  116. package/build/video/effects/tintPulse.d.ts.map +1 -0
  117. package/build/video/{webgl/effects → effects}/vignette.d.ts +2 -2
  118. package/build/video/effects/vignette.d.ts.map +1 -0
  119. package/build/video/{webgl/effects → effects}/wave.d.ts +2 -2
  120. package/build/video/effects/wave.d.ts.map +1 -0
  121. package/build/video/effects/wgsl/layout.d.ts +28 -0
  122. package/build/video/effects/wgsl/layout.d.ts.map +1 -0
  123. package/build/video/effects/wgsl/parse.d.ts +9 -0
  124. package/build/video/effects/wgsl/parse.d.ts.map +1 -0
  125. package/build/video/effects/wgsl/scaffold.d.ts +43 -0
  126. package/build/video/effects/wgsl/scaffold.d.ts.map +1 -0
  127. package/build/video/effects/wgsl_realization.d.ts +83 -0
  128. package/build/video/effects/wgsl_realization.d.ts.map +1 -0
  129. package/build/video/gpu/batcher.d.ts +71 -0
  130. package/build/video/gpu/batcher.d.ts.map +1 -0
  131. package/build/video/gpu/instancerecord.d.ts +164 -0
  132. package/build/video/gpu/instancerecord.d.ts.map +1 -0
  133. package/build/video/gpu/meshchunk.d.ts +49 -0
  134. package/build/video/gpu/meshchunk.d.ts.map +1 -0
  135. package/build/video/gpu/meshvertex.d.ts +54 -0
  136. package/build/video/gpu/meshvertex.d.ts.map +1 -0
  137. package/build/video/gpu/primitives.d.ts +60 -0
  138. package/build/video/gpu/primitives.d.ts.map +1 -0
  139. package/build/video/gpu/quadcorners.d.ts +11 -0
  140. package/build/video/gpu/quadcorners.d.ts.map +1 -0
  141. package/build/video/gpu/textureslots.d.ts +122 -0
  142. package/build/video/gpu/textureslots.d.ts.map +1 -0
  143. package/build/video/gpu/texturestore.d.ts +139 -0
  144. package/build/video/gpu/texturestore.d.ts.map +1 -0
  145. package/build/video/gpu/topology.d.ts +43 -0
  146. package/build/video/gpu/topology.d.ts.map +1 -0
  147. package/build/video/gpu/vertexformat.d.ts +72 -0
  148. package/build/video/gpu/vertexformat.d.ts.map +1 -0
  149. package/build/video/gradient.d.ts +14 -5
  150. package/build/video/gradient.d.ts.map +1 -1
  151. package/build/video/renderer.d.ts +153 -8
  152. package/build/video/renderer.d.ts.map +1 -1
  153. package/build/video/rendertarget/canvasrendertarget.d.ts +7 -6
  154. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  155. package/build/video/rendertarget/render_target_pool.d.ts +2 -2
  156. package/build/video/rendertarget/render_target_pool.d.ts.map +1 -1
  157. package/build/video/rendertarget/webglrendertarget.d.ts +38 -2
  158. package/build/video/rendertarget/webglrendertarget.d.ts.map +1 -1
  159. package/build/video/rendertarget/webgpurendertarget.d.ts +83 -0
  160. package/build/video/rendertarget/webgpurendertarget.d.ts.map +1 -0
  161. package/build/video/texture/atlas.d.ts.map +1 -1
  162. package/build/video/texture/cache.d.ts +20 -2
  163. package/build/video/texture/cache.d.ts.map +1 -1
  164. package/build/video/texture/noise_texture2d.d.ts +2 -2
  165. package/build/video/utils/autodetect.d.ts.map +1 -1
  166. package/build/video/video.d.ts +1 -55
  167. package/build/video/video.d.ts.map +1 -1
  168. package/build/video/webgl/batchers/batcher.d.ts +132 -35
  169. package/build/video/webgl/batchers/batcher.d.ts.map +1 -1
  170. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts +14 -0
  171. package/build/video/webgl/batchers/lit_mesh_batcher.d.ts.map +1 -1
  172. package/build/video/webgl/batchers/lit_quad_batcher.d.ts +63 -36
  173. package/build/video/webgl/batchers/lit_quad_batcher.d.ts.map +1 -1
  174. package/build/video/webgl/batchers/material_batcher.d.ts +29 -20
  175. package/build/video/webgl/batchers/material_batcher.d.ts.map +1 -1
  176. package/build/video/webgl/batchers/mesh_batcher.d.ts +308 -14
  177. package/build/video/webgl/batchers/mesh_batcher.d.ts.map +1 -1
  178. package/build/video/webgl/batchers/primitive_batcher.d.ts +2 -2
  179. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -1
  180. package/build/video/webgl/batchers/quad_batcher.d.ts +0 -2
  181. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -1
  182. package/build/video/webgl/buffer/index.d.ts +1 -1
  183. package/build/video/webgl/buffer/instance_buffer.d.ts +54 -0
  184. package/build/video/webgl/buffer/instance_buffer.d.ts.map +1 -0
  185. package/build/video/webgl/buffer/retained_geometry.d.ts +83 -0
  186. package/build/video/webgl/buffer/retained_geometry.d.ts.map +1 -0
  187. package/build/video/webgl/buffer/uniformblock.d.ts +81 -0
  188. package/build/video/webgl/buffer/uniformblock.d.ts.map +1 -0
  189. package/build/video/webgl/buffer/vertexstate.d.ts +101 -0
  190. package/build/video/webgl/buffer/vertexstate.d.ts.map +1 -0
  191. package/build/video/webgl/glshader.d.ts +101 -8
  192. package/build/video/webgl/glshader.d.ts.map +1 -1
  193. package/build/video/webgl/lighting/constants.d.ts +20 -8
  194. package/build/video/webgl/lighting/constants.d.ts.map +1 -1
  195. package/build/video/webgl/lighting/pack.d.ts +1 -1
  196. package/build/video/webgl/lighting/pack3d.d.ts +27 -11
  197. package/build/video/webgl/lighting/pack3d.d.ts.map +1 -1
  198. package/build/video/webgl/lighting/std140.d.ts +110 -0
  199. package/build/video/webgl/lighting/std140.d.ts.map +1 -0
  200. package/build/video/webgl/shaders/multitexture-lit.d.ts +7 -3
  201. package/build/video/webgl/shaders/multitexture-lit.d.ts.map +1 -1
  202. package/build/video/webgl/texture/store.d.ts +52 -0
  203. package/build/video/webgl/texture/store.d.ts.map +1 -0
  204. package/build/video/webgl/utils/maxtextures.d.ts +37 -0
  205. package/build/video/webgl/utils/maxtextures.d.ts.map +1 -0
  206. package/build/video/webgl/utils/samplercache.d.ts +69 -0
  207. package/build/video/webgl/utils/samplercache.d.ts.map +1 -0
  208. package/build/video/webgl/utils/string.d.ts +16 -0
  209. package/build/video/webgl/utils/string.d.ts.map +1 -1
  210. package/build/video/webgl/utils/topology.d.ts +24 -0
  211. package/build/video/webgl/utils/topology.d.ts.map +1 -0
  212. package/build/video/webgl/utils/vertexformat.d.ts +27 -0
  213. package/build/video/webgl/utils/vertexformat.d.ts.map +1 -0
  214. package/build/video/webgl/webgl_renderer.d.ts +148 -30
  215. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  216. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts +40 -0
  217. package/build/video/webgpu/batchers/lit_mesh_batcher.d.ts.map +1 -0
  218. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts +82 -0
  219. package/build/video/webgpu/batchers/lit_quad_batcher.d.ts.map +1 -0
  220. package/build/video/webgpu/batchers/mesh_batcher.d.ts +301 -0
  221. package/build/video/webgpu/batchers/mesh_batcher.d.ts.map +1 -0
  222. package/build/video/webgpu/batchers/primitive_batcher.d.ts +39 -0
  223. package/build/video/webgpu/batchers/primitive_batcher.d.ts.map +1 -0
  224. package/build/video/webgpu/batchers/quad_batcher.d.ts +143 -0
  225. package/build/video/webgpu/batchers/quad_batcher.d.ts.map +1 -0
  226. package/build/video/webgpu/batchers/webgpu_batcher.d.ts +70 -0
  227. package/build/video/webgpu/batchers/webgpu_batcher.d.ts.map +1 -0
  228. package/build/video/webgpu/buffer/arena.d.ts +64 -0
  229. package/build/video/webgpu/buffer/arena.d.ts.map +1 -0
  230. package/build/video/webgpu/buffer/instance_buffer.d.ts +65 -0
  231. package/build/video/webgpu/buffer/instance_buffer.d.ts.map +1 -0
  232. package/build/video/webgpu/buffer/retained_geometry.d.ts +55 -0
  233. package/build/video/webgpu/buffer/retained_geometry.d.ts.map +1 -0
  234. package/build/video/webgpu/buffer/uniformring.d.ts +68 -0
  235. package/build/video/webgpu/buffer/uniformring.d.ts.map +1 -0
  236. package/build/video/webgpu/effect_binding.d.ts +17 -0
  237. package/build/video/webgpu/effect_binding.d.ts.map +1 -0
  238. package/build/video/webgpu/pipeline/bindgroups.d.ts +36 -0
  239. package/build/video/webgpu/pipeline/bindgroups.d.ts.map +1 -0
  240. package/build/video/webgpu/pipeline/cache.d.ts +173 -0
  241. package/build/video/webgpu/pipeline/cache.d.ts.map +1 -0
  242. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts +90 -0
  243. package/build/video/webgpu/renderers/tmxlayer/orthogonal.d.ts.map +1 -0
  244. package/build/video/webgpu/shaders/mesh-instanced.d.ts +60 -0
  245. package/build/video/webgpu/shaders/mesh-instanced.d.ts.map +1 -0
  246. package/build/video/webgpu/texture/compressed.d.ts +33 -0
  247. package/build/video/webgpu/texture/compressed.d.ts.map +1 -0
  248. package/build/video/webgpu/texture/frametexture.d.ts +65 -0
  249. package/build/video/webgpu/texture/frametexture.d.ts.map +1 -0
  250. package/build/video/webgpu/texture/store.d.ts +149 -0
  251. package/build/video/webgpu/texture/store.d.ts.map +1 -0
  252. package/build/video/webgpu/webgpu_renderer.d.ts +536 -0
  253. package/build/video/webgpu/webgpu_renderer.d.ts.map +1 -0
  254. package/package.json +2 -2
  255. package/build/video/webgl/effects/blur.d.ts.map +0 -1
  256. package/build/video/webgl/effects/chromaticAberration.d.ts.map +0 -1
  257. package/build/video/webgl/effects/colorMatrix.d.ts.map +0 -1
  258. package/build/video/webgl/effects/desaturate.d.ts.map +0 -1
  259. package/build/video/webgl/effects/dissolve.d.ts.map +0 -1
  260. package/build/video/webgl/effects/dropShadow.d.ts.map +0 -1
  261. package/build/video/webgl/effects/flash.d.ts.map +0 -1
  262. package/build/video/webgl/effects/glow.d.ts.map +0 -1
  263. package/build/video/webgl/effects/hologram.d.ts.map +0 -1
  264. package/build/video/webgl/effects/invert.d.ts.map +0 -1
  265. package/build/video/webgl/effects/outline.d.ts.map +0 -1
  266. package/build/video/webgl/effects/pixelate.d.ts.map +0 -1
  267. package/build/video/webgl/effects/radialGradient.d.ts.map +0 -1
  268. package/build/video/webgl/effects/scanline.d.ts.map +0 -1
  269. package/build/video/webgl/effects/sepia.d.ts.map +0 -1
  270. package/build/video/webgl/effects/shine.d.ts.map +0 -1
  271. package/build/video/webgl/effects/tintPulse.d.ts.map +0 -1
  272. package/build/video/webgl/effects/vignette.d.ts.map +0 -1
  273. package/build/video/webgl/effects/wave.d.ts.map +0 -1
  274. package/build/video/webgl/shadereffect.d.ts.map +0 -1
@@ -4,7 +4,21 @@
4
4
  * or from raw geometry data (vertices, uvs, indices).
5
5
  * Includes a built-in perspective projection and supports 3D transforms
6
6
  * through the standard Renderable API (`rotate`, `scale`, `translate`).
7
- * Works on both WebGL (hardware depth testing) and Canvas (painter's algorithm) renderers.
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.
8
22
  *
9
23
  * **Pivot — transforms are applied about the mesh's local origin `(0, 0, 0)`,
10
24
  * NOT a normalized anchor point.** Unlike a {@link Sprite} (whose
@@ -26,12 +40,12 @@ export default class Mesh extends Renderable {
26
40
  * @param {number} x - the x screen position of the mesh object
27
41
  * @param {number} y - the y screen position of the mesh object
28
42
  * @param {object} settings - Configuration parameters for the Mesh object
29
- * @param {string} [settings.model] - name of a preloaded OBJ model (via loader.preload with type "obj")
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`.
30
44
  * @param {Float32Array|number[]} [settings.vertices] - vertex positions as x,y,z triplets (alternative to settings.model)
31
45
  * @param {Float32Array|number[]} [settings.uvs] - texture coordinates as u,v pairs (alternative to settings.model)
32
46
  * @param {Uint16Array|number[]} [settings.indices] - triangle vertex indices (alternative to settings.model)
33
- * @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.
34
- * @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.
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.
35
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.
36
50
  * @param {number} [settings.height] - display height in pixels (normalized models only; ignored when `normalize: false`)
37
51
  * @param {boolean} [settings.cullBackFaces=true] - enable backface culling
@@ -39,9 +53,9 @@ export default class Mesh extends Renderable {
39
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}.
40
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}.
41
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.
42
- * @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. WebGL only (ignored by the Canvas renderer).
43
- * @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"`. WebGL mesh path only.
44
- * @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`). WebGL mesh path only.
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).
45
59
  * @example
46
60
  * // create from OBJ + MTL (texture auto-resolved from material)
47
61
  * let mesh = new me.Mesh(0, 0, {
@@ -122,7 +136,18 @@ export default class Mesh extends Renderable {
122
136
  vertexCount: number;
123
137
  _indicesOriginal: number[];
124
138
  /**
125
- * the projected vertex positions, updated each draw call
139
+ * the projected vertex positions.
140
+ *
141
+ * **Not refreshed on the retained `Camera3d` path.** There, geometry is
142
+ * uploaded once in model space and placed by the GPU, so nothing
143
+ * projects vertices per frame and this array holds whatever it last
144
+ * did. It is still maintained by the Canvas renderer and by the 2D
145
+ * camera path. Engine consumers that need current world positions —
146
+ * {@link Mesh#getBounds3d}, {@link Mesh#toPolygon} — derive them on
147
+ * demand instead of reading this; user code should do the same.
148
+ *
149
+ * To edit geometry, write to {@link Mesh#originalVertices} and set
150
+ * {@link Mesh#needsUpdate}.
126
151
  * @type {Float32Array}
127
152
  */
128
153
  vertices: Float32Array;
@@ -139,7 +164,7 @@ export default class Mesh extends Renderable {
139
164
  * from the scene's lights, using {@link Mesh#originalNormals}); when
140
165
  * `false` (the default) it uses the lean unlit path and pays no lighting
141
166
  * cost. The glTF loader sets this on scene meshes when the scene has
142
- * lights. Only meaningful under a `Camera3d` + WebGL.
167
+ * lights. Only meaningful under a `Camera3d` on a GPU backend.
143
168
  * @type {boolean}
144
169
  * @default false
145
170
  */
@@ -150,7 +175,7 @@ export default class Mesh extends Renderable {
150
175
  * decals) that needs no blending or back-to-front sorting. `0` (the
151
176
  * default) disables the cutout and the mesh renders fully opaque. Set by
152
177
  * the glTF loader from a material's `alphaMode: "MASK"` / `alphaCutoff`.
153
- * WebGL mesh path only (the Canvas renderer ignores it).
178
+ * GPU mesh path only (the Canvas renderer ignores it).
154
179
  * @type {number}
155
180
  * @default 0
156
181
  */
@@ -162,10 +187,107 @@ export default class Mesh extends Renderable {
162
187
  * screens, glowing eyes). `undefined` (the default) means no emission and
163
188
  * keeps the mesh on the lean path. Set by the glTF loader from a material's
164
189
  * `emissiveFactor` (× `KHR_materials_emissive_strength`) and by the OBJ
165
- * loader from an MTL's `Ke`. WebGL mesh path only.
190
+ * loader from an MTL's `Ke`. GPU mesh path only (WebGL and WebGPU; the Canvas renderer ignores it).
166
191
  * @type {Float32Array|undefined}
167
192
  */
168
193
  emissive: Float32Array | undefined;
194
+ /**
195
+ * Specular (highlight) color as an `[r, g, b]` `Float32Array`, or
196
+ * `undefined` for a purely diffuse surface — which is the default, and
197
+ * what every mesh rendered as before this existed.
198
+ *
199
+ * Drives a Blinn-Phong highlight on the **lit** mesh path, so it needs
200
+ * `lit: true`, a `Light3d`, and normals. Set by the OBJ loader from an
201
+ * MTL's `Ks`; paired with {@link Mesh#shininess}, which decides how
202
+ * tight the highlight is. A `Ks` with no `Ns` produces nothing — the
203
+ * exponent is what turns the term on.
204
+ * @type {Float32Array|undefined}
205
+ * @see Mesh#shininess
206
+ */
207
+ specular: Float32Array | undefined;
208
+ /**
209
+ * Specular exponent — how tight the highlight is. The MTL `Ns` range
210
+ * is 0..1000; higher is a smaller, harder highlight (polished metal),
211
+ * lower is a broad sheen (satin). `0` (the default) disables the
212
+ * specular term outright however bright {@link Mesh#specular} is, which
213
+ * is what keeps a material declaring neither on the diffuse-only path.
214
+ * @type {number}
215
+ * @default 0
216
+ */
217
+ shininess: number;
218
+ /**
219
+ * Per-texel opacity map (MTL `map_d`), or `undefined`. Its red channel
220
+ * multiplies the fragment's alpha before {@link Mesh#alphaCutoff} is
221
+ * applied, so a single material can cut out per pixel — the shape of
222
+ * a leaf, the holes in a chain-link fence — where `alphaCutoff` alone
223
+ * can only threshold uniformly across the whole material.
224
+ *
225
+ * Only meaningful alongside a non-zero `alphaCutoff`: without one there
226
+ * is nothing to discard against. GPU mesh path only.
227
+ * @type {TextureAtlas|undefined}
228
+ */
229
+ alphaMap: TextureAtlas | undefined;
230
+ /**
231
+ * Cast a soft dark ellipse — a "blob" shadow — on the ground beneath
232
+ * this mesh (#1515).
233
+ *
234
+ * Not a simulated shadow, deliberately: what a 2.5D scene needs from
235
+ * one is *contact* — where the object is standing, and how far off the
236
+ * ground it is mid-jump. It costs one extra draw per shadowed object,
237
+ * shares one geometry and one texture with every other shadow in the
238
+ * scene, and is inert while `false`.
239
+ *
240
+ * Requires a GPU backend and a {@link Camera3d}: the shadow rides the
241
+ * retained world-space path, so the Canvas renderer and the 2D-camera
242
+ * path draw none.
243
+ *
244
+ * Left **unset** (`undefined`, the default) this follows the
245
+ * application's `castGroundShadow` setting — with one safeguard: a
246
+ * scene-wide opt-in skips meshes with no vertical extent, because a
247
+ * flat plane lying on the floor is the floor, and shadowing it with
248
+ * itself smears the whole ground. Setting the property here is an
249
+ * explicit instruction and always obeyed, safeguard included.
250
+ * @type {boolean|undefined}
251
+ * @default undefined
252
+ * @see Mesh#shadowGroundY
253
+ */
254
+ castGroundShadow: boolean | undefined;
255
+ /**
256
+ * World Y of the floor the shadow lands on, or `undefined` (the
257
+ * default) to mean "this object is standing on the ground" — the
258
+ * shadow sits at the object's own base, at full strength, and does not
259
+ * shrink or fade.
260
+ *
261
+ * Set it, and the shadow shrinks and fades as the object rises above
262
+ * it: the readable part of a jump. The game already knows this value
263
+ * from collision, which is why it is not derived — deriving it from the
264
+ * object's live bounds would make the "ground" jump with the jumper,
265
+ * so the height could never be anything but zero.
266
+ *
267
+ * Render space is Y-DOWN, so the floor is a **greater** Y than the
268
+ * object above it.
269
+ * @type {number|undefined}
270
+ * @default undefined
271
+ */
272
+ shadowGroundY: number | undefined;
273
+ /**
274
+ * Opacity of the shadow directly beneath the object, before any
275
+ * height fade.
276
+ * @type {number}
277
+ * @default 0.45
278
+ */
279
+ shadowOpacity: number;
280
+ /**
281
+ * Cached horizontal half-extent used to size the shadow, resolved on
282
+ * first shadowed draw. Cached because the alternative is a
283
+ * `getBounds3d()` per frame per shadow, which re-bounds every source
284
+ * vertex through the model matrix.
285
+ * @ignore
286
+ */
287
+ _shadowHalfX: number;
288
+ _shadowHalfZ: number;
289
+ _shadowGeomVersion: number;
290
+ _shadowHasHeight: boolean;
169
291
  /**
170
292
  * whether to cull back-facing triangles
171
293
  * @type {boolean}
@@ -211,7 +333,8 @@ export default class Mesh extends Renderable {
211
333
  * runtime color multiplication, or rebuild the Mesh with
212
334
  * new material settings.
213
335
  * @type {Array<{materialName: string|null, start: number,
214
- * count: number, tint: Color, opacity: number}>}
336
+ * count: number, tint: Color, opacity: number,
337
+ * texture: TextureAtlas|undefined}>}
215
338
  */
216
339
  groups: Array<{
217
340
  materialName: string | null;
@@ -219,6 +342,7 @@ export default class Mesh extends Renderable {
219
342
  count: number;
220
343
  tint: Color;
221
344
  opacity: number;
345
+ texture: TextureAtlas | undefined;
222
346
  }>;
223
347
  /**
224
348
  * Per-vertex color buffer (one packed Uint32 per vertex)
@@ -241,6 +365,28 @@ export default class Mesh extends Renderable {
241
365
  */
242
366
  vertexColors: Uint32Array;
243
367
  texture: any;
368
+ /**
369
+ * Index ranges that each need their own diffuse texture bound, for a
370
+ * multi-material model whose materials carry different `map_Kd` maps
371
+ * (#1573) — `undefined` whenever one binding covers the whole mesh,
372
+ * which is every single-material model and every `Kd`-only one.
373
+ *
374
+ * The GPU backends draw one indexed range per entry instead of one
375
+ * range for the whole mesh; adjacent materials sharing a texture are
376
+ * already merged here, so the list is the minimum number of draws the
377
+ * model needs. An explicit `settings.texture` suppresses the split
378
+ * entirely — asking for one texture is asking for one texture.
379
+ *
380
+ * The Canvas renderer ignores this: a multi-material mesh takes its
381
+ * per-triangle solid-fill path there and never samples a texture at
382
+ * all.
383
+ * @type {Array<{texture: TextureAtlas, start: number, count: number}>|undefined}
384
+ */
385
+ textureGroups: Array<{
386
+ texture: TextureAtlas;
387
+ start: number;
388
+ count: number;
389
+ }> | undefined;
244
390
  /**
245
391
  * Per-mesh texture wrap mode (`"repeat"` / `"repeat-x"` / `"repeat-y"`
246
392
  * / `"no-repeat"`), or `undefined` to sample with the texture's own
@@ -274,6 +420,8 @@ export default class Mesh extends Renderable {
274
420
  _hullPoints: Vector2d[];
275
421
  /** @ignore */
276
422
  _hullPolygon: Polygon | null;
423
+ /** @ignore */
424
+ _geometryVersion: number;
277
425
  /**
278
426
  * Project all vertices through projectionMatrix × currentTransform
279
427
  * and store the results in `this.vertices`.
@@ -283,6 +431,40 @@ export default class Mesh extends Renderable {
283
431
  * @ignore
284
432
  */
285
433
  _projectVertices(offsetX?: number, offsetY?: number, zScale?: number): void;
434
+ /**
435
+ * Signal that this mesh's geometry itself has changed — its vertices, UVs,
436
+ * indices, normals or per-vertex colours were edited in place.
437
+ *
438
+ * Placement is *not* geometry: moving, rotating, scaling or re-tinting a
439
+ * mesh needs no signal, because those are applied when drawing rather than
440
+ * stored in the geometry. Only reach for this after writing into
441
+ * {@link Mesh#originalVertices} and friends directly.
442
+ * @type {boolean}
443
+ * @example
444
+ * // deform the mesh, then tell it the shape moved
445
+ * mesh.originalVertices[1] += 10;
446
+ * mesh.needsUpdate = true;
447
+ */
448
+ set needsUpdate(value: any);
449
+ /**
450
+ * Compose this mesh's placement into a single matrix: where its model-space
451
+ * geometry sits in the world.
452
+ *
453
+ * This is the matrix form of {@link Mesh#_projectVerticesWorld} — the same
454
+ * transform, scale and axis bridge, expressed once instead of applied to
455
+ * every vertex:
456
+ *
457
+ * `translate(pos, depth) · scale(s, -s, ±s) · currentTransform`
458
+ *
459
+ * The Y negation bridges Y-up geometry to the engine's Y-down world; Z is
460
+ * negated too for right-handed (glTF) sources, which makes the bridge a
461
+ * rotation rather than a reflection and so preserves triangle winding.
462
+ * @returns {Matrix3d} the mesh's model matrix (reused instance)
463
+ * @ignore
464
+ */
465
+ _composeModelMatrix(): Matrix3d;
466
+ /** @ignore */
467
+ _modelMatrix: Matrix3d | undefined;
286
468
  /**
287
469
  * Project vertices into **world space** for the Camera3d render path.
288
470
  * Bypasses {@link Mesh#projectionMatrix} (the self-contained
@@ -332,23 +514,22 @@ export default class Mesh extends Renderable {
332
514
  * (e.g. a level transition into a 2D minigame) gets its original
333
515
  * winding back and stays correctly oriented under
334
516
  * `cullBackFaces: true`.
517
+ * @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.
335
518
  * @ignore
336
519
  */
337
- _setupWorldSpace(): void;
520
+ _setupWorldSpace(needsReversedIndices?: boolean): void;
338
521
  _indicesReversed: any;
339
522
  _worldSpace: boolean | undefined;
340
523
  _useWorldSpace: boolean | undefined;
341
524
  /**
342
- * The mesh's world-space 3D axis-aligned bounding box, as projected by the
343
- * most recent draw. This is the 3D analog of {@link Renderable#getBounds}
344
- * (which returns a flat 2D box from `width`/`height` and so cannot describe
345
- * a mesh's real extent).
525
+ * The mesh's world-space 3D axis-aligned bounding box. This is the 3D analog
526
+ * of {@link Renderable#getBounds} (which returns a flat 2D box from
527
+ * `width`/`height` and so cannot describe a mesh's real extent).
346
528
  *
347
- * Under a `Camera3d` the mesh projects its vertices into world space every
348
- * frame (see {@link Mesh#_projectVerticesWorld}), so the returned box tracks
349
- * the live transform / animation. Under the 2D path the projected vertices
350
- * are screen-space, so the box is only meaningful after a Camera3d draw —
351
- * use {@link Renderable#getBounds} for the 2D case.
529
+ * Computed on demand by bounding the model-space geometry through the
530
+ * mesh's current placement, so it reflects the live transform and is valid
531
+ * before the mesh has ever been drawn. Meaningful for the `Camera3d` path;
532
+ * for the 2D path use {@link Renderable#getBounds}.
352
533
  *
353
534
  * The same {@link AABB3d} instance is returned each call (recomputed in
354
535
  * place), so copy it (`.clone()`) if you need to keep it.
@@ -357,6 +538,37 @@ export default class Mesh extends Renderable {
357
538
  getBounds3d(): AABB3d;
358
539
  /** @ignore */
359
540
  _bounds3d: AABB3d | undefined;
541
+ /**
542
+ * Whether this mesh casts a ground shadow on this draw (#1515).
543
+ *
544
+ * Precedence, most specific first: the mesh's own `castGroundShadow`, then
545
+ * the application's `castGroundShadow` setting. A per-mesh value is an
546
+ * explicit instruction and is obeyed as given; the application default is a
547
+ * blanket one, so it skips meshes with no vertical extent — which is what a
548
+ * ground plane is, and a flat plane lying on the floor has nothing to cast.
549
+ * Read off the renderer rather than the global application instance, the
550
+ * same way the `textureFilter` default is.
551
+ * @param {WebGLRenderer|WebGPURenderer} renderer - the active renderer
552
+ * @returns {boolean} true if a shadow should be drawn
553
+ * @ignore
554
+ */
555
+ _castsGroundShadow(renderer: WebGLRenderer | WebGPURenderer): boolean;
556
+ /**
557
+ * Measure the model-space footprint the blob is built from, and whether the
558
+ * geometry has any height at all — once per geometry version.
559
+ * @ignore
560
+ */
561
+ _measureShadowFootprint(): void;
562
+ /**
563
+ * Draw this mesh's ground shadow: the shared blob quad, flattened onto the
564
+ * ground plane beneath the object (#1515).
565
+ *
566
+ * The quad is shared by every shadow in the scene and its geometry is
567
+ * uploaded once, so this is one draw and no allocation.
568
+ * @param {WebGLRenderer} renderer - the active renderer
569
+ * @ignore
570
+ */
571
+ _drawGroundShadow(renderer: WebGLRenderer): void;
360
572
  /**
361
573
  * Render the mesh at its current state (transforms, projection, tint) to an offscreen canvas.
362
574
  * The returned canvas can be used with `renderer.drawImage()`, as a `Sprite` image source,
@@ -380,12 +592,19 @@ export default class Mesh extends Renderable {
380
592
  * const sprite = new me.Sprite(100, 100, { image: bitmap });
381
593
  */
382
594
  toImageBitmap(): Promise<ImageBitmap>;
595
+ /**
596
+ * Release this mesh's GPU-resident geometry, if a renderer is holding any,
597
+ * then destroy the renderable.
598
+ * @ignore
599
+ */
600
+ destroy(): void;
383
601
  }
384
602
  import Renderable from "./renderable.js";
603
+ import { TextureAtlas } from "./../video/texture/atlas.js";
385
604
  import { Color } from "../math/color.ts";
386
605
  import { Matrix3d } from "../math/matrix3d.ts";
387
606
  import { Vector2d } from "../math/vector2d.ts";
388
607
  import { Polygon } from "../geometries/polygon.ts";
389
608
  import { AABB3d } from "../physics/broadphase/aabb3d.ts";
390
- import { TextureAtlas } from "./../video/texture/atlas.js";
609
+ import type WebGLRenderer from "./../video/webgl/webgl_renderer.js";
391
610
  //# sourceMappingURL=mesh.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mesh.d.ts","sourceRoot":"","sources":["../../src/renderable/mesh.js"],"names":[],"mappings":"AAmHA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAgEG;IACH,eAhEW,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;KACjD,EAwbF;IAjYC;;;OAGG;IACH,kBAFU,YAAY,CAEkB;IAExC;;;OAGG;IACH,KAFU,YAAY,CAEA;IAQtB;;;OAGG;IACH,aAFU,MAAM,CAEsB;IAmCvC,2BAAoC;IAGpC;;;OAGG;IACH,UAFU,YAAY,CAEgC;IAEtD;;;;;OAKG;IACH,iBAFU,YAAY,GAAC,SAAS,CAOnB;IAUb;;;;;;;;;OASG;IACH,KAHU,OAAO,CAGe;IAEhC;;;;;;;;;OASG;IACH,aAHU,MAAM,CAIoD;IAEpE;;;;;;;;;OASG;I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AqChB;IAED;;;;;;;;;;;;OAYG;IACH,6BA8BC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wCAHW,OAAO,QA6BjB;IAHC,sBAA2B;IAE5B,iCAAuB;IAoBvB,oCAAuD;IAqBxD;;;;;;;;;;;;;OAaG;IACH,eAFa,MAAM,CAgBlB;IAZC,cAAc;IACd,8BAA6B;IAkC/B;;;;;;;;;;;;;OAaG;IACH,6BAJW,aAAa,GAAC,cAAc,GAC1B,OAAO,CAiBnB;IAED;;;;OAIG;IACH,gCA0BC;IAED;;;;;;;;OAQG;IACH,4BAHW,aAAa,QAmJvB;IA0ID;;;;;;;;;;;;OAYG;IACH,YATa,iBAAiB,CAoH7B;IAED;;;;;;;OAOG;IACH,iBALa,OAAO,CAAC,WAAW,CAAC,CAOhC;IAED;;;;OAIG;IACH,gBAMC;CACD;uBA/xDsB,iBAAiB;6BAHX,6BAA6B;sBAVpC,kBAAkB;yBACf,qBAAqB;yBACrB,qBAAqB;wBALtB,0BAA0B;uBAW3B,iCAAiC;+BAU1B,oCAAoC"}
@@ -238,10 +238,12 @@ export default class Renderable extends Rect {
238
238
  */
239
239
  mask: Rect | RoundRect | Polygon | Line | Ellipse;
240
240
  /**
241
- * the list of post-processing shader effects applied to this renderable (WebGL only).
242
- * Effects are applied in order. Use {@link addPostEffect}, {@link getPostEffect},
243
- * and {@link removePostEffect} to manage effects, or assign directly.
244
- * In Canvas mode, this property is ignored.
241
+ * the list of post-processing shader effects applied to this renderable
242
+ * (GPU backends — WebGL and WebGPU). Effects are applied in order. Use
243
+ * {@link addPostEffect}, {@link getPostEffect}, and
244
+ * {@link removePostEffect} to manage effects, or assign directly.
245
+ * On the Canvas renderer effects stay inert (the scene keeps rendering
246
+ * un-effected).
245
247
  * @type {Array<GLShader|ShaderEffect>}
246
248
  * @default []
247
249
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"renderable.d.ts","sourceRoot":"","sources":["../../src/renderable/renderable.js"],"names":[],"mappings":"AAYA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ED;;;;OAIG;IACH,eAHW,UAAU,GAAC,QAAQ,GAAC,QAAQ,GAC1B,UAAU,CAgBtB;IAED;;;;;;;OAOG;IACH,cAJW,MAAM,MACN,QAAQ,GACN,UAAU,CAStB;IAED;;;;;;;;;;OAUG;IACH,SALW,MAAM,MACN,MAAM,MACN,MAAM,GACJ,UAAU,CAOtB;IAED;;;;OAIG;IACH,UAHW,QAAQ,GACN,UAAU,CAKtB;IAED;;;;;;OAMG;IACH,aALW,MAAM,MACN,MAAM,MACN,MAAM,GACJ,UAAU,CAOtB;IAED;;;;OAIG;IAEH,WAJW,MAAM,GACJ,OAAO,CAKnB;IAED;;;;OAIG;IACH,wBAHW,OAAO,GACL,MAAM,CAwClB;IAED;;;;;;;;OAQG;IACH,uBAFa,QAAQ,CAYpB;IAED;;;;;;OAMG;IACH,kBAFW,cAAc,GAAC,aAAa,QA+DtC;IAED;;;;;;;;;;;;OAYG;IAEH,eAJW,cAAc,GAAC,aAAa,aAC5B,QAAQ,QAKlB;IAED;;;;;OAKG;IACH,mBAFW,cAAc,GAAC,aAAa,QAqBtC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,0CAZa,OAAO,CAoBnB;IAkCD;;;OAGG;IACH,8BA6DC;IAED;;;;;;OAMG;IACH,yBAFc,GAAC,EAAA,QAId;IAED;;;;;;;OAOG;IACH,0BAFc,GAAC,EAAA,QAId;IAED;;;;;;OAMG;IACH,4BAFc,GAAC,EAAA,QAId;CACD;qBApnCoB,8BAA8B;gCADnB,kCAAkC;yBAKzC,qBAAqB;2BAWpB,gBAAgB;wBADnB,oBAAoB;+BAKf,8BAA8B;6BADhC,0BAA0B;0BAF7B,yBAAyB;6BACtB,4BAA4B;6BAG1B,iCAAiC;gCAC9B,sCAAsC;+BACvC,oCAAoC"}
1
+ {"version":3,"file":"renderable.d.ts","sourceRoot":"","sources":["../../src/renderable/renderable.js"],"names":[],"mappings":"AAYA;;;;;;;;;;;;;IAaI;AAEJ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UAAU,GAAC,QAAQ,GAAC,QAAQ,GAC1B,UAAU,CAgBtB;IAED;;;;;;;OAOG;IACH,cAJW,MAAM,MACN,QAAQ,GACN,UAAU,CAStB;IAED;;;;;;;;;;OAUG;IACH,SALW,MAAM,MACN,MAAM,MACN,MAAM,GACJ,UAAU,CAOtB;IAED;;;;OAIG;IACH,UAHW,QAAQ,GACN,UAAU,CAKtB;IAED;;;;;;OAMG;IACH,aALW,MAAM,MACN,MAAM,MACN,MAAM,GACJ,UAAU,CAOtB;IAED;;;;OAIG;IAEH,WAJW,MAAM,GACJ,OAAO,CAKnB;IAED;;;;OAIG;IACH,wBAHW,OAAO,GACL,MAAM,CAwClB;IAED;;;;;;;;OAQG;IACH,uBAFa,QAAQ,CAYpB;IAED;;;;;;OAMG;IACH,kBAFW,cAAc,GAAC,aAAa,QA2EtC;IAED;;;;;;;;;;;;OAYG;IAEH,eAJW,cAAc,GAAC,aAAa,aAC5B,QAAQ,QAKlB;IAED;;;;;OAKG;IACH,mBAFW,cAAc,GAAC,aAAa,QAqBtC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmCG;IACH,0CAZa,OAAO,CAoBnB;IAkCD;;;OAGG;IACH,8BA6DC;IAED;;;;;;OAMG;IACH,yBAFc,GAAC,EAAA,QAId;IAED;;;;;;;OAOG;IACH,0BAFc,GAAC,EAAA,QAId;IAED;;;;;;OAMG;IACH,4BAFc,GAAC,EAAA,QAId;CACD;qBAtoCoB,8BAA8B;gCADnB,kCAAkC;yBAKzC,qBAAqB;2BAWpB,gBAAgB;wBADnB,oBAAoB;+BAKf,8BAA8B;6BADhC,0BAA0B;0BAF7B,yBAAyB;6BACtB,4BAA4B;6BAG1B,iCAAiC;gCAC9B,sCAAsC;+BACvC,oCAAoC"}
@@ -319,12 +319,6 @@ export default class Sprite3d extends Mesh {
319
319
  * @ignore
320
320
  */
321
321
  _applyFrame(region: object): void;
322
- /**
323
- * Release resources (returns the engine's pooled `current.offset` to the
324
- * pool), then defer to the standard mesh/renderable teardown.
325
- * @ignore
326
- */
327
- destroy(): void;
328
322
  /**
329
323
  * Capture the rendering camera so {@link Sprite3d#_projectVerticesWorld} can
330
324
  * orient the billboard toward it. Read from the per-draw `viewport` (passed
@@ -342,6 +336,23 @@ export default class Sprite3d extends Mesh {
342
336
  * @ignore
343
337
  */
344
338
  _projectVerticesWorld(offsetX: any, offsetY: any, offsetZ: any): void;
339
+ /**
340
+ * Resolve the camera-facing basis this billboard should use, leaving it in
341
+ * the shared `_right` / `_up` scratch vectors.
342
+ *
343
+ * Shared by the CPU projection and the model-matrix composition so the two
344
+ * can never disagree about which way the card faces.
345
+ * @returns {boolean} `false` when this sprite is not billboarding
346
+ * @ignore
347
+ */
348
+ _billboardBasis(): boolean;
349
+ /**
350
+ * Emit the 4 corners as center ± right·localX ± up·localY (the local
351
+ * offsets are the baked ±hw / ±hh quad coordinates, already shifted by the
352
+ * anchor offset). Only used on renderers without retained geometry.
353
+ * @ignore
354
+ */
355
+ _projectBillboardCorners(offsetX: any, offsetY: any, offsetZ: any): void;
345
356
  }
346
357
  import Mesh from "./mesh.js";
347
358
  import FrameAnimation from "./frameAnimation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"sprite3d.d.ts","sourceRoot":"","sources":["../../src/renderable/sprite3d.js"],"names":[],"mappings":"AAmEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH;IACC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAnBW,MAAM,KACN,MAAM,YAEd;QAAqD,KAAK;QAChC,KAAK;QACL,MAAM;QACN,UAAU;QACV,WAAW;QACX,MAAM;QACJ,KAAK;QACP,CAAC;QACO,SAAS;QACY,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QAChB,KAAK;QACL,KAA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;IAED;;OAEG;IACH,cAFa,OAAO,CAInB;IAED;;;;;OAKG;IACH,YAJW,MAAM,YACN,MAAM,cAAU,MAAM,GACpB,QAAQ,CAQpB;IAED;;;OAGG;IACH,SAFa,QAAQ,CAKpB;IAED;;;OAGG;IACH,QAFa,QAAQ,CAMpB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,QAAQ,CAKpB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,QAAQ,CAKpB;IAED;;;OAGG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;OAEG;IACH,qBAFa,MAAM,EAAE,CAIpB;IAED;;OAEG;IACH,4BAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,mCAJW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;;;;;;;;OAWG;IACH,oBAHW,MAAM,QA2GhB;IAgBD;;;;OAIG;IACH,gBAIC;IAED;;;;;;;;;OASG;IACH,eAJW,cAAc,GAAC,aAAa,aAC5B,QAAQ,QAMlB;IAED;;;;OAIG;IACH,sEA4DC;CACD;iBAx2BgB,WAAW;2BADD,qBAAqB;qBAL3B,uBAAuB;sBAGtB,+BAA+B"}
1
+ {"version":3,"file":"sprite3d.d.ts","sourceRoot":"","sources":["../../src/renderable/sprite3d.js"],"names":[],"mappings":"AAoEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4EG;AACH;IACC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,eAnBW,MAAM,KACN,MAAM,YAEd;QAAqD,KAAK;QAChC,KAAK;QACL,MAAM;QACN,UAAU;QACV,WAAW;QACX,MAAM;QACJ,KAAK;QACP,CAAC;QACO,SAAS;QACY,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QAChB,KAAK;QACL,KAAK;QACL,GAAG;QACW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,cAFa,OAAO,CAInB;IAED;;;;;OAKG;IACH,YAJW,MAAM,YACN,MAAM,cAAU,MAAM,GACpB,QAAQ,CAQpB;IAED;;;OAGG;IACH,SAFa,QAAQ,CAKpB;IAED;;;OAGG;IACH,QAFa,QAAQ,CAMpB;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,QAAQ,CAKpB;IAED;;;;OAIG;IACH,kBAHW,MAAM,GACJ,QAAQ,CAKpB;IAED;;;OAGG;IACH,yBAHW,MAAM,GACJ,OAAO,CAInB;IAED;;OAEG;IACH,qBAFa,MAAM,EAAE,CAIpB;IAED;;OAEG;IACH,4BAFa,MAAM,CAIlB;IAED;;;;;OAKG;IACH,mCAJW,MAAM,GACJ,MAAM,CAKlB;IAED;;;;;;;;;;;OAWG;IACH,oBAHW,MAAM,QA+GhB;IA2BD;;;;;;;;;OASG;IACH,eAJW,cAAc,GAAC,aAAa,aAC5B,QAAQ,QAMlB;IAED;;;;OAIG;IACH,sEAMC;IAED;;;;;;;;OAQG;IACH,mBAHa,OAAO,CA4CnB;IAwCD;;;;;OAKG;IACH,yEAiBC;CACD;iBAt7BgB,WAAW;2BADD,qBAAqB;qBAN3B,uBAAuB;sBAItB,+BAA+B"}
@@ -1 +1 @@
1
- {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/text.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAyCG;IACH,eAzCW,MAAM,KACN,MAAM,YAEd;QAAyB,IAAI,EAArB,MAAM;QACkB,IAAI,EAA5B,MAAM,GAAC,MAAM;QACW,SAAS;QACT,WAAW;QACjB,SAAS;QACT,SAAS;QACT,YAAY;QACZ,UAAU;QACmB,WAAW,GAA1D,MAAM,GAAC,QAAQ,GAAC;YAAC,CAAC,EAAC,MAAM,CAAC;YAAA,CAAC,EAAC,MAAM,CAAA;SAAC;QACjB,aAAa;QACF,IAAI;KACzC,EAmGF;IApEA;;;;OAIG;IACH,WAHU,KAAK,CAGwB;IAEvC;;;;OAIG;IACH,aAHU,KAAK,CAG0B;IAEzC;;;;OAIG;IACH,WAHU,MAAM,CAGE;IAElB;;;;;OAKG;IACH,WAHU,MAAM,CAGO;IAEvB;;;;;OAKG;IACH,cAHU,MAAM,CAGS;IAEzB;;;;;OAKG;IACH,YAHU,MAAM,CAGK;IAErB;;;;;OAKG;IACH,eAHU,MAAM,CAGO;IAEvB;;;;OAIG;IACH,UAHU,MAAM,CAGE;IAElB;;;OAGG;IACH,cAAe;IAMhB,cAAc;IACd,kDA8EC;IAdA,8CAEE;IAEF;;OAEG;IACH,wBAA4B;IAG5B,iCAAoC;IAMrC;;;OAGG;IACH,QAFa,IAAI,CAWhB;IAJC,UAA+B;IAMjC;;;OAGG;IACH,UAFa,IAAI,CAWhB;IAED;;;;;;;;OAQG;IACH,cAPW,MAAM,SACN,MAAM,GAAC,MAAM,GACX,IAAI,CAwChB;IAED;;;;OAIG;IACH,gBAHW,MAAM,GAAC,MAAM,GAAC,MAAM,EAAE,GACpB,IAAI,CA4DhB;IAkBD,oCAZU,MAAM,EAiBf;IArBD;;;;;;;;;;;OAWG;IACH,gCARU,MAAM,CAUf;IAyBD,+BAZU,MAAM,EAsBf;IA1BD;;;;;OAKG;IACH,2BAFU,MAAM,CAUf;IAiED;;;;OAIG;IACH,mBAHW,MAAM,GACJ,WAAW,CAIvB;IAED;;;OAGG;IACH,eAFW,cAAc,GAAC,aAAa,QA2BtC;IAED;;OAEG;IACH,4EA6BC;IAED;;;OAGG;IACH,gBAUC;CACD;uBAnkBsB,kBAAkB;sBAJR,qBAAqB;+BAEvB,gDAAgD;wBAGvD,kBAAkB"}
1
+ {"version":3,"file":"text.d.ts","sourceRoot":"","sources":["../../../src/renderable/text/text.js"],"names":[],"mappings":"AAuCA;;;;;;;;;;;;;;GAcG;AACH;IACC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,aAAa,QA2BtC;IAED;;OAEG;IACH,4EA6BC;IAED;;;OAGG;IACH,gBAUC;CACD;uBAzkBsB,kBAAkB;sBAJR,qBAAqB;+BAEvB,gDAAgD;wBAGvD,kBAAkB"}
@@ -153,43 +153,9 @@ export declare function setAutoFocus(enable: boolean): void;
153
153
  * specify a function to execute when the Device is fully loaded and ready
154
154
  * @param fn - the function to be executed
155
155
  * @example
156
- * // small game skeleton
157
- * let game = {
158
- * // called by the me.device.onReady function
159
- * onload = function () {
160
- * // init video
161
- * if (!me.video.init('screen', 640, 480, true)) {
162
- * alert("Sorry but your browser does not support html 5 canvas.");
163
- * return;
164
- * }
165
- *
166
- * // initialize the "audio"
167
- * me.audio.init("mp3,ogg");
168
- *
169
- * // set callback for resources loaded event
170
- * me.loader.onload = this.loaded.bind(this);
171
- *
172
- * // set all resources to be loaded
173
- * me.loader.preload(game.assets);
174
- *
175
- * // load everything & display a loading screen
176
- * me.state.change(me.state.LOADING);
177
- * };
178
- *
179
- * // callback when everything is loaded
180
- * loaded = function () {
181
- * // define stuff
182
- * // ....
183
- *
184
- * // change to the menu screen
185
- * me.state.change(me.state.PLAY);
186
- * }
187
- * }; // game
188
- *
189
- * // "bootstrap"
190
- * me.device.onReady(function () {
191
- * game.onload();
192
- * });
156
+ * // the modern equivalent is simply to await the Application
157
+ * const app = new Application(640, 480, { parent: "screen" });
158
+ * await app.init();
193
159
  * @deprecated since 18.3.0 — no longer needed when using {@link Application} as entry point.
194
160
  * @category Application
195
161
  */
@@ -284,10 +250,15 @@ export declare function getElementBounds(element: string | HTMLElement): DOMRect
284
250
  */
285
251
  export declare function getParentBounds(element: string | HTMLElement): DOMRect;
286
252
  /**
287
- * returns true if the device supports WebGL
253
+ * Returns true if the device supports WebGL 2 — the version the WebGL
254
+ * renderer requires since 20.0. This probes the same context type that
255
+ * renderer construction requests, so the two can never disagree.
256
+ *
257
+ * When it returns false, `renderer: video.AUTO` falls back to the Canvas
258
+ * renderer and `renderer: video.WEBGL` throws at construction time.
288
259
  * @param [options] - context creation options
289
- * @param [options.failIfMajorPerformanceCaveat=true] - If true, the renderer will switch to CANVAS mode if the performances of a WebGL context would be dramatically lower than that of a native application making equivalent OpenGL calls.
290
- * @returns true if WebGL is supported
260
+ * @param [options.failIfMajorPerformanceCaveat=true] - if true, report WebGL as unsupported when the browser warns that a context would perform dramatically worse than a native application (e.g. a software rasterizer). Set false to accept WebGL on blocklisted drivers or software renderers.
261
+ * @returns true if WebGL 2 is supported
291
262
  * @category Application
292
263
  */
293
264
  export declare function isWebGLSupported(options?: {
@@ -1 +1 @@
1
- {"version":3,"file":"device.d.ts","sourceRoot":"","sources":["../../src/system/device.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,eAAe,MAAM,eAAe,CAAC;AA+FjD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,sBAAsB,QAIvD;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,wBAAkB,CAAC;AAExC;;GAEG;AACH,eAAO,MAAM,UAAU,SAA+B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,YAAY,OAA4B,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,KAAK,SACsD,CAAC;AAEzE;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,QAIvB,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,KAAK,SAEoC,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,qBAAqB,SAE4B,CAAC;AAE/D;;GAEG;AACH,eAAO,MAAM,oBAAoB,OAAsC,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,SAC6C,CAAC;AAE5E;;GAEG;AACH,eAAO,MAAM,gBAAgB,OAAiC,CAAC;AAO/D,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,WAAW,OAIvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,SAA0C,CAAC;AAErE;;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ACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW,CAqBrE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,GAAG,OAAO,CAYvE;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,WAE5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE;IAC1C,4BAA4B,CAAC,EAAE,OAAO,CAAC;CACvC,GAAG,OAAO,CAwBV;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,SAIpB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,kBAAkB,YAoBjC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,SAMnC;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,sBAAsB,YAsBrC;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,SAKvC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,QAOjD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAC7B,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GACrE,OAAO,CAkCT"}
@@ -18,22 +18,6 @@
18
18
  * webApp `true` if running as a standalone web app
19
19
  */
20
20
  export declare const ua: string;
21
- /**
22
- * iPad-on-Mac-UA predicate. Exported so the spec file can assert the
23
- * SAME function the module evaluates at load time (no drift between
24
- * docs and implementation), but marked `@internal` because it's a
25
- * test-seam, not a stable public API — the engine reserves the right
26
- * to change / inline / rename it without a breaking-change bump.
27
- *
28
- * Parameter shape is `Partial<Pick<Navigator, ...>>` rather than a
29
- * named alias so no engine-defined type leaks into the emitted
30
- * `.d.ts` (`tsconfig.build.json` doesn't currently set
31
- * `stripInternal`).
32
- * @param nav - a `navigator`-shaped object (or `undefined` for Node/SSR)
33
- * @returns `true` when `nav` looks like an iPad reporting under the iPadOS-13+ desktop Mac UA
34
- * @internal
35
- */
36
- export declare function isIPadOnMacUA(nav: Partial<Pick<Navigator, "platform" | "maxTouchPoints">> | undefined): boolean;
37
21
  export declare const iOS: boolean;
38
22
  export declare const android: boolean;
39
23
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/system/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,EAAE,QAGT,CAAC;AAaP;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAC5B,GAAG,EAAE,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,gBAAgB,CAAC,CAAC,GAAG,SAAS,GACtE,OAAO,CAET;AAOD,eAAO,MAAM,GAAG,SAAsD,CAAC;AACvE,eAAO,MAAM,OAAO,SAAsB,CAAC;AAC3C;;GAEG;AACH,eAAO,MAAM,QAAQ,SAAwB,CAAC;AAC9C,eAAO,MAAM,KAAK,SAAoB,CAAC;AACvC,eAAO,MAAM,QAAQ,SAAkB,CAAC;AACxC;;GAEG;AACH,eAAO,MAAM,EAAE,SAA4B,CAAC;AAC5C;;GAEG;AACH,eAAO,MAAM,UAAU,SAAyB,CAAC;AACjD;;GAEG;AACH,eAAO,MAAM,MAAM,SAAyC,CAAC;AAC7D,eAAO,MAAM,MAAM,SAAyB,CAAC;AAC7C,eAAO,MAAM,QAAQ,SAA6B,CAAC;AAOnD,eAAO,MAAM,MAAM,SAGW,CAAC;AAO/B,eAAO,MAAM,QAAQ,SAAqC,CAAC;AAC3D,eAAO,MAAM,MAAM,SAK2C,CAAC"}
1
+ {"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../../src/system/platform.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,EAAE,QAGT,CAAC;AAuCP,eAAO,MAAM,GAAG,SAAsD,CAAC;AACvE,eAAO,MAAM,OAAO,SAAsB,CAAC;AAC3C;;GAEG;AACH,eAAO,MAAM,QAAQ,SAAwB,CAAC;AAC9C,eAAO,MAAM,KAAK,SAAoB,CAAC;AACvC,eAAO,MAAM,QAAQ,SAAkB,CAAC;AACxC;;GAEG;AACH,eAAO,MAAM,EAAE,SAA4B,CAAC;AAC5C;;GAEG;AACH,eAAO,MAAM,UAAU,SAAyB,CAAC;AACjD;;GAEG;AACH,eAAO,MAAM,MAAM,SAAyC,CAAC;AAC7D,eAAO,MAAM,MAAM,SAAyB,CAAC;AAC7C,eAAO,MAAM,QAAQ,SAA6B,CAAC;AAOnD,eAAO,MAAM,MAAM,SAGW,CAAC;AAO/B,eAAO,MAAM,QAAQ,SAAqC,CAAC;AAC3D,eAAO,MAAM,MAAM,SAK2C,CAAC"}
@@ -24,6 +24,8 @@ export declare function checkVersion(v1: string, v2: string): 0 | 1 | -1;
24
24
  * [velocity=false] draw the entities velocity in the debug panel (if enabled)
25
25
  * [quadtree=false] draw the quadtree in the debug panel (if enabled)
26
26
  * [webgl=false] force the renderer to WebGL
27
+ * [canvas=false] force the renderer to Canvas
28
+ * [webgpu=false] force the renderer to WebGPU (opt-in only; never selected by `video.AUTO`)
27
29
  * [debug=false] display the debug panel (if preloaded)
28
30
  * [debugToggleKey="s"] show/hide the debug panel (if preloaded)
29
31
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;A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