melonjs 14.1.0 → 14.1.2
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 +8 -3
- package/dist/melonjs.mjs/_virtual/_commonjsHelpers.js +1 -1
- package/dist/melonjs.mjs/_virtual/arraymultimap.js +1 -1
- package/dist/melonjs.mjs/_virtual/earcut.js +1 -1
- package/dist/melonjs.mjs/_virtual/howler.js +1 -1
- package/dist/melonjs.mjs/_virtual/index.js +1 -1
- package/dist/melonjs.mjs/_virtual/index2.js +1 -1
- package/dist/melonjs.mjs/_virtual/multimap.js +1 -1
- package/dist/melonjs.mjs/_virtual/setmultimap.js +1 -1
- package/dist/melonjs.mjs/application/application.js +3 -5
- package/dist/melonjs.mjs/audio/audio.js +1 -1
- package/dist/melonjs.mjs/camera/camera2d.js +3 -4
- package/dist/melonjs.mjs/entity/entity.js +3 -4
- package/dist/melonjs.mjs/game.js +1 -1
- package/dist/melonjs.mjs/geometries/ellipse.js +3 -4
- package/dist/melonjs.mjs/geometries/line.js +3 -4
- package/dist/melonjs.mjs/geometries/path2d.js +3 -4
- package/dist/melonjs.mjs/geometries/point.js +3 -4
- package/dist/melonjs.mjs/geometries/poly.js +3 -5
- package/dist/melonjs.mjs/geometries/rectangle.js +3 -4
- package/dist/melonjs.mjs/geometries/roundrect.js +2 -3
- package/dist/melonjs.mjs/index.js +2 -2
- package/dist/melonjs.mjs/input/gamepad.js +1 -1
- package/dist/melonjs.mjs/input/input.js +1 -1
- package/dist/melonjs.mjs/input/keyboard.js +1 -1
- package/dist/melonjs.mjs/input/pointer.js +1 -1
- package/dist/melonjs.mjs/input/pointerevent.js +1 -1
- package/dist/melonjs.mjs/lang/deprecated.js +1 -1
- package/dist/melonjs.mjs/level/level.js +1 -1
- package/dist/melonjs.mjs/level/tiled/TMXGroup.js +1 -1
- package/dist/melonjs.mjs/level/tiled/TMXLayer.js +3 -5
- package/dist/melonjs.mjs/level/tiled/TMXObject.js +1 -1
- package/dist/melonjs.mjs/level/tiled/TMXTile.js +3 -4
- package/dist/melonjs.mjs/level/tiled/TMXTileMap.js +5 -8
- package/dist/melonjs.mjs/level/tiled/TMXTileset.js +3 -5
- package/dist/melonjs.mjs/level/tiled/TMXTilesetGroup.js +3 -5
- package/dist/melonjs.mjs/level/tiled/TMXUtils.js +1 -1
- package/dist/melonjs.mjs/level/tiled/renderer/TMXHexagonalRenderer.js +3 -5
- package/dist/melonjs.mjs/level/tiled/renderer/TMXIsometricRenderer.js +3 -5
- package/dist/melonjs.mjs/level/tiled/renderer/TMXOrthogonalRenderer.js +3 -5
- package/dist/melonjs.mjs/level/tiled/renderer/TMXRenderer.js +3 -4
- package/dist/melonjs.mjs/level/tiled/renderer/TMXStaggeredRenderer.js +3 -5
- package/dist/melonjs.mjs/loader/loader.js +1 -1
- package/dist/melonjs.mjs/loader/loadingscreen.js +1 -1
- package/dist/melonjs.mjs/loader/melonjs_logo.png.js +1 -1
- package/dist/melonjs.mjs/math/color.js +3 -5
- package/dist/melonjs.mjs/math/math.js +1 -1
- package/dist/melonjs.mjs/math/matrix2.js +3 -5
- package/dist/melonjs.mjs/math/matrix3.js +3 -5
- package/dist/melonjs.mjs/math/observable_vector2.js +3 -5
- package/dist/melonjs.mjs/math/observable_vector3.js +3 -5
- package/dist/melonjs.mjs/math/vector2.js +3 -5
- package/dist/melonjs.mjs/math/vector3.js +3 -5
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/arraymultimap.js +1 -1
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/index.js +1 -1
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/multimap.js +1 -1
- package/dist/melonjs.mjs/node_modules/@teppeis/multimaps/dist/src/setmultimap.js +1 -1
- package/dist/melonjs.mjs/node_modules/earcut/src/earcut.js +1 -1
- package/dist/melonjs.mjs/node_modules/eventemitter3/index.js +1 -1
- package/dist/melonjs.mjs/node_modules/eventemitter3/index2.js +9 -0
- package/dist/melonjs.mjs/node_modules/howler/dist/howler.js +1 -1
- package/dist/melonjs.mjs/particles/emitter.js +3 -5
- package/dist/melonjs.mjs/particles/particle.js +3 -5
- package/dist/melonjs.mjs/particles/settings.js +1 -1
- package/dist/melonjs.mjs/physics/body.js +3 -5
- package/dist/melonjs.mjs/physics/bounds.js +3 -4
- package/dist/melonjs.mjs/physics/collision.js +1 -1
- package/dist/melonjs.mjs/physics/detector.js +1 -5
- package/dist/melonjs.mjs/physics/quadtree.js +23 -20
- package/dist/melonjs.mjs/physics/response.js +1 -1
- package/dist/melonjs.mjs/physics/sat.js +1 -1
- package/dist/melonjs.mjs/physics/world.js +3 -5
- package/dist/melonjs.mjs/plugin/plugin.js +3 -3
- package/dist/melonjs.mjs/renderable/collectable.js +3 -5
- package/dist/melonjs.mjs/renderable/colorlayer.js +3 -5
- package/dist/melonjs.mjs/renderable/container.js +6 -8
- package/dist/melonjs.mjs/renderable/dragndrop.js +1 -1
- package/dist/melonjs.mjs/renderable/imagelayer.js +4 -5
- package/dist/melonjs.mjs/renderable/light2d.js +3 -4
- package/dist/melonjs.mjs/renderable/nineslicesprite.js +3 -4
- package/dist/melonjs.mjs/renderable/renderable.js +5 -7
- package/dist/melonjs.mjs/renderable/sprite.js +3 -4
- package/dist/melonjs.mjs/renderable/trigger.js +3 -4
- package/dist/melonjs.mjs/renderable/ui/uibaseelement.js +3 -4
- package/dist/melonjs.mjs/renderable/ui/uispriteelement.js +3 -4
- package/dist/melonjs.mjs/renderable/ui/uitextbutton.js +3 -4
- package/dist/melonjs.mjs/state/stage.js +3 -4
- package/dist/melonjs.mjs/state/state.js +1 -1
- package/dist/melonjs.mjs/system/device.js +1 -1
- package/dist/melonjs.mjs/system/dom.js +1 -1
- package/dist/melonjs.mjs/system/event.js +1 -1
- package/dist/melonjs.mjs/system/platform.js +1 -1
- package/dist/melonjs.mjs/system/pooling.js +1 -1
- package/dist/melonjs.mjs/system/save.js +1 -1
- package/dist/melonjs.mjs/system/timer.js +1 -1
- package/dist/melonjs.mjs/text/bitmaptext.js +3 -4
- package/dist/melonjs.mjs/text/bitmaptextdata.js +3 -4
- package/dist/melonjs.mjs/text/glyph.js +3 -4
- package/dist/melonjs.mjs/text/text.js +3 -4
- package/dist/melonjs.mjs/text/textmetrics.js +3 -4
- package/dist/melonjs.mjs/text/textstyle.js +1 -1
- package/dist/melonjs.mjs/tweens/easing.js +1 -1
- package/dist/melonjs.mjs/tweens/interpolation.js +1 -1
- package/dist/melonjs.mjs/tweens/tween.js +3 -4
- package/dist/melonjs.mjs/utils/agent.js +1 -1
- package/dist/melonjs.mjs/utils/array.js +1 -1
- package/dist/melonjs.mjs/utils/file.js +1 -1
- package/dist/melonjs.mjs/utils/function.js +1 -1
- package/dist/melonjs.mjs/utils/string.js +1 -1
- package/dist/melonjs.mjs/utils/utils.js +1 -1
- package/dist/melonjs.mjs/video/canvas/canvas_renderer.js +3 -4
- package/dist/melonjs.mjs/video/renderer.js +4 -5
- package/dist/melonjs.mjs/video/texture/atlas.js +1 -1
- package/dist/melonjs.mjs/video/texture/cache.js +1 -1
- package/dist/melonjs.mjs/video/texture/canvas_texture.js +1 -1
- package/dist/melonjs.mjs/video/video.js +1 -1
- package/dist/melonjs.mjs/video/webgl/buffer/vertex.js +3 -4
- package/dist/melonjs.mjs/video/webgl/glshader.js +3 -4
- package/dist/melonjs.mjs/video/webgl/shaders/primitive.frag.js +1 -1
- package/dist/melonjs.mjs/video/webgl/shaders/primitive.vert.js +1 -1
- package/dist/melonjs.mjs/video/webgl/shaders/quad.frag.js +1 -1
- package/dist/melonjs.mjs/video/webgl/shaders/quad.vert.js +1 -1
- package/dist/melonjs.mjs/video/webgl/utils/attributes.js +1 -1
- package/dist/melonjs.mjs/video/webgl/utils/precision.js +1 -1
- package/dist/melonjs.mjs/video/webgl/utils/program.js +1 -1
- package/dist/melonjs.mjs/video/webgl/utils/string.js +1 -1
- package/dist/melonjs.mjs/video/webgl/utils/uniforms.js +1 -1
- package/dist/melonjs.mjs/video/webgl/webgl_compositor.js +3 -4
- package/dist/melonjs.mjs/video/webgl/webgl_renderer.js +3 -4
- package/dist/melonjs.module.js +659 -740
- package/dist/types/index.d.ts +108 -0
- package/package.json +19 -19
- package/src/application/application.js +1 -2
- package/src/camera/camera2d.js +1 -2
- package/src/entity/entity.js +1 -2
- package/src/geometries/ellipse.js +1 -2
- package/src/geometries/line.js +1 -2
- package/src/geometries/path2d.js +1 -2
- package/src/geometries/point.js +1 -2
- package/src/geometries/poly.js +1 -3
- package/src/geometries/rectangle.js +1 -2
- package/src/geometries/roundrect.js +1 -2
- package/src/level/tiled/TMXLayer.js +1 -2
- package/src/level/tiled/TMXTile.js +1 -2
- package/src/level/tiled/TMXTileMap.js +2 -4
- package/src/level/tiled/TMXTileset.js +1 -2
- package/src/level/tiled/TMXTilesetGroup.js +1 -2
- package/src/level/tiled/renderer/TMXHexagonalRenderer.js +1 -2
- package/src/level/tiled/renderer/TMXIsometricRenderer.js +1 -2
- package/src/level/tiled/renderer/TMXOrthogonalRenderer.js +1 -2
- package/src/level/tiled/renderer/TMXRenderer.js +1 -2
- package/src/level/tiled/renderer/TMXStaggeredRenderer.js +1 -2
- package/src/math/color.js +1 -2
- package/src/math/matrix2.js +1 -2
- package/src/math/matrix3.js +1 -2
- package/src/math/observable_vector2.js +1 -2
- package/src/math/observable_vector3.js +1 -2
- package/src/math/vector2.js +1 -2
- package/src/math/vector3.js +1 -2
- package/src/particles/emitter.js +1 -2
- package/src/particles/particle.js +1 -2
- package/src/physics/body.js +1 -2
- package/src/physics/bounds.js +2 -2
- package/src/physics/detector.js +0 -4
- package/src/physics/quadtree.js +7 -12
- package/src/physics/world.js +1 -2
- package/src/renderable/collectable.js +1 -3
- package/src/renderable/colorlayer.js +1 -3
- package/src/renderable/container.js +4 -6
- package/src/renderable/imagelayer.js +1 -2
- package/src/renderable/light2d.js +1 -2
- package/src/renderable/nineslicesprite.js +1 -2
- package/src/renderable/renderable.js +3 -5
- package/src/renderable/sprite.js +1 -2
- package/src/renderable/trigger.js +1 -2
- package/src/renderable/ui/uibaseelement.js +1 -2
- package/src/renderable/ui/uispriteelement.js +2 -2
- package/src/renderable/ui/uitextbutton.js +2 -2
- package/src/state/stage.js +1 -2
- package/src/text/bitmaptext.js +1 -2
- package/src/text/bitmaptextdata.js +1 -2
- package/src/text/glyph.js +1 -2
- package/src/text/text.js +1 -2
- package/src/text/textmetrics.js +1 -2
- package/src/tweens/tween.js +1 -2
- package/src/video/canvas/canvas_renderer.js +1 -2
- package/src/video/renderer.js +1 -2
- package/src/video/webgl/buffer/vertex.js +1 -2
- package/src/video/webgl/glshader.js +2 -2
- package/src/video/webgl/webgl_compositor.js +1 -2
- package/src/video/webgl/webgl_renderer.js +1 -2
- package/dist/melonjs.module.d.ts +0 -14020
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -15,7 +15,7 @@ import Bounds from '../../../physics/bounds.js';
|
|
|
15
15
|
* @classdesc
|
|
16
16
|
* The map renderer base class
|
|
17
17
|
*/
|
|
18
|
-
class TMXRenderer {
|
|
18
|
+
class TMXRenderer {
|
|
19
19
|
/**
|
|
20
20
|
* @param {number} cols - width of the tilemap in tiles
|
|
21
21
|
* @param {number} rows - height of the tilemap in tiles
|
|
@@ -118,8 +118,7 @@ class TMXRenderer {
|
|
|
118
118
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
var TMXRenderer$1 = TMXRenderer;
|
|
122
121
|
|
|
123
122
|
/* eslint-enable no-unused-vars */
|
|
124
123
|
|
|
125
|
-
export { TMXRenderer
|
|
124
|
+
export { TMXRenderer as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -15,7 +15,7 @@ import { degToRad } from '../../../math/math.js';
|
|
|
15
15
|
* a Staggered Map Renderder
|
|
16
16
|
* @augments TMXHexagonalRenderer
|
|
17
17
|
*/
|
|
18
|
-
class TMXStaggeredRenderer extends TMXHexagonalRenderer {
|
|
18
|
+
class TMXStaggeredRenderer extends TMXHexagonalRenderer {
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* return true if the renderer can render the specified layer
|
|
@@ -104,6 +104,4 @@ class TMXStaggeredRenderer extends TMXHexagonalRenderer {
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
export { TMXStaggeredRenderer$1 as default };
|
|
107
|
+
export { TMXStaggeredRenderer as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -189,7 +189,7 @@ var cssToRGB = new Map();
|
|
|
189
189
|
* @classdesc
|
|
190
190
|
* A color manipulation object.
|
|
191
191
|
*/
|
|
192
|
-
class Color {
|
|
192
|
+
class Color {
|
|
193
193
|
/**
|
|
194
194
|
* @param {number} [r=0] - red component or array of color components
|
|
195
195
|
* @param {number} [g=0] - green component
|
|
@@ -613,6 +613,4 @@ class Color {
|
|
|
613
613
|
}
|
|
614
614
|
}
|
|
615
615
|
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
export { Color$1 as default };
|
|
616
|
+
export { Color as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -14,7 +14,7 @@ import Matrix3d from './matrix3.js';
|
|
|
14
14
|
* the identity matrix and parameters position : <br>
|
|
15
15
|
* <img src="images/identity-matrix_2x.png"/>
|
|
16
16
|
*/
|
|
17
|
-
class Matrix2d {
|
|
17
|
+
class Matrix2d {
|
|
18
18
|
/**
|
|
19
19
|
* @param {(Matrix2d|Matrix3d|...number)} args - an instance of me.Matrix2d or me.Matrix3d to copy from, or individual matrix components (See {@link Matrix2d.setTransform}). If not arguments are given, the matrix will be set to Identity.
|
|
20
20
|
*/
|
|
@@ -498,6 +498,4 @@ class Matrix2d {
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
export { Matrix2d$1 as default };
|
|
501
|
+
export { Matrix2d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -12,7 +12,7 @@ import { EPSILON } from './math.js';
|
|
|
12
12
|
* @classdesc
|
|
13
13
|
* a 4x4 Matrix3d Object
|
|
14
14
|
*/
|
|
15
|
-
class Matrix3d {
|
|
15
|
+
class Matrix3d {
|
|
16
16
|
/**
|
|
17
17
|
* @param {(Matrix3d|...number)} args - An instance of me.Matrix3d to copy from, or individual Matrix components (See {@link Matrix3d.setTransform}). If not arguments are given, the matrix will be set to Identity.
|
|
18
18
|
*/
|
|
@@ -676,6 +676,4 @@ class Matrix3d {
|
|
|
676
676
|
}
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
export { Matrix3d$1 as default };
|
|
679
|
+
export { Matrix3d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -14,7 +14,7 @@ import { clamp } from './math.js';
|
|
|
14
14
|
* A Vector2d object that provide notification by executing the given callback when the vector is changed.
|
|
15
15
|
* @augments Vector2d
|
|
16
16
|
*/
|
|
17
|
-
class ObservableVector2d extends Vector2d {
|
|
17
|
+
class ObservableVector2d extends Vector2d {
|
|
18
18
|
/**
|
|
19
19
|
* @param {number} x - x value of the vector
|
|
20
20
|
* @param {number} y - y value of the vector
|
|
@@ -466,6 +466,4 @@ class ObservableVector2d extends Vector2d {
|
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
468
|
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
export { ObservableVector2d$1 as default };
|
|
469
|
+
export { ObservableVector2d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -14,7 +14,7 @@ import pool from '../system/pooling.js';
|
|
|
14
14
|
* A Vector3d object that provide notification by executing the given callback when the vector is changed.
|
|
15
15
|
* @augments Vector3d
|
|
16
16
|
*/
|
|
17
|
-
class ObservableVector3d extends Vector3d {
|
|
17
|
+
class ObservableVector3d extends Vector3d {
|
|
18
18
|
/**
|
|
19
19
|
* @param {number} x - x value of the vector
|
|
20
20
|
* @param {number} y - y value of the vector
|
|
@@ -556,6 +556,4 @@ class ObservableVector3d extends Vector3d {
|
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
export { ObservableVector3d$1 as default };
|
|
559
|
+
export { ObservableVector3d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -12,7 +12,7 @@ import pool from '../system/pooling.js';
|
|
|
12
12
|
* @classdesc
|
|
13
13
|
* a generic 2D Vector Object
|
|
14
14
|
*/
|
|
15
|
-
class Vector2d {
|
|
15
|
+
class Vector2d {
|
|
16
16
|
/**
|
|
17
17
|
* @param {number} [x=0] - x value of the vector
|
|
18
18
|
* @param {number} [y=0] - y value of the vector
|
|
@@ -523,6 +523,4 @@ class Vector2d {
|
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
export { Vector2d$1 as default };
|
|
526
|
+
export { Vector2d as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -12,7 +12,7 @@ import pool from '../system/pooling.js';
|
|
|
12
12
|
* @classdesc
|
|
13
13
|
* a generic 3D Vector Object
|
|
14
14
|
*/
|
|
15
|
-
class Vector3d {
|
|
15
|
+
class Vector3d {
|
|
16
16
|
/**
|
|
17
17
|
* @param {number} [x=0] - x value of the vector
|
|
18
18
|
* @param {number} [y=0] - y value of the vector
|
|
@@ -564,6 +564,4 @@ class Vector3d {
|
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
export { Vector3d$1 as default };
|
|
567
|
+
export { Vector3d as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
|
+
* http://www.melonjs.org
|
|
4
|
+
* melonjs is licensed under the MIT License.
|
|
5
|
+
* http://www.opensource.org/licenses/mit-license
|
|
6
|
+
* @copyright (C) 2011 - 2022 Olivier Biot (AltByte Pte Ltd)
|
|
7
|
+
*/
|
|
8
|
+
import EventEmitter from './index.js';
|
|
9
|
+
export { default as EventEmitter, default } from './index.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -27,7 +27,7 @@ function createDefaultParticleTexture(w = 8, h = 8) {
|
|
|
27
27
|
* Particle Emitter Object.
|
|
28
28
|
* @augments Container
|
|
29
29
|
*/
|
|
30
|
-
class ParticleEmitter extends Container {
|
|
30
|
+
class ParticleEmitter extends Container {
|
|
31
31
|
/**
|
|
32
32
|
* @param {number} x - x position of the particle emitter
|
|
33
33
|
* @param {number} y - y position of the particle emitter
|
|
@@ -262,6 +262,4 @@ class ParticleEmitter extends Container {
|
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
export { ParticleEmitter$1 as default };
|
|
265
|
+
export { ParticleEmitter as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -15,7 +15,7 @@ import Renderable from '../renderable/renderable.js';
|
|
|
15
15
|
* Single Particle Object.
|
|
16
16
|
* @augments Renderable
|
|
17
17
|
*/
|
|
18
|
-
class Particle extends Renderable {
|
|
18
|
+
class Particle extends Renderable {
|
|
19
19
|
/**
|
|
20
20
|
* @param {ParticleEmitter} emitter - the particle emitter
|
|
21
21
|
*/
|
|
@@ -183,6 +183,4 @@ class Particle extends Renderable {
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
export { Particle$1 as default };
|
|
186
|
+
export { Particle as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -21,7 +21,7 @@ import Point from '../geometries/point.js';
|
|
|
21
21
|
* a Generic Physic Body Object with some physic properties and behavior functionality, to as a member of a Renderable.
|
|
22
22
|
* @see Renderable.body
|
|
23
23
|
*/
|
|
24
|
-
class Body {
|
|
24
|
+
class Body {
|
|
25
25
|
/**
|
|
26
26
|
* @param {Renderable} ancestor - the parent object this body is attached to
|
|
27
27
|
* @param {Rect|Rect[]|Polygon|Polygon[]|Line|Line[]|Ellipse|Ellipse[]|Point|Point[]|Bounds|Bounds[]|object} [shapes] - a initial shape, list of shapes, or JSON object defining the body
|
|
@@ -699,6 +699,4 @@ class Body {
|
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
701
|
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
export { Body$1 as default };
|
|
702
|
+
export { Body as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -12,7 +12,7 @@ import Vector2d from '../math/vector2.js';
|
|
|
12
12
|
* @classdesc
|
|
13
13
|
* a bound object contains methods for creating and manipulating axis-aligned bounding boxes (AABB).
|
|
14
14
|
*/
|
|
15
|
-
class Bounds {
|
|
15
|
+
class Bounds {
|
|
16
16
|
/**
|
|
17
17
|
* @param {Vector2d[]} [vertices] - an array of me.Vector2d points
|
|
18
18
|
*/
|
|
@@ -455,6 +455,5 @@ class Bounds {
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
}
|
|
458
|
-
var Bounds$1 = Bounds;
|
|
459
458
|
|
|
460
|
-
export { Bounds
|
|
459
|
+
export { Bounds as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -31,8 +31,6 @@ let globalResponse = new ResponseObject();
|
|
|
31
31
|
/**
|
|
32
32
|
* a function used to determine if two objects should collide (based on both respective objects collision mask and type).<br>
|
|
33
33
|
* you can redefine this function if you need any specific rules over what should collide with what.
|
|
34
|
-
* @name shouldCollide
|
|
35
|
-
* @memberof collision
|
|
36
34
|
* @ignore
|
|
37
35
|
* @param {Renderable} a - a reference to the object A.
|
|
38
36
|
* @param {Renderable} b - a reference to the object B.
|
|
@@ -56,7 +54,6 @@ function shouldCollide(a, b) {
|
|
|
56
54
|
|
|
57
55
|
/**
|
|
58
56
|
* find all the collisions for the specified object
|
|
59
|
-
* @name collisionCheck
|
|
60
57
|
* @ignore
|
|
61
58
|
* @param {Renderable} objA - object to be tested for collision
|
|
62
59
|
* @param {ResponseObject} [response] - a user defined response object that will be populated if they intersect.
|
|
@@ -119,7 +116,6 @@ function collisionCheck(objA, response = globalResponse) {
|
|
|
119
116
|
|
|
120
117
|
/**
|
|
121
118
|
* Checks for object colliding with the given line
|
|
122
|
-
* @name rayCast
|
|
123
119
|
* @ignore
|
|
124
120
|
* @param {Line} line - line to be tested for collision
|
|
125
121
|
* @param {Array.<Renderable>} [result] - a user defined array that will be populated with intersecting physic objects.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
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
6
|
* @copyright (C) 2011 - 2022 Olivier Biot (AltByte Pte Ltd)
|
|
7
7
|
*/
|
|
8
8
|
import Vector2d from '../math/vector2.js';
|
|
9
|
-
import Container from '../renderable/container.js';
|
|
10
9
|
import { remove } from '../utils/array.js';
|
|
11
10
|
|
|
12
11
|
/*
|
|
@@ -15,7 +14,6 @@ import { remove } from '../utils/array.js';
|
|
|
15
14
|
* https://github.com/timohausmann/quadtree-js/
|
|
16
15
|
**/
|
|
17
16
|
|
|
18
|
-
|
|
19
17
|
/**
|
|
20
18
|
* a pool of `QuadTree` objects
|
|
21
19
|
* @ignore
|
|
@@ -60,7 +58,7 @@ var QT_VECTOR = new Vector2d();
|
|
|
60
58
|
* a QuadTree implementation in JavaScript, a 2d spatial subdivision algorithm.
|
|
61
59
|
* @see game.world.broadphase
|
|
62
60
|
*/
|
|
63
|
-
class QuadTree {
|
|
61
|
+
class QuadTree {
|
|
64
62
|
/**
|
|
65
63
|
* @param {World} world - the physic world this QuadTree belongs to
|
|
66
64
|
* @param {Bounds} bounds - bounds of the node
|
|
@@ -77,7 +75,6 @@ class QuadTree {
|
|
|
77
75
|
this.max_levels = max_levels;
|
|
78
76
|
|
|
79
77
|
this.level = level;
|
|
80
|
-
this.bounds = bounds;
|
|
81
78
|
|
|
82
79
|
this.objects = [];
|
|
83
80
|
this.nodes = [];
|
|
@@ -87,8 +84,8 @@ class QuadTree {
|
|
|
87
84
|
* Split the node into 4 subnodes
|
|
88
85
|
*/
|
|
89
86
|
split() {
|
|
90
|
-
this.level + 1
|
|
91
|
-
|
|
87
|
+
var nextLevel = this.level + 1,
|
|
88
|
+
subWidth = this.bounds.width / 2,
|
|
92
89
|
subHeight = this.bounds.height / 2,
|
|
93
90
|
left = this.bounds.left,
|
|
94
91
|
top = this.bounds.top;
|
|
@@ -96,50 +93,58 @@ class QuadTree {
|
|
|
96
93
|
//top right node
|
|
97
94
|
this.nodes[0] = QT_ARRAY_POP(
|
|
98
95
|
this.world,
|
|
99
|
-
|
|
96
|
+
{
|
|
100
97
|
left : left + subWidth,
|
|
101
98
|
top : top,
|
|
102
99
|
width : subWidth,
|
|
103
100
|
height : subHeight
|
|
104
101
|
},
|
|
105
102
|
this.max_objects,
|
|
106
|
-
this.max_levels
|
|
103
|
+
this.max_levels,
|
|
104
|
+
nextLevel
|
|
105
|
+
);
|
|
107
106
|
|
|
108
107
|
//top left node
|
|
109
108
|
this.nodes[1] = QT_ARRAY_POP(
|
|
110
109
|
this.world,
|
|
111
|
-
|
|
110
|
+
{
|
|
112
111
|
left : left,
|
|
113
112
|
top: top,
|
|
114
113
|
width : subWidth,
|
|
115
114
|
height : subHeight
|
|
116
115
|
},
|
|
117
116
|
this.max_objects,
|
|
118
|
-
this.max_levels
|
|
117
|
+
this.max_levels,
|
|
118
|
+
nextLevel
|
|
119
|
+
);
|
|
119
120
|
|
|
120
121
|
//bottom left node
|
|
121
122
|
this.nodes[2] = QT_ARRAY_POP(
|
|
122
123
|
this.world,
|
|
123
|
-
|
|
124
|
+
{
|
|
124
125
|
left : left,
|
|
125
126
|
top : top + subHeight,
|
|
126
127
|
width : subWidth,
|
|
127
128
|
height : subHeight
|
|
128
129
|
},
|
|
129
130
|
this.max_objects,
|
|
130
|
-
this.max_levels
|
|
131
|
+
this.max_levels,
|
|
132
|
+
nextLevel
|
|
133
|
+
);
|
|
131
134
|
|
|
132
135
|
//bottom right node
|
|
133
136
|
this.nodes[3] = QT_ARRAY_POP(
|
|
134
137
|
this.world,
|
|
135
|
-
|
|
138
|
+
{
|
|
136
139
|
left : left + subWidth,
|
|
137
140
|
top : top + subHeight,
|
|
138
141
|
width : subWidth,
|
|
139
142
|
height : subHeight
|
|
140
143
|
},
|
|
141
144
|
this.max_objects,
|
|
142
|
-
this.max_levels
|
|
145
|
+
this.max_levels,
|
|
146
|
+
nextLevel
|
|
147
|
+
);
|
|
143
148
|
}
|
|
144
149
|
|
|
145
150
|
/*
|
|
@@ -155,7 +160,7 @@ class QuadTree {
|
|
|
155
160
|
if (item.isFloating === true) {
|
|
156
161
|
pos = this.world.app.viewport.localToWorld(bounds.left, bounds.top, QT_VECTOR);
|
|
157
162
|
} else {
|
|
158
|
-
pos = QT_VECTOR.set(
|
|
163
|
+
pos = QT_VECTOR.set(item.left, item.top);
|
|
159
164
|
}
|
|
160
165
|
|
|
161
166
|
var index = -1,
|
|
@@ -198,7 +203,7 @@ class QuadTree {
|
|
|
198
203
|
insertContainer(container) {
|
|
199
204
|
for (var i = container.children.length, child; i--, (child = container.children[i]);) {
|
|
200
205
|
if (child.isKinematic !== true) {
|
|
201
|
-
if (child
|
|
206
|
+
if (typeof child.addChild === "function") {
|
|
202
207
|
if (child.name !== "rootContainer") {
|
|
203
208
|
this.insert(child);
|
|
204
209
|
}
|
|
@@ -386,6 +391,4 @@ class QuadTree {
|
|
|
386
391
|
}
|
|
387
392
|
}
|
|
388
393
|
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
export { QuadTree$1 as default };
|
|
394
|
+
export { QuadTree as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -18,7 +18,7 @@ import state from '../state/state.js';
|
|
|
18
18
|
* an object representing the physic world, and responsible for managing and updating all childs and physics
|
|
19
19
|
* @augments Container
|
|
20
20
|
*/
|
|
21
|
-
class World extends Container {
|
|
21
|
+
class World extends Container {
|
|
22
22
|
/**
|
|
23
23
|
* @param {number} [x=0] - position of the container (accessible via the inherited pos.x property)
|
|
24
24
|
* @param {number} [y=0] - position of the container (accessible via the inherited pos.y property)
|
|
@@ -216,6 +216,4 @@ class World extends Container {
|
|
|
216
216
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
export { World$1 as default };
|
|
219
|
+
export { World as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* melonJS Game Engine - v14.1.
|
|
2
|
+
* melonJS Game Engine - v14.1.2
|
|
3
3
|
* http://www.melonjs.org
|
|
4
4
|
* melonjs is licensed under the MIT License.
|
|
5
5
|
* http://www.opensource.org/licenses/mit-license
|
|
@@ -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.1.
|
|
27
|
+
* @default "14.1.2"
|
|
28
28
|
* @name plugin.Base#version
|
|
29
29
|
*/
|
|
30
|
-
this.version = "14.1.
|
|
30
|
+
this.version = "14.1.2";
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|