Updated to Pixi 1.5 final.

InputHandler.pixelPerfectOver - performs a pixel perfect check to see if any pointer is over the current object (warning: very expensive!)
InputHandler.pixelPerfectClick - performs a pixel perfect check but only when the pointer touches/clicks on the current object.
This commit is contained in:
photonstorm
2014-02-12 01:25:36 +00:00
parent da878b2181
commit ab5c07dfe8
46 changed files with 845 additions and 526 deletions
+3 -28
View File
@@ -153,15 +153,7 @@ Phaser.AnimationParser = {
frames[i].spriteSourceSize.h
);
PIXI.TextureCache[uuid].trimmed = true;
PIXI.TextureCache[uuid].trim = {
x: frames[i].spriteSourceSize.x,
y: frames[i].spriteSourceSize.y,
realWidth: frames[i].sourceSize.w,
realHeight: frames[i].sourceSize.h
}
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frames[i].spriteSourceSize.x, frames[i].spriteSourceSize.y, frames[i].sourceSize.w, frames[i].sourceSize.h);
}
}
@@ -229,15 +221,7 @@ Phaser.AnimationParser = {
frames[key].spriteSourceSize.h
);
PIXI.TextureCache[uuid].trimmed = true;
PIXI.TextureCache[uuid].trim = {
x: frames[i].spriteSourceSize.x,
y: frames[i].spriteSourceSize.y,
realWidth: frames[i].sourceSize.w,
realHeight: frames[i].sourceSize.h
}
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frames[i].spriteSourceSize.x, frames[i].spriteSourceSize.y, frames[i].sourceSize.w, frames[i].sourceSize.h);
}
i++;
@@ -319,16 +303,7 @@ Phaser.AnimationParser = {
{
newFrame.setTrim(true, width, height, frameX, frameY, frameWidth, frameHeight);
PIXI.TextureCache[uuid].realSize = { x: frameX, y: frameY, w: frameWidth, h: frameHeight };
PIXI.TextureCache[uuid].trimmed = true;
PIXI.TextureCache[uuid].trim = {
x: frameX,
y: frameY,
realWidth: width,
realHeight: height
}
PIXI.TextureCache[uuid].trim = new Phaser.Rectangle(frameX, frameY, width, height);
}
}