3 ms·
I wonder if it would be plausible to use this with webgl via WASM... Or if anyone's working on a javascript implementation of the algorithm. Good text renderin
by westoncb 7y ago
I wonder if it would be plausible to use this with webgl via WASM... Or if anyone's working on a javascript implementation of the algorithm.
Good text rendering/layout is about the only thing I feel like I'm missing from being able to pretty simply/rapidly create 3d apps with web tech these days. I still end up typically just overlaying DOM elements over the scene :/
- espeed 7y ago> I wonder if it would be plausible to use this with webgl via WASM. That's precisely what I'm looking at. I'm not as familiar with the front-end space as I used to be. What's the SOTA these days?
- westoncb 7y agoIMO, unless you're writing a new renderer from scratch or doing something else super custom, three.js is the best way of doing real-time 3d for the web these days. But, here's their article on text in three.js: https://threejs.org/docs/#manual/en/introduction/Creating-text https://threejs.org/docs/#manual/en/introduction/Creating-te... I think the bitmap font stuff can be extended to rendering SDF (signed distance field) fonts, which are nice enough for me--but that is not ready to use out of the box.
- kowdermeister 7y agoI would just render text to a canvas and use it as a texture in your Three.js scene. That's how I do it in my side project and it works without any extra dependency.
- tech_man7 7y agoThis might work well with Golem (www.golem.network) because they've implemented WASM which opens up many possibilities. I haven't found a cheaper way to render.
- espeed 7y ago> webgl and WASM I just found this... Google's CanvasKit - Skia + WebAssembly https://skia.org/user/modules/canvaskit https://skia.org/user/modules/canvaskit