I have a MapBox
project that is using Threebox
to render a plane on the map that has a THREE.VideoTexture
material to show a video. This works, BUT it only updates the video texture when there is interaction on the map or the map is animating. It seems that the Threebox
update method doesn’t run continuously so when you stop moving the mouse over the map the video texture freezes. Moving the mouse after a second will show the video one second later.
I tried updating the map by running this event listener on the Video Element:
video.addEventListener('timeupdate', function() {
console.log('Video tick');
window.tb.update();
});
The window.tb
being the Threebox
instance. It caused horrible glitching on the map.
Is there a way to update the material only, or target just the layer with the objects on it?