10

对于http://aframe.io/,如何在不创建图像的情况下呈现文本?

4

1 回答 1

20

编辑:文本组件已登陆 A-Frame 主分支。这将在 0.5.0 中推出。该组件将支持字体、对齐方式、锚点、基线、着色器等。<a-entity text="value: HELLO"></a-entity> https://aframe.io/docs/master/components/text.html

您可以使用一些社区组件:

我推荐位图字体文本组件,它性能好,视觉效果好:

<html>
  <head>
    <script src="https://aframe.io/releases/0.2.0/aframe.min.js"></script>
    <script src="https://rawgit.com/bryik/aframe-bmfont-text-component/master/dist/aframe-bmfont-text-component.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-entity bmfont-text="text: HELLO!; color: #333" position="0 0 -5"></a-entity>
    </a-scene>
  </body>
</html>
于 2016-03-29T06:12:24.070 回答