最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How can I render HTML in A-Frame? - Stack Overflow

programmeradmin3浏览0评论

How can I render or display plain HTML markup as a texture in A-Frame?

I want to do something like:

<!-- language-all: lang-html -->
<a-scene>
  <div>HELLO WORLD</div>
</a-scene>

How can I render or display plain HTML markup as a texture in A-Frame?

I want to do something like:

<!-- language-all: lang-html -->
<a-scene>
  <div>HELLO WORLD</div>
</a-scene>
Share Improve this question edited Mar 30, 2016 at 23:56 ngokevin asked Mar 30, 2016 at 22:33 ngokevinngokevin 13.2k5 gold badges44 silver badges88 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

To render HTML as a texture in A-Frame, it is not as easy as dropping HTML into <a-scene>.

Solutions involve painting to a <canvas> and using the canvas as texture onto 3D meshes. The A-Frame munity has shared some ponents for this:

  • HTML Texture Component
  • Draw Component
  • DOM to Screenshot
发布评论

评论列表(0)

  1. 暂无评论