4 ms·
And here I am trying to get a bunch of 2d lines rendering quickly in a 2d canvas for some charts. So strange to me that something 'simple' like drawing 20,000 l
by vmind 15y ago
And here I am trying to get a bunch of 2d lines rendering quickly in a 2d canvas for some charts. So strange to me that something 'simple' like drawing 20,000 lines chugs along at ~20fps and a water simulation with caustics is there running at 30fps just fine. Goes to show how much you gain from a GPU if you're using it for something it's designed to do.
- modeless 15y agoWebGL would draw your 20,000 lines much faster. It's not just for 3D; charting would be a perfectly reasonable use for WebGL.
- vmind 15y agoUnfortunately it's a lot of smaller charts and they're embedded in an SVG based diagram interface as foreignObjects, which doesn't support a WebGL context (in Chrome at least). I'd love to play with WebGL, but not usable for this task. Writing the whole interface in a WebGL canvas could be really fun, but far too much work for an MVP, and would kind of mess with making it work on iPad etc.
- AshleysBrain 15y agoAt this rate, you'd get an awful lot of people who can't see your chart if you did it in WebGL!
- hiker 15y agoI agree for mobile web apps. For PC, tell them to switch away from IE. If you're making high-end graphics, your users need a high-end browser.
- andrewljohnson 15y agoGetting lots of 2D lines to render on a chart fast is fairl;y easy with Google Maps and KML. It uses Douglas Peuker simplification.