mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 14:40:38 +00:00
Removed old code
This commit is contained in:
parent
3d1e2f952f
commit
a39cebf7dc
1 changed files with 0 additions and 148 deletions
|
@ -1546,152 +1546,4 @@ var DynamicTexture = new Class({
|
|||
|
||||
});
|
||||
|
||||
/**
|
||||
create: function (slices)
|
||||
{
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
var width = this.width;
|
||||
var height = this.height;
|
||||
var alpha = 1;
|
||||
var tint = 0xffffff;
|
||||
|
||||
var textureManager = this.textureManager;
|
||||
|
||||
var topLeft = textureManager.parseFrame(GetFastValue(slices, 'topLeft', null));
|
||||
var topBg = textureManager.parseFrame(GetFastValue(slices, 'topBackground', null));
|
||||
var topRight = textureManager.parseFrame(GetFastValue(slices, 'topRight', null));
|
||||
var leftBg = textureManager.parseFrame(GetFastValue(slices, 'left', null));
|
||||
var rightBg = textureManager.parseFrame(GetFastValue(slices, 'right', null));
|
||||
|
||||
// var background = textureManager.parseFrame(GetFastValue(slices, 'background', null));
|
||||
|
||||
var botLeft = textureManager.parseFrame(GetFastValue(slices, 'botLeft', null));
|
||||
var botBg = textureManager.parseFrame(GetFastValue(slices, 'botBackground', null));
|
||||
var botRight = textureManager.parseFrame(GetFastValue(slices, 'botRight', null));
|
||||
|
||||
var topLeftPos = { x: x, y: y };
|
||||
var topRightPos = { x: x + width, y: y };
|
||||
var topPos = { x: x, y: y, w: width };
|
||||
var botLeftPos = { x: x, y: y + height };
|
||||
var botRightPos = { x: x + width, y: y + height };
|
||||
var botPos = { x: x, y: y + height, w: width };
|
||||
var leftPos = { x: x, y: y, h: height };
|
||||
var rightPos = { x: x + width, y: y, h: height };
|
||||
|
||||
if (topLeft)
|
||||
{
|
||||
topPos.x += topLeft.width;
|
||||
topPos.w -= topLeft.width;
|
||||
leftPos.y += topLeft.height;
|
||||
leftPos.h -= topLeft.height;
|
||||
}
|
||||
|
||||
if (topRight)
|
||||
{
|
||||
topRightPos.x -= topRight.width;
|
||||
topPos.w -= topRight.width;
|
||||
rightPos.y += topRight.height;
|
||||
rightPos.h -= topRight.height;
|
||||
}
|
||||
|
||||
if (botBg)
|
||||
{
|
||||
botPos.y -= botBg.height;
|
||||
}
|
||||
|
||||
if (botLeft)
|
||||
{
|
||||
botLeftPos.y -= botLeft.height;
|
||||
botPos.x += botLeft.width;
|
||||
botPos.w -= botLeft.width;
|
||||
leftPos.h -= botLeft.height;
|
||||
}
|
||||
|
||||
if (botRight)
|
||||
{
|
||||
botRightPos.x -= botRight.width;
|
||||
botRightPos.y -= botRight.height;
|
||||
botPos.w -= botRight.width;
|
||||
rightPos.h -= botRight.height;
|
||||
}
|
||||
|
||||
if (rightBg)
|
||||
{
|
||||
rightPos.x -= rightBg.width;
|
||||
}
|
||||
|
||||
// console.log('topLeftPos', topLeftPos);
|
||||
// console.log('topRightPos', topRightPos);
|
||||
// console.log('topPos', topPos);
|
||||
// console.log('botLeftPos', botLeftPos);
|
||||
// console.log('botRightPos', botRightPos);
|
||||
// console.log('botPos', botPos);
|
||||
// console.log('leftPos', leftPos);
|
||||
// console.log('rightPos', rightPos);
|
||||
|
||||
var stamp = this.resetStamp(alpha, tint);
|
||||
|
||||
this.clear();
|
||||
|
||||
this.beginDraw();
|
||||
|
||||
// None of these need cropping:
|
||||
|
||||
if (topLeft)
|
||||
{
|
||||
stamp.setFrame(topLeft);
|
||||
|
||||
this.drawGameObject(stamp, topLeftPos.x, topLeftPos.y);
|
||||
}
|
||||
|
||||
if (topRight)
|
||||
{
|
||||
stamp.setFrame(topRight);
|
||||
|
||||
this.drawGameObject(stamp, topRightPos.x, topRightPos.y);
|
||||
}
|
||||
|
||||
if (botLeft)
|
||||
{
|
||||
stamp.setFrame(botLeft);
|
||||
|
||||
this.drawGameObject(stamp, botLeftPos.x, botLeftPos.y);
|
||||
}
|
||||
|
||||
if (botRight)
|
||||
{
|
||||
stamp.setFrame(botRight);
|
||||
|
||||
this.drawGameObject(stamp, botRightPos.x, botRightPos.y);
|
||||
}
|
||||
|
||||
// These all use crop if they don't fit perfectly
|
||||
|
||||
if (topBg)
|
||||
{
|
||||
this.repeat(topBg, null, topPos.x, topPos.y, topPos.w, topBg.height, alpha, tint, true);
|
||||
}
|
||||
|
||||
if (leftBg)
|
||||
{
|
||||
this.repeat(leftBg, null, leftPos.x, leftPos.y, leftBg.width, leftPos.h, alpha, tint, true);
|
||||
}
|
||||
|
||||
if (rightBg)
|
||||
{
|
||||
this.repeat(rightBg, null, rightPos.x, rightPos.y, rightBg.width, rightPos.h, alpha, tint, true);
|
||||
}
|
||||
|
||||
if (botBg)
|
||||
{
|
||||
this.repeat(botBg, null, botPos.x, botPos.y, botPos.w, botBg.height, alpha, tint, true);
|
||||
}
|
||||
|
||||
this.endDraw();
|
||||
|
||||
return this;
|
||||
}
|
||||
*/
|
||||
|
||||
module.exports = DynamicTexture;
|
||||
|
|
Loading…
Reference in a new issue