You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The more PIXI.Graphics objects we use the worse our performance gets. So let's reduce the number of graphics objects!
Some easy ones that can be removed:
image-with-background.js doesn't need a dedicated graphics object for the background. Let's instead create a 1x1 texture for each background color and use scaled sprites as the background.
pile.js might not need contentGraphics at all. We should be able to just replace it with a container.
pile.js similar to 1, borderGraphics should be replaced by scaled PIXI.Sprite objects that are instantiated from fixed 1x1 textures. (One texture per color)
The more
PIXI.Graphics
objects we use the worse our performance gets. So let's reduce the number of graphics objects!Some easy ones that can be removed:
image-with-background.js
doesn't need a dedicated graphics object for the background. Let's instead create a 1x1 texture for each background color and use scaled sprites as the background.pile.js
might not needcontentGraphics
at all. We should be able to just replace it with a container.pile.js
similar to 1,borderGraphics
should be replaced by scaled PIXI.Sprite objects that are instantiated from fixed 1x1 textures. (One texture per color)Even better would be to replace 1 and 3 with custom meshes. Alternatively, this might also work: https://pixijs.io/pixi-filters/docs/outline_src_OutlineFilter.js.html
The text was updated successfully, but these errors were encountered: