aframevr / aframe

:a: Web framework for building virtual reality experiences.
https://aframe.io/
MIT License
16.69k stars 3.98k forks source link

[feature request] text #1966

Closed hongbo-miao closed 7 years ago

hongbo-miao commented 8 years ago

I saw the demos are all using images to show text. It will be great to have something like text box.

donmccurdy commented 8 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.

hongbo-miao commented 8 years ago

Thanks, that is very helpful!

ngokevin commented 8 years ago

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?

hongbo-miao commented 8 years ago

@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.

ngokevin commented 8 years ago

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.

bryik commented 8 years ago

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:

ngokevin commented 7 years ago

https://github.com/aframevr/aframe/pull/2200