Skip to content

tint

const tint: (color, amount?) => TintFilter

Mixes the node’s colours towards color by amount (0 none, 1 a flat silhouette of that colour): a hit flash, a frozen look. Unlike node.tint (a multiply), it can make dark pixels light.

ColorLike

number

TintFilter

const flash = tint('#ffffff', 0); enemy.filters = [flash]
engine.tween(flash, { amount: 1 }, 0.06).then(() => engine.tween(flash, { amount: 0 }, 0.2))