millionsjs / millions

A JavaScript line rendering library for dealing with large numbers of lines using WebGL
MIT License
0 stars 0 forks source link

temporarily hiding lines #3

Open conundrumer opened 8 years ago

conundrumer commented 8 years ago

Right now, to hide a group of lines, we'd have to remove them, and then readd them to unhide them. We should test the performance implications since this is going to be a common operation.

One clever solution is to have multiple canvases as multiple layers that can be hidden using CSS.

mhenr18 commented 8 years ago

The CSS solution won't work because Millions doesn't support a transparent backbuffer (this is to make sure the antialiasing works correctly), so we'd need a solution that allows multiple Millions contexts to share a single WebGL or Canvas2D context.

That or just support layers within a Millions context. Might be the easiest approach for quickly switching out what's visible.