melonjs 14.2.0 → 14.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/melonjs.mjs/_virtual/_commonjsHelpers.js +2 -2
- package/dist/melonjs.mjs/_virtual/arraymultimap.js +2 -2
- package/dist/melonjs.mjs/_virtual/earcut.js +2 -2
- package/dist/melonjs.mjs/_virtual/howler.js +2 -2
- package/dist/melonjs.mjs/_virtual/index.js +2 -2
- package/dist/melonjs.mjs/_virtual/index2.js +2 -2
- package/dist/melonjs.mjs/_virtual/multimap.js +2 -2
- package/dist/melonjs.mjs/_virtual/setmultimap.js +2 -2
- package/dist/melonjs.mjs/application/application.js +141 -10
- package/dist/melonjs.mjs/application/header.js +34 -0
- package/dist/melonjs.mjs/application/resize.js +4 -2
- package/dist/melonjs.mjs/application/settings.js +28 -0
- package/dist/melonjs.mjs/audio/audio.js +2 -2
- package/dist/melonjs.mjs/camera/camera2d.js +3 -3
- package/dist/melonjs.mjs/const.js +32 -0
- package/dist/melonjs.mjs/entity/entity.js +2 -2
- package/dist/melonjs.mjs/game.js +1 -1
- package/dist/melonjs.mjs/geometries/ellipse.js +2 -2
- package/dist/melonjs.mjs/geometries/line.js +2 -2
- package/dist/melonjs.mjs/geometries/path2d.js +2 -2
- package/dist/melonjs.mjs/geometries/point.js +2 -2
- package/dist/melonjs.mjs/geometries/poly.js +2 -2
- package/dist/melonjs.mjs/geometries/rectangle.js +2 -2
- package/dist/melonjs.mjs/geometries/roundrect.js +2 -2
- package/dist/melonjs.mjs/index.js +44 -33
- package/dist/melonjs.mjs/input/gamepad.js +2 -2
- package/dist/melonjs.mjs/input/input.js +2 -2
- package/dist/melonjs.mjs/input/keyboard.js +2 -2
- package/dist/melonjs.mjs/input/pointer.js +3 -3
- package/dist/melonjs.mjs/input/pointerevent.js +3 -3
- package/dist/melonjs.mjs/lang/console.js +44 -0
- package/dist/melonjs.mjs/lang/deprecated.js +4 -40
- package/dist/melonjs.mjs/level/level.js +3 -3
- package/dist/melonjs.mjs/level/tiled/TMXGroup.js +2 -23
- package/dist/melonjs.mjs/level/tiled/TMXLayer.js +68 -58
- package/dist/melonjs.mjs/level/tiled/TMXObject.js +2 -64
- package/dist/melonjs.mjs/level/tiled/TMXTile.js +10 -26
- package/dist/melonjs.mjs/level/tiled/TMXTileMap.js +18 -84
- package/dist/melonjs.mjs/level/tiled/TMXTileset.js +2 -16
- package/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js +3 -10
- package/dist/melonjs.mjs/level/tiled/TMXUtils.js +37 -14
- package/dist/melonjs.mjs/level/tiled/constants.js +17 -0
- package/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js +7 -8
- package/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js +3 -6
- package/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js +2 -2
- package/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js +2 -14
- package/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js +2 -2
- package/dist/melonjs.mjs/level/tiled/renderer/autodetect.js +38 -0
- package/dist/melonjs.mjs/loader/loader.js +5 -3
- package/dist/melonjs.mjs/loader/loadingscreen.js +3 -3
- package/dist/melonjs.mjs/loader/melonjs_logo.png.js +2 -2
- package/dist/melonjs.mjs/math/color.js +2 -2
- package/dist/melonjs.mjs/math/math.js +2 -2
- package/dist/melonjs.mjs/math/matrix2.js +2 -2
- package/dist/melonjs.mjs/math/matrix3.js +2 -2
- package/dist/melonjs.mjs/math/observable_vector2.js +2 -2
- package/dist/melonjs.mjs/math/observable_vector3.js +2 -2
- package/dist/melonjs.mjs/math/vector2.js +2 -2
- package/dist/melonjs.mjs/math/vector3.js +2 -2
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/arraymultimap.js +2 -2
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/index.js +2 -2
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/multimap.js +2 -2
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/setmultimap.js +2 -2
- package/dist/melonjs.mjs/node_modules/earcut/src/earcut.js +2 -2
- package/dist/melonjs.mjs/node_modules/eventemitter3/index.js +2 -2
- package/dist/melonjs.mjs/node_modules/eventemitter3/index2.js +2 -2
- package/dist/melonjs.mjs/node_modules/howler/dist/howler.js +2 -2
- package/dist/melonjs.mjs/particles/emitter.js +2 -2
- package/dist/melonjs.mjs/particles/particle.js +2 -2
- package/dist/melonjs.mjs/particles/settings.js +2 -2
- package/dist/melonjs.mjs/physics/body.js +2 -2
- package/dist/melonjs.mjs/physics/bounds.js +2 -2
- package/dist/melonjs.mjs/physics/collision.js +4 -4
- package/dist/melonjs.mjs/physics/detector.js +175 -147
- package/dist/melonjs.mjs/physics/quadtree.js +2 -2
- package/dist/melonjs.mjs/physics/response.js +2 -2
- package/dist/melonjs.mjs/physics/sat.js +2 -2
- package/dist/melonjs.mjs/physics/world.js +11 -31
- package/dist/melonjs.mjs/plugin/plugin.js +4 -4
- package/dist/melonjs.mjs/renderable/collectable.js +2 -2
- package/dist/melonjs.mjs/renderable/colorlayer.js +2 -2
- package/dist/melonjs.mjs/renderable/container.js +4 -88
- package/dist/melonjs.mjs/renderable/dragndrop.js +2 -2
- package/dist/melonjs.mjs/renderable/imagelayer.js +3 -3
- package/dist/melonjs.mjs/renderable/light2d.js +2 -2
- package/dist/melonjs.mjs/renderable/nineslicesprite.js +2 -2
- package/dist/melonjs.mjs/renderable/renderable.js +2 -2
- package/dist/melonjs.mjs/renderable/sprite.js +2 -2
- package/dist/melonjs.mjs/renderable/trigger.js +3 -3
- package/dist/melonjs.mjs/renderable/ui/uibaseelement.js +2 -2
- package/dist/melonjs.mjs/renderable/ui/uispriteelement.js +2 -2
- package/dist/melonjs.mjs/renderable/ui/uitextbutton.js +2 -2
- package/dist/melonjs.mjs/state/stage.js +3 -3
- package/dist/melonjs.mjs/state/state.js +3 -3
- package/dist/melonjs.mjs/system/device.js +3 -23
- package/dist/melonjs.mjs/system/dom.js +2 -2
- package/dist/melonjs.mjs/system/event.js +2 -2
- package/dist/melonjs.mjs/system/platform.js +2 -2
- package/dist/melonjs.mjs/system/pooling.js +2 -2
- package/dist/melonjs.mjs/system/save.js +2 -2
- package/dist/melonjs.mjs/system/timer.js +2 -2
- package/dist/melonjs.mjs/text/bitmaptext.js +2 -2
- package/dist/melonjs.mjs/text/bitmaptextdata.js +2 -2
- package/dist/melonjs.mjs/text/glyph.js +2 -2
- package/dist/melonjs.mjs/text/text.js +2 -2
- package/dist/melonjs.mjs/text/textmetrics.js +2 -2
- package/dist/melonjs.mjs/text/textstyle.js +2 -2
- package/dist/melonjs.mjs/tweens/easing.js +2 -2
- package/dist/melonjs.mjs/tweens/interpolation.js +2 -2
- package/dist/melonjs.mjs/tweens/tween.js +3 -3
- package/dist/melonjs.mjs/utils/agent.js +2 -2
- package/dist/melonjs.mjs/utils/array.js +2 -2
- package/dist/melonjs.mjs/utils/file.js +2 -2
- package/dist/melonjs.mjs/utils/function.js +2 -2
- package/dist/melonjs.mjs/utils/string.js +2 -2
- package/dist/melonjs.mjs/utils/utils.js +2 -2
- package/dist/melonjs.mjs/video/canvas/canvas_renderer.js +5 -2
- package/dist/melonjs.mjs/video/renderer.js +9 -2
- package/dist/melonjs.mjs/video/texture/atlas.js +2 -2
- package/dist/melonjs.mjs/video/texture/cache.js +2 -2
- package/dist/melonjs.mjs/video/texture/canvas_texture.js +4 -3
- package/dist/melonjs.mjs/video/utils/autodetect.js +27 -0
- package/dist/melonjs.mjs/video/utils/resize.js +1 -1
- package/dist/melonjs.mjs/video/video.js +29 -158
- package/dist/melonjs.mjs/video/webgl/buffer/vertex.js +2 -2
- package/dist/melonjs.mjs/video/webgl/glshader.js +3 -4
- package/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js +2 -2
- package/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js +2 -2
- package/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js +2 -2
- package/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js +2 -2
- package/dist/melonjs.mjs/video/webgl/utils/attributes.js +2 -2
- package/dist/melonjs.mjs/video/webgl/utils/precision.js +21 -3
- package/dist/melonjs.mjs/video/webgl/utils/program.js +2 -2
- package/dist/melonjs.mjs/video/webgl/utils/string.js +2 -2
- package/dist/melonjs.mjs/video/webgl/utils/uniforms.js +2 -2
- package/dist/melonjs.mjs/video/webgl/webgl_compositor.js +2 -2
- package/dist/melonjs.mjs/video/webgl/webgl_renderer.js +5 -2
- package/dist/melonjs.module.js +20845 -20968
- package/dist/types/application/application.d.ts +148 -0
- package/dist/types/application/header.d.ts +5 -0
- package/dist/types/application/resize.d.ts +6 -0
- package/dist/types/application/settings.d.ts +18 -0
- package/dist/types/audio/audio.d.ts +267 -0
- package/dist/types/camera/camera2d.d.ts +289 -0
- package/dist/types/const.d.ts +21 -0
- package/dist/types/entity/entity.d.ts +98 -0
- package/{src/game.js → dist/types/game.d.ts} +3 -14
- package/dist/types/geometries/ellipse.d.ts +154 -0
- package/dist/types/geometries/line.d.ts +11 -0
- package/dist/types/geometries/path2d.d.ts +121 -0
- package/dist/types/geometries/point.d.ts +53 -0
- package/dist/types/geometries/poly.d.ts +222 -0
- package/dist/types/geometries/rectangle.d.ts +176 -0
- package/dist/types/geometries/roundrect.d.ts +52 -0
- package/dist/types/index.d.ts +4 -2
- package/dist/types/input/gamepad.d.ts +95 -0
- package/dist/types/input/input.d.ts +15 -0
- package/dist/types/input/keyboard.d.ts +205 -0
- package/dist/types/input/pointer.d.ts +270 -0
- package/dist/types/input/pointerevent.d.ts +181 -0
- package/dist/types/lang/console.d.ts +7 -0
- package/dist/types/lang/deprecated.d.ts +45 -0
- package/dist/types/level/level.d.ts +134 -0
- package/dist/types/level/tiled/TMXGroup.d.ts +61 -0
- package/dist/types/level/tiled/TMXLayer.d.ts +158 -0
- package/dist/types/level/tiled/TMXObject.d.ts +133 -0
- package/dist/types/level/tiled/TMXTile.d.ts +64 -0
- package/dist/types/level/tiled/TMXTileMap.d.ts +142 -0
- package/dist/types/level/tiled/TMXTileset.d.ts +80 -0
- package/dist/types/level/tiled/TMXTilesetGroup.d.ts +26 -0
- package/dist/types/level/tiled/TMXUtils.d.ts +47 -0
- package/dist/types/level/tiled/constants.d.ts +5 -0
- package/dist/types/level/tiled/renderer/TMXHexagonalRenderer.d.ts +83 -0
- package/dist/types/level/tiled/renderer/TMXIsometricRenderer.d.ts +51 -0
- package/dist/types/level/tiled/renderer/TMXOrthogonalRenderer.d.ts +43 -0
- package/dist/types/level/tiled/renderer/TMXRenderer.d.ts +63 -0
- package/dist/types/level/tiled/renderer/TMXStaggeredRenderer.d.ts +8 -0
- package/dist/types/level/tiled/renderer/autodetect.d.ts +9 -0
- package/dist/types/loader/loader.d.ts +181 -0
- package/dist/types/loader/loadingscreen.d.ts +18 -0
- package/dist/types/math/color.d.ts +170 -0
- package/dist/types/math/math.d.ts +165 -0
- package/dist/types/math/matrix2.d.ts +209 -0
- package/dist/types/math/matrix3.d.ts +236 -0
- package/dist/types/math/observable_vector2.d.ts +278 -0
- package/dist/types/math/observable_vector3.d.ts +277 -0
- package/dist/types/math/vector2.d.ts +327 -0
- package/dist/types/math/vector3.d.ts +332 -0
- package/dist/types/particles/emitter.d.ts +188 -0
- package/dist/types/particles/particle.d.ts +32 -0
- package/dist/types/particles/settings.d.ts +32 -0
- package/dist/types/physics/body.d.ts +330 -0
- package/dist/types/physics/bounds.d.ts +250 -0
- package/dist/types/physics/collision.d.ts +44 -0
- package/dist/types/physics/detector.d.ts +64 -0
- package/dist/types/physics/quadtree.d.ts +79 -0
- package/dist/types/physics/response.d.ts +37 -0
- package/dist/types/physics/sat.d.ts +48 -0
- package/dist/types/physics/world.d.ts +83 -0
- package/dist/types/plugin/plugin.d.ts +10 -0
- package/dist/types/polyfill/console.d.ts +0 -0
- package/dist/types/polyfill/index.d.ts +1 -0
- package/dist/types/polyfill/performance.d.ts +0 -0
- package/dist/types/polyfill/requestAnimationFrame.d.ts +1 -0
- package/dist/types/polyfill/roundrect.d.ts +0 -0
- package/dist/types/renderable/collectable.d.ts +19 -0
- package/dist/types/renderable/colorlayer.d.ts +28 -0
- package/dist/types/renderable/container.d.ts +302 -0
- package/dist/types/renderable/dragndrop.d.ts +118 -0
- package/dist/types/renderable/imagelayer.d.ts +106 -0
- package/dist/types/renderable/light2d.d.ts +58 -0
- package/dist/types/renderable/nineslicesprite.d.ts +59 -0
- package/dist/types/renderable/renderable.d.ts +402 -0
- package/dist/types/renderable/sprite.d.ts +268 -0
- package/dist/types/renderable/trigger.d.ts +61 -0
- package/dist/types/renderable/ui/uibaseelement.d.ts +95 -0
- package/dist/types/renderable/ui/uispriteelement.d.ts +127 -0
- package/dist/types/renderable/ui/uitextbutton.d.ts +54 -0
- package/dist/types/state/stage.d.ts +116 -0
- package/dist/types/state/state.d.ts +170 -0
- package/dist/types/system/device.d.ts +579 -0
- package/dist/types/system/dom.d.ts +1 -0
- package/dist/types/system/event.d.ts +473 -0
- package/dist/types/system/platform.d.ts +31 -0
- package/dist/types/system/pooling.d.ts +101 -0
- package/dist/types/system/save.d.ts +25 -0
- package/dist/types/system/timer.d.ts +126 -0
- package/dist/types/text/bitmaptext.d.ts +151 -0
- package/dist/types/text/bitmaptextdata.d.ts +35 -0
- package/dist/types/text/glyph.d.ts +28 -0
- package/dist/types/text/text.d.ts +173 -0
- package/dist/types/text/textmetrics.d.ts +47 -0
- package/dist/types/text/textstyle.d.ts +5 -0
- package/dist/types/tweens/easing.d.ts +46 -0
- package/dist/types/tweens/interpolation.d.ts +18 -0
- package/dist/types/tweens/tween.d.ts +195 -0
- package/dist/types/utils/agent.d.ts +21 -0
- package/dist/types/utils/array.d.ts +39 -0
- package/dist/types/utils/file.d.ts +18 -0
- package/dist/types/utils/function.d.ts +32 -0
- package/dist/types/utils/string.d.ts +50 -0
- package/dist/types/utils/utils.d.ts +17 -0
- package/dist/types/video/canvas/canvas_renderer.d.ts +380 -0
- package/dist/types/video/renderer.d.ts +222 -0
- package/dist/types/video/texture/atlas.d.ts +201 -0
- package/dist/types/video/texture/cache.d.ts +45 -0
- package/dist/types/video/texture/canvas_texture.d.ts +78 -0
- package/dist/types/video/utils/autodetect.d.ts +7 -0
- package/dist/types/video/utils/resize.d.ts +4 -0
- package/dist/types/video/video.d.ts +93 -0
- package/dist/types/video/webgl/buffer/vertex.d.ts +56 -0
- package/dist/types/video/webgl/glshader.d.ts +93 -0
- package/dist/types/video/webgl/utils/attributes.d.ts +4 -0
- package/dist/types/video/webgl/utils/precision.d.ts +13 -0
- package/dist/types/video/webgl/utils/program.d.ts +5 -0
- package/dist/types/video/webgl/utils/string.d.ts +5 -0
- package/dist/types/video/webgl/utils/uniforms.d.ts +4 -0
- package/dist/types/video/webgl/webgl_compositor.d.ts +174 -0
- package/dist/types/video/webgl/webgl_renderer.d.ts +429 -0
- package/package.json +8 -8
- package/src/application/application.js +138 -7
- package/src/application/header.js +25 -0
- package/src/{video/utils → application}/resize.js +11 -6
- package/src/application/settings.js +19 -0
- package/src/camera/camera2d.js +1 -1
- package/src/const.js +23 -0
- package/src/index.js +36 -23
- package/src/input/pointer.js +1 -1
- package/src/input/pointerevent.js +1 -1
- package/src/lang/console.js +36 -0
- package/src/lang/deprecated.js +2 -37
- package/src/level/level.js +1 -1
- package/src/level/tiled/TMXGroup.js +0 -21
- package/src/level/tiled/TMXLayer.js +66 -56
- package/src/level/tiled/TMXObject.js +0 -62
- package/src/level/tiled/TMXTile.js +8 -24
- package/src/level/tiled/TMXTileMap.js +17 -83
- package/src/level/tiled/TMXTileset.js +0 -14
- package/src/level/tiled/TMXTilesetGroup.js +1 -9
- package/src/level/tiled/TMXUtils.js +38 -15
- package/src/level/tiled/constants.js +8 -0
- package/src/level/tiled/renderer/TMXHexagonalRenderer.js +5 -6
- package/src/level/tiled/renderer/TMXIsometricRenderer.js +1 -4
- package/src/level/tiled/renderer/TMXRenderer.js +0 -12
- package/src/level/tiled/renderer/autodetect.js +29 -0
- package/src/loader/loader.js +3 -1
- package/src/loader/loadingscreen.js +1 -1
- package/src/physics/collision.js +2 -2
- package/src/physics/detector.js +172 -145
- package/src/physics/world.js +10 -30
- package/src/renderable/container.js +7 -91
- package/src/renderable/imagelayer.js +1 -1
- package/src/renderable/trigger.js +1 -1
- package/src/renderable/ui/uibaseelement.js +1 -1
- package/src/state/stage.js +1 -1
- package/src/state/state.js +1 -1
- package/src/system/device.js +0 -20
- package/src/tweens/tween.js +1 -1
- package/src/video/canvas/canvas_renderer.js +3 -0
- package/src/video/renderer.js +7 -0
- package/src/video/texture/canvas_texture.js +2 -1
- package/src/video/utils/autodetect.js +18 -0
- package/src/video/video.js +26 -155
- package/src/video/webgl/glshader.js +3 -4
- package/src/video/webgl/utils/precision.js +18 -0
- package/src/video/webgl/webgl_renderer.js +3 -0
- package/dist/melonjs.mjs/node_modules/core-js/es/string/trim-end.js +0 -13
- package/dist/melonjs.mjs/node_modules/core-js/es/string/trim-start.js +0 -13
- package/dist/melonjs.mjs/node_modules/core-js/internals/a-callable.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/an-object.js +0 -21
- package/dist/melonjs.mjs/node_modules/core-js/internals/array-includes.js +0 -45
- package/dist/melonjs.mjs/node_modules/core-js/internals/classof-raw.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/classof.js +0 -43
- package/dist/melonjs.mjs/node_modules/core-js/internals/copy-constructor-properties.js +0 -32
- package/dist/melonjs.mjs/node_modules/core-js/internals/create-non-enumerable-property.js +0 -24
- package/dist/melonjs.mjs/node_modules/core-js/internals/create-property-descriptor.js +0 -17
- package/dist/melonjs.mjs/node_modules/core-js/internals/define-built-in.js +0 -43
- package/dist/melonjs.mjs/node_modules/core-js/internals/define-global-property.js +0 -23
- package/dist/melonjs.mjs/node_modules/core-js/internals/descriptors.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/document-all.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/document-create-element.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/engine-user-agent.js +0 -14
- package/dist/melonjs.mjs/node_modules/core-js/internals/engine-v8-version.js +0 -39
- package/dist/melonjs.mjs/node_modules/core-js/internals/entry-unbind.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/enum-bug-keys.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/export.js +0 -72
- package/dist/melonjs.mjs/node_modules/core-js/internals/fails.js +0 -16
- package/dist/melonjs.mjs/node_modules/core-js/internals/function-bind-native.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/function-call.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/function-name.js +0 -29
- package/dist/melonjs.mjs/node_modules/core-js/internals/function-uncurry-this.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/get-built-in.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/get-method.js +0 -21
- package/dist/melonjs.mjs/node_modules/core-js/internals/global.js +0 -25
- package/dist/melonjs.mjs/node_modules/core-js/internals/has-own-property.js +0 -23
- package/dist/melonjs.mjs/node_modules/core-js/internals/hidden-keys.js +0 -10
- package/dist/melonjs.mjs/node_modules/core-js/internals/ie8-dom-define.js +0 -24
- package/dist/melonjs.mjs/node_modules/core-js/internals/indexed-object.js +0 -28
- package/dist/melonjs.mjs/node_modules/core-js/internals/inspect-source.js +0 -27
- package/dist/melonjs.mjs/node_modules/core-js/internals/internal-state.js +0 -88
- package/dist/melonjs.mjs/node_modules/core-js/internals/is-callable.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/is-forced.js +0 -34
- package/dist/melonjs.mjs/node_modules/core-js/internals/is-null-or-undefined.js +0 -14
- package/dist/melonjs.mjs/node_modules/core-js/internals/is-object.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/is-symbol.js +0 -27
- package/dist/melonjs.mjs/node_modules/core-js/internals/length-of-array-like.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/make-built-in.js +0 -68
- package/dist/melonjs.mjs/node_modules/core-js/internals/math-trunc.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-define-property.js +0 -58
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-descriptor.js +0 -41
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-names.js +0 -23
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-get-own-property-symbols.js +0 -12
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-is-prototype-of.js +0 -14
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-keys-internal.js +0 -35
- package/dist/melonjs.mjs/node_modules/core-js/internals/object-property-is-enumerable.js +0 -23
- package/dist/melonjs.mjs/node_modules/core-js/internals/ordinary-to-primitive.js +0 -28
- package/dist/melonjs.mjs/node_modules/core-js/internals/own-keys.js +0 -31
- package/dist/melonjs.mjs/node_modules/core-js/internals/require-object-coercible.js +0 -21
- package/dist/melonjs.mjs/node_modules/core-js/internals/shared-key.js +0 -21
- package/dist/melonjs.mjs/node_modules/core-js/internals/shared-store.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/shared.js +0 -24
- package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-end.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-forced.js +0 -28
- package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim-start.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/internals/string-trim.js +0 -45
- package/dist/melonjs.mjs/node_modules/core-js/internals/symbol-constructor-detection.js +0 -26
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-absolute-index.js +0 -23
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-indexed-object.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-integer-or-infinity.js +0 -20
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-length.js +0 -20
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-object.js +0 -20
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-primitive.js +0 -41
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-property-key.js +0 -21
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-string-tag-support.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/to-string.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/internals/try-to-string.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/uid.js +0 -20
- package/dist/melonjs.mjs/node_modules/core-js/internals/use-symbol-as-uid.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/v8-prototype-define-bug.js +0 -24
- package/dist/melonjs.mjs/node_modules/core-js/internals/weak-map-basic-detection.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/internals/well-known-symbol.js +0 -41
- package/dist/melonjs.mjs/node_modules/core-js/internals/whitespaces.js +0 -12
- package/dist/melonjs.mjs/node_modules/core-js/modules/es.global-this.js +0 -18
- package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-end.js +0 -22
- package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-left.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-right.js +0 -19
- package/dist/melonjs.mjs/node_modules/core-js/modules/es.string.trim-start.js +0 -22
- package/dist/melonjs.mjs/node_modules/eventemitter3/index.mjs.js +0 -9
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
|
+
import Renderable from './renderable.js';
|
|
8
9
|
import utils from '../utils/utils.js';
|
|
9
|
-
import game from '../
|
|
10
|
+
import { game } from '../index.js';
|
|
10
11
|
import { on, CANVAS_ONRESIZE } from '../system/event.js';
|
|
11
12
|
import pool from '../system/pooling.js';
|
|
12
13
|
import state from '../state/state.js';
|
|
13
|
-
import Renderable from './renderable.js';
|
|
14
14
|
import Body from '../physics/body.js';
|
|
15
15
|
|
|
16
16
|
/**
|
|
@@ -52,11 +52,8 @@ let globalFloatingCounter = 0;
|
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* whether the container is the root of the scene
|
|
55
|
-
* @public
|
|
56
55
|
* @type {boolean}
|
|
57
56
|
* @default false
|
|
58
|
-
* @name root
|
|
59
|
-
* @memberof Container
|
|
60
57
|
*/
|
|
61
58
|
this.root = root;
|
|
62
59
|
|
|
@@ -69,48 +66,34 @@ let globalFloatingCounter = 0;
|
|
|
69
66
|
/**
|
|
70
67
|
* The property of the child object that should be used to sort on <br>
|
|
71
68
|
* value : "x", "y", "z"
|
|
72
|
-
* @public
|
|
73
69
|
* @type {string}
|
|
74
70
|
* @default me.game.sortOn
|
|
75
|
-
* @name sortOn
|
|
76
|
-
* @memberof Container
|
|
77
71
|
*/
|
|
78
72
|
this.sortOn = game.sortOn;
|
|
79
73
|
|
|
80
74
|
/**
|
|
81
75
|
* Specify if the children list should be automatically sorted when adding a new child
|
|
82
|
-
* @public
|
|
83
76
|
* @type {boolean}
|
|
84
77
|
* @default true
|
|
85
|
-
* @name autoSort
|
|
86
|
-
* @memberof Container
|
|
87
78
|
*/
|
|
88
79
|
this.autoSort = true;
|
|
89
80
|
|
|
90
81
|
/**
|
|
91
82
|
* Specify if the children z index should automatically be managed by the parent container
|
|
92
|
-
* @public
|
|
93
83
|
* @type {boolean}
|
|
94
84
|
* @default true
|
|
95
|
-
* @name autoDepth
|
|
96
|
-
* @memberof Container
|
|
97
85
|
*/
|
|
98
86
|
this.autoDepth = true;
|
|
99
87
|
|
|
100
88
|
/**
|
|
101
89
|
* Specify if the container draw operation should clip his children to its own bounds
|
|
102
|
-
* @public
|
|
103
90
|
* @type {boolean}
|
|
104
91
|
* @default false
|
|
105
|
-
* @name clipping
|
|
106
|
-
* @memberof Container
|
|
107
92
|
*/
|
|
108
93
|
this.clipping = false;
|
|
109
94
|
|
|
110
95
|
/**
|
|
111
96
|
* a callback to be extended, triggered after a child has been added or removed
|
|
112
|
-
* @name onChildChange
|
|
113
|
-
* @memberof Container#
|
|
114
97
|
* @param {number} index - added or removed child index
|
|
115
98
|
*/
|
|
116
99
|
this.onChildChange = function (index) { // eslint-disable-line no-unused-vars
|
|
@@ -121,21 +104,15 @@ let globalFloatingCounter = 0;
|
|
|
121
104
|
* Specify if the container bounds should automatically take in account
|
|
122
105
|
* all child bounds when updated (this is expensive and disabled by default,
|
|
123
106
|
* only enable if necessary)
|
|
124
|
-
* @public
|
|
125
107
|
* @type {boolean}
|
|
126
108
|
* @default false
|
|
127
|
-
* @name enableChildBoundsUpdate
|
|
128
|
-
* @memberof Container
|
|
129
109
|
*/
|
|
130
110
|
this.enableChildBoundsUpdate = false;
|
|
131
111
|
|
|
132
112
|
/**
|
|
133
113
|
* define a background color for this container
|
|
134
|
-
* @public
|
|
135
114
|
* @type {Color}
|
|
136
|
-
* @name backgroundColor
|
|
137
115
|
* @default (0, 0, 0, 0.0)
|
|
138
|
-
* @memberof Container
|
|
139
116
|
* @example
|
|
140
117
|
* // add a red background color to this container
|
|
141
118
|
* this.backgroundColor.setColor(255, 0, 0);
|
|
@@ -165,8 +142,6 @@ let globalFloatingCounter = 0;
|
|
|
165
142
|
|
|
166
143
|
/**
|
|
167
144
|
* reset the container, removing all childrens, and reseting transforms.
|
|
168
|
-
* @name reset
|
|
169
|
-
* @memberof Container
|
|
170
145
|
*/
|
|
171
146
|
reset() {
|
|
172
147
|
// cancel any sort operation
|
|
@@ -202,8 +177,6 @@ let globalFloatingCounter = 0;
|
|
|
202
177
|
* will not be in any container. <br>
|
|
203
178
|
* if the given child implements a onActivateEvent method, that method will be called
|
|
204
179
|
* once the child is added to this container.
|
|
205
|
-
* @name addChild
|
|
206
|
-
* @memberof Container
|
|
207
180
|
* @param {Renderable} child
|
|
208
181
|
* @param {number} [z] - forces the z index of the child to the specified value
|
|
209
182
|
* @returns {Renderable} the added child
|
|
@@ -265,8 +238,6 @@ let globalFloatingCounter = 0;
|
|
|
265
238
|
/**
|
|
266
239
|
* Add a child to the container at the specified index<br>
|
|
267
240
|
* (the list won't be sorted after insertion)
|
|
268
|
-
* @name addChildAt
|
|
269
|
-
* @memberof Container
|
|
270
241
|
* @param {Renderable} child
|
|
271
242
|
* @param {number} index
|
|
272
243
|
* @returns {Renderable} the added child
|
|
@@ -323,8 +294,6 @@ let globalFloatingCounter = 0;
|
|
|
323
294
|
* - The current element being processed in the array <br>
|
|
324
295
|
* - The index of element in the array. <br>
|
|
325
296
|
* - The array forEach() was called upon. <br>
|
|
326
|
-
* @name forEach
|
|
327
|
-
* @memberof Container
|
|
328
297
|
* @param {Function} callback - fnction to execute on each element
|
|
329
298
|
* @param {object} [thisArg] - value to use as this(i.e reference Object) when executing callback.
|
|
330
299
|
* @example
|
|
@@ -359,8 +328,6 @@ let globalFloatingCounter = 0;
|
|
|
359
328
|
|
|
360
329
|
/**
|
|
361
330
|
* Swaps the position (z-index) of 2 children
|
|
362
|
-
* @name swapChildren
|
|
363
|
-
* @memberof Container
|
|
364
331
|
* @param {Renderable} child
|
|
365
332
|
* @param {Renderable} child2
|
|
366
333
|
*/
|
|
@@ -386,8 +353,6 @@ let globalFloatingCounter = 0;
|
|
|
386
353
|
|
|
387
354
|
/**
|
|
388
355
|
* Returns the Child at the specified index
|
|
389
|
-
* @name getChildAt
|
|
390
|
-
* @memberof Container
|
|
391
356
|
* @param {number} index
|
|
392
357
|
* @returns {Renderable} the child at the specified index
|
|
393
358
|
*/
|
|
@@ -402,8 +367,6 @@ let globalFloatingCounter = 0;
|
|
|
402
367
|
|
|
403
368
|
/**
|
|
404
369
|
* Returns the index of the given Child
|
|
405
|
-
* @name getChildIndex
|
|
406
|
-
* @memberof Container
|
|
407
370
|
* @param {Renderable} child
|
|
408
371
|
* @returns {number} index
|
|
409
372
|
*/
|
|
@@ -413,8 +376,6 @@ let globalFloatingCounter = 0;
|
|
|
413
376
|
|
|
414
377
|
/**
|
|
415
378
|
* Returns the next child within the container or undefined if none
|
|
416
|
-
* @name getNextChild
|
|
417
|
-
* @memberof Container
|
|
418
379
|
* @param {Renderable} child
|
|
419
380
|
* @returns {Renderable} child
|
|
420
381
|
*/
|
|
@@ -428,8 +389,6 @@ let globalFloatingCounter = 0;
|
|
|
428
389
|
|
|
429
390
|
/**
|
|
430
391
|
* Returns true if contains the specified Child
|
|
431
|
-
* @name hasChild
|
|
432
|
-
* @memberof Container
|
|
433
392
|
* @param {Renderable} child
|
|
434
393
|
* @returns {boolean}
|
|
435
394
|
*/
|
|
@@ -441,9 +400,6 @@ let globalFloatingCounter = 0;
|
|
|
441
400
|
* return the child corresponding to the given property and value.<br>
|
|
442
401
|
* note : avoid calling this function every frame since
|
|
443
402
|
* it parses the whole object tree each time
|
|
444
|
-
* @name getChildByProp
|
|
445
|
-
* @memberof Container
|
|
446
|
-
* @public
|
|
447
403
|
* @param {string} prop - Property name
|
|
448
404
|
* @param {string|RegExp|number|boolean} value - Value of the property
|
|
449
405
|
* @returns {Renderable[]} Array of childs
|
|
@@ -492,9 +448,6 @@ let globalFloatingCounter = 0;
|
|
|
492
448
|
|
|
493
449
|
/**
|
|
494
450
|
* returns the list of childs with the specified class type
|
|
495
|
-
* @name getChildByType
|
|
496
|
-
* @memberof Container
|
|
497
|
-
* @public
|
|
498
451
|
* @param {object} classType
|
|
499
452
|
* @returns {Renderable[]} Array of children
|
|
500
453
|
*/
|
|
@@ -518,9 +471,6 @@ let globalFloatingCounter = 0;
|
|
|
518
471
|
* as defined in Tiled (Name field of the Object Properties)<br>
|
|
519
472
|
* note : avoid calling this function every frame since
|
|
520
473
|
* it parses the whole object list each time
|
|
521
|
-
* @name getChildByName
|
|
522
|
-
* @memberof Container
|
|
523
|
-
* @public
|
|
524
474
|
* @param {string|RegExp|number|boolean} name - child name
|
|
525
475
|
* @returns {Renderable[]} Array of children
|
|
526
476
|
*/
|
|
@@ -532,9 +482,6 @@ let globalFloatingCounter = 0;
|
|
|
532
482
|
* return the child corresponding to the specified GUID<br>
|
|
533
483
|
* note : avoid calling this function every frame since
|
|
534
484
|
* it parses the whole object list each time
|
|
535
|
-
* @name getChildByGUID
|
|
536
|
-
* @memberof Container
|
|
537
|
-
* @public
|
|
538
485
|
* @param {string|RegExp|number|boolean} guid - child GUID
|
|
539
486
|
* @returns {Renderable} corresponding child or null
|
|
540
487
|
*/
|
|
@@ -545,9 +492,6 @@ let globalFloatingCounter = 0;
|
|
|
545
492
|
|
|
546
493
|
/**
|
|
547
494
|
* return all child in this container
|
|
548
|
-
* @name getChildren
|
|
549
|
-
* @memberof Container
|
|
550
|
-
* @public
|
|
551
495
|
* @returns {Renderable[]} an array of renderable object
|
|
552
496
|
*/
|
|
553
497
|
getChildren() {
|
|
@@ -560,8 +504,6 @@ let globalFloatingCounter = 0;
|
|
|
560
504
|
/**
|
|
561
505
|
* update the bounding box for this shape.
|
|
562
506
|
* @ignore
|
|
563
|
-
* @name updateBounds
|
|
564
|
-
* @memberof Renderable
|
|
565
507
|
* @returns {Bounds} this shape bounding box Rectangle object
|
|
566
508
|
*/
|
|
567
509
|
updateBounds(forceUpdateChildBounds = false) {
|
|
@@ -588,8 +530,6 @@ let globalFloatingCounter = 0;
|
|
|
588
530
|
/**
|
|
589
531
|
* Checks if this container is root or if it's attached to the root container.
|
|
590
532
|
* @private
|
|
591
|
-
* @name isAttachedToRoot
|
|
592
|
-
* @memberof Container
|
|
593
533
|
* @returns {boolean}
|
|
594
534
|
*/
|
|
595
535
|
isAttachedToRoot() {
|
|
@@ -610,8 +550,6 @@ let globalFloatingCounter = 0;
|
|
|
610
550
|
/**
|
|
611
551
|
* update the cointainer's bounding rect (private)
|
|
612
552
|
* @ignore
|
|
613
|
-
* @name updateBoundsPos
|
|
614
|
-
* @memberof Container
|
|
615
553
|
*/
|
|
616
554
|
updateBoundsPos(newX, newY) {
|
|
617
555
|
// call the parent method
|
|
@@ -645,9 +583,6 @@ let globalFloatingCounter = 0;
|
|
|
645
583
|
/**
|
|
646
584
|
* Invokes the removeChildNow in a defer, to ensure the child is removed safely after the update & draw stack has completed. <br>
|
|
647
585
|
* if the given child implements a onDeactivateEvent() method, that method will be called once the child is removed from this container.
|
|
648
|
-
* @name removeChild
|
|
649
|
-
* @memberof Container
|
|
650
|
-
* @public
|
|
651
586
|
* @param {Renderable} child
|
|
652
587
|
* @param {boolean} [keepalive=false] - true to prevent calling child.destroy()
|
|
653
588
|
*/
|
|
@@ -664,8 +599,6 @@ let globalFloatingCounter = 0;
|
|
|
664
599
|
* Removes (and optionally destroys) a child from the container.<br>
|
|
665
600
|
* (removal is immediate and unconditional)<br>
|
|
666
601
|
* Never use keepalive=true with objects from {@link pool}. Doing so will create a memory leak.
|
|
667
|
-
* @name removeChildNow
|
|
668
|
-
* @memberof Container
|
|
669
602
|
* @param {Renderable} child
|
|
670
603
|
* @param {boolean} [keepalive=False] - True to prevent calling child.destroy()
|
|
671
604
|
*/
|
|
@@ -716,8 +649,6 @@ let globalFloatingCounter = 0;
|
|
|
716
649
|
|
|
717
650
|
/**
|
|
718
651
|
* Automatically set the specified property of all childs to the given value
|
|
719
|
-
* @name setChildsProperty
|
|
720
|
-
* @memberof Container
|
|
721
652
|
* @param {string} prop - property name
|
|
722
653
|
* @param {object} value - property value
|
|
723
654
|
* @param {boolean} [recursive=false] - recursively apply the value to child containers if true
|
|
@@ -733,8 +664,6 @@ let globalFloatingCounter = 0;
|
|
|
733
664
|
|
|
734
665
|
/**
|
|
735
666
|
* Move the child in the group one step forward (z depth).
|
|
736
|
-
* @name moveUp
|
|
737
|
-
* @memberof Container
|
|
738
667
|
* @param {Renderable} child
|
|
739
668
|
*/
|
|
740
669
|
moveUp(child) {
|
|
@@ -749,8 +678,6 @@ let globalFloatingCounter = 0;
|
|
|
749
678
|
|
|
750
679
|
/**
|
|
751
680
|
* Move the child in the group one step backward (z depth).
|
|
752
|
-
* @name moveDown
|
|
753
|
-
* @memberof Container
|
|
754
681
|
* @param {Renderable} child
|
|
755
682
|
*/
|
|
756
683
|
moveDown(child) {
|
|
@@ -765,8 +692,6 @@ let globalFloatingCounter = 0;
|
|
|
765
692
|
|
|
766
693
|
/**
|
|
767
694
|
* Move the specified child to the top(z depth).
|
|
768
|
-
* @name moveToTop
|
|
769
|
-
* @memberof Container
|
|
770
695
|
* @param {Renderable} child
|
|
771
696
|
*/
|
|
772
697
|
moveToTop(child) {
|
|
@@ -784,8 +709,6 @@ let globalFloatingCounter = 0;
|
|
|
784
709
|
|
|
785
710
|
/**
|
|
786
711
|
* Move the specified child the bottom (z depth).
|
|
787
|
-
* @name moveToBottom
|
|
788
|
-
* @memberof Container
|
|
789
712
|
* @param {Renderable} child
|
|
790
713
|
*/
|
|
791
714
|
moveToBottom(child) {
|
|
@@ -803,9 +726,6 @@ let globalFloatingCounter = 0;
|
|
|
803
726
|
|
|
804
727
|
/**
|
|
805
728
|
* Manually trigger the sort of all the childs in the container</p>
|
|
806
|
-
* @name sort
|
|
807
|
-
* @memberof Container
|
|
808
|
-
* @public
|
|
809
729
|
* @param {boolean} [recursive=false] - recursively sort all containers if true
|
|
810
730
|
*/
|
|
811
731
|
sort(recursive) {
|
|
@@ -897,8 +817,6 @@ let globalFloatingCounter = 0;
|
|
|
897
817
|
/**
|
|
898
818
|
* container update function. <br>
|
|
899
819
|
* automatically called by the game manager {@link game}
|
|
900
|
-
* @name update
|
|
901
|
-
* @memberof Container
|
|
902
820
|
* @protected
|
|
903
821
|
* @param {number} dt - time since the last update in milliseconds.
|
|
904
822
|
* @returns {boolean} true if the Container is dirty
|
|
@@ -948,8 +866,6 @@ let globalFloatingCounter = 0;
|
|
|
948
866
|
|
|
949
867
|
/**
|
|
950
868
|
* draw this renderable (automatically called by melonJS)
|
|
951
|
-
* @name draw
|
|
952
|
-
* @memberof Container
|
|
953
869
|
* @protected
|
|
954
870
|
* @param {CanvasRenderer|WebGLRenderer} renderer - a renderer instance
|
|
955
871
|
* @param {Camera2d} [viewport] - the viewport to (re)draw
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Vector2d from '../math/vector2.js';
|
|
9
9
|
import { emit, DRAGSTART, DRAGEND, on, POINTERMOVE, off } from '../system/event.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { renderer } from '../video/video.js';
|
|
9
9
|
import { on, ONCONTEXT_RESTORED, VIEWPORT_ONCHANGE, VIEWPORT_ONRESIZE, once, off, LEVEL_LOADED } from '../system/event.js';
|
|
10
10
|
import pool from '../system/pooling.js';
|
|
11
|
-
import game from '../
|
|
11
|
+
import { game } from '../index.js';
|
|
12
12
|
import Sprite from './sprite.js';
|
|
13
13
|
import { isNumeric } from '../utils/string.js';
|
|
14
14
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import pool from '../system/pooling.js';
|
|
9
9
|
import Renderable from './renderable.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Sprite from './sprite.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import ObservableVector2d from '../math/observable_vector2.js';
|
|
9
9
|
import ObservableVector3d from '../math/observable_vector3.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { renderer } from '../video/video.js';
|
|
9
9
|
import pool from '../system/pooling.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Renderable from './renderable.js';
|
|
9
9
|
import collision from '../physics/collision.js';
|
|
10
10
|
import Body from '../physics/body.js';
|
|
11
11
|
import level from '../level/level.js';
|
|
12
|
-
import game from '../
|
|
12
|
+
import { game } from '../index.js';
|
|
13
13
|
import pool from '../system/pooling.js';
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Container from '../container.js';
|
|
9
9
|
import timer from '../../system/timer.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import timer from '../../system/timer.js';
|
|
9
9
|
import Sprite from '../sprite.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Vector2d from '../../math/vector2.js';
|
|
9
9
|
import BitmapText from '../../text/bitmaptext.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { renderer } from '../video/video.js';
|
|
9
|
-
import game from '../
|
|
9
|
+
import { game } from '../index.js';
|
|
10
10
|
import Camera2d from '../camera/camera2d.js';
|
|
11
11
|
import Color from '../math/color.js';
|
|
12
12
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { pauseTrack, resumeTrack } from '../audio/audio.js';
|
|
9
9
|
import { defer } from '../utils/function.js';
|
|
10
10
|
import { on, VIDEO_INIT, BOOT, emit, STATE_STOP, STATE_PAUSE, STATE_RESTART, STATE_RESUME, STATE_CHANGE } from '../system/event.js';
|
|
11
|
-
import game from '../
|
|
11
|
+
import { game } from '../index.js';
|
|
12
12
|
import { focus } from '../system/device.js';
|
|
13
13
|
import Stage from './stage.js';
|
|
14
14
|
import DefaultLoadingScreen from '../loader/loadingscreen.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { getParent } from '../video/video.js';
|
|
9
9
|
import save from './save.js';
|
|
@@ -736,26 +736,6 @@ function isWebGLSupported(options) {
|
|
|
736
736
|
return _supported;
|
|
737
737
|
}
|
|
738
738
|
|
|
739
|
-
/**
|
|
740
|
-
* return the highest precision format supported by this device for GL Shaders
|
|
741
|
-
* @function getMaxShaderPrecision
|
|
742
|
-
* @memberof device
|
|
743
|
-
* @public
|
|
744
|
-
* @param {WebGLRenderingContext} gl
|
|
745
|
-
* @returns {boolean} "lowp", "mediump", or "highp"
|
|
746
|
-
*/
|
|
747
|
-
function getMaxShaderPrecision(gl) {
|
|
748
|
-
if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.HIGH_FLOAT ).precision > 0 &&
|
|
749
|
-
gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.HIGH_FLOAT ).precision > 0) {
|
|
750
|
-
return "highp";
|
|
751
|
-
}
|
|
752
|
-
if (gl.getShaderPrecisionFormat(gl.VERTEX_SHADER, gl.MEDIUM_FLOAT ).precision > 0 &&
|
|
753
|
-
gl.getShaderPrecisionFormat(gl.FRAGMENT_SHADER, gl.MEDIUM_FLOAT ).precision > 0) {
|
|
754
|
-
return "mediump";
|
|
755
|
-
}
|
|
756
|
-
return "lowp";
|
|
757
|
-
}
|
|
758
|
-
|
|
759
739
|
/**
|
|
760
740
|
* Makes a request to bring this device window to the front.
|
|
761
741
|
* @function focus
|
|
@@ -906,4 +886,4 @@ function vibrate(pattern) {
|
|
|
906
886
|
}
|
|
907
887
|
}
|
|
908
888
|
|
|
909
|
-
export { accelerationX, accelerationY, accelerationZ, alpha, autoFocus, beta, devicePixelRatio, enableSwipe, exitFullscreen, focus, gamma, getElement, getElementBounds,
|
|
889
|
+
export { accelerationX, accelerationY, accelerationZ, alpha, autoFocus, beta, devicePixelRatio, enableSwipe, exitFullscreen, focus, gamma, getElement, getElementBounds, getParentBounds, getParentElement, getScreenOrientation, getStorage, hasAccelerometer, hasDeviceOrientation, hasFullscreenSupport, hasHTML5Audio, hasPointerLockSupport, hasWebAudio, isFullscreen, isLandscape, isMobile, isPortrait, isWebGLSupported, language, localStorage, lockOrientation, maxTouchPoints, nativeBase64, offscreenCanvas, onDeviceRotate, onReady, pauseOnBlur, platform, pointerEvent, requestFullscreen, resumeOnFocus, screenOrientation, sound, stopOnBlur, touch, touchEvent, unlockOrientation, unwatchAccelerometer, unwatchDeviceOrientation, vibrate, watchAccelerometer, watchDeviceOrientation, wheel };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { once, DOM_READY, emit } from './event.js';
|
|
9
9
|
import { nodeJS } from './platform.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import EventEmitter from '../node_modules/eventemitter3/index.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* The device platform type
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
/**
|
|
9
9
|
* @classdesc
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import { on, BOOT } from './event.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import utils from '../utils/utils.js';
|
|
9
9
|
import { on, GAME_BEFORE_UPDATE, BOOT, STATE_RESUME, STATE_RESTART, STATE_CHANGE } from './event.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Color from '../math/color.js';
|
|
9
9
|
import pool from '../system/pooling.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.4.0
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
6
|
-
* @copyright (C) 2011 -
|
|
6
|
+
* @copyright (C) 2011 - 2023 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Glyph from './glyph.js';
|
|
9
9
|
|