melonjs 18.0.0 → 18.2.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 (215) hide show
  1. package/build/application/application.d.ts +33 -40
  2. package/build/application/application.d.ts.map +1 -1
  3. package/build/application/defaultApplicationSettings.d.ts +1 -1
  4. package/build/application/header.d.ts +3 -7
  5. package/build/application/header.d.ts.map +1 -1
  6. package/build/application/resize.d.ts +3 -4
  7. package/build/application/resize.d.ts.map +1 -1
  8. package/build/application/settings.d.ts +8 -3
  9. package/build/application/settings.d.ts.map +1 -1
  10. package/build/audio/audio.d.ts +179 -128
  11. package/build/audio/audio.d.ts.map +1 -1
  12. package/build/camera/camera2d.d.ts +194 -103
  13. package/build/camera/camera2d.d.ts.map +1 -1
  14. package/build/geometries/ellipse.d.ts +40 -4
  15. package/build/geometries/ellipse.d.ts.map +1 -1
  16. package/build/geometries/line.d.ts +2 -1
  17. package/build/geometries/line.d.ts.map +1 -1
  18. package/build/geometries/path2d.d.ts +39 -4
  19. package/build/geometries/path2d.d.ts.map +1 -1
  20. package/build/geometries/polygon.d.ts +6 -5
  21. package/build/geometries/polygon.d.ts.map +1 -1
  22. package/build/geometries/rectangle.d.ts +1 -0
  23. package/build/geometries/rectangle.d.ts.map +1 -1
  24. package/build/geometries/roundrect.d.ts +83 -17
  25. package/build/geometries/roundrect.d.ts.map +1 -1
  26. package/build/index.d.ts +18 -16
  27. package/build/index.d.ts.map +1 -1
  28. package/build/index.js +5283 -2234
  29. package/build/index.js.map +4 -4
  30. package/build/input/gamepad.d.ts +113 -61
  31. package/build/input/gamepad.d.ts.map +1 -1
  32. package/build/input/input.d.ts +3 -7
  33. package/build/input/input.d.ts.map +1 -1
  34. package/build/input/keyboard.d.ts +6 -0
  35. package/build/input/keyboard.d.ts.map +1 -1
  36. package/build/input/pointer.d.ts +25 -51
  37. package/build/input/pointer.d.ts.map +1 -1
  38. package/build/input/pointerevent.d.ts +51 -79
  39. package/build/input/pointerevent.d.ts.map +1 -1
  40. package/build/lang/console.d.ts.map +1 -1
  41. package/build/lang/deprecated.d.ts +27 -0
  42. package/build/lang/deprecated.d.ts.map +1 -1
  43. package/build/level/tiled/TMXGroup.d.ts +5 -0
  44. package/build/level/tiled/TMXGroup.d.ts.map +1 -1
  45. package/build/level/tiled/TMXLayer.d.ts +1 -0
  46. package/build/level/tiled/TMXLayer.d.ts.map +1 -1
  47. package/build/level/tiled/TMXObject.d.ts +21 -16
  48. package/build/level/tiled/TMXObject.d.ts.map +1 -1
  49. package/build/level/tiled/TMXTile.d.ts +16 -5
  50. package/build/level/tiled/TMXTile.d.ts.map +1 -1
  51. package/build/level/tiled/TMXTileMap.d.ts +16 -3
  52. package/build/level/tiled/TMXTileMap.d.ts.map +1 -1
  53. package/build/level/tiled/TMXTileset.d.ts +138 -16
  54. package/build/level/tiled/TMXTileset.d.ts.map +1 -1
  55. package/build/level/tiled/TMXTilesetGroup.d.ts +1 -0
  56. package/build/level/tiled/TMXTilesetGroup.d.ts.map +1 -1
  57. package/build/level/tiled/TMXUtils.d.ts +29 -12
  58. package/build/level/tiled/TMXUtils.d.ts.map +1 -1
  59. package/build/level/tiled/constants.d.ts +1 -0
  60. package/build/level/tiled/constants.d.ts.map +1 -1
  61. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts +2 -7
  62. package/build/level/tiled/renderer/TMXHexagonalRenderer.d.ts.map +1 -1
  63. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts +2 -1
  64. package/build/level/tiled/renderer/TMXIsometricRenderer.d.ts.map +1 -1
  65. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts +42 -0
  66. package/build/level/tiled/renderer/TMXObliqueRenderer.d.ts.map +1 -0
  67. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +2 -7
  68. package/build/level/tiled/renderer/TMXOrthogonalRenderer.d.ts.map +1 -1
  69. package/build/level/tiled/renderer/TMXRenderer.d.ts +7 -0
  70. package/build/level/tiled/renderer/TMXRenderer.d.ts.map +1 -1
  71. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts +2 -1
  72. package/build/level/tiled/renderer/TMXStaggeredRenderer.d.ts.map +1 -1
  73. package/build/level/tiled/renderer/autodetect.d.ts +2 -1
  74. package/build/level/tiled/renderer/autodetect.d.ts.map +1 -1
  75. package/build/loader/loader.d.ts +39 -15
  76. package/build/loader/loader.d.ts.map +1 -1
  77. package/build/loader/loadingscreen.d.ts +8 -0
  78. package/build/loader/loadingscreen.d.ts.map +1 -1
  79. package/build/loader/parsers/compressed_textures/compressed_image.d.ts +44 -1
  80. package/build/loader/parsers/compressed_textures/compressed_image.d.ts.map +1 -1
  81. package/build/loader/parsers/compressed_textures/parseDDS.d.ts +7 -1
  82. package/build/loader/parsers/compressed_textures/parseDDS.d.ts.map +1 -1
  83. package/build/loader/parsers/compressed_textures/parseKTX.d.ts +7 -1
  84. package/build/loader/parsers/compressed_textures/parseKTX.d.ts.map +1 -1
  85. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts +7 -1
  86. package/build/loader/parsers/compressed_textures/parseKTX2.d.ts.map +1 -1
  87. package/build/loader/parsers/compressed_textures/parsePKM.d.ts +7 -1
  88. package/build/loader/parsers/compressed_textures/parsePKM.d.ts.map +1 -1
  89. package/build/loader/parsers/compressed_textures/parsePVR.d.ts +7 -1
  90. package/build/loader/parsers/compressed_textures/parsePVR.d.ts.map +1 -1
  91. package/build/loader/parsers/fontface.d.ts +1 -1
  92. package/build/loader/parsers/fontface.d.ts.map +1 -1
  93. package/build/loader/parsers/image.d.ts +6 -1
  94. package/build/loader/parsers/image.d.ts.map +1 -1
  95. package/build/math/color.d.ts +2 -1
  96. package/build/math/color.d.ts.map +1 -1
  97. package/build/math/matrix2d.d.ts +1 -0
  98. package/build/math/matrix2d.d.ts.map +1 -1
  99. package/build/math/matrix3d.d.ts +1 -0
  100. package/build/math/matrix3d.d.ts.map +1 -1
  101. package/build/math/observableVector2d.d.ts +3 -2
  102. package/build/math/observableVector2d.d.ts.map +1 -1
  103. package/build/math/observableVector3d.d.ts +5 -4
  104. package/build/math/observableVector3d.d.ts.map +1 -1
  105. package/build/math/vector2d.d.ts +2 -1
  106. package/build/math/vector2d.d.ts.map +1 -1
  107. package/build/math/vector3d.d.ts +4 -3
  108. package/build/math/vector3d.d.ts.map +1 -1
  109. package/build/particles/emitter.d.ts +40 -122
  110. package/build/particles/emitter.d.ts.map +1 -1
  111. package/build/particles/particle.d.ts +2 -4
  112. package/build/particles/particle.d.ts.map +1 -1
  113. package/build/physics/body.d.ts +8 -7
  114. package/build/physics/body.d.ts.map +1 -1
  115. package/build/physics/bounds.d.ts +2 -1
  116. package/build/physics/bounds.d.ts.map +1 -1
  117. package/build/physics/detector.d.ts.map +1 -1
  118. package/build/physics/quadtree.d.ts +1 -0
  119. package/build/physics/quadtree.d.ts.map +1 -1
  120. package/build/physics/sat.d.ts.map +1 -1
  121. package/build/physics/world.d.ts +4 -3
  122. package/build/physics/world.d.ts.map +1 -1
  123. package/build/plugin/plugin.d.ts +36 -53
  124. package/build/plugin/plugin.d.ts.map +1 -1
  125. package/build/polyfill/ellipse.d.ts +2 -0
  126. package/build/polyfill/ellipse.d.ts.map +1 -0
  127. package/build/polyfill/index.d.ts +1 -0
  128. package/build/polyfill/index.d.ts.map +1 -1
  129. package/build/renderable/collectable.d.ts +1 -0
  130. package/build/renderable/collectable.d.ts.map +1 -1
  131. package/build/renderable/colorlayer.d.ts +3 -2
  132. package/build/renderable/colorlayer.d.ts.map +1 -1
  133. package/build/renderable/container.d.ts +19 -18
  134. package/build/renderable/container.d.ts.map +1 -1
  135. package/build/renderable/draggable.d.ts +1 -0
  136. package/build/renderable/draggable.d.ts.map +1 -1
  137. package/build/renderable/entity/entity.d.ts +141 -0
  138. package/build/renderable/entity/entity.d.ts.map +1 -1
  139. package/build/renderable/imagelayer.d.ts +3 -2
  140. package/build/renderable/imagelayer.d.ts.map +1 -1
  141. package/build/renderable/nineslicesprite.d.ts +4 -3
  142. package/build/renderable/nineslicesprite.d.ts.map +1 -1
  143. package/build/renderable/renderable.d.ts +42 -7
  144. package/build/renderable/renderable.d.ts.map +1 -1
  145. package/build/renderable/sprite.d.ts +7 -5
  146. package/build/renderable/sprite.d.ts.map +1 -1
  147. package/build/renderable/text/bitmaptext.d.ts +3 -2
  148. package/build/renderable/text/bitmaptext.d.ts.map +1 -1
  149. package/build/renderable/text/bitmaptextdata.d.ts +4 -0
  150. package/build/renderable/text/bitmaptextdata.d.ts.map +1 -1
  151. package/build/renderable/text/text.d.ts +2 -1
  152. package/build/renderable/text/text.d.ts.map +1 -1
  153. package/build/renderable/trigger.d.ts +1 -0
  154. package/build/renderable/trigger.d.ts.map +1 -1
  155. package/build/renderable/ui/uibaseelement.d.ts +47 -33
  156. package/build/renderable/ui/uibaseelement.d.ts.map +1 -1
  157. package/build/renderable/ui/uispriteelement.d.ts +54 -43
  158. package/build/renderable/ui/uispriteelement.d.ts.map +1 -1
  159. package/build/renderable/ui/uitextbutton.d.ts +70 -75
  160. package/build/renderable/ui/uitextbutton.d.ts.map +1 -1
  161. package/build/state/stage.d.ts +2 -1
  162. package/build/state/stage.d.ts.map +1 -1
  163. package/build/state/state.d.ts +93 -90
  164. package/build/state/state.d.ts.map +1 -1
  165. package/build/system/device.d.ts +33 -3
  166. package/build/system/device.d.ts.map +1 -1
  167. package/build/system/dom.d.ts +7 -0
  168. package/build/system/dom.d.ts.map +1 -1
  169. package/build/system/event.d.ts +2 -2
  170. package/build/system/event.d.ts.map +1 -1
  171. package/build/system/legacy_pool.d.ts.map +1 -1
  172. package/build/tweens/tween.d.ts +1 -0
  173. package/build/tweens/tween.d.ts.map +1 -1
  174. package/build/utils/array.d.ts +2 -2
  175. package/build/utils/decode.d.ts +35 -0
  176. package/build/utils/decode.d.ts.map +1 -0
  177. package/build/utils/function.d.ts +1 -1
  178. package/build/utils/function.d.ts.map +1 -1
  179. package/build/utils/utils.d.ts +1 -1
  180. package/build/utils/utils.d.ts.map +1 -1
  181. package/build/utils/xml.d.ts +21 -0
  182. package/build/utils/xml.d.ts.map +1 -0
  183. package/build/video/canvas/canvas_renderer.d.ts +42 -14
  184. package/build/video/canvas/canvas_renderer.d.ts.map +1 -1
  185. package/build/video/renderer.d.ts +39 -8
  186. package/build/video/renderer.d.ts.map +1 -1
  187. package/build/video/renderstate.d.ts +85 -0
  188. package/build/video/renderstate.d.ts.map +1 -0
  189. package/build/video/rendertarget/canvasrendertarget.d.ts +1 -0
  190. package/build/video/rendertarget/canvasrendertarget.d.ts.map +1 -1
  191. package/build/video/texture/atlas.d.ts +44 -5
  192. package/build/video/texture/atlas.d.ts.map +1 -1
  193. package/build/video/texture/cache.d.ts +9 -0
  194. package/build/video/texture/cache.d.ts.map +1 -1
  195. package/build/video/texture/parser/texturepacker.d.ts.map +1 -1
  196. package/build/video/webgl/{compositors/compositor.d.ts → batchers/batcher.d.ts} +63 -30
  197. package/build/video/webgl/batchers/batcher.d.ts.map +1 -0
  198. package/build/video/webgl/{compositors/primitive_compositor.d.ts → batchers/primitive_batcher.d.ts} +10 -3
  199. package/build/video/webgl/batchers/primitive_batcher.d.ts.map +1 -0
  200. package/build/video/webgl/{compositors/quad_compositor.d.ts → batchers/quad_batcher.d.ts} +6 -5
  201. package/build/video/webgl/batchers/quad_batcher.d.ts.map +1 -0
  202. package/build/video/webgl/buffer/index.d.ts +49 -0
  203. package/build/video/webgl/buffer/index.d.ts.map +1 -0
  204. package/build/video/webgl/buffer/vertex.d.ts +12 -19
  205. package/build/video/webgl/buffer/vertex.d.ts.map +1 -1
  206. package/build/video/webgl/glshader.d.ts +3 -2
  207. package/build/video/webgl/glshader.d.ts.map +1 -1
  208. package/build/video/webgl/shadereffect.d.ts +72 -0
  209. package/build/video/webgl/shadereffect.d.ts.map +1 -0
  210. package/build/video/webgl/webgl_renderer.d.ts +53 -69
  211. package/build/video/webgl/webgl_renderer.d.ts.map +1 -1
  212. package/package.json +19 -13
  213. package/build/video/webgl/compositors/compositor.d.ts.map +0 -1
  214. package/build/video/webgl/compositors/primitive_compositor.d.ts.map +0 -1
  215. package/build/video/webgl/compositors/quad_compositor.d.ts.map +0 -1
