I'm a big fan of the old school game effect of having a sprite flicker on damage, so I added the following code to impact's entity class:
// Added for flicker
flickerTimer: 0,
isFlickering: false,
flicker: function(duration){
this.flickerTimer = duration;
if (this.flickerTimer <= 0){
this.isFlickering = false;
}
},

In the draw function, before any existing draw code:
draw: function() {
// Added
if (this.flickerTimer > 0){
this.isFlickering = !this.isFlickering;
if (this.isFlickering === true){
return;
}
}

In the update function:
update: function() {
if (this.flickerTimer > 0){
this.flickerTimer -= ig.system.tick;
if (this.flickerTimer <= 0){
this.flickerTimer = 0;
this.isFlickering = false;
}
}



Now I have some sweet flickering action!