creationRoutine = {
let videoIndex = 1;
setTimeout(
() =>
setInterval(() => {
$(`#image-${videoIndex - 1}`).remove();
$(`#sky-${videoIndex - 1}`).remove();
const videoSphere = $(
`<a-sky id='sky-${videoIndex}' unload-component/>`
);
videoSphere.attr("visible", true);
const randomNumber = videoIndex % wallpaper_images.length;
const video = $(`<img id='image-${videoIndex}' />`);
video.attr("crossorigin", "anonymous");
video.attr(
"src",
`https://cors-anywhere.herokuapp.com/${wallpaper_images[randomNumber]}`
);
$("#assets").append(video);
videoSphere.attr("src", `#image-${videoIndex}`);
videoIndex++;
$("#assets").append(video);
$("#scene").append(videoSphere);
}, 5000),
3000
);
}