Jump to content

drawing many graphics efficiently


Recommended Posts

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?





This is what I'm trying to mimic


Edited by barrard
Link to comment
Share on other sites

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 ?


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...