melonjs 14.1.2 → 14.3.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 (381) hide show
  1. package/README.md +3 -4
  2. package/dist/melonjs.mjs/_virtual/_commonjsHelpers.js +1 -1
  3. package/dist/melonjs.mjs/_virtual/arraymultimap.js +1 -1
  4. package/dist/melonjs.mjs/_virtual/earcut.js +7 -3
  5. package/dist/melonjs.mjs/_virtual/howler.js +1 -1
  6. package/dist/melonjs.mjs/_virtual/index.js +1 -1
  7. package/dist/melonjs.mjs/_virtual/index2.js +7 -3
  8. package/dist/melonjs.mjs/_virtual/make-built-in.js +10 -0
  9. package/dist/melonjs.mjs/_virtual/multimap.js +1 -1
  10. package/dist/melonjs.mjs/_virtual/object-define-property.js +10 -0
  11. package/dist/melonjs.mjs/_virtual/object-get-own-property-descriptor.js +10 -0
  12. package/dist/melonjs.mjs/_virtual/object-get-own-property-names.js +10 -0
  13. package/dist/melonjs.mjs/_virtual/object-get-own-property-symbols.js +10 -0
  14. package/dist/melonjs.mjs/_virtual/object-property-is-enumerable.js +10 -0
  15. package/dist/melonjs.mjs/_virtual/setmultimap.js +1 -1
  16. package/dist/melonjs.mjs/_virtual/shared.js +10 -0
  17. package/dist/melonjs.mjs/application/application.js +173 -22
  18. package/dist/melonjs.mjs/application/header.js +34 -0
  19. package/dist/melonjs.mjs/application/resize.js +119 -0
  20. package/dist/melonjs.mjs/application/settings.js +28 -0
  21. package/dist/melonjs.mjs/audio/audio.js +1 -1
  22. package/dist/melonjs.mjs/camera/camera2d.js +2 -2
  23. package/dist/melonjs.mjs/entity/entity.js +1 -1
  24. package/dist/melonjs.mjs/game.js +1 -1
  25. package/dist/melonjs.mjs/geometries/ellipse.js +1 -1
  26. package/dist/melonjs.mjs/geometries/line.js +1 -1
  27. package/dist/melonjs.mjs/geometries/path2d.js +3 -3
  28. package/dist/melonjs.mjs/geometries/point.js +1 -1
  29. package/dist/melonjs.mjs/geometries/poly.js +3 -3
  30. package/dist/melonjs.mjs/geometries/rectangle.js +1 -1
  31. package/dist/melonjs.mjs/geometries/roundrect.js +1 -1
  32. package/dist/melonjs.mjs/index.js +41 -61
  33. package/dist/melonjs.mjs/input/gamepad.js +1 -1
  34. package/dist/melonjs.mjs/input/input.js +1 -1
  35. package/dist/melonjs.mjs/input/keyboard.js +1 -1
  36. package/dist/melonjs.mjs/input/pointer.js +2 -2
  37. package/dist/melonjs.mjs/input/pointerevent.js +7 -8
  38. package/dist/melonjs.mjs/lang/deprecated.js +1 -1
  39. package/dist/melonjs.mjs/level/level.js +2 -2
  40. package/dist/melonjs.mjs/level/tiled/TMXGroup.js +1 -1
  41. package/dist/melonjs.mjs/level/tiled/TMXLayer.js +2 -2
  42. package/dist/melonjs.mjs/level/tiled/TMXObject.js +1 -1
  43. package/dist/melonjs.mjs/level/tiled/TMXTile.js +1 -1
  44. package/dist/melonjs.mjs/level/tiled/TMXTileMap.js +2 -2
  45. package/dist/melonjs.mjs/level/tiled/TMXTileset.js +1 -1
  46. package/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js +1 -1
  47. package/dist/melonjs.mjs/level/tiled/TMXUtils.js +1 -1
  48. package/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js +1 -1
  49. package/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js +1 -1
  50. package/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js +1 -1
  51. package/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js +1 -1
  52. package/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js +1 -1
  53. package/dist/melonjs.mjs/loader/loader.js +1 -1
  54. package/dist/melonjs.mjs/loader/loadingscreen.js +2 -2
  55. package/dist/melonjs.mjs/loader/melonjs_logo.png.js +1 -1
  56. package/dist/melonjs.mjs/math/color.js +1 -1
  57. package/dist/melonjs.mjs/math/math.js +1 -1
  58. package/dist/melonjs.mjs/math/matrix2.js +1 -1
  59. package/dist/melonjs.mjs/math/matrix3.js +1 -1
  60. package/dist/melonjs.mjs/math/observable_vector2.js +1 -1
  61. package/dist/melonjs.mjs/math/observable_vector3.js +1 -1
  62. package/dist/melonjs.mjs/math/vector2.js +1 -1
  63. package/dist/melonjs.mjs/math/vector3.js +1 -1
  64. package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/arraymultimap.js +3 -2
  65. package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/index.js +1 -1
  66. package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/multimap.js +3 -2
  67. package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/setmultimap.js +3 -2
  68. package/dist/melonjs.mjs/node_modules/core-js/es/string/trim-end.js +13 -0
  69. package/dist/melonjs.mjs/node_modules/core-js/es/string/trim-start.js +13 -0
  70. package/dist/melonjs.mjs/node_modules/core-js/internals/a-callable.js +22 -0
  71. package/dist/melonjs.mjs/node_modules/core-js/internals/an-object.js +21 -0
  72. package/dist/melonjs.mjs/node_modules/core-js/internals/array-includes.js +45 -0
  73. package/dist/melonjs.mjs/node_modules/core-js/internals/classof-raw.js +19 -0
  74. package/dist/melonjs.mjs/node_modules/core-js/internals/classof.js +43 -0
  75. package/dist/melonjs.mjs/node_modules/core-js/internals/copy-constructor-properties.js +32 -0
  76. package/dist/melonjs.mjs/node_modules/core-js/internals/create-non-enumerable-property.js +24 -0
  77. package/dist/melonjs.mjs/node_modules/core-js/internals/create-property-descriptor.js +17 -0
  78. package/dist/melonjs.mjs/node_modules/core-js/internals/define-built-in.js +43 -0
  79. package/dist/melonjs.mjs/node_modules/core-js/internals/define-global-property.js +23 -0
  80. package/dist/melonjs.mjs/node_modules/core-js/internals/descriptors.js +18 -0
  81. package/dist/melonjs.mjs/node_modules/core-js/internals/document-all.js +18 -0
  82. package/dist/melonjs.mjs/node_modules/core-js/internals/document-create-element.js +22 -0
  83. package/dist/melonjs.mjs/node_modules/core-js/internals/engine-user-agent.js +14 -0
  84. package/dist/melonjs.mjs/node_modules/core-js/internals/engine-v8-version.js +39 -0
  85. package/dist/melonjs.mjs/node_modules/core-js/internals/entry-unbind.js +18 -0
  86. package/dist/melonjs.mjs/node_modules/core-js/internals/enum-bug-keys.js +19 -0
  87. package/dist/melonjs.mjs/node_modules/core-js/internals/export.js +72 -0
  88. package/dist/melonjs.mjs/node_modules/core-js/internals/fails.js +16 -0
  89. package/dist/melonjs.mjs/node_modules/core-js/internals/function-bind-native.js +19 -0
  90. package/dist/melonjs.mjs/node_modules/core-js/internals/function-call.js +18 -0
  91. package/dist/melonjs.mjs/node_modules/core-js/internals/function-name.js +29 -0
  92. package/dist/melonjs.mjs/node_modules/core-js/internals/function-uncurry-this.js +22 -0
  93. package/dist/melonjs.mjs/node_modules/core-js/internals/get-built-in.js +22 -0
  94. package/dist/melonjs.mjs/node_modules/core-js/internals/get-method.js +21 -0
  95. package/dist/melonjs.mjs/node_modules/core-js/internals/global.js +25 -0
  96. package/dist/melonjs.mjs/node_modules/core-js/internals/has-own-property.js +23 -0
  97. package/dist/melonjs.mjs/node_modules/core-js/internals/hidden-keys.js +10 -0
  98. package/dist/melonjs.mjs/node_modules/core-js/internals/ie8-dom-define.js +24 -0
  99. package/dist/melonjs.mjs/node_modules/core-js/internals/indexed-object.js +28 -0
  100. package/dist/melonjs.mjs/node_modules/core-js/internals/inspect-source.js +27 -0
  101. package/dist/melonjs.mjs/node_modules/core-js/internals/internal-state.js +88 -0
  102. package/dist/melonjs.mjs/node_modules/core-js/internals/is-callable.js +22 -0
  103. package/dist/melonjs.mjs/node_modules/core-js/internals/is-forced.js +34 -0
  104. package/dist/melonjs.mjs/node_modules/core-js/internals/is-null-or-undefined.js +14 -0
  105. package/dist/melonjs.mjs/node_modules/core-js/internals/is-object.js +22 -0
  106. package/dist/melonjs.mjs/node_modules/core-js/internals/is-symbol.js +27 -0
  107. package/dist/melonjs.mjs/node_modules/core-js/internals/length-of-array-like.js +18 -0
  108. package/dist/melonjs.mjs/node_modules/core-js/internals/make-built-in.js +68 -0
  109. package/dist/melonjs.mjs/node_modules/core-js/internals/math-trunc.js +19 -0
  110. package/dist/melonjs.mjs/node_modules/core-js/internals/object-define-property.js +58 -0
  111. package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-descriptor.js +41 -0
  112. package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-names.js +23 -0
  113. package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-symbols.js +12 -0
  114. package/dist/melonjs.mjs/node_modules/core-js/internals/object-is-prototype-of.js +14 -0
  115. package/dist/melonjs.mjs/node_modules/core-js/internals/object-keys-internal.js +35 -0
  116. package/dist/melonjs.mjs/node_modules/core-js/internals/object-property-is-enumerable.js +23 -0
  117. package/dist/melonjs.mjs/node_modules/core-js/internals/ordinary-to-primitive.js +28 -0
  118. package/dist/melonjs.mjs/node_modules/core-js/internals/own-keys.js +31 -0
  119. package/dist/melonjs.mjs/node_modules/core-js/internals/require-object-coercible.js +21 -0
  120. package/dist/melonjs.mjs/node_modules/core-js/internals/shared-key.js +21 -0
  121. package/dist/melonjs.mjs/node_modules/core-js/internals/shared-store.js +19 -0
  122. package/dist/melonjs.mjs/node_modules/core-js/internals/shared.js +24 -0
  123. package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-end.js +22 -0
  124. package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-forced.js +28 -0
  125. package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-start.js +22 -0
  126. package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim.js +45 -0
  127. package/dist/melonjs.mjs/node_modules/core-js/internals/symbol-constructor-detection.js +26 -0
  128. package/dist/melonjs.mjs/node_modules/core-js/internals/to-absolute-index.js +23 -0
  129. package/dist/melonjs.mjs/node_modules/core-js/internals/to-indexed-object.js +19 -0
  130. package/dist/melonjs.mjs/node_modules/core-js/internals/to-integer-or-infinity.js +20 -0
  131. package/dist/melonjs.mjs/node_modules/core-js/internals/to-length.js +20 -0
  132. package/dist/melonjs.mjs/node_modules/core-js/internals/to-object.js +20 -0
  133. package/dist/melonjs.mjs/node_modules/core-js/internals/to-primitive.js +41 -0
  134. package/dist/melonjs.mjs/node_modules/core-js/internals/to-property-key.js +21 -0
  135. package/dist/melonjs.mjs/node_modules/core-js/internals/to-string-tag-support.js +19 -0
  136. package/dist/melonjs.mjs/node_modules/core-js/internals/to-string.js +19 -0
  137. package/dist/melonjs.mjs/node_modules/core-js/internals/try-to-string.js +18 -0
  138. package/dist/melonjs.mjs/node_modules/core-js/internals/uid.js +20 -0
  139. package/dist/melonjs.mjs/node_modules/core-js/internals/use-symbol-as-uid.js +18 -0
  140. package/dist/melonjs.mjs/node_modules/core-js/internals/v8-prototype-define-bug.js +24 -0
  141. package/dist/melonjs.mjs/node_modules/core-js/internals/weak-map-basic-detection.js +18 -0
  142. package/dist/melonjs.mjs/node_modules/core-js/internals/well-known-symbol.js +41 -0
  143. package/dist/melonjs.mjs/node_modules/core-js/internals/whitespaces.js +12 -0
  144. package/dist/melonjs.mjs/node_modules/core-js/modules/es.global-this.js +18 -0
  145. package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-end.js +22 -0
  146. package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-left.js +19 -0
  147. package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-right.js +19 -0
  148. package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-start.js +22 -0
  149. package/dist/melonjs.mjs/node_modules/earcut/src/earcut.js +4 -5
  150. package/dist/melonjs.mjs/node_modules/eventemitter3/index.js +3 -3
  151. package/dist/melonjs.mjs/node_modules/eventemitter3/index.mjs.js +9 -0
  152. package/dist/melonjs.mjs/node_modules/eventemitter3/index2.js +5 -2
  153. package/dist/melonjs.mjs/node_modules/howler/dist/howler.js +3 -2
  154. package/dist/melonjs.mjs/particles/emitter.js +1 -1
  155. package/dist/melonjs.mjs/particles/particle.js +1 -1
  156. package/dist/melonjs.mjs/particles/settings.js +1 -1
  157. package/dist/melonjs.mjs/physics/body.js +1 -1
  158. package/dist/melonjs.mjs/physics/bounds.js +1 -1
  159. package/dist/melonjs.mjs/physics/collision.js +3 -3
  160. package/dist/melonjs.mjs/physics/detector.js +174 -146
  161. package/dist/melonjs.mjs/physics/quadtree.js +1 -1
  162. package/dist/melonjs.mjs/physics/response.js +1 -1
  163. package/dist/melonjs.mjs/physics/sat.js +1 -1
  164. package/dist/melonjs.mjs/physics/world.js +10 -30
  165. package/dist/melonjs.mjs/plugin/plugin.js +4 -4
  166. package/dist/melonjs.mjs/polyfill/console.js +18 -0
  167. package/dist/melonjs.mjs/polyfill/performance.js +27 -0
  168. package/dist/melonjs.mjs/polyfill/requestAnimationFrame.js +46 -0
  169. package/dist/melonjs.mjs/polyfill/roundrect.js +242 -0
  170. package/dist/melonjs.mjs/renderable/collectable.js +1 -1
  171. package/dist/melonjs.mjs/renderable/colorlayer.js +1 -1
  172. package/dist/melonjs.mjs/renderable/container.js +3 -87
  173. package/dist/melonjs.mjs/renderable/dragndrop.js +1 -1
  174. package/dist/melonjs.mjs/renderable/imagelayer.js +2 -2
  175. package/dist/melonjs.mjs/renderable/light2d.js +1 -1
  176. package/dist/melonjs.mjs/renderable/nineslicesprite.js +1 -1
  177. package/dist/melonjs.mjs/renderable/re_container.js +1016 -0
  178. package/dist/melonjs.mjs/renderable/renderable.js +1 -1
  179. package/dist/melonjs.mjs/renderable/sprite.js +1 -1
  180. package/dist/melonjs.mjs/renderable/trigger.js +2 -2
  181. package/dist/melonjs.mjs/renderable/ui/uibaseelement.js +1 -1
  182. package/dist/melonjs.mjs/renderable/ui/uispriteelement.js +1 -1
  183. package/dist/melonjs.mjs/renderable/ui/uitextbutton.js +1 -1
  184. package/dist/melonjs.mjs/state/stage.js +2 -2
  185. package/dist/melonjs.mjs/state/state.js +2 -2
  186. package/dist/melonjs.mjs/system/device.js +9 -29
  187. package/dist/melonjs.mjs/system/dom.js +3 -2
  188. package/dist/melonjs.mjs/system/event.js +1 -1
  189. package/dist/melonjs.mjs/system/platform.js +1 -1
  190. package/dist/melonjs.mjs/system/pooling.js +1 -1
  191. package/dist/melonjs.mjs/system/save.js +1 -1
  192. package/dist/melonjs.mjs/system/timer.js +1 -1
  193. package/dist/melonjs.mjs/text/bitmaptext.js +1 -1
  194. package/dist/melonjs.mjs/text/bitmaptextdata.js +1 -1
  195. package/dist/melonjs.mjs/text/glyph.js +1 -1
  196. package/dist/melonjs.mjs/text/text.js +1 -1
  197. package/dist/melonjs.mjs/text/textmetrics.js +1 -1
  198. package/dist/melonjs.mjs/text/textstyle.js +1 -1
  199. package/dist/melonjs.mjs/tweens/easing.js +1 -1
  200. package/dist/melonjs.mjs/tweens/interpolation.js +1 -1
  201. package/dist/melonjs.mjs/tweens/tween.js +2 -2
  202. package/dist/melonjs.mjs/utils/agent.js +1 -1
  203. package/dist/melonjs.mjs/utils/array.js +1 -1
  204. package/dist/melonjs.mjs/utils/file.js +1 -1
  205. package/dist/melonjs.mjs/utils/function.js +1 -1
  206. package/dist/melonjs.mjs/utils/string.js +1 -1
  207. package/dist/melonjs.mjs/utils/utils.js +4 -29
  208. package/dist/melonjs.mjs/video/canvas/canvas_renderer.js +4 -1
  209. package/dist/melonjs.mjs/video/renderer.js +26 -6
  210. package/dist/melonjs.mjs/video/texture/atlas.js +1 -1
  211. package/dist/melonjs.mjs/video/texture/cache.js +1 -1
  212. package/dist/melonjs.mjs/video/texture/canvas_texture.js +21 -1
  213. package/dist/melonjs.mjs/video/utils/autodetect.js +27 -0
  214. package/dist/melonjs.mjs/video/utils/resize.js +116 -0
  215. package/dist/melonjs.mjs/video/video.js +20 -294
  216. package/dist/melonjs.mjs/video/webgl/buffer/vertex.js +1 -1
  217. package/dist/melonjs.mjs/video/webgl/glshader.js +2 -3
  218. package/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js +1 -1
  219. package/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js +1 -1
  220. package/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js +1 -1
  221. package/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js +1 -1
  222. package/dist/melonjs.mjs/video/webgl/utils/attributes.js +1 -1
  223. package/dist/melonjs.mjs/video/webgl/utils/precision.js +20 -2
  224. package/dist/melonjs.mjs/video/webgl/utils/program.js +1 -1
  225. package/dist/melonjs.mjs/video/webgl/utils/string.js +1 -1
  226. package/dist/melonjs.mjs/video/webgl/utils/uniforms.js +1 -1
  227. package/dist/melonjs.mjs/video/webgl/webgl_compositor.js +1 -1
  228. package/dist/melonjs.mjs/video/webgl/webgl_renderer.js +4 -1
  229. package/dist/melonjs.module.js +28551 -26959
  230. package/dist/types/application/application.d.ts +144 -0
  231. package/dist/types/application/header.d.ts +5 -0
  232. package/dist/types/application/resize.d.ts +5 -0
  233. package/dist/types/application/settings.d.ts +18 -0
  234. package/dist/types/audio/audio.d.ts +267 -0
  235. package/dist/types/camera/camera2d.d.ts +289 -0
  236. package/dist/types/entity/entity.d.ts +98 -0
  237. package/{src/game.js → dist/types/game.d.ts} +3 -14
  238. package/dist/types/geometries/ellipse.d.ts +154 -0
  239. package/dist/types/geometries/line.d.ts +11 -0
  240. package/dist/types/geometries/path2d.d.ts +121 -0
  241. package/dist/types/geometries/point.d.ts +53 -0
  242. package/dist/types/geometries/poly.d.ts +222 -0
  243. package/dist/types/geometries/rectangle.d.ts +176 -0
  244. package/dist/types/geometries/roundrect.d.ts +52 -0
  245. package/dist/types/index.d.ts +3 -2
  246. package/dist/types/input/gamepad.d.ts +95 -0
  247. package/dist/types/input/input.d.ts +15 -0
  248. package/dist/types/input/keyboard.d.ts +205 -0
  249. package/dist/types/input/pointer.d.ts +270 -0
  250. package/dist/types/input/pointerevent.d.ts +181 -0
  251. package/dist/types/lang/deprecated.d.ts +53 -0
  252. package/dist/types/level/level.d.ts +134 -0
  253. package/dist/types/level/tiled/TMXGroup.d.ts +82 -0
  254. package/dist/types/level/tiled/TMXLayer.d.ts +180 -0
  255. package/dist/types/level/tiled/TMXObject.d.ts +195 -0
  256. package/dist/types/level/tiled/TMXTile.d.ts +78 -0
  257. package/dist/types/level/tiled/TMXTileMap.d.ts +180 -0
  258. package/dist/types/level/tiled/TMXTileset.d.ts +94 -0
  259. package/dist/types/level/tiled/TMXTilesetGroup.d.ts +32 -0
  260. package/dist/types/level/tiled/TMXUtils.d.ts +47 -0
  261. package/dist/types/level/tiled/renderer/TMXHexagonalRenderer.d.ts +87 -0
  262. package/dist/types/level/tiled/renderer/TMXIsometricRenderer.d.ts +55 -0
  263. package/dist/types/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +43 -0
  264. package/dist/types/level/tiled/renderer/TMXRenderer.d.ts +75 -0
  265. package/dist/types/level/tiled/renderer/TMXStaggeredRenderer.d.ts +8 -0
  266. package/dist/types/loader/loader.d.ts +181 -0
  267. package/dist/types/loader/loadingscreen.d.ts +18 -0
  268. package/dist/types/math/color.d.ts +170 -0
  269. package/dist/types/math/math.d.ts +165 -0
  270. package/dist/types/math/matrix2.d.ts +209 -0
  271. package/dist/types/math/matrix3.d.ts +236 -0
  272. package/dist/types/math/observable_vector2.d.ts +278 -0
  273. package/dist/types/math/observable_vector3.d.ts +277 -0
  274. package/dist/types/math/vector2.d.ts +327 -0
  275. package/dist/types/math/vector3.d.ts +332 -0
  276. package/dist/types/particles/emitter.d.ts +188 -0
  277. package/dist/types/particles/particle.d.ts +32 -0
  278. package/dist/types/particles/settings.d.ts +32 -0
  279. package/dist/types/physics/body.d.ts +330 -0
  280. package/dist/types/physics/bounds.d.ts +250 -0
  281. package/dist/types/physics/collision.d.ts +44 -0
  282. package/dist/types/physics/detector.d.ts +64 -0
  283. package/dist/types/physics/quadtree.d.ts +79 -0
  284. package/dist/types/physics/response.d.ts +37 -0
  285. package/dist/types/physics/sat.d.ts +48 -0
  286. package/dist/types/physics/world.d.ts +83 -0
  287. package/dist/types/plugin/plugin.d.ts +10 -0
  288. package/dist/types/polyfill/console.d.ts +0 -0
  289. package/dist/types/polyfill/index.d.ts +1 -0
  290. package/dist/types/polyfill/performance.d.ts +0 -0
  291. package/dist/types/polyfill/requestAnimationFrame.d.ts +1 -0
  292. package/dist/types/polyfill/roundrect.d.ts +0 -0
  293. package/dist/types/renderable/collectable.d.ts +19 -0
  294. package/dist/types/renderable/colorlayer.d.ts +28 -0
  295. package/dist/types/renderable/container.d.ts +302 -0
  296. package/dist/types/renderable/dragndrop.d.ts +118 -0
  297. package/dist/types/renderable/imagelayer.d.ts +106 -0
  298. package/dist/types/renderable/light2d.d.ts +58 -0
  299. package/dist/types/renderable/nineslicesprite.d.ts +59 -0
  300. package/dist/types/renderable/renderable.d.ts +402 -0
  301. package/dist/types/renderable/sprite.d.ts +268 -0
  302. package/dist/types/renderable/trigger.d.ts +61 -0
  303. package/dist/types/renderable/ui/uibaseelement.d.ts +95 -0
  304. package/dist/types/renderable/ui/uispriteelement.d.ts +127 -0
  305. package/dist/types/renderable/ui/uitextbutton.d.ts +54 -0
  306. package/dist/types/state/stage.d.ts +116 -0
  307. package/dist/types/state/state.d.ts +170 -0
  308. package/dist/types/system/device.d.ts +579 -0
  309. package/dist/types/system/dom.d.ts +1 -0
  310. package/dist/types/system/event.d.ts +473 -0
  311. package/dist/types/system/platform.d.ts +31 -0
  312. package/dist/types/system/pooling.d.ts +101 -0
  313. package/dist/types/system/save.d.ts +25 -0
  314. package/dist/types/system/timer.d.ts +126 -0
  315. package/dist/types/text/bitmaptext.d.ts +151 -0
  316. package/dist/types/text/bitmaptextdata.d.ts +35 -0
  317. package/dist/types/text/glyph.d.ts +28 -0
  318. package/dist/types/text/text.d.ts +173 -0
  319. package/dist/types/text/textmetrics.d.ts +47 -0
  320. package/dist/types/text/textstyle.d.ts +5 -0
  321. package/dist/types/tweens/easing.d.ts +46 -0
  322. package/dist/types/tweens/interpolation.d.ts +18 -0
  323. package/dist/types/tweens/tween.d.ts +195 -0
  324. package/dist/types/utils/agent.d.ts +21 -0
  325. package/dist/types/utils/array.d.ts +39 -0
  326. package/dist/types/utils/file.d.ts +18 -0
  327. package/dist/types/utils/function.d.ts +32 -0
  328. package/dist/types/utils/string.d.ts +50 -0
  329. package/dist/types/utils/utils.d.ts +17 -0
  330. package/dist/types/video/canvas/canvas_renderer.d.ts +380 -0
  331. package/dist/types/video/renderer.d.ts +222 -0
  332. package/dist/types/video/texture/atlas.d.ts +201 -0
  333. package/dist/types/video/texture/cache.d.ts +45 -0
  334. package/dist/types/video/texture/canvas_texture.d.ts +78 -0
  335. package/dist/types/video/utils/autodetect.d.ts +7 -0
  336. package/dist/types/video/utils/resize.d.ts +4 -0
  337. package/dist/types/video/video.d.ts +92 -0
  338. package/dist/types/video/webgl/buffer/vertex.d.ts +56 -0
  339. package/dist/types/video/webgl/glshader.d.ts +93 -0
  340. package/dist/types/video/webgl/utils/attributes.d.ts +4 -0
  341. package/dist/types/video/webgl/utils/precision.d.ts +13 -0
  342. package/dist/types/video/webgl/utils/program.d.ts +5 -0
  343. package/dist/types/video/webgl/utils/string.d.ts +5 -0
  344. package/dist/types/video/webgl/utils/uniforms.d.ts +4 -0
  345. package/dist/types/video/webgl/webgl_compositor.d.ts +174 -0
  346. package/dist/types/video/webgl/webgl_renderer.d.ts +429 -0
  347. package/package.json +14 -14
  348. package/src/application/application.js +171 -20
  349. package/src/application/header.js +25 -0
  350. package/src/application/resize.js +110 -0
  351. package/src/application/settings.js +19 -0
  352. package/src/camera/camera2d.js +1 -1
  353. package/src/index.js +34 -23
  354. package/src/input/pointer.js +1 -1
  355. package/src/input/pointerevent.js +6 -7
  356. package/src/level/level.js +1 -1
  357. package/src/level/tiled/TMXLayer.js +1 -1
  358. package/src/level/tiled/TMXTileMap.js +2 -2
  359. package/src/loader/loadingscreen.js +1 -1
  360. package/src/physics/collision.js +2 -2
  361. package/src/physics/detector.js +172 -145
  362. package/src/physics/world.js +10 -30
  363. package/src/plugin/plugin.js +1 -1
  364. package/src/renderable/container.js +7 -91
  365. package/src/renderable/imagelayer.js +1 -1
  366. package/src/renderable/trigger.js +1 -1
  367. package/src/renderable/ui/uibaseelement.js +1 -1
  368. package/src/state/stage.js +1 -1
  369. package/src/state/state.js +1 -1
  370. package/src/system/device.js +7 -27
  371. package/src/system/dom.js +2 -1
  372. package/src/tweens/tween.js +1 -1
  373. package/src/utils/utils.js +3 -28
  374. package/src/video/canvas/canvas_renderer.js +3 -0
  375. package/src/video/renderer.js +27 -7
  376. package/src/video/texture/canvas_texture.js +20 -0
  377. package/src/video/utils/autodetect.js +18 -0
  378. package/src/video/video.js +17 -291
  379. package/src/video/webgl/glshader.js +3 -4
  380. package/src/video/webgl/utils/precision.js +18 -0
  381. package/src/video/webgl/webgl_renderer.js +3 -0
