Skip to content

Comment on Show HN: CandyGraph, a flexible, fast-by-default WebGL plotting libraryparent

Comments

It renders everything on the GPU, even axes and text.

Yeah, DOM needs immediate mode graphics. Like the one I've added to Sciter, this for example:

   element.paintForeground = function(gfx) {
     ... 
   }
allows to custom draw a) on top of default element's content (note: any element, not just <canvas>), b) with the paint frequency (60 FPS) and c) on GPU directly - gfx there is the same graphics that HTML content uses.

So you can still use Context2D for GPU drawing without the need for WebGL.

Even you can push vertices on WebGL fast enough there are other problems, text measurement and rendering for example. WebGL simply have no means for drawing texts.

So I've added Graphics.Text - attributed text layout that caches chars-to-glyphs and layout calculations...

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.