Skip to content

Commit 7011082

Browse files
committed
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.
1 parent d44fc88 commit 7011082

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/animations/AnimationManager.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,10 @@ var AnimationManager = new Class({
518518
{
519519
out.push({ key: key, frame: frame });
520520
}
521+
else
522+
{
523+
console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key);
524+
}
521525
}
522526
}
523527
else
@@ -530,6 +534,10 @@ var AnimationManager = new Class({
530534
{
531535
out.push({ key: key, frame: frame });
532536
}
537+
else
538+
{
539+
console.warn('generateFrameNames: Frame missing: ' + frame + ' from texture: ' + key);
540+
}
533541
}
534542
}
535543

@@ -582,6 +590,10 @@ var AnimationManager = new Class({
582590
{
583591
out.push({ key: key, frame: frames[i] });
584592
}
593+
else
594+
{
595+
console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key);
596+
}
585597
}
586598
}
587599
else
@@ -603,6 +615,10 @@ var AnimationManager = new Class({
603615
{
604616
out.push({ key: key, frame: i });
605617
}
618+
else
619+
{
620+
console.warn('generateFrameNumbers: Frame ' + i + ' missing from texture: ' + key);
621+
}
606622
}
607623
}
608624

0 commit comments

Comments
 (0)