Filters on SpriteSheets use WAY to much system resources
See original GitHub issueThis is a question and a bug. I have tried Stack Overflow and I was just being ignored so I am here now, hope that’s okay. I am working on a game that uses a lot of Sprite Sheets on screen, one of them requires a filter during game play.
I tried:
mySprite.filters = [new createjs.BlurFilter(10,10,1)];
mySprite.cache(0,0,640,480);
mySprite.on("tick", this.updateCostumeColor, this);
function updateCostumeColor (evt) {
evt.currentTarget.updateCache();
};
As suggested but all it does is boggle down my game’s performance due to the amount of rendering on the screen. I have provided a work around that someone has made, I was able to get it to partially work. I load in my SpriteSheets through Preload.js and can’t automate their system to use the details from my spritesheet.json.
I am asking for an internal way to add filters on to the sprite’s image set similar to how the workaround acts.
Thank.
Issue Details
-
Current Version of EaselJS
-
Workarounds: https://jsfiddle.net/lannymcnie/NRH5X/
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I did something with this before. Basically I created filtered versions of the whole spritesheet once and then used the cached version.
I doubt my implementation works anymore, but you may be able to do something with the code: https://github.com/MannyC/FilteredSprite.js
Thanks! @WindowsTV - looking forward to going through it. Will let you know what happens! Cheers.