@@ -1,45 +1,33 @@
1
- /**
2
- * additional import for TypeScript
3
- * @import WebGLRenderer from "./../video/webgl/webgl_renderer.js";
4
- * @import Camera2d from "./../camera/camera2d.js";
5
- */
1
+ import type Camera2d from "./../camera/camera2d.ts";
2
+ import World from "../physics/world.js";
3
+ import type Renderer from "./../video/renderer.js";
4
+ import type { ApplicationSettings } from "./settings.ts";
6
5
  /**
7
6
  * An Application represents a single melonJS game, and is responsible for updating (each frame) all the related object status and draw them.
7
+ * @category Application
8
8
  * @see {@link game}
9
9
  */
10
10
  export default class Application {
11
- /**
12
- * @param {number} width - The width of the canvas viewport
13
- * @param {number} height - The height of the canvas viewport
14
- * @param {ApplicationSettings} [options] - The optional parameters for the application and default renderer
15
- * @throws Will throw an exception if it fails to instantiate a renderer
16
- */
17
- constructor(width: number, height: number, options?: ApplicationSettings);
18
11
  /**
19
12
  * the parent HTML element holding the main canvas of this application
20
- * @type {HTMLElement}
21
13
  */
22
14
  parentElement: HTMLElement;
23
15
  /**
24
- * a reference to the active Canvas or WebGL active renderer renderer
25
- * @type {CanvasRenderer|WebGLRenderer}
16
+ * a reference to the active Canvas or WebGL renderer
26
17
  */
27
- renderer: CanvasRenderer | WebGLRenderer;
18
+ renderer: Renderer;
28
19
  /**
29
20
  * the active stage "default" camera
30
- * @type {Camera2d}
31
21
  */
32
22
  viewport: Camera2d;
33
23
  /**
34
24
  * a reference to the game world, <br>
35
25
  * a world is a virtual environment containing all the game objects
36
- * @type {World}
37
26
  */
38
27
  world: World;
39
28
  /**
40
29
  * when true, all objects will be added under the root world container.<br>
41
30
  * When false, a `me.Container` object will be created for each corresponding groups
42
- * @type {boolean}
43
31
  * @default true
44
32
  */
45
33
  mergeGroup: boolean;
@@ -48,38 +36,39 @@ export default class Application {
48
36
  * Use this value to implement frame prediction in drawing events,
49
37
  * for creating smooth motion while running game update logic at
50
38
  * a lower fps.
51
- * @type {DOMHighResTimeStamp}
52
39
  */
53
40
  lastUpdate: DOMHighResTimeStamp;
54
41
  /**
55
42
  * true when this app instance has been initialized
56
- * @type {boolean}
57
43
  * @default false
58
44
  */
59
45
  isInitialized: boolean;
60
46
  /**
61
47
  * the given settings used when creating this application
62
- * @type {ApplicationSettings}
63
48
  */
64
- settings: ApplicationSettings;
49
+ settings: ApplicationSettings & {
50
+ width: number;
51
+ height: number;
52
+ autoScale: boolean;
53
+ zoomX: number;
54
+ zoomY: number;
55
+ scale: number | "auto";
56
+ };
65
57
  /**
66
58
  * Specify whether to pause this app when losing focus
67
- * @type {boolean}
68
59
  * @default true
69
60
  * @example
70
- * // keep the default game instance running even when loosing focus
61
+ * // keep the default game instance running even when losing focus
71
62
  * me.game.pauseOnBlur = false;
72
63
  */
73
64
  pauseOnBlur: boolean;
74
65
  /**
75
66
  * Specify whether to unpause this app when gaining back focus
76
- * @type {boolean}
77
67
  * @default true
78
68
  */
79
69
  resumeOnFocus: boolean;
80
70
  /**
81
71
  * Specify whether to stop this app when losing focus
82
- * @type {boolean}
83
72
  * @default false
84
73
  */
85
74
  stopOnBlur: boolean;
@@ -94,29 +83,37 @@ export default class Application {
94
83
  updateDelta: number;
95
84
  lastUpdateStart: number | null;
96
85
  updateAverageDelta: number;
86
+ /**
87
+ * @param width - The width of the canvas viewport
88
+ * @param height - The height of the canvas viewport
89
+ * @param options - The optional parameters for the application and default renderer
90
+ * @throws {Error} Will throw an exception if it fails to instantiate a renderer
91
+ */
92
+ constructor(width: number, height: number, options?: Partial<ApplicationSettings> & {
93
+ legacy?: boolean;
94
+ });
97
95
  /**
98
96
  * init the game instance (create a physic world, update starting time, etc..)
99
- * @param {number} width - The width of the canvas viewport
100
- * @param {number} height - The height of the canvas viewport
101
- * @param {ApplicationSettings} [options] - The optional parameters for the application and default renderer
97
+ * @param width - The width of the canvas viewport
98
+ * @param height - The height of the canvas viewport
99
+ * @param options - The optional parameters for the application and default renderer
102
100
  */
103
- init(width: number, height: number, options?: ApplicationSettings): void;
101
+ init(width: number, height: number, options?: Partial<ApplicationSettings>): void;
104
102
  /**
105
103
  * reset the game Object manager
106
104
  * destroy all current objects
107
105
  */
108
106
  reset(): void;
109
- set sortOn(value: string);
110
107
  /**
111
108
  * Specify the property to be used when sorting renderables for this application game world.
112
109
  * Accepted values : "x", "y", "z", "depth"
113
- * @type {string}
114
110
  * @see {@link World.sortOn}
115
111
  */
116
112
  get sortOn(): string;
113
+ set sortOn(value: string);
117
114
  /**
118
115
  * Fired when a level is fully loaded and all renderable instantiated. <br>
119
- * Additionnaly the level id will also be passed to the called function.
116
+ * Additionally the level id will also be passed to the called function.
120
117
  * @example
121
118
  * // call myFunction () everytime a level is loaded
122
119
  * me.game.onLevelLoaded = this.myFunction.bind(this);
@@ -130,7 +127,7 @@ export default class Application {
130
127
  updateFrameRate(): void;
131
128
  /**
132
129
  * Returns the parent HTML Element holding the main canvas of this application
133
- * @returns {HTMLElement} the parent HTML element
130
+ * @returns the parent HTML element
134
131
  */
135
132
  getParentElement(): HTMLElement;
136
133
  /**
@@ -139,7 +136,7 @@ export default class Application {
139
136
  repaint(): void;
140
137
  /**
141
138
  * update all objects related to this game active scene/stage
142
- * @param {number} time - current timestamp as provided by the RAF callback
139
+ * @param time - current timestamp as provided by the RAF callback
143
140
  */
144
141
  update(time: number): void;
145
142
  /**
@@ -147,8 +144,4 @@ export default class Application {
147
144
  */
148
145
  draw(): void;
149
146
  }
150
- import CanvasRenderer from "../video/canvas/canvas_renderer.js";
151
- import type WebGLRenderer from "./../video/webgl/webgl_renderer.js";
152
- import type Camera2d from "./../camera/camera2d.js";
153
- import World from "../physics/world.js";
154
147
  //# sourceMappingURL=application.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application/application.js"],"names":[],"mappings":"AAgCA;;;;GAIG;AAEH;;;GAGG;AACH;IACC;;;;;OAKG;IACH,mBALW,MAAM,UACN,MAAM,YACN,mBAAmB,EA8G7B;IA1GA;;;OAGG;IACH,eAFU,WAAW,CAES;IAE9B;;;OAGG;IACH,UAFU,cAAc,GAAC,aAAa,CAEb;IAEzB;;;OAGG;IACH,UAFU,QAAQ,CAEO;IAEzB;;;;OAIG;IACH,OAFU,KAAK,CAEO;IAEtB;;;;;OAKG;IACH,YAHU,OAAO,CAGK;IAEtB;;;;;;OAMG;IACH,YAFU,mBAAmB,CAEV;IAEnB;;;;OAIG;IACH,eAHU,OAAO,CAGS;IAE1B;;;OAGG;IACH,UAFU,mBAAmB,CAEJ;IAEzB;;;;;;;OAOG;IACH,aANU,OAAO,CAMM;IAEvB;;;;OAIG;IACH,eAHU,OAAO,CAGQ;IAEzB;;;;OAIG;IACH,YAHU,OAAO,CAGM;IAGvB,iBAAmB;IAGnB,uBAA0B;IAI1B,qBAAqB;IACrB,kBAAkB;IAGlB,oBAAsB;IACtB,uBAAyB;IACzB,+BAA+B;IAG/B,iBAAyB;IACzB,oBAAoB;IACpB,+BAA2B;IAC3B,2BAA2B;IAS5B;;;;;OAKG;IACH,YAJW,MAAM,UACN,MAAM,YACN,mBAAmB,QA6J7B;IAED;;;OAGG;IACH,cAYC;IAWD,kBANU,MAAM,EAQf;IAXD;;;;;OAKG;IACH,cAHU,MAAM,CAKf;IAKD;;;;;;OAMG;IACH,sBAAkB;IAElB;;;;OAIG;IACH,wBAaC;IAED;;;OAGG;IACH,oBAFa,WAAW,CAIvB;IAED;;OAEG;IACH,gBAEC;IAED;;;OAGG;IACH,aAFW,MAAM,QA8ChB;IAED;;OAEG;IACH,aAuBC;CACD;2BAhc0B,oCAAoC;+BASjC,oCAAoC;0BACzC,yBAAyB;kBAlChC,qBAAqB"}
1
+ {"version":3,"file":"application.d.ts","sourceRoot":"","sources":["../../src/application/application.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,QAAQ,MAAM,yBAAyB,CAAC;AAEpD,OAAO,KAAK,MAAM,qBAAqB,CAAC;AA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EF,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO;IA2BlE;;;;;OAKG;IACH,IAAI,CACH,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,GACpC,IAAI;IA4JP;;;OAGG;IACH,KAAK,IAAI,IAAI;IAgBb;;;;OAIG;IACH,IAAI,MAAM,IAAI,MAAM,CAEnB;IACD,IAAI,MAAM,CAAC,KAAK,EAAE,MAAM,EAEvB;IAED;;;;;;OAMG;IACH,aAAa,IAAI,IAAI;IAErB;;;;OAIG;IACH,eAAe,IAAI,IAAI;IAevB;;;OAGG;IACH,gBAAgB,IAAI,WAAW;IAI/B;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IA+C1B;;OAEG;IACH,IAAI,IAAI,IAAI;CAqBZ"}
@@ -7,7 +7,7 @@ export declare const defaultApplicationSettings: {
7
7
  powerPreference: "default";
8
8
  transparent: false;
9
9
  antiAlias: false;
10
- consoleHeader: boolean;
10
+ consoleHeader: true;
11
11
  blendMode: "normal";
12
12
  physic: "builtin";
13
13
  failIfMajorPerformanceCaveat: true;
@@ -1,11 +1,7 @@
1
- /**
2
- * additional import for TypeScript
3
- * @import Application from "./application.js";
4
- */
1
+ import type Application from "./application.ts";
5
2
  /**
6
3
  * display information
7
- * @param {Application} app - the game application instance calling this function
4
+ * @param app - the game application instance calling this function
8
5
  */
9
- export function consoleHeader(app: Application): void;
10
- import type Application from "./application.js";
6
+ export declare function consoleHeader(app: Application): void;
11
7
  //# sourceMappingURL=header.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.js"],"names":[],"mappings":"AAEA;;;GAGG;AAEH;;;GAGG;AACH,mCAFW,WAAW,QAgDrB;6BArD2B,kBAAkB"}
1
+ {"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../src/application/header.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAEhD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,WAAW,GAAG,IAAI,CA8BpD"}
@@ -1,8 +1,7 @@
1
+ import type Application from "./application.ts";
1
2
  /**
2
3
  * callback for window resize event
3
- * @private
4
- * @param {Application} game - the game application instance triggering the resize
4
+ * @param game - the game application instance triggering the resize
5
5
  */
6
- export function onresize(game: Application): void;
7
- import type Application from "./application.js";
6
+ export declare function onresize(game: Application): void;
8
7
  //# sourceMappingURL=resize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/application/resize.js"],"names":[],"mappings":"AAyCA;;;;GAIG;AACH,+BAFW,WAAW,QA8ErB;6BAtH2B,kBAAkB"}
1
+ {"version":3,"file":"resize.d.ts","sourceRoot":"","sources":["../../src/application/resize.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,WAAW,MAAM,kBAAkB,CAAC;AAkChD;;;GAGG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,CA4EhD"}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { RendererType } from "../const";
6
6
  import Renderer from "../video/renderer";
7
- import Compositor from "../video/webgl/compositors/compositor";
7
+ import { Batcher } from "../video/webgl/batchers/batcher";
8
8
  import { ScaleMethod } from "./scaleMethods";
9
9
  type BlendMode = "normal" | "multiply" | "lighter" | "additive" | "screen";
10
10
  type PhysicsType = "builtin" | "none";
@@ -71,9 +71,14 @@ export type ApplicationSettings = {
71
71
  verbose: boolean;
72
72
  legacy: boolean;
73
73
  /**
74
- * a custom compositor class (WebGL only)
74
+ * a custom batcher class (WebGL only)
75
+ * @deprecated since 18.1.0 — use `batcher` instead
75
76
  */
76
- compositor?: Compositor | undefined;
77
+ compositor?: (new (renderer: any) => Batcher) | undefined;
78
+ /**
79
+ * a custom batcher class (WebGL only)
80
+ */
81
+ batcher?: (new (renderer: any) => Batcher) | undefined;
77
82
  } & ({
78
83
  parent: HTMLElement;
79
84
  canvas?: never;
@@ -1 +1 @@
1
- {"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/application/settings.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AACzC,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,KAAK,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE3E,KAAK,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;AAEtC,KAAK,eAAe,GAAG,SAAS,GAAG,WAAW,CAAC;AAE/C,KAAK,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;AAExC,MAAM,MAAM,mBAAmB,GAAG;IACjC;;;OAGG;IACH,QAAQ,EAAE,YAAY,GAAG,QAAQ,CAAC;IAElC;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IAEvB;;;OAGG;IACH,WAAW,EAAE,WAAW,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IAEzB;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;;OAGG;IACH,eAAe,EAAE,eAAe,CAAC;IAEjC;;;OAGG;IACH,WAAW,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,SAAS,CAAC;IAErB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