Jump to content

drawing many graphics efficiently


barrard
 Share

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

single-profile.thumb.png.0ee58ded5ec849a29f26cf88ad9b7653.png

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

 many-profile.thumb.png.643ca9355e5760505f5d8ef0e2bbe5b9.png

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

heatmap.png.366bbd84bc09408942819ada29c0541b.png

Edited by barrard
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.

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

Loading...
 Share

  • Recently Browsing   0 members

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