3 ms·
I have been working a lot with WebGL text in the past several months. Our current solution uses SDF with standard derivatives (crisp anti-aliasing regardless of
by mattdesl 11y ago
I have been working a lot with WebGL text in the past several months. Our current solution uses SDF with standard derivatives (crisp anti-aliasing regardless of zoom level) and supports kerning (depending on the font), batched glyphs, and word wrapping. It's not perfect, but it's pretty good for common use cases.
Since the OP is using modules already, they might enjoy some of the libraries and tools here:
https://www.npmjs.com/package/text-modules https://www.npmjs.com/package/text-modules
Or a ThreeJS specific implementation of bitmap / SDF:
https://github.com/Jam3/three-bmfont-text https://github.com/Jam3/three-bmfont-text
And lots more reading on the subject:
http://mattdesl.svbtle.com/material-design-on-the-gpu http://mattdesl.svbtle.com/material-design-on-the-gpu
Some practical implementations of it:
- npm dataviz: http://mattdesl.github.io/npm-names/ http://mattdesl.github.io/npm-names/ (over 40k glyphs, could go higher)
- physical text: http://mattdesl.github.io/physical-text/index.html http://mattdesl.github.io/physical-text/index.html
- parris 11y agoWhoa that's really cool!