Closed hongbo-miao closed 7 years ago
Hi @Hongbo-Miao – try the list of community-made A-Frame components. You probably want one of these. Showing text in WebGL is a bit complex, and different approaches are better for different things, so it has been left out of the core library so far.
Thanks, that is very helpful!
I like using https://github.com/bryik/aframe-bmfont-text-component
Whether that should be standard I am not sure. Currently, it's the solution that works and looks the best. It might be nice to have it out of the box. But other solutions like html-to-canvas might win out?
@ngokevin Thanks! Those are very helpful suggestions. It will be great to add these in the the A-Frame document.
Feel free to close this if need.
We should consider having a basic sample text implementation (I like @bryik's) as part of the standard lib. This way if third-party components want to add text for whatever reason (debug, labels), they don't have to depend on a third-party text component or consider how to package that in.
Apparently, ReactVR will use SDF font text.
Displaying text is a common need, so it would be nice for A-Frame to have a built-in solution. Though @donmccurdy has a point about "different approaches [being] better for different things"; e.g. HTML-to-canvas for foreign languages.
Downsides of bmfont-text:
I saw the demos are all using images to show text. It will be great to have something like text box.