mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 13:13:43 +00:00
Merge branch 'master' of https://github.com/photonstorm/phaser
This commit is contained in:
commit
f47c46def2
1 changed files with 5 additions and 0 deletions
|
@ -58,6 +58,11 @@ var SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)
|
||||||
var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));
|
var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));
|
||||||
var total = row * column;
|
var total = row * column;
|
||||||
|
|
||||||
|
if (total === 0)
|
||||||
|
{
|
||||||
|
console.warn('SpriteSheet frame dimensions will result in zero frames.');
|
||||||
|
}
|
||||||
|
|
||||||
if (startFrame > total || startFrame < -total)
|
if (startFrame > total || startFrame < -total)
|
||||||
{
|
{
|
||||||
startFrame = 0;
|
startFrame = 0;
|
||||||
|
|
Loading…
Reference in a new issue