melonjs 14.3.0 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -55
- 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 +8 -21
- package/dist/melonjs.mjs/application/header.js +2 -2
- package/dist/melonjs.mjs/application/resize.js +4 -2
- package/dist/melonjs.mjs/application/settings.js +2 -2
- package/dist/melonjs.mjs/audio/audio.js +5 -5
- package/dist/melonjs.mjs/camera/camera2d.js +2 -2
- package/dist/melonjs.mjs/const.js +32 -0
- package/dist/melonjs.mjs/entity/entity.js +44 -10
- package/dist/melonjs.mjs/geometries/ellipse.js +3 -4
- package/dist/melonjs.mjs/geometries/line.js +2 -2
- package/dist/melonjs.mjs/geometries/path2d.js +19 -43
- package/dist/melonjs.mjs/geometries/point.js +2 -7
- package/dist/melonjs.mjs/geometries/poly.js +3 -6
- package/dist/melonjs.mjs/geometries/rectangle.js +14 -10
- package/dist/melonjs.mjs/geometries/roundrect.js +2 -2
- package/dist/melonjs.mjs/index.js +11 -9
- package/dist/melonjs.mjs/input/gamepad.js +11 -17
- 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 +2 -2
- package/dist/melonjs.mjs/input/pointerevent.js +3 -17
- 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 +4 -4
- package/dist/melonjs.mjs/level/tiled/TMXGroup.js +2 -23
- package/dist/melonjs.mjs/level/tiled/TMXLayer.js +67 -64
- 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 +21 -83
- package/dist/melonjs.mjs/level/tiled/TMXTileset.js +6 -20
- 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/cache.js +24 -0
- package/dist/melonjs.mjs/loader/loader.js +332 -715
- package/dist/melonjs.mjs/loader/loadingscreen.js +5 -5
- package/dist/melonjs.mjs/loader/melonjs_logo.png.js +2 -2
- package/dist/melonjs.mjs/loader/parser.js +281 -0
- package/dist/melonjs.mjs/loader/settings.js +91 -0
- 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 +8 -10
- package/dist/melonjs.mjs/math/matrix3.js +19 -22
- package/dist/melonjs.mjs/math/observable_vector2.js +4 -4
- package/dist/melonjs.mjs/math/observable_vector3.js +4 -5
- package/dist/melonjs.mjs/math/vector2.js +4 -4
- package/dist/melonjs.mjs/math/vector3.js +4 -5
- 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 +4 -4
- 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 +19 -15
- package/dist/melonjs.mjs/physics/bounds.js +19 -71
- package/dist/melonjs.mjs/physics/collision.js +3 -3
- package/dist/melonjs.mjs/physics/detector.js +2 -2
- 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 +2 -2
- 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 +26 -20
- package/dist/melonjs.mjs/renderable/dragndrop.js +2 -2
- package/dist/melonjs.mjs/renderable/imagelayer.js +8 -2
- 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 +127 -106
- package/dist/melonjs.mjs/renderable/sprite.js +34 -55
- package/dist/melonjs.mjs/renderable/trigger.js +2 -2
- 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 +2 -2
- package/dist/melonjs.mjs/state/state.js +3 -3
- package/dist/melonjs.mjs/system/device.js +2 -2
- 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 +9 -19
- 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 +67 -9
- 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 +2 -2
- 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 +3 -3
- package/dist/melonjs.mjs/utils/utils.js +3 -5
- package/dist/melonjs.mjs/video/canvas/canvas_renderer.js +2 -2
- package/dist/melonjs.mjs/video/renderer.js +2 -2
- package/dist/melonjs.mjs/video/texture/atlas.js +11 -10
- package/dist/melonjs.mjs/video/texture/cache.js +4 -4
- package/dist/melonjs.mjs/video/texture/canvas_texture.js +2 -2
- package/dist/melonjs.mjs/video/utils/autodetect.js +2 -2
- package/dist/melonjs.mjs/video/video.js +17 -14
- package/dist/melonjs.mjs/video/webgl/buffer/vertex.js +2 -2
- package/dist/melonjs.mjs/video/webgl/compositors/compositor.js +235 -0
- package/{src/video/webgl → dist/melonjs.mjs/video/webgl/compositors}/webgl_compositor.js +28 -205
- package/dist/melonjs.mjs/video/webgl/glshader.js +2 -2
- 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 +2 -2
- 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 +3 -3
- package/dist/melonjs.mjs/video/webgl/webgl_renderer.js +3 -3
- package/dist/melonjs.module.js +19807 -19896
- package/dist/types/application/application.d.ts +5 -1
- package/dist/types/application/resize.d.ts +1 -0
- package/dist/types/const.d.ts +21 -0
- package/dist/types/entity/entity.d.ts +2 -2
- package/dist/types/geometries/path2d.d.ts +5 -31
- package/dist/types/geometries/point.d.ts +2 -7
- package/dist/types/geometries/poly.d.ts +0 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/lang/console.d.ts +7 -0
- package/dist/types/lang/deprecated.d.ts +0 -8
- package/dist/types/level/tiled/TMXGroup.d.ts +7 -28
- package/dist/types/level/tiled/TMXLayer.d.ts +25 -47
- package/dist/types/level/tiled/TMXObject.d.ts +20 -82
- package/dist/types/level/tiled/TMXTile.d.ts +11 -25
- package/dist/types/level/tiled/TMXTileMap.d.ts +18 -56
- package/dist/types/level/tiled/TMXTileset.d.ts +7 -21
- package/dist/types/level/tiled/TMXTilesetGroup.d.ts +3 -9
- package/dist/types/level/tiled/constants.d.ts +5 -0
- package/dist/types/level/tiled/renderer/TMXHexagonalRenderer.d.ts +2 -6
- package/dist/types/level/tiled/renderer/TMXIsometricRenderer.d.ts +2 -6
- package/dist/types/level/tiled/renderer/TMXRenderer.d.ts +6 -18
- package/dist/types/level/tiled/renderer/autodetect.d.ts +9 -0
- package/dist/types/loader/cache.d.ts +7 -0
- package/dist/types/loader/loader.d.ts +166 -181
- package/dist/types/loader/parser.d.ts +41 -0
- package/dist/types/loader/settings.d.ts +57 -0
- package/dist/types/particles/emitter.d.ts +4 -4
- package/dist/types/physics/bounds.d.ts +29 -84
- package/dist/types/renderable/container.d.ts +0 -11
- package/dist/types/renderable/renderable.d.ts +37 -31
- package/dist/types/renderable/sprite.d.ts +3 -3
- package/dist/types/state/state.d.ts +1 -1
- package/dist/types/system/pooling.d.ts +2 -2
- package/dist/types/video/renderer.d.ts +1 -1
- package/dist/types/video/video.d.ts +7 -6
- package/dist/types/video/webgl/compositors/compositor.d.ts +101 -0
- package/dist/types/video/webgl/compositors/webgl_compositor.d.ts +86 -0
- package/dist/types/video/webgl/webgl_compositor.d.ts +2 -3
- package/dist/types/video/webgl/webgl_renderer.d.ts +1 -1
- package/package.json +17 -16
- package/src/application/application.js +6 -19
- package/src/application/resize.js +2 -0
- package/src/audio/audio.js +3 -3
- package/src/const.js +23 -0
- package/src/entity/entity.js +42 -8
- package/src/geometries/ellipse.js +1 -2
- package/src/geometries/path2d.js +17 -41
- package/src/geometries/point.js +0 -5
- package/src/geometries/poly.js +1 -4
- package/src/geometries/rectangle.js +12 -8
- package/src/index.js +4 -2
- package/src/input/gamepad.js +9 -15
- package/src/input/pointerevent.js +1 -15
- package/src/lang/console.js +36 -0
- package/src/lang/deprecated.js +2 -37
- package/src/level/level.js +2 -2
- package/src/level/tiled/TMXGroup.js +0 -21
- package/src/level/tiled/TMXLayer.js +65 -62
- package/src/level/tiled/TMXObject.js +0 -62
- package/src/level/tiled/TMXTile.js +8 -24
- package/src/level/tiled/TMXTileMap.js +19 -81
- package/src/level/tiled/TMXTileset.js +4 -18
- 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/cache.js +16 -0
- package/src/loader/loader.js +339 -709
- package/src/loader/loadingscreen.js +3 -3
- package/src/loader/parser.js +279 -0
- package/src/loader/settings.js +85 -0
- package/src/math/matrix2.js +6 -8
- package/src/math/matrix3.js +17 -20
- package/src/math/observable_vector2.js +2 -2
- package/src/math/observable_vector3.js +2 -3
- package/src/math/vector2.js +2 -2
- package/src/math/vector3.js +2 -3
- package/src/particles/emitter.js +2 -2
- package/src/physics/body.js +17 -13
- package/src/physics/bounds.js +17 -69
- package/src/physics/collision.js +1 -1
- package/src/renderable/container.js +24 -18
- package/src/renderable/imagelayer.js +6 -0
- package/src/renderable/renderable.js +125 -104
- package/src/renderable/sprite.js +32 -53
- package/src/state/state.js +1 -1
- package/src/system/pooling.js +7 -17
- package/src/text/bitmaptext.js +65 -7
- package/src/utils/string.js +1 -1
- package/src/utils/utils.js +1 -3
- package/src/video/texture/atlas.js +9 -8
- package/src/video/texture/cache.js +2 -2
- package/src/video/video.js +15 -12
- package/src/video/webgl/compositors/compositor.js +227 -0
- package/src/video/webgl/compositors/webgl_compositor.js +300 -0
- package/src/video/webgl/webgl_renderer.js +1 -1
- 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,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { __exports as src } from '../../../../../_virtual/index.js';
|
|
9
9
|
import './arraymultimap.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { commonjsGlobal } from '../../../../../_virtual/_commonjsHelpers.js';
|
|
9
9
|
import { __exports as multimap } from '../../../../../_virtual/multimap.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { commonjsGlobal } from '../../../../../_virtual/_commonjsHelpers.js';
|
|
9
9
|
import { __exports as setmultimap } from '../../../../../_virtual/setmultimap.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { __module as earcut$1, exports as earcutExports } from '../../../_virtual/earcut.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { __module as eventemitter3, exports as eventemitter3Exports } from '../../_virtual/index2.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 './index.js';
|
|
9
9
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { commonjsGlobal } from '../../../_virtual/_commonjsHelpers.js';
|
|
9
9
|
import { __exports as howler } from '../../../_virtual/howler.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 ParticleEmitterSettings from './settings.js';
|
|
@@ -167,7 +167,7 @@ function createDefaultParticleTexture(w = 8, h = 8) {
|
|
|
167
167
|
|
|
168
168
|
/**
|
|
169
169
|
* Launch particles from emitter constantly (e.g. for stream)
|
|
170
|
-
* @param {number} duration -
|
|
170
|
+
* @param {number} [duration] - time that the emitter releases particles in ms
|
|
171
171
|
*/
|
|
172
172
|
streamParticles(duration) {
|
|
173
173
|
this._enabled = true;
|
|
@@ -185,7 +185,7 @@ function createDefaultParticleTexture(w = 8, h = 8) {
|
|
|
185
185
|
|
|
186
186
|
/**
|
|
187
187
|
* Launch all particles from emitter and stop (e.g. for explosion)
|
|
188
|
-
* @param {number} total -
|
|
188
|
+
* @param {number} [total] - number of particles to launch
|
|
189
189
|
*/
|
|
190
190
|
burstParticles(total) {
|
|
191
191
|
this._enabled = true;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 timer from '../system/timer.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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
|
* ParticleEmitterSettings contains the default settings for ParticleEmitter
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 Rect from '../geometries/rectangle.js';
|
|
9
9
|
import Ellipse from '../geometries/ellipse.js';
|
|
@@ -565,20 +565,24 @@ import Point from '../geometries/point.js';
|
|
|
565
565
|
* @returns {Body} Reference to this object for method chaining
|
|
566
566
|
*/
|
|
567
567
|
rotate(angle, v = this.getBounds().center) {
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
shape.
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
568
|
+
if (angle !== 0) {
|
|
569
|
+
this.bounds.clear();
|
|
570
|
+
this.forEach((shape) => {
|
|
571
|
+
shape.rotate(angle, v);
|
|
572
|
+
this.bounds.addBounds(shape.getBounds());
|
|
573
|
+
/*
|
|
574
|
+
if (!(shape instanceof Ellipse)) {
|
|
575
|
+
// ellipse position is center
|
|
576
|
+
this.bounds.translate(shape.pos);
|
|
577
|
+
}
|
|
578
|
+
*/
|
|
579
|
+
});
|
|
580
|
+
/*
|
|
581
|
+
if (typeof this.onBodyUpdate === "function") {
|
|
582
|
+
this.onBodyUpdate(this);
|
|
580
583
|
}
|
|
581
|
-
|
|
584
|
+
*/
|
|
585
|
+
}
|
|
582
586
|
return this;
|
|
583
587
|
}
|
|
584
588
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 Vector2d from '../math/vector2.js';
|
|
@@ -14,7 +14,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
14
14
|
*/
|
|
15
15
|
class Bounds {
|
|
16
16
|
/**
|
|
17
|
-
* @param {Vector2d[]} [vertices] - an array of
|
|
17
|
+
* @param {Vector2d[]|Point[]} [vertices] - an array of Vector2d or Point
|
|
18
18
|
*/
|
|
19
19
|
constructor(vertices) {
|
|
20
20
|
// @ignore
|
|
@@ -39,8 +39,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
41
|
* reset the bound
|
|
42
|
-
* @name clear
|
|
43
|
-
* @memberof Bounds
|
|
44
42
|
*/
|
|
45
43
|
clear() {
|
|
46
44
|
this.setMinMax(Infinity, Infinity, -Infinity, -Infinity);
|
|
@@ -49,8 +47,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
49
47
|
|
|
50
48
|
/**
|
|
51
49
|
* sets the bounds to the given min and max value
|
|
52
|
-
* @name setMinMax
|
|
53
|
-
* @memberof Bounds
|
|
54
50
|
* @param {number} minX
|
|
55
51
|
* @param {number} minY
|
|
56
52
|
* @param {number} maxX
|
|
@@ -66,10 +62,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
66
62
|
|
|
67
63
|
/**
|
|
68
64
|
* x position of the bound
|
|
69
|
-
* @public
|
|
70
65
|
* @type {number}
|
|
71
|
-
* @name x
|
|
72
|
-
* @memberof Bounds
|
|
73
66
|
*/
|
|
74
67
|
get x() {
|
|
75
68
|
return this.min.x;
|
|
@@ -83,10 +76,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
83
76
|
|
|
84
77
|
/**
|
|
85
78
|
* y position of the bounds
|
|
86
|
-
* @public
|
|
87
79
|
* @type {number}
|
|
88
|
-
* @name y
|
|
89
|
-
* @memberof Bounds
|
|
90
80
|
*/
|
|
91
81
|
get y() {
|
|
92
82
|
return this.min.y;
|
|
@@ -101,10 +91,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
101
91
|
|
|
102
92
|
/**
|
|
103
93
|
* width of the bounds
|
|
104
|
-
* @public
|
|
105
94
|
* @type {number}
|
|
106
|
-
* @name width
|
|
107
|
-
* @memberof Bounds
|
|
108
95
|
*/
|
|
109
96
|
get width() {
|
|
110
97
|
return this.max.x - this.min.x;
|
|
@@ -116,10 +103,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
116
103
|
|
|
117
104
|
/**
|
|
118
105
|
* width of the bounds
|
|
119
|
-
* @public
|
|
120
106
|
* @type {number}
|
|
121
|
-
* @name width
|
|
122
|
-
* @memberof Bounds
|
|
123
107
|
*/
|
|
124
108
|
get height() {
|
|
125
109
|
return this.max.y - this.min.y;
|
|
@@ -131,10 +115,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
131
115
|
|
|
132
116
|
/**
|
|
133
117
|
* left coordinate of the bound
|
|
134
|
-
* @public
|
|
135
118
|
* @type {number}
|
|
136
|
-
* @name left
|
|
137
|
-
* @memberof Bounds
|
|
138
119
|
*/
|
|
139
120
|
get left() {
|
|
140
121
|
return this.min.x;
|
|
@@ -142,10 +123,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
142
123
|
|
|
143
124
|
/**
|
|
144
125
|
* right coordinate of the bound
|
|
145
|
-
* @public
|
|
146
126
|
* @type {number}
|
|
147
|
-
* @name right
|
|
148
|
-
* @memberof Bounds
|
|
149
127
|
*/
|
|
150
128
|
get right() {
|
|
151
129
|
return this.max.x;
|
|
@@ -153,10 +131,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
153
131
|
|
|
154
132
|
/**
|
|
155
133
|
* top coordinate of the bound
|
|
156
|
-
* @public
|
|
157
134
|
* @type {number}
|
|
158
|
-
* @name top
|
|
159
|
-
* @memberof Bounds
|
|
160
135
|
*/
|
|
161
136
|
get top() {
|
|
162
137
|
return this.min.y;
|
|
@@ -164,10 +139,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
164
139
|
|
|
165
140
|
/**
|
|
166
141
|
* bottom coordinate of the bound
|
|
167
|
-
* @public
|
|
168
142
|
* @type {number}
|
|
169
|
-
* @name bottom
|
|
170
|
-
* @memberof Bounds
|
|
171
143
|
*/
|
|
172
144
|
get bottom() {
|
|
173
145
|
return this.max.y;
|
|
@@ -175,10 +147,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
175
147
|
|
|
176
148
|
/**
|
|
177
149
|
* center position of the bound on the x axis
|
|
178
|
-
* @public
|
|
179
150
|
* @type {number}
|
|
180
|
-
* @name centerX
|
|
181
|
-
* @memberof Bounds
|
|
182
151
|
*/
|
|
183
152
|
get centerX() {
|
|
184
153
|
return this.min.x + (this.width / 2);
|
|
@@ -186,10 +155,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
186
155
|
|
|
187
156
|
/**
|
|
188
157
|
* center position of the bound on the y axis
|
|
189
|
-
* @public
|
|
190
158
|
* @type {number}
|
|
191
|
-
* @name centerY
|
|
192
|
-
* @memberof Bounds
|
|
193
159
|
*/
|
|
194
160
|
get centerY() {
|
|
195
161
|
return this.min.y + (this.height / 2);
|
|
@@ -197,20 +163,25 @@ import Vector2d from '../math/vector2.js';
|
|
|
197
163
|
|
|
198
164
|
/**
|
|
199
165
|
* return the center position of the bound
|
|
200
|
-
* @public
|
|
201
166
|
* @type {Vector2d}
|
|
202
|
-
* @name center
|
|
203
|
-
* @memberof Bounds
|
|
204
167
|
*/
|
|
205
168
|
get center() {
|
|
206
169
|
return this._center.set(this.centerX, this.centerY);
|
|
207
170
|
}
|
|
208
171
|
|
|
172
|
+
/**
|
|
173
|
+
* center the bounds position around the given coordinates
|
|
174
|
+
* @param {number} x - the x coordinate around which to center this bounds
|
|
175
|
+
* @param {number} y - the y coordinate around which to center this bounds
|
|
176
|
+
*/
|
|
177
|
+
centerOn(x, y) {
|
|
178
|
+
this.shift(x - this.width / 2, y - this.height / 2);
|
|
179
|
+
return this;
|
|
180
|
+
}
|
|
181
|
+
|
|
209
182
|
/**
|
|
210
183
|
* Updates bounds using the given vertices
|
|
211
|
-
* @
|
|
212
|
-
* @memberof Bounds
|
|
213
|
-
* @param {Vector2d[]} vertices - an array of me.Vector2d points
|
|
184
|
+
* @param {Vector2d[]|Point[]} vertices - an array of Vector2d or Point
|
|
214
185
|
*/
|
|
215
186
|
update(vertices) {
|
|
216
187
|
this.add(vertices, true);
|
|
@@ -218,9 +189,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
218
189
|
|
|
219
190
|
/**
|
|
220
191
|
* add the given vertices to the bounds definition.
|
|
221
|
-
* @
|
|
222
|
-
* @memberof Bounds
|
|
223
|
-
* @param {Vector2d[]} vertices - an array of me.Vector2d points
|
|
192
|
+
* @param {Vector2d[]|Point[]} vertices - an array of Vector2d or Point
|
|
224
193
|
* @param {boolean} [clear=false] - either to reset the bounds before adding the new vertices
|
|
225
194
|
*/
|
|
226
195
|
add(vertices, clear = false) {
|
|
@@ -238,8 +207,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
238
207
|
|
|
239
208
|
/**
|
|
240
209
|
* add the given bounds to the bounds definition.
|
|
241
|
-
* @name addBounds
|
|
242
|
-
* @memberof Bounds
|
|
243
210
|
* @param {Bounds} bounds
|
|
244
211
|
* @param {boolean} [clear=false] - either to reset the bounds before adding the new vertices
|
|
245
212
|
*/
|
|
@@ -259,13 +226,11 @@ import Vector2d from '../math/vector2.js';
|
|
|
259
226
|
|
|
260
227
|
/**
|
|
261
228
|
* add the given point to the bounds definition.
|
|
262
|
-
* @
|
|
263
|
-
* @
|
|
264
|
-
* @param {Vector2d|Point} point - the point to be added to the bounds
|
|
265
|
-
* @param {Matrix2d} [m] - an optional transform to apply to the given point (only if the given point is a vector)
|
|
229
|
+
* @param {Vector2d|Point} point - the vector or point to be added to the bounds
|
|
230
|
+
* @param {Matrix2d} [m] - an optional transform to apply to the given point (if the given point is a Vector2d)
|
|
266
231
|
*/
|
|
267
232
|
addPoint(point, m) {
|
|
268
|
-
if ((typeof m !== "undefined")
|
|
233
|
+
if ((typeof m !== "undefined")) {
|
|
269
234
|
// only Vectors object have a rotate function
|
|
270
235
|
point = m.apply(point);
|
|
271
236
|
}
|
|
@@ -277,8 +242,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
277
242
|
|
|
278
243
|
/**
|
|
279
244
|
* add the given quad coordinates to this bound definition, multiplied by the given matrix
|
|
280
|
-
* @name addFrame
|
|
281
|
-
* @memberof Bounds
|
|
282
245
|
* @param {number} x0 - left X coordinates of the quad
|
|
283
246
|
* @param {number} y0 - top Y coordinates of the quad
|
|
284
247
|
* @param {number} x1 - right X coordinates of the quad
|
|
@@ -286,9 +249,8 @@ import Vector2d from '../math/vector2.js';
|
|
|
286
249
|
* @param {Matrix2d} [m] - an optional transform to apply to the given frame coordinates
|
|
287
250
|
*/
|
|
288
251
|
addFrame(x0, y0, x1, y1, m) {
|
|
289
|
-
var v = pool.pull("
|
|
252
|
+
var v = pool.pull("Point");
|
|
290
253
|
|
|
291
|
-
// transform all points and add to the bound definition
|
|
292
254
|
this.addPoint(v.set(x0, y0), m);
|
|
293
255
|
this.addPoint(v.set(x1, y0), m);
|
|
294
256
|
this.addPoint(v.set(x0, y1), m);
|
|
@@ -307,8 +269,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
307
269
|
*/
|
|
308
270
|
/**
|
|
309
271
|
* Returns true if the bounds contains the given point.
|
|
310
|
-
* @name contains
|
|
311
|
-
* @memberof Bounds
|
|
312
272
|
* @param {number} x
|
|
313
273
|
* @param {number} y
|
|
314
274
|
* @returns {boolean} True if the bounds contain the point, otherwise false
|
|
@@ -340,8 +300,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
340
300
|
|
|
341
301
|
/**
|
|
342
302
|
* Returns true if the two bounds intersect.
|
|
343
|
-
* @name overlaps
|
|
344
|
-
* @memberof Bounds
|
|
345
303
|
* @param {Bounds|Rect} bounds
|
|
346
304
|
* @returns {boolean} True if the bounds overlap, otherwise false
|
|
347
305
|
*/
|
|
@@ -352,8 +310,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
352
310
|
|
|
353
311
|
/**
|
|
354
312
|
* determines whether all coordinates of this bounds are finite numbers.
|
|
355
|
-
* @name isFinite
|
|
356
|
-
* @memberof Bounds
|
|
357
313
|
* @returns {boolean} false if all coordinates are positive or negative Infinity or NaN; otherwise, true.
|
|
358
314
|
*/
|
|
359
315
|
isFinite() {
|
|
@@ -369,8 +325,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
369
325
|
*/
|
|
370
326
|
/**
|
|
371
327
|
* Translates the bounds by x on the x axis, and y on the y axis
|
|
372
|
-
* @name translate
|
|
373
|
-
* @memberof Bounds
|
|
374
328
|
* @param {number} x
|
|
375
329
|
* @param {number} y
|
|
376
330
|
*/
|
|
@@ -400,8 +354,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
400
354
|
*/
|
|
401
355
|
/**
|
|
402
356
|
* Shifts the bounds to the given x, y position.
|
|
403
|
-
* @name shift
|
|
404
|
-
* @memberof Bounds
|
|
405
357
|
* @param {number} x
|
|
406
358
|
* @param {number} y
|
|
407
359
|
*/
|
|
@@ -429,8 +381,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
429
381
|
|
|
430
382
|
/**
|
|
431
383
|
* clone this bounds
|
|
432
|
-
* @name clone
|
|
433
|
-
* @memberof Bounds
|
|
434
384
|
* @returns {Bounds}
|
|
435
385
|
*/
|
|
436
386
|
clone() {
|
|
@@ -441,8 +391,6 @@ import Vector2d from '../math/vector2.js';
|
|
|
441
391
|
|
|
442
392
|
/**
|
|
443
393
|
* Returns a polygon whose edges are the same as this bounds.
|
|
444
|
-
* @name toPolygon
|
|
445
|
-
* @memberof Bounds
|
|
446
394
|
* @returns {Polygon} a new Polygon that represents this bounds.
|
|
447
395
|
*/
|
|
448
396
|
toPolygon () {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { game } from '../index.js';
|
|
9
9
|
|
|
@@ -124,7 +124,7 @@ var collision = {
|
|
|
124
124
|
* // ...
|
|
125
125
|
* }
|
|
126
126
|
*/
|
|
127
|
-
rayCast(line, result) { return game.world.rayCast(line, result); }
|
|
127
|
+
rayCast(line, result) { return game.world.detector.rayCast(line, result); }
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
var collision$1 = collision;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 * as sat from './sat.js';
|
|
9
9
|
import ResponseObject from './response.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { remove } from '../utils/array.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { on, GAME_RESET, LEVEL_LOADED } from '../system/event.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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 { version } from '../index.js';
|
|
@@ -24,10 +24,10 @@ class BasePlugin {
|
|
|
24
24
|
* this can be overridden by the plugin
|
|
25
25
|
* @public
|
|
26
26
|
* @type {string}
|
|
27
|
-
* @default "14.
|
|
27
|
+
* @default "14.5.0"
|
|
28
28
|
* @name plugin.Base#version
|
|
29
29
|
*/
|
|
30
|
-
this.version = "14.
|
|
30
|
+
this.version = "14.5.0";
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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
|
import Body from '../physics/body.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.
|
|
2
|
+
* melonJS Game Engine - v14.5.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';
|