jmp909 Posted October 23, 2015 Share Posted October 23, 2015 somebody asked if you could tint a whole sprite atlas. My idea was to load the same PNG separately as an image, tint it, draw it to bitmap data and then overwrite the cache object for the atlas. I can create a dataURL for the image but I'm not sure it's possible to overwrite an existing cache item's URL etc. (obviously this is likely to be calling private methods or rather updating non-public properties, but it'd still be interesting to know if it's doable) thanks for any adviceJ. Link to comment Share on other sites More sharing options...
drhayes Posted October 23, 2015 Share Posted October 23, 2015 I'm pretty sure if you add something to the cache at an existing ID the old one is overwritten. Link to comment Share on other sites More sharing options...
jmp909 Posted October 24, 2015 Author Share Posted October 24, 2015 Yes but doesn't the atlas image in the cache have associated json data? In which case I can't just replace the whole entry... I just need to replace the image part of it. I tried setting the url to my dataurl but that didn't work Link to comment Share on other sites More sharing options...
Recommended Posts