@@ -0,0 +1,579 @@
1
+ /**
2
+ * used by [un]watchDeviceOrientation()
3
+ */
4
+ export function onDeviceRotate(e: any): void;
5
+ /**
6
+ * specify a function to execute when the Device is fully loaded and ready
7
+ * @function onReady
8
+ * @memberof device
9
+ * @public
10
+ * @param {Function} fn - the function to be executed
11
+ * @example
12
+ * // small game skeleton
13
+ * var game = {
14
+ * // called by the me.device.onReady function
15
+ * onload = function () {
16
+ * // init video
17
+ * if (!me.video.init('screen', 640, 480, true)) {
18
+ * alert("Sorry but your browser does not support html 5 canvas.");
19
+ * return;
20
+ * }
21
+ *
22
+ * // initialize the "audio"
23
+ * me.audio.init("mp3,ogg");
24
+ *
25
+ * // set callback for ressources loaded event
26
+ * me.loader.onload = this.loaded.bind(this);
27
+ *
28
+ * // set all ressources to be loaded
29
+ * me.loader.preload(game.assets);
30
+ *
31
+ * // load everything & display a loading screen
32
+ * me.state.change(me.state.LOADING);
33
+ * };
34
+ *
35
+ * // callback when everything is loaded
36
+ * loaded = function () {
37
+ * // define stuff
38
+ * // ....
39
+ *
40
+ * // change to the menu screen
41
+ * me.state.change(me.state.PLAY);
42
+ * }
43
+ * }; // game
44
+ *
45
+ * // "bootstrap"
46
+ * me.device.onReady(function () {
47
+ * game.onload();
48
+ * });
49
+ */
50
+ export function onReady(fn: Function): void;
51
+ /**
52
+ * enable/disable swipe on WebView.
53
+ * @function enableSwipe
54
+ * @memberof device
55
+ * @public
56
+ * @param {boolean} [enable=true] - enable or disable swipe.
57
+ */
58
+ export function enableSwipe(enable?: boolean | undefined): void;
59
+ /**
60
+ * Returns true if the browser/device is in full screen mode.
61
+ * @function isFullscreen
62
+ * @memberof device
63
+ * @public
64
+ * @returns {boolean}
65
+ */
66
+ export function isFullscreen(): boolean;
67
+ /**
68
+ * Triggers a fullscreen request. Requires fullscreen support from the browser/device.
69
+ * @function requestFullscreen
70
+ * @memberof device
71
+ * @public
72
+ * @param {Element} [element] - the element to be set in full-screen mode.
73
+ * @example
74
+ * // add a keyboard shortcut to toggle Fullscreen mode on/off
75
+ * me.input.bindKey(me.input.KEY.F, "toggleFullscreen");
76
+ * me.event.on(me.event.KEYDOWN, function (action, keyCode, edge) {
77
+ * // toggle fullscreen on/off
78
+ * if (action === "toggleFullscreen") {
79
+ * me.device.requestFullscreen();
80
+ * } else {
81
+ * me.device.exitFullscreen();
82
+ * }
83
+ * });
84
+ */
85
+ export function requestFullscreen(element?: Element | undefined): void;
86
+ /**
87
+ * Exit fullscreen mode. Requires fullscreen support from the browser/device.
88
+ * @function exitFullscreen
89
+ * @memberof device
90
+ * @public
91
+ */
92
+ export function exitFullscreen(): void;
93
+ /**
94
+ * Return a string representing the orientation of the device screen.
95
+ * It can be "any", "natural", "landscape", "portrait", "portrait-primary", "portrait-secondary", "landscape-primary", "landscape-secondary"
96
+ * @function getScreenOrientation
97
+ * @memberof device
98
+ * @public
99
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/orientation
100
+ * @returns {string} the screen orientation
101
+ */
102
+ export function getScreenOrientation(): string;
103
+ /**
104
+ * locks the device screen into the specified orientation.<br>
105
+ * This method only works for installed Web apps or for Web pages in full-screen mode.
106
+ * @function lockOrientation
107
+ * @memberof device
108
+ * @public
109
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation
110
+ * @param {string|string[]} orientation - The orientation into which to lock the screen.
111
+ * @returns {boolean} true if the orientation was unsuccessfully locked
112
+ */
113
+ export function lockOrientation(orientation: string | string[]): boolean;
114
+ /**
115
+ * unlocks the device screen into the specified orientation.<br>
116
+ * This method only works for installed Web apps or for Web pages in full-screen mode.
117
+ * @function unlockOrientation
118
+ * @memberof device
119
+ * @public
120
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation
121
+ * @returns {boolean} true if the orientation was unsuccessfully unlocked
122
+ */
123
+ export function unlockOrientation(): boolean;
124
+ /**
125
+ * return true if the device screen orientation is in Portrait mode
126
+ * @function isPortrait
127
+ * @memberof device
128
+ * @public
129
+ * @returns {boolean}
130
+ */
131
+ export function isPortrait(): boolean;
132
+ /**
133
+ * return true if the device screen orientation is in Portrait mode
134
+ * @function isLandscape
135
+ * @memberof device
136
+ * @public
137
+ * @returns {boolean}
138
+ */
139
+ export function isLandscape(): boolean;
140
+ /**
141
+ * return the device storage
142
+ * @function getStorage
143
+ * @memberof device
144
+ * @public
145
+ * @see save
146
+ * @param {string} [type="local"]
147
+ * @returns {object} a reference to the device storage
148
+ */
149
+ export function getStorage(type?: string | undefined): object;
150
+ /**
151
+ * return the parent DOM element for the given parent name or HTMLElement object
152
+ * @function getParentElement
153
+ * @memberof device
154
+ * @public
155
+ * @param {string|HTMLElement} element - the parent element name or a HTMLElement object
156
+ * @returns {HTMLElement} the parent Element
157
+ */
158
+ export function getParentElement(element: string | HTMLElement): HTMLElement;
159
+ /**
160
+ * return the DOM element for the given element name or HTMLElement object
161
+ * @function getElement
162
+ * @memberof device
163
+ * @public
164
+ * @param {string|HTMLElement} element - the parent element name or a HTMLElement object
165
+ * @returns {HTMLElement} the corresponding DOM Element or null if not existing
166
+ */
167
+ export function getElement(element: string | HTMLElement): HTMLElement;
168
+ /**
169
+ * returns the size of the given HTMLElement and its position relative to the viewport
170
+ * <br><img src="images/element-box-diagram.png"/>
171
+ * @function getElementBounds
172
+ * @memberof device
173
+ * @public
174
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
175
+ * @param {string|HTMLElement} element - an HTMLElement object
176
+ * @returns {DOMRect} the size and position of the element relatively to the viewport
177
+ */
178
+ export function getElementBounds(element: string | HTMLElement): DOMRect;
179
+ /**
180
+ * returns the size of the given HTMLElement Parent and its position relative to the viewport
181
+ * <br><img src="images/element-box-diagram.png"/>
182
+ * @function getParentBounds
183
+ * @memberof device
184
+ * @public
185
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMRect
186
+ * @param {string|HTMLElement} element - an HTMLElement object
187
+ * @returns {DOMRect} the size and position of the given element parent relative to the viewport
188
+ */
189
+ export function getParentBounds(element: string | HTMLElement): DOMRect;
190
+ /**
191
+ * returns true if the device supports WebGL
192
+ * @function isWebGLSupported
193
+ * @memberof device
194
+ * @public
195
+ * @param {object} [options] - context creation options
196
+ * @param {boolean} [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.
197
+ * @returns {boolean} true if WebGL is supported
198
+ */
199
+ export function isWebGLSupported(options?: {
200
+ failIfMajorPerformanceCaveat?: boolean | undefined;
201
+ } | undefined): boolean;
202
+ /**
203
+ * Makes a request to bring this device window to the front.
204
+ * @function focus
205
+ * @memberof device
206
+ * @public
207
+ * @example
208
+ * if (clicked) {
209
+ * me.device.focus();
210
+ * }
211
+ */
212
+ export function focus(): void;
213
+ /**
214
+ * Enable monitor of the device accelerator to detect the amount of physical force of acceleration the device is receiving.
215
+ * (one some device a first user gesture will be required before calling this function)
216
+ * @function watchAccelerometer
217
+ * @memberof device
218
+ * @public
219
+ * @see device.accelerationX
220
+ * @see device.accelerationY
221
+ * @see device.accelerationZ
222
+ * @link {http://www.mobilexweb.com/samples/ball.html}
223
+ * @link {http://www.mobilexweb.com/blog/safari-ios-accelerometer-websockets-html5}
224
+ * @returns {boolean} false if not supported or permission not granted by the user
225
+ * @example
226
+ * // try to enable device accelerometer event on user gesture
227
+ * me.input.registerPointerEvent("pointerleave", me.game.viewport, function() {
228
+ * if (me.device.watchAccelerometer() === true) {
229
+ * // Success
230
+ * me.input.releasePointerEvent("pointerleave", me.game.viewport);
231
+ * } else {
232
+ * // ... fail at enabling the device accelerometer event
233
+ * }
234
+ * });
235
+ */
236
+ export function watchAccelerometer(): boolean;
237
+ /**
238
+ * unwatch Accelerometor event
239
+ * @function unwatchAccelerometer
240
+ * @memberof device
241
+ * @public
242
+ */
243
+ export function unwatchAccelerometer(): void;
244
+ /**
245
+ * Enable monitor of the device orientation to detect the current orientation of the device as compared to the Earth coordinate frame.
246
+ * (one some device a first user gesture will be required before calling this function)
247
+ * @function watchDeviceOrientation
248
+ * @memberof device
249
+ * @public
250
+ * @see device.alpha
251
+ * @see device.beta
252
+ * @see device.gamma
253
+ * @returns {boolean} false if not supported or permission not granted by the user
254
+ * @example
255
+ * // try to enable device orientation event on user gesture
256
+ * me.input.registerPointerEvent("pointerleave", me.game.viewport, function() {
257
+ * if (me.device.watchDeviceOrientation() === true) {
258
+ * // Success
259
+ * me.input.releasePointerEvent("pointerleave", me.game.viewport);
260
+ * } else {
261
+ * // ... fail at enabling the device orientation event
262
+ * }
263
+ * });
264
+ */
265
+ export function watchDeviceOrientation(): boolean;
266
+ /**
267
+ * unwatch Device orientation event
268
+ * @function unwatchDeviceOrientation
269
+ * @memberof device
270
+ * @public
271
+ */
272
+ export function unwatchDeviceOrientation(): void;
273
+ /**
274
+ * the vibrate method pulses the vibration hardware on the device, <br>
275
+ * If the device doesn't support vibration, this method has no effect. <br>
276
+ * If a vibration pattern is already in progress when this method is called,
277
+ * the previous pattern is halted and the new one begins instead.
278
+ * @function vibrate
279
+ * @memberof device
280
+ * @public
281
+ * @param {number|number[]} pattern - pattern of vibration and pause intervals
282
+ * @example
283
+ * // vibrate for 1000 ms
284
+ * me.device.vibrate(1000);
285
+ * // or alternatively
286
+ * me.device.vibrate([1000]);
287
+ * // vibrate for 50 ms, be still for 100 ms, and then vibrate for 150 ms:
288
+ * me.device.vibrate([50, 100, 150]);
289
+ * // cancel any existing vibrations
290
+ * me.device.vibrate(0);
291
+ */
292
+ export function vibrate(pattern: number | number[]): void;
293
+ /**
294
+ * the device platform type
295
+ * @name platform
296
+ * @memberof device
297
+ * @readonly
298
+ * @public
299
+ * @type {device.platform}
300
+ */
301
+ export let platform: device.platform;
302
+ /**
303
+ * True if the browser supports Touch Events
304
+ * @name touchEvent
305
+ * @memberof device
306
+ * @type {boolean}
307
+ * @readonly
308
+ * @public
309
+ */
310
+ export const touchEvent: boolean;
311
+ /**
312
+ * True if the browser supports Pointer Events
313
+ * @name pointerEvent
314
+ * @memberof device
315
+ * @type {boolean}
316
+ * @readonly
317
+ * @public
318
+ */
319
+ export const pointerEvent: boolean;
320
+ /**
321
+ * Touch capabilities (support either Touch or Pointer events)
322
+ * @name touch
323
+ * @memberof device
324
+ * @type {boolean}
325
+ * @readonly
326
+ * @public
327
+ */
328
+ export const touch: boolean;
329
+ /**
330
+ * the maximum number of simultaneous touch contact points are supported by the current device.
331
+ * @name maxTouchPoints
332
+ * @memberof device
333
+ * @type {number}
334
+ * @readonly
335
+ * @public
336
+ * @example
337
+ * if (me.device.maxTouchPoints > 1) {
338
+ * // device supports multi-touch
339
+ * }
340
+ */
341
+ export const maxTouchPoints: number;
342
+ /**
343
+ * W3C standard wheel events
344
+ * @name wheel
345
+ * @memberof device
346
+ * @type {boolean}
347
+ * @readonly
348
+ * @public
349
+ */
350
+ export const wheel: boolean;
351
+ /**
352
+ * Browser pointerlock api support
353
+ * @name hasPointerLockSupport
354
+ * @memberof device
355
+ * @type {boolean}
356
+ * @readonly
357
+ * @public
358
+ */
359
+ export const hasPointerLockSupport: boolean;
360
+ /**
361
+ * Browser device orientation
362
+ * @name hasDeviceOrientation
363
+ * @memberof device
364
+ * @readonly
365
+ * @public
366
+ * @type {boolean}
367
+ */
368
+ export const hasDeviceOrientation: boolean;
369
+ /**
370
+ * Supports the ScreenOrientation API
371
+ * @name screenOrientation
372
+ * @memberof device
373
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation/onchange
374
+ * @type {boolean}
375
+ * @readonly
376
+ * @public
377
+ */
378
+ export const screenOrientation: boolean;
379
+ /**
380
+ * Browser accelerometer capabilities
381
+ * @name hasAccelerometer
382
+ * @memberof device
383
+ * @readonly
384
+ * @public
385
+ * @type {boolean}
386
+ */
387
+ export const hasAccelerometer: boolean;
388
+ /**
389
+ * Browser full screen support
390
+ * @name hasFullscreenSupport
391
+ * @memberof device
392
+ * @type {boolean}
393
+ * @readonly
394
+ * @public
395
+ */
396
+ export const hasFullscreenSupport: boolean;
397
+ /**
398
+ * Device WebAudio Support
399
+ * @name hasWebAudio
400
+ * @memberof device
401
+ * @type {boolean}
402
+ * @readonly
403
+ * @public
404
+ */
405
+ export const hasWebAudio: boolean;
406
+ /**
407
+ * Device HTML5Audio Support
408
+ * @name hasHTML5Audio
409
+ * @memberof device
410
+ * @type {boolean}
411
+ * @readonly
412
+ * @public
413
+ */
414
+ export const hasHTML5Audio: boolean;
415
+ /**
416
+ * Returns true if the browser/device has audio capabilities.
417
+ * @name sound
418
+ * @memberof device
419
+ * @type {boolean}
420
+ * @readonly
421
+ * @public
422
+ */
423
+ export const sound: boolean;
424
+ /**
425
+ * Browser Local Storage capabilities <br>
426
+ * (this flag will be set to false if cookies are blocked)
427
+ * @name localStorage
428
+ * @memberof device
429
+ * @readonly
430
+ * @public
431
+ * @type {boolean}
432
+ */
433
+ export const localStorage: boolean;
434
+ /**
435
+ * equals to true if the device browser supports OffScreenCanvas.
436
+ * @name offscreenCanvas
437
+ * @memberof device
438
+ * @type {boolean}
439
+ * @readonly
440
+ * @public
441
+ */
442
+ export const offscreenCanvas: boolean;
443
+ /**
444
+ * Browser Base64 decoding capability
445
+ * @name nativeBase64
446
+ * @memberof device
447
+ * @type {boolean}
448
+ * @readonly
449
+ * @public
450
+ */
451
+ export const nativeBase64: boolean;
452
+ /**
453
+ * a string representing the preferred language of the user, usually the language of the browser UI.
454
+ * (will default to "en" if the information is not available)
455
+ * @name language
456
+ * @memberof device
457
+ * @type {string}
458
+ * @readonly
459
+ * @public
460
+ * @see http://www.w3schools.com/tags/ref_language_codes.asp
461
+ */
462
+ export const language: string;
463
+ /**
464
+ * Ratio of the resolution in physical pixels to the resolution in CSS pixels for the current display device.
465
+ * @name devicePixelRatio
466
+ * @memberof device
467
+ * @type {number}
468
+ * @readonly
469
+ * @public
470
+ */
471
+ export const devicePixelRatio: number;
472
+ /**
473
+ * equals to true if a mobile device.
474
+ * (Android | iPhone | iPad | iPod | BlackBerry | Windows Phone | Kindle)
475
+ * @name isMobile
476
+ * @memberof device
477
+ * @type {boolean}
478
+ * @readonly
479
+ * @public
480
+ */
481
+ export const isMobile: boolean;
482
+ /**
483
+ * contains the g-force acceleration along the x-axis.
484
+ * @name accelerationX
485
+ * @memberof device
486
+ * @type {number}
487
+ * @readonly
488
+ * @public
489
+ * @see device.watchAccelerometer
490
+ */
491
+ export let accelerationX: number;
492
+ /**
493
+ * contains the g-force acceleration along the y-axis.
494
+ * @name accelerationY
495
+ * @memberof device
496
+ * @type {number}
497
+ * @readonly
498
+ * @public
499
+ * @see device.watchAccelerometer
500
+ */
501
+ export let accelerationY: number;
502
+ /**
503
+ * contains the g-force acceleration along the z-axis.
504
+ * @name accelerationZ
505
+ * @memberof device
506
+ * @type {number}
507
+ * @readonly
508
+ * @public
509
+ * @see device.watchAccelerometer
510
+ */
511
+ export let accelerationZ: number;
512
+ /**
513
+ * Device orientation Gamma property. Gives angle on tilting a portrait held phone left or right
514
+ * @name gamma
515
+ * @memberof device
516
+ * @type {number}
517
+ * @readonly
518
+ * @public
519
+ * @see device.watchDeviceOrientation
520
+ */
521
+ export let gamma: number;
522
+ /**
523
+ * Device orientation Beta property. Gives angle on tilting a portrait held phone forward or backward
524
+ * @name beta
525
+ * @memberof device
526
+ * @type {number}
527
+ * @readonly
528
+ * @public
529
+ * @see device.watchDeviceOrientation
530
+ */
531
+ export let beta: number;
532
+ /**
533
+ * Device orientation Alpha property. Gives angle based on the rotation of the phone around its z axis.
534
+ * The z-axis is perpendicular to the phone, facing out from the center of the screen.
535
+ * @name alpha
536
+ * @memberof device
537
+ * @type {number}
538
+ * @readonly
539
+ * @public
540
+ * @see device.watchDeviceOrientation
541
+ */
542
+ export let alpha: number;
543
+ /**
544
+ * Specify whether to pause the game when losing focus
545
+ * @name pauseOnBlur
546
+ * @memberof device
547
+ * @type {boolean}
548
+ * @public
549
+ * @default true
550
+ */
551
+ export let pauseOnBlur: boolean;
552
+ /**
553
+ * Specify whether to unpause the game when gaining focus
554
+ * @name resumeOnFocus
555
+ * @memberof device
556
+ * @type {boolean}
557
+ * @public
558
+ * @default true
559
+ */
560
+ export let resumeOnFocus: boolean;
561
+ /**
562
+ * Specify whether to automatically bring the window to the front
563
+ * @name autoFocus
564
+ * @memberof device
565
+ * @type {boolean}
566
+ * @public
567
+ * @default true
568
+ */
569
+ export let autoFocus: boolean;
570
+ /**
571
+ * Specify whether to stop the game when losing focus or not.
572
+ * The engine restarts on focus if this is enabled.
573
+ * @name stopOnBlur
574
+ * @memberof device
575
+ * @type {boolean}
576
+ * @public
577
+ * @default false
578
+ */
579
+ export let stopOnBlur: boolean;
@@ -0,0 +1 @@
1
+ export function DOMContentLoaded(fn: any): void;