Fixed World.scale and Group.scale.

This commit is contained in:
photonstorm
2013-12-03 02:13:57 +00:00
parent 3bfea2101a
commit 42c0bed502
11 changed files with 16 additions and 55 deletions
+2 -2
View File
@@ -79,8 +79,8 @@ PIXI.CanvasRenderer.prototype.renderDisplayObject = function(displayObject)
displayObject.texture.frame.y,
displayObject.texture.frame.width,
displayObject.texture.frame.height,
(displayObject.anchor.x) * -displayObject.texture.frame.width,
(displayObject.anchor.y) * -displayObject.texture.frame.height,
Math.floor((displayObject.anchor.x) * -displayObject.texture.frame.width),
Math.floor((displayObject.anchor.y) * -displayObject.texture.frame.height),
displayObject.texture.frame.width,
displayObject.texture.frame.height);
}
+5 -2
View File
@@ -77,10 +77,13 @@ Phaser.Group = function (game, parent, name, useStage) {
*/
this.exists = true;
// Replaces the PIXI.Point with a slightly more flexible one.
this._container.scale = new Phaser.Point(1, 1);
/**
* @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one.
* @property {Phaser.Point} scale - The scane of the Group container.
*/
this.scale = new Phaser.Point(1, 1);
this.scale = this._container.scale;
/**
* The cursor is a simple way to iterate through the objects in a Group using the Group.next and Group.previous functions.
+1 -5
View File
@@ -12,6 +12,7 @@
* the world at world-based coordinates. By default a world is created the same size as your Stage.
*
* @class Phaser.World
* @extends Phaser.Group
* @constructor
* @param {Phaser.Game} game - Reference to the current game instance.
*/
@@ -19,11 +20,6 @@ Phaser.World = function (game) {
Phaser.Group.call(this, game, null, '__world', false);
/**
* @property {Phaser.Point} scale - Replaces the PIXI.Point with a slightly more flexible one.
*/
this.scale = new Phaser.Point(1, 1);
/**
* The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects.
* By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display.
-2
View File
@@ -1101,8 +1101,6 @@ Object.defineProperty(Phaser.Sprite.prototype, "inputEnabled", {
set: function (value) {
console.log('inputEnabled', value, this.input);
if (value)
{
if (this.input.enabled === false)
-32
View File
@@ -28,36 +28,6 @@ Phaser.InputHandler = function (sprite) {
*/
this.enabled = false;
/**
* @property {Description} parent - Description.
* @default
*/
// this.parent = null;
/**
* @property {Description} next - Linked List
* @default
*/
// this.next = null;
/**
* @property {Description} prev - Description.
* @default
*/
// this.prev = null;
/**
* @property {Description} last - Description.
* @default
*/
// this.last = this;
/**
* @property {Description} first - Description.
* @default
*/
// this.first = this;
/**
* @property {number} priorityID - The PriorityID controls which Sprite receives an Input event first if they should overlap.
* @default
@@ -199,8 +169,6 @@ Phaser.InputHandler.prototype = {
*/
start: function (priority, useHandCursor) {
console.log('InputHandler start');
priority = priority || 0;
if (typeof useHandCursor == 'undefined') { useHandCursor = false; }
+1 -1
View File
@@ -745,7 +745,7 @@ Phaser.Cache.prototype = {
for (var item in array)
{
if (item !== '__default')
if (item !== '__default' && item !== '__missing')
{
output.push(item);
}
+2 -2
View File
@@ -128,8 +128,8 @@ Phaser.Net.prototype = {
var output = {};
var keyValues = location.search.substring(1).split('&');
for (var i in keyValues) {
for (var i in keyValues)
{
var key = keyValues[i].split('=');
if (key.length > 1)
+2 -1
View File
@@ -115,7 +115,8 @@ PIXI.Texture.prototype.setFrame = function(frame)
if(frame.x + frame.width > this.baseTexture.width || frame.y + frame.height > this.baseTexture.height)
{
throw new Error("Texture Error: frame does not fit inside the base Texture dimensions " + this);
console.log(frame);
throw new Error("Texture Error: frame does not fit inside the base Texture dimensions ", frame);
}
this.updateFrame = true;