4x Animated Numbers

let startNum = 0;

let endNum = 20;

const duration = 100;

 

$w.onReady(function () {

 

});

 

function countUp(){

if (startNum <= endNum ){

$w('#text199').text = startNum.toString();

startNum++;

}

}

 

 

export function text199_viewportEnter(event, $w) {

setInterval(()=> {

countUp();

}, duration);

}

 

let startNum1 = 100;

let endNum1 = 160;

const duration1 = 100;

 

$w.onReady(function () {

 

});

 

function countUp1(){

if (startNum1 <= endNum1 ){

$w('#text18').text = startNum1.toString();

startNum1++;

}

}

 

export function text18_viewportEnter(event, $w) {

setInterval(()=> {

countUp1();

}, duration1);

}

 

let startNum2 = 0;

let endNum2 = 10;

const duration2 = 100;

 

$w.onReady(function () {

 

});

 

function countUp2(){

if (startNum2 <= endNum2 ){

$w('#text201').text = startNum2.toString();

startNum2++;

}

}

 

export function text201_viewportEnter(event, $w) {

setInterval(()=> {

countUp2();

}, duration2);

}

 

 

let startNum3 = 550;

let endNum3 = 600;

const duration3 = 100;

 

$w.onReady(function () {

 

});

 

function countUp3(){

if (startNum3 <= endNum3 ){

$w('#text202').text = startNum3.toString();

startNum3++;

}

}

 

export function text202_viewportEnter(event, $w) {

setInterval(()=> {

countUp3();

}, duration3);

}