question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filters on SpriteSheets use WAY to much system resources

See original GitHub issue

This 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

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MannyCcommented, Nov 23, 2020

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

1reaction
danzencommented, Nov 24, 2020

Thanks! @WindowsTV - looking forward to going through it. Will let you know what happens! Cheers.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Filters on SpriteSheets use WAY to much system resources -
Filters on SpriteSheets use WAY to much system resources. ... I am working on a game that uses a lot of Sprite Sheets...
Read more >
Using Sprite Sheets in Pygame - Python Crash Course, 2nd ...
To use a sprite sheet, you load the sprite sheet as a single large image, and then you load the individual images from...
Read more >
How to Import a 2D Character Sprite Sheet and ... - YouTube
How to Import a 2D Character Sprite Sheet and Use in a GameObject in Unity (2021).
Read more >
CSS Sprites: What They Are, Why They're Cool, and How To ...
I wish. In short: CSS Sprites are a means of combining multiple images into a single image file for use on a website,...
Read more >
Textures - PixiJS
In PixiJS, textures are one of the core resources used by display objects. A texture, broadly speaking, represents a source of pixels to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found