Aframe: [feature request] text

Created on 8 Oct 2016  Â·  7Comments  Â·  Source: aframevr/aframe

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

feature request

All 7 comments

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:

  • character set is limited
  • my implementation is hackey and the dependencies are complex
  • components (color, opacity) do not work 'natively'
  • offset and other issues
Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrBokeh picture MrBokeh  Â·  5Comments

ghost picture ghost  Â·  3Comments

huhsame picture huhsame  Â·  3Comments

greggman picture greggman  Â·  4Comments

ngokevin picture ngokevin  Â·  5Comments