mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 23:20:59 +00:00
eslint fixes and console removal
This commit is contained in:
parent
c1b810afef
commit
50dac412be
15 changed files with 23 additions and 45 deletions
|
@ -186,7 +186,7 @@ var BitmapMask = new Class({
|
|||
* @param {[type]} mask - [description]
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.
|
||||
*/
|
||||
preRenderCanvas: function (renderer, mask, camera)
|
||||
preRenderCanvas: function ()
|
||||
{
|
||||
// NOOP
|
||||
},
|
||||
|
@ -199,7 +199,7 @@ var BitmapMask = new Class({
|
|||
*
|
||||
* @param {[type]} renderer - [description]
|
||||
*/
|
||||
postRenderCanvas: function (renderer)
|
||||
postRenderCanvas: function ()
|
||||
{
|
||||
// NOOP
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ var UpdateList = new Class({
|
|||
* @param {number} time - [description]
|
||||
* @param {number} delta - [description]
|
||||
*/
|
||||
preUpdate: function (time, delta)
|
||||
preUpdate: function ()
|
||||
{
|
||||
var toRemove = this._pendingRemoval.length;
|
||||
var toInsert = this._pendingInsertion.length;
|
||||
|
@ -153,9 +153,6 @@ var UpdateList = new Class({
|
|||
{
|
||||
this._list.splice(index, 1);
|
||||
}
|
||||
|
||||
// Pool them?
|
||||
// gameObject.destroy();
|
||||
}
|
||||
|
||||
// Move pending to active
|
||||
|
|
|
@ -25,10 +25,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)
|
|||
|
||||
var letters = xml.getElementsByTagName('char');
|
||||
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var cx = 0;
|
||||
var cy = 0;
|
||||
var adjustForTrim = (frame !== undefined && frame.trimmed);
|
||||
|
||||
if (adjustForTrim)
|
||||
|
@ -37,8 +33,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)
|
|||
var left = frame.width;
|
||||
}
|
||||
|
||||
var diff = 0;
|
||||
|
||||
for (var i = 0; i < letters.length; i++)
|
||||
{
|
||||
var node = letters[i];
|
||||
|
@ -53,18 +47,6 @@ var ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)
|
|||
|
||||
if (adjustForTrim)
|
||||
{
|
||||
// if (gx + gw > frame.width)
|
||||
// {
|
||||
// diff = frame.width - (gx + gw);
|
||||
// gw -= diff;
|
||||
// }
|
||||
|
||||
// if (gy + gh > frame.height)
|
||||
// {
|
||||
// diff = frame.height - (gy + gh);
|
||||
// gh -= diff;
|
||||
// }
|
||||
|
||||
if (gx < left)
|
||||
{
|
||||
left = gx;
|
||||
|
|
|
@ -62,7 +62,6 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage,
|
|||
var textureX = textureFrame.cutX;
|
||||
var textureY = textureFrame.cutY;
|
||||
|
||||
var rotation = 0;
|
||||
var scale = (src.fontSize / src.fontData.size);
|
||||
|
||||
// Blend Mode
|
||||
|
|
|
@ -31,7 +31,6 @@ var BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, ca
|
|||
|
||||
renderer.setBlendMode(src.blendMode);
|
||||
|
||||
var ca = renderer.currentAlpha;
|
||||
var ctx = renderer.gameContext;
|
||||
var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX;
|
||||
var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY;
|
||||
|
|
|
@ -249,7 +249,7 @@ var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, c
|
|||
break;
|
||||
|
||||
default:
|
||||
console.error('Phaser: Invalid Graphics Command ID ' + commandID);
|
||||
// console.error('Phaser: Invalid Graphics Command ID ' + commandID);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* @param {number} interpolationPercentage - Reserved for future use and custom pipelines.
|
||||
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.
|
||||
*/
|
||||
var MeshCanvasRenderer = function (renderer, src, interpolationPercentage, camera)
|
||||
var MeshCanvasRenderer = function ()
|
||||
{
|
||||
};
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ var EdgeZone = require('./zones/EdgeZone');
|
|||
var EmitterOp = require('./EmitterOp');
|
||||
var GetFastValue = require('../../utils/object/GetFastValue');
|
||||
var GetRandomElement = require('../../utils/array/GetRandomElement');
|
||||
var GetValue = require('../../utils/object/GetValue');
|
||||
var HasAny = require('../../utils/object/HasAny');
|
||||
var HasValue = require('../../utils/object/HasValue');
|
||||
var Particle = require('./Particle');
|
||||
|
@ -986,7 +985,8 @@ var ParticleEmitter = new Class({
|
|||
else if (t === 'object')
|
||||
{
|
||||
var frameConfig = frames;
|
||||
var frames = GetFastValue(frameConfig, 'frames', null);
|
||||
|
||||
frames = GetFastValue(frameConfig, 'frames', null);
|
||||
|
||||
if (frames)
|
||||
{
|
||||
|
@ -1068,10 +1068,10 @@ var ParticleEmitter = new Class({
|
|||
{
|
||||
var obj = x;
|
||||
|
||||
var x = obj.x;
|
||||
var y = obj.y;
|
||||
var width = (HasValue(obj, 'w')) ? obj.w : obj.width;
|
||||
var height = (HasValue(obj, 'h')) ? obj.h : obj.height;
|
||||
x = obj.x;
|
||||
y = obj.y;
|
||||
width = (HasValue(obj, 'w')) ? obj.w : obj.width;
|
||||
height = (HasValue(obj, 'h')) ? obj.h : obj.height;
|
||||
}
|
||||
|
||||
if (this.bounds)
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
*/
|
||||
|
||||
var Class = require('../../../utils/Class');
|
||||
var Wrap = require('../../../math/Wrap');
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
|
|
|
@ -350,7 +350,7 @@ var Pointer = new Class({
|
|||
* @param {[type]} event - [description]
|
||||
* @param {[type]} time - [description]
|
||||
*/
|
||||
touchmove: function (event, time)
|
||||
touchmove: function (event)
|
||||
{
|
||||
this.event = event;
|
||||
|
||||
|
@ -373,7 +373,7 @@ var Pointer = new Class({
|
|||
* @param {[type]} event - [description]
|
||||
* @param {[type]} time - [description]
|
||||
*/
|
||||
move: function (event, time)
|
||||
move: function (event)
|
||||
{
|
||||
if (event.buttons)
|
||||
{
|
||||
|
|
|
@ -209,11 +209,12 @@ var GamepadManager = new Class({
|
|||
*
|
||||
* @method Phaser.Input.Gamepad.GamepadManager#removePad
|
||||
* @since 3.0.0
|
||||
* @todo Code this feature
|
||||
*
|
||||
* @param {[type]} index - [description]
|
||||
* @param {[type]} pad - [description]
|
||||
*/
|
||||
removePad: function (index, pad)
|
||||
removePad: function ()
|
||||
{
|
||||
// TODO
|
||||
},
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @namespace Phaser.Input.Mouse
|
||||
*/
|
||||
|
||||
/*eslint-disable */
|
||||
/* eslint-disable */
|
||||
module.exports = {
|
||||
|
||||
MouseManager: require('./MouseManager')
|
||||
|
||||
};
|
||||
/*eslint-enable */
|
||||
/* eslint-enable */
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
* @namespace Phaser.Input.Touch
|
||||
*/
|
||||
|
||||
/*eslint-disable */
|
||||
/* eslint-disable */
|
||||
module.exports = {
|
||||
|
||||
TouchManager: require('./TouchManager')
|
||||
|
||||
};
|
||||
/*eslint-enable */
|
||||
/* eslint-enable */
|
||||
|
|
|
@ -311,7 +311,7 @@ var File = new Class({
|
|||
*
|
||||
* @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.
|
||||
*/
|
||||
onError: function (event)
|
||||
onError: function ()
|
||||
{
|
||||
this.resetXHR();
|
||||
|
||||
|
|
|
@ -82,6 +82,7 @@ var AudioFile = new Class({
|
|||
},
|
||||
function (e)
|
||||
{
|
||||
// eslint-disable-next-line no-console
|
||||
console.error('Error with decoding audio data for \'' + this.key + '\':', e.message);
|
||||
|
||||
_this.state = CONST.FILE_ERRORED;
|
||||
|
@ -103,7 +104,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings)
|
|||
|
||||
if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))
|
||||
{
|
||||
console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.');
|
||||
// console.info('Skipping loading audio \'' + key + '\' since sounds are disabled.');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
@ -111,7 +112,7 @@ AudioFile.create = function (loader, key, urls, config, xhrSettings)
|
|||
|
||||
if (!url)
|
||||
{
|
||||
console.warn('No supported url provided for audio \'' + key + '\'!');
|
||||
// console.warn('No supported url provided for audio \'' + key + '\'!');
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue