Skip to content

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

Comments

The new Google docs uses a canvas. The feature is not rolled out fully yet but there is a demo document attached to the announcement. The canvas demo document is fully selectable, it feels native. I assume it works as you described, so it's possible to make it feel right, with enough effort to detail.

By placing the right elements at the right place, you can have native input and text selection, but that’s not just WebGL anymore; That’s a regular (but transparent) webpage with a WebGL background that mimics your input. It takes quite a bit of effort to emulate that effectively since there’s no guarantee that the visible text rendered by WebGL renders with what the browser renders outside it. Probably the 80/20 rule applies here.

I inspected the DOM while selecting and I didn't find the hidden text element. Perhaps it was there and I didn't know how to find it.

Is this a more likely approach than just drawing the selection highlight and emulating the whole thing in canvas?

AboutSource Built by g1lg1l

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