Hi there, I'm currently facing an issue with my Cube
. It's showing the image texture that I implemented quite easily, but when it comes to mapping a video texture, it just doesn't seem to work. I've tried creating a video element, setting its properties, and even updating the texture within my Three.js material, but still no luck.
video = document.createElement('video');
video.width = 320;
video.height = 240;
video.autoplay = true;
video.src = "my video.....";
var videoTexture = new THREE.Texture( video );
var material = new THREE.MeshBasicMaterial( { vertexColors: THREE.FaceColors,
map:texture, map: videoTexture} );
// render update....
if( video.readyState === video.HAVE_ENOUGH_DATA ){ videoTexture.needsUpdate = true; }
I would really appreciate any assistance in getting my video to display on the cubes properly. Thank you!