This commit is contained in:
Richard Davey 2018-07-08 23:19:36 +01:00
commit f47c46def2

View file

@ -58,6 +58,11 @@ var SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)
var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));
var total = row * column;
if (total === 0)
{
console.warn('SpriteSheet frame dimensions will result in zero frames.');
}
if (startFrame > total || startFrame < -total)
{
startFrame = 0;