mirror of
https://github.com/photonstorm/phaser
synced 2024-11-15 01:17:43 +00:00
Fix jshint issues in src/Phaser.js
This commit is contained in:
parent
bdbf2783ad
commit
f409a735f0
4 changed files with 62 additions and 61 deletions
115
src/Phaser.js
115
src/Phaser.js
|
@ -1,3 +1,4 @@
|
|||
/* global Phaser:true */
|
||||
/**
|
||||
* @author Richard Davey <rich@photonstorm.com>
|
||||
* @copyright 2014 Photon Storm Ltd.
|
||||
|
@ -13,68 +14,68 @@ var Phaser = Phaser || {
|
|||
DEV_VERSION: '2.0.2',
|
||||
GAMES: [],
|
||||
|
||||
AUTO: 0,
|
||||
CANVAS: 1,
|
||||
WEBGL: 2,
|
||||
HEADLESS: 3,
|
||||
AUTO: 0,
|
||||
CANVAS: 1,
|
||||
WEBGL: 2,
|
||||
HEADLESS: 3,
|
||||
|
||||
NONE: 0,
|
||||
LEFT: 1,
|
||||
RIGHT: 2,
|
||||
UP: 3,
|
||||
DOWN: 4,
|
||||
NONE: 0,
|
||||
LEFT: 1,
|
||||
RIGHT: 2,
|
||||
UP: 3,
|
||||
DOWN: 4,
|
||||
|
||||
SPRITE: 0,
|
||||
BUTTON: 1,
|
||||
IMAGE: 2,
|
||||
GRAPHICS: 3,
|
||||
TEXT: 4,
|
||||
TILESPRITE: 5,
|
||||
BITMAPTEXT: 6,
|
||||
GROUP: 7,
|
||||
RENDERTEXTURE: 8,
|
||||
TILEMAP: 9,
|
||||
TILEMAPLAYER: 10,
|
||||
EMITTER: 11,
|
||||
POLYGON: 12,
|
||||
BITMAPDATA: 13,
|
||||
CANVAS_FILTER: 14,
|
||||
WEBGL_FILTER: 15,
|
||||
ELLIPSE: 16,
|
||||
SPRITEBATCH: 17,
|
||||
RETROFONT: 18,
|
||||
SPRITE: 0,
|
||||
BUTTON: 1,
|
||||
IMAGE: 2,
|
||||
GRAPHICS: 3,
|
||||
TEXT: 4,
|
||||
TILESPRITE: 5,
|
||||
BITMAPTEXT: 6,
|
||||
GROUP: 7,
|
||||
RENDERTEXTURE: 8,
|
||||
TILEMAP: 9,
|
||||
TILEMAPLAYER: 10,
|
||||
EMITTER: 11,
|
||||
POLYGON: 12,
|
||||
BITMAPDATA: 13,
|
||||
CANVAS_FILTER: 14,
|
||||
WEBGL_FILTER: 15,
|
||||
ELLIPSE: 16,
|
||||
SPRITEBATCH: 17,
|
||||
RETROFONT: 18,
|
||||
|
||||
// The various blend modes supported by pixi / phaser
|
||||
blendModes: {
|
||||
NORMAL:0,
|
||||
ADD:1,
|
||||
MULTIPLY:2,
|
||||
SCREEN:3,
|
||||
OVERLAY:4,
|
||||
DARKEN:5,
|
||||
LIGHTEN:6,
|
||||
COLOR_DODGE:7,
|
||||
COLOR_BURN:8,
|
||||
HARD_LIGHT:9,
|
||||
SOFT_LIGHT:10,
|
||||
DIFFERENCE:11,
|
||||
EXCLUSION:12,
|
||||
HUE:13,
|
||||
SATURATION:14,
|
||||
COLOR:15,
|
||||
LUMINOSITY:16
|
||||
},
|
||||
// The various blend modes supported by pixi / phaser
|
||||
blendModes: {
|
||||
NORMAL:0,
|
||||
ADD:1,
|
||||
MULTIPLY:2,
|
||||
SCREEN:3,
|
||||
OVERLAY:4,
|
||||
DARKEN:5,
|
||||
LIGHTEN:6,
|
||||
COLOR_DODGE:7,
|
||||
COLOR_BURN:8,
|
||||
HARD_LIGHT:9,
|
||||
SOFT_LIGHT:10,
|
||||
DIFFERENCE:11,
|
||||
EXCLUSION:12,
|
||||
HUE:13,
|
||||
SATURATION:14,
|
||||
COLOR:15,
|
||||
LUMINOSITY:16
|
||||
},
|
||||
|
||||
// The scale modes
|
||||
scaleModes: {
|
||||
DEFAULT:0,
|
||||
LINEAR:0,
|
||||
NEAREST:1
|
||||
}
|
||||
// The scale modes
|
||||
scaleModes: {
|
||||
DEFAULT:0,
|
||||
LINEAR:0,
|
||||
NEAREST:1
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
PIXI.InteractionManager = function (dummy) {
|
||||
// We don't need this in Pixi, so we've removed it to save space
|
||||
// however the Stage object expects a reference to it, so here is a dummy entry.
|
||||
PIXI.InteractionManager = function () {
|
||||
// We don't need this in Pixi, so we've removed it to save space
|
||||
// however the Stage object expects a reference to it, so here is a dummy entry.
|
||||
};
|
||||
|
|
|
@ -146,11 +146,11 @@ Phaser.Physics.prototype = {
|
|||
}
|
||||
else if (system === Phaser.Physics.BOX2D && this.box2d === null)
|
||||
{
|
||||
// Coming soon
|
||||
throw new Error('The Box2D physics system has not been implemented yet.');
|
||||
}
|
||||
else if (system === Phaser.Physics.CHIPMUNK && this.chipmunk === null)
|
||||
{
|
||||
// Coming soon
|
||||
throw new Error('The Chipmunk physics system has not been implemented yet.');
|
||||
}
|
||||
|
||||
},
|
||||
|
|
|
@ -136,7 +136,7 @@ Phaser.Physics.Ninja.AABB.prototype = {
|
|||
* @param {number} dy - Collision normal
|
||||
* @param {number} obj - Object this AABB collided with
|
||||
*/
|
||||
reportCollisionVsWorld: function (px, py, dx, dy, obj) {
|
||||
reportCollisionVsWorld: function (px, py, dx, dy) {
|
||||
|
||||
var p = this.pos;
|
||||
var o = this.oldpos;
|
||||
|
|
|
@ -140,7 +140,7 @@ Phaser.Physics.Ninja.Circle.prototype = {
|
|||
* @param {number} dy - Collision normal
|
||||
* @param {number} obj - Object this Circle collided with
|
||||
*/
|
||||
reportCollisionVsWorld: function (px, py, dx, dy, obj) {
|
||||
reportCollisionVsWorld: function (px, py, dx, dy) {
|
||||
|
||||
var p = this.pos;
|
||||
var o = this.oldpos;
|
||||
|
|
Loading…
Reference in a new issue