Attempting to apply a basic video as a texture to a cube, but the outcome is not quite what I had hoped for :)
video = document.createElement('video');
video.width = 320;
video.height = 320;
video.autoplay = true;
video.loop = true;
video.src = 'video.mp4'
var videoTexture = new THREE.Texture(video);
videoTexture.needsupdate = true;
var cube = new THREE.Mesh(new THREE.BoxGeometry( 10, 10, 10, 1, 1, 1 ), new THREE.MeshBasicMaterial({ map: videoTexture }));
scene.add(cube);
When replacing map: videoTexture
with color: '#fff'
, a white square appears instead. So, the cube is being displayed, leading to the assumption that the issue might be related to the video itself?