barrard Posted April 26, 2023 Share Posted April 26, 2023 (edited) Hey thanks for reading/offering help with my question. I'm drawing roughly about 100 horizontal Graphics.drawRect() on a canvas with Pixi.js as seen here Each horizontal line is a color filled rect using Graphics. This is simple enough, and poses little efforts to draw even when zooming and panning. The question is, and What I want to do, is, I want to draw many more of these lines, which wont go all the way across, but small vertical slivers as depicted here This is over simplified, as I would like to draw up to 43,000 of these small vertical slices of colored horizontal lines. How/what is the best way to do this without simply drawing 400k graphics on the canvas??? -is this not good idea? Thanks P.S. This is what I'm trying to mimic Edited April 26, 2023 by barrard Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted April 26, 2023 Share Posted April 26, 2023 Btw, plot-crypto-related stuff I did is under NDA ) cant help, except.. i can point you to https://github.com/gameofbombs/pixi-candles as a base if you are ready to write better shaders for such things ) 43k small bars should work fine there barrard 1 Quote Link to comment Share on other sites More sharing options...
barrard Posted April 26, 2023 Author Share Posted April 26, 2023 So likely drawing each individual line would be the best/only way? there would be about 100 horizonal lines per veritcal slice, and up to 43k slizes, so 400k+ can I draw a single Rect and fill with different colors ? 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.