Console warning if frame doesn't exist

* `GenerateFrameNames` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
* `GenerateFrameNumbers` will now console.warn if the generated frame isn't present in the texture, which should help with debugging animation creation massively.
This commit is contained in:
Richard Davey 2020-09-07 10:26:04 +01:00
parent d44fc88705
commit 70110825da

View file

@ -518,6 +518,10 @@ var AnimationManager = new Class({
{
out.push({ key: key, frame: frame });
}
else
{
console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key);
}
}
}
else
@ -530,6 +534,10 @@ var AnimationManager = new Class({
{
out.push({ key: key, frame: frame });
}
else
{
console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key);
}
}
}
@ -582,6 +590,10 @@ var AnimationManager = new Class({
{
out.push({ key: key, frame: frames[i] });
}
else
{
console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key);
}
}
}
else
@ -603,6 +615,10 @@ var AnimationManager = new Class({
{
out.push({ key: key, frame: i });
}
else
{
console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key);
}
}
}