Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dx * renderer.resolution,
dy * renderer.resolution,
width * renderer.resolution,
height * renderer.resolution
);
context.clip();
}
if (sprite.tint !== 0xFFFFFF)
{
if (sprite._cachedTint !== sprite.tint || sprite._tintedCanvas.tintId !== sprite._texture._updateID)
{
sprite._cachedTint = sprite.tint;
// TODO clean up caching - how to clean up the caches?
sprite._tintedCanvas = CanvasTinter.getTintedCanvas(sprite, sprite.tint);
}
context.drawImage(
sprite._tintedCanvas,
0,
0,
width * resolution,
height * resolution,
dx * renderer.resolution,
dy * renderer.resolution,
width * renderer.resolution,
height * renderer.resolution
);
}
else
{