Help us understand the problem. What is going on with this article?

テクスチャにvideoを使用

More than 3 years have passed since last update.

デモ:https://mo49.github.io/qiita/20160908/video.html

const video = document.getElementById('video');
const texture = new THREE.VideoTexture(video);
texture.minFilter = THREE.LinearFilter;
texture.magFilter = THREE.LinearFilter;
texture.generateMipmaps = false; // 動画は正方形ではないので無効にする

DOMに用意したvideoタグ自体はdisplay:none;で非表示にする

<video id="video" style="display: none; position: absolute; left: 15px; top: 75px;"
       src="movie/sample.mp4" controls="true" autoplay="true"></video>

最後にマテリアルのmapにセットする

mczkzk
読ませる記事よりも公開メモやスニペットの投稿が多め。
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away