Saeki Amae Posted August 5, 2020 Share Posted August 5, 2020 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! ❤️ Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 5, 2020 Share Posted August 5, 2020 use pixi-legacy build, `graphics.generateCanvasTexture()` Quote Link to comment Share on other sites More sharing options...
Saeki Amae Posted August 6, 2020 Author Share Posted August 6, 2020 (edited) Does it mean I need to move entire project to PIXI v4? Won't it slow other things down? I thought that downgrading libraries makes only things worse? Edited August 6, 2020 by Saeki Amae Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 6, 2020 Share Posted August 6, 2020 (edited) 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 August 6, 2020 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.