How to use video element or html content as a face texture in three.js?

核能气质少年 提交于 2021-02-16 09:21:26

问题


I am looking to use a video texture for a face in three.js. I know this is fairly easy to do if you have the video data. But what would I do if I only have the element it is playing from?

For example: How would I play a youtube video and copy the video or player onto a face in three.js?


回答1:


There is an example of integrating Three.js and YouTube videos at

http://threejs.org/examples/css3d_youtube.html#cats

and examples of including general HTML elements (using CSS3D) at

http://learningthreejs.com/blog/2013/04/30/closing-the-gap-between-html-and-webgl/
and http://stemkoski.github.io/Three.js/CSS3D.html

Hope this helps!



来源:https://stackoverflow.com/questions/16868921/how-to-use-video-element-or-html-content-as-a-face-texture-in-three-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!