2017-04-20 19:17:05 -04:00
|
|
|
const FakeRenderer = function () {
|
2017-04-24 10:04:06 -04:00
|
|
|
this.unused = '';
|
|
|
|
this.x = 0;
|
|
|
|
this.y = 0;
|
|
|
|
this.order = 0;
|
|
|
|
this.spriteCount = 5;
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.createDrawable = function () {
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.getFencedPositionOfDrawable = function (d, p) { // eslint-disable-line no-unused-vars
|
|
|
|
return [p[0], p[1]];
|
|
|
|
};
|
|
|
|
|
2019-06-11 11:13:39 -04:00
|
|
|
FakeRenderer.prototype.updateDrawableSkinId = function (d, skinId) { // eslint-disable-line no-unused-vars
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.updateDrawablePosition = function (d, position) { // eslint-disable-line no-unused-vars
|
|
|
|
this.x = position[0];
|
|
|
|
this.y = position[1];
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.updateDrawableDirectionScale =
|
|
|
|
function (d, direction, scale) {}; // eslint-disable-line no-unused-vars
|
|
|
|
|
|
|
|
FakeRenderer.prototype.updateDrawableVisible = function (d, visible) { // eslint-disable-line no-unused-vars
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.updateDrawableEffect = function (d, effectName, value) { // eslint-disable-line no-unused-vars
|
|
|
|
};
|
|
|
|
|
2017-04-24 10:04:06 -04:00
|
|
|
FakeRenderer.prototype.updateDrawableProperties = function (d, p) { // eslint-disable-line no-unused-vars
|
2019-06-11 11:13:39 -04:00
|
|
|
throw new Error('updateDrawableProperties is deprecated');
|
2017-04-24 10:04:06 -04:00
|
|
|
};
|
|
|
|
|
2018-04-10 09:50:18 -04:00
|
|
|
FakeRenderer.prototype.getCurrentSkinSize = function (d) { // eslint-disable-line no-unused-vars
|
2017-04-24 10:04:06 -04:00
|
|
|
return [0, 0];
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.pick = function (x, y, a, b, d) { // eslint-disable-line no-unused-vars
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
2018-08-09 10:10:23 -04:00
|
|
|
FakeRenderer.prototype.drawableTouching = function (d, x, y, w, h) { // eslint-disable-line no-unused-vars
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
2017-04-24 10:04:06 -04:00
|
|
|
FakeRenderer.prototype.isTouchingColor = function (d, c) { // eslint-disable-line no-unused-vars
|
|
|
|
return true;
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.getBounds = function (d) { // eslint-disable-line no-unused-vars
|
|
|
|
return {left: this.x, right: this.x, top: this.y, bottom: this.y};
|
|
|
|
};
|
|
|
|
|
2018-05-16 16:00:50 -04:00
|
|
|
FakeRenderer.prototype.setDrawableOrder = function (d, a, optG, optA, optB) { // eslint-disable-line no-unused-vars
|
2017-04-24 10:04:06 -04:00
|
|
|
if (d === 999) return 1; // fake for test case
|
|
|
|
if (optA) {
|
|
|
|
a += this.order;
|
|
|
|
}
|
|
|
|
if (optB) {
|
|
|
|
a = Math.max(a, optB);
|
|
|
|
}
|
|
|
|
a = Math.max(a, 0);
|
|
|
|
this.order = Math.min(a, this.spriteCount);
|
|
|
|
return this.order;
|
|
|
|
};
|
|
|
|
|
2018-07-24 11:00:48 -04:00
|
|
|
FakeRenderer.prototype.getDrawableOrder = function (d) { // eslint-disable-line no-unused-vars
|
|
|
|
return 'stub';
|
|
|
|
};
|
|
|
|
|
2017-04-24 10:04:06 -04:00
|
|
|
FakeRenderer.prototype.pick = function (x, y, a, b, c) { // eslint-disable-line no-unused-vars
|
|
|
|
return c[0];
|
|
|
|
};
|
|
|
|
|
|
|
|
FakeRenderer.prototype.isTouchingColor = function (a, b) { // eslint-disable-line no-unused-vars
|
|
|
|
return false;
|
|
|
|
};
|
|
|
|
|
2018-05-16 16:00:50 -04:00
|
|
|
FakeRenderer.prototype.setLayerGroupOrdering = function (a) {}; // eslint-disable-line no-unused-vars
|
|
|
|
|
2017-04-24 10:04:06 -04:00
|
|
|
module.exports = FakeRenderer;
|