http://aframe.io/の場合、画像を作成せずにテキストをレンダリングするにはどうすればよいですか?
12642 次
1 に答える
20
編集:テキスト コンポーネントが A-Frame マスター ブランチに配置されました。これは 0.5.0 で展開されます。コンポーネントは、フォント、配置、アンカー、ベースライン、シェーダーなどをサポートします。<a-entity text="value: HELLO"></a-entity>
https://aframe.io/docs/master/components/text.html
いくつかのコミュニティ コンポーネントを使用できます。
- https://github.com/bryik/aframe-bmfont-text-component - 符号付きディスタンス フィールド フォント (ズーム レベルに関係なく見栄えの良いビットマップ フォント) を使用して描画されたテキスト。
- https://npmjs.com/package/aframe-text-geometry-component - テキスト ジオメトリ。
- https://github.com/maxkrieger/aframe-textwrap-component - テキストの折り返しに重点を置いた描画コンポーネント。
- https://github.com/scenevr/htmltexture-component - テクスチャとしての 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 に答える