mirror of
https://github.com/wassname/phaser.git
synced 2026-07-20 12:30:48 +08:00
Added Phaser.Filter and started moving the shaders over into their own filter classes, so they won't all get bundled in unless needed.
This commit is contained in:
@@ -118,11 +118,16 @@ Phaser.Sprite = function (game, x, y, key, frame) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (key == null || this.game.cache.checkImageKey(key) == false)
|
||||
if (key === null || typeof key === 'undefined')
|
||||
{
|
||||
key = '__default';
|
||||
this.key = key;
|
||||
}
|
||||
else if (typeof key === 'string' && this.game.cache.checkImageKey(key) == false)
|
||||
{
|
||||
key = '__missing';
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
PIXI.Sprite.call(this, PIXI.TextureCache[key]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user