These are chat archives for pixijs/pixi.js

28th
Nov 2017
L
@louisgv
Nov 28 2017 04:17
Hi folks, I'm working on an educational project called taMAGGOTchi, the overall specs is available at
So in the game, player would feed maggots with PIXI.Sprite
My question is, is it possible to access the pixel of a sprite and erase them from the canvas as the maggot chomp away from the sprite
Should I tackle this problem with thst solution
*that
L
@louisgv
Nov 28 2017 04:31
Or should I simply draw circles on the stage as the maggot eat away. And check if the drawn bite marks overlap the sprite
Or is there a way for me to render the texture as bitmap and have the maggot act similat to an eraser
The texture I am referring to are food items, which are image texture, sourced from base64 data.
L
@louisgv
Nov 28 2017 09:26
So I see that with a container, I can cache the food item as bitmap
Right now I have 2 containers, a normal container for all the food item adding in
and a ParticleContainer for the maggots
I'm looking at way to erase pixels from the cached bitmap of a container
And potentially, reduce all the children of the container into a single sprite from the bitmap returned from the container
Is this possible?
Thomas Persson
@thomaspersson
Nov 28 2017 13:30
Hi, when importing pixi.js stuff in my test files I get "TypeError: Cannot set property 'fillStyle' of null" anyone know how to solve this? I am guessing that my environment for test (jest.s) does not have canvas and window etc but I haven't invoked them even..