问题
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