Jump to content

Drawing many rings

Saeki Amae

Recommended Posts

Hello everyone! ❤️ I'm having problem - i need to render in webGL renderer (pixi v5) about 100-600 rings with defined line width.
Performance here is very important so I'm looking for fastest way of rendering them. Rings color and scale and position may change every frame.

One of ways is using PIXI graphics - but then during scaling the line width grows. Besides I heard that using many graphics objects may be costly.

Another way I heard of is drawing all circles on one graphics object and redrawing it each frame - but then probably performance is even worse yes?

Yet another way converting ring graphics into texture and using it for sprites that i put into particle container - it will be fastest but then again line will grow during scaling
and in some scales the rings will look ugly and pixelized on borders.. 

Please, what is best solution for my problem? Any ideas? Thank you all in advance! ❤️

Link to comment
Share on other sites

pixi.js-legacy is a bundle of pixijs that supports CanvasRenderer. It was moved from default package because some people apparantly want as minimal build as possible and comparing weight of libs, measuring who's cooler. Canvas2d in pixi-v5 is supported better than in v4. It is not possible to do certain things easily without canvas2d and we will not remove it.

Look in the assets: https://github.com/pixijs/pixi.js/releases/tag/v5.3.3

Edited by ivan.popelyshev
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...