Skip to content

Commit

Permalink
9.1.2 distribution files
Browse files Browse the repository at this point in the history
  • Loading branch information
obiot committed Oct 2, 2021
1 parent b3d8b20 commit ddbd7c0
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 144 deletions.
112 changes: 41 additions & 71 deletions dist/melonjs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* melonJS Game Engine - v9.1.1
* melonJS Game Engine - v9.1.2
* http://www.melonjs.org
* melonjs is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
Expand Down Expand Up @@ -10681,6 +10681,37 @@
return this;
},

/**
* Shifts the Polygon to the given position vector.
* @name shift
* @memberOf me.Polygon
* @function
* @param {me.Vector2d} position
*/
/**
* Shifts the Polygon to the given x, y position.
* @name shift
* @memberOf me.Polygon
* @function
* @param {Number} x
* @param {Number} y
*/
shift: function shift() {
var _x, _y;
if (arguments.length === 2) {
// x, y
_x = arguments[0];
_y = arguments[1];
} else {
// vector
_x = arguments[0].x;
_y = arguments[0].y;
}
this.pos.x = _x;
this.pos.y = _y;
this.updateBounds();
},

/**
* Returns true if the polygon contains the given point.
* (Note: it is highly recommended to first do a hit test on the corresponding <br>
Expand Down Expand Up @@ -10892,67 +10923,6 @@
return this.setShape(rect.pos.x, rect.pos.y, rect.width, rect.height);
},

/**
* translate the rect by the specified offset
* @name translate
* @memberOf me.Rect.prototype
* @function
* @param {Number} x x offset
* @param {Number} y y offset
* @return {me.Rect} this rectangle
*/
/**
* translate the rect by the specified vector
* @name translate
* @memberOf me.Rect.prototype
* @function
* @param {me.Vector2d} v vector offset
* @return {me.Rect} this rectangle
*/
translate : function () {
var _x, _y;

if (arguments.length === 2) {
// x, y
_x = arguments[0];
_y = arguments[1];
} else {
// vector
_x = arguments[0].x;
_y = arguments[0].y;
}

this.pos.x += _x;
this.pos.y += _y;

return this;
},

/**
* Shifts the rect to the given position vector.
* @name shift
* @memberOf me.Rect
* @function
* @param {me.Vector2d} position
*/
/**
* Shifts the rect to the given x, y position.
* @name shift
* @memberOf me.Rect
* @function
* @param {Number} x
* @param {Number} y
*/
shift : function () {
if (arguments.length === 2) {
// x, y
this.pos.set(arguments[0], arguments[1]);
} else {
// vector
this.pos.setV(arguments[0]);
}
},

/**
* merge this rectangle with another one
* @name union
Expand Down Expand Up @@ -28404,16 +28374,16 @@
}

// set pause/stop action on losing focus
window.addEventListener("blur", function () {
window.addEventListener("blur", (function () {
if (this.stopOnBlur) {
state$1.stop(true);
}
if (this.pauseOnBlur) {
state$1.pause(true);
}
}, false);
}).bind(this), false);
// set restart/resume action on gaining focus
window.addEventListener("focus", function () {
window.addEventListener("focus", (function () {
if (this.stopOnBlur) {
state$1.restart(true);
}
Expand All @@ -28424,7 +28394,7 @@
if (this.autoFocus) {
this.focus();
}
}, false);
}).bind(this), false);


// Set the name of the hidden property and the change event for visibility
Expand All @@ -28448,7 +28418,7 @@
if (typeof (visibilityChange) === "string") {
// add the corresponding event listener
document.addEventListener(visibilityChange,
function () {
(function () {
if (document[hidden]) {
if (this.stopOnBlur) {
state$1.stop(true);
Expand All @@ -28464,7 +28434,7 @@
state$1.resume(true);
}
}
}, false
}).bind(this), false
);
}
},
Expand Down Expand Up @@ -32519,10 +32489,10 @@
* this can be overridden by the plugin
* @public
* @type String
* @default "9.1.1"
* @default "9.1.2"
* @name me.plugin.Base#version
*/
this.version = "9.1.1";
this.version = "9.1.2";
}
}),

Expand Down Expand Up @@ -36773,7 +36743,7 @@
* @name version
* @type {string}
*/
var version = "9.1.1";
var version = "9.1.2";


/**
Expand Down
4 changes: 2 additions & 2 deletions dist/melonjs.min.js

Large diffs are not rendered by default.

112 changes: 41 additions & 71 deletions dist/melonjs.module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* melonJS Game Engine - v9.1.1
* melonJS Game Engine - v9.1.2
* http://www.melonjs.org
* melonjs is licensed under the MIT License.
* http://www.opensource.org/licenses/mit-license
Expand Down Expand Up @@ -10591,6 +10591,37 @@ var Polygon = window.Jay.extend({
return this;
},

/**
* Shifts the Polygon to the given position vector.
* @name shift
* @memberOf me.Polygon
* @function
* @param {me.Vector2d} position
*/
/**
* Shifts the Polygon to the given x, y position.
* @name shift
* @memberOf me.Polygon
* @function
* @param {Number} x
* @param {Number} y
*/
shift() {
var _x, _y;
if (arguments.length === 2) {
// x, y
_x = arguments[0];
_y = arguments[1];
} else {
// vector
_x = arguments[0].x;
_y = arguments[0].y;
}
this.pos.x = _x;
this.pos.y = _y;
this.updateBounds();
},

/**
* Returns true if the polygon contains the given point.
* (Note: it is highly recommended to first do a hit test on the corresponding <br>
Expand Down Expand Up @@ -10801,67 +10832,6 @@ var Rect = Polygon.extend({
return this.setShape(rect.pos.x, rect.pos.y, rect.width, rect.height);
},

/**
* translate the rect by the specified offset
* @name translate
* @memberOf me.Rect.prototype
* @function
* @param {Number} x x offset
* @param {Number} y y offset
* @return {me.Rect} this rectangle
*/
/**
* translate the rect by the specified vector
* @name translate
* @memberOf me.Rect.prototype
* @function
* @param {me.Vector2d} v vector offset
* @return {me.Rect} this rectangle
*/
translate : function () {
var _x, _y;

if (arguments.length === 2) {
// x, y
_x = arguments[0];
_y = arguments[1];
} else {
// vector
_x = arguments[0].x;
_y = arguments[0].y;
}

this.pos.x += _x;
this.pos.y += _y;

return this;
},

/**
* Shifts the rect to the given position vector.
* @name shift
* @memberOf me.Rect
* @function
* @param {me.Vector2d} position
*/
/**
* Shifts the rect to the given x, y position.
* @name shift
* @memberOf me.Rect
* @function
* @param {Number} x
* @param {Number} y
*/
shift : function () {
if (arguments.length === 2) {
// x, y
this.pos.set(arguments[0], arguments[1]);
} else {
// vector
this.pos.setV(arguments[0]);
}
},

/**
* merge this rectangle with another one
* @name union
Expand Down Expand Up @@ -28268,16 +28238,16 @@ let device = {
}

// set pause/stop action on losing focus
window.addEventListener("blur", function () {
window.addEventListener("blur", (function () {
if (this.stopOnBlur) {
state$1.stop(true);
}
if (this.pauseOnBlur) {
state$1.pause(true);
}
}, false);
}).bind(this), false);
// set restart/resume action on gaining focus
window.addEventListener("focus", function () {
window.addEventListener("focus", (function () {
if (this.stopOnBlur) {
state$1.restart(true);
}
Expand All @@ -28288,7 +28258,7 @@ let device = {
if (this.autoFocus) {
this.focus();
}
}, false);
}).bind(this), false);


// Set the name of the hidden property and the change event for visibility
Expand All @@ -28312,7 +28282,7 @@ let device = {
if (typeof (visibilityChange) === "string") {
// add the corresponding event listener
document.addEventListener(visibilityChange,
function () {
(function () {
if (document[hidden]) {
if (this.stopOnBlur) {
state$1.stop(true);
Expand All @@ -28328,7 +28298,7 @@ let device = {
state$1.resume(true);
}
}
}, false
}).bind(this), false
);
}
},
Expand Down Expand Up @@ -32368,10 +32338,10 @@ var plugin = {
* this can be overridden by the plugin
* @public
* @type String
* @default "9.1.1"
* @default "9.1.2"
* @name me.plugin.Base#version
*/
this.version = "9.1.1";
this.version = "9.1.2";
}
}),

Expand Down Expand Up @@ -36623,7 +36593,7 @@ var Jay = window.Jay;
* @name version
* @type {string}
*/
const version = "9.1.1";
const version = "9.1.2";


/**
Expand Down

0 comments on commit ddbd7c0

Please sign in to comment.