I try that my aframe-sky-component changes his image every 3sec but it´s not working. Here what i coded so far:
<script type = "text/javascript">
function startTimer(){
setInterval(function(){ nextimage(); }, 3000);
function nextimage() {
var zahl = 0;
if (zahl == 0) {
$("#skyid").attr("src","#sky_2");
zahl ++;
}
if (zahl == 1) {
$("#skyid").attr("src","#sky_3");
zahl ++;
}
if (zahl == 2) {
$("#skyid").attr("src","#sky_4");
zahl ++;
}
if (zahl == 3) {
$("#skyid").attr("src","#sky_1");
zahl ++;
}
if (zahl == 4) {
zahl == 0;
}
}
}
</script>
I guess i have some logic mistakes thx for helping :D