On temp depile: adjust opacity of entire pile, individual items
Closed this issue · 4 comments
I'm sorry, but do you mean to adjust the opacity of the pile or individual items or both? Right now I'm adjusting the opacity of the pile's rootContainer
, see https://github.com/flekschas/piling.js/blob/master/src/library.js#L3746.
Interesting. Maybe I caused the visual change by replacing the graphics element with a container 🤔 Can you do a quick test to see if changing the root container back to a graphics object would change the visual output?
Essentially, instead of having the opacity of every individual item adjusted, the opacity of the pile as a whole should change.
No, the issue still exists. Actually I think the issue existed all the time.
I found this issue on pixi's github that might be related: pixijs/pixijs#4334
I think there's a very easy workaround:
- Add dispersed pile to a separate container that sits on top of normal piles (can we use
activePile
?) - Add a container in between normal piles and the dispersed pile with a single black sprite texture. Set the transparency of that texture to 0.66 or somethings
To get a black sprite do
const blackSprite = new PIXI.Sprite(PIXI.Texture.WHITE);
blackSprite.tint = 0x000000;
blackSprite.width = containerWidth;
blackSprite.height = containerHeight;