adityaravishankar/command-and-conquer — Issue #28: ImageData color Manipulation code needs to be optimized
Author: adityaravishankar
Created: 2012-01-24 11:51:32+00:00
State: open

The unit color mapping (yellow to red) is done every time a vehicle/building is drawn.

I did some testing and commenting out the code makes the game significantly faster
Doing this every refresh, for ever unit/building is KILLING performance on some browsers.

It should ideally be done just once (during image load) and cached (maybe in a hidden canvas) for reuse.