js/dataCollector/dataCollector.js
function tick(){

    performanceCollector.tick();

    const useMedia = dataManager.getMediaState();
    const playTimeSinceStart = timeManager.getPlayTimeSinceStart();

    for (let key in dataConfig){

        const infoDict = dataConfig[key];

        if (infoDict.status && 
            playTimeSinceStart - infoDict.lastFetchTime > infoDict.timePeriod){
            
            const timeDifferene = playTimeSinceStart - infoDict.lastFetchTime;

            if (useMedia)
                _setEvents(infoDict.calculator.getMediaEvents(timeDifferene));
            
            // always collecting default events
            _setEvents(infoDict.calculator.getEvents(timeDifferene));
                
            infoDict.lastFetchTime = playTimeSinceStart;

        }

    }

}
function tick(){

    performanceCollector.tick();

    const useMedia = dataManager.getMediaState();
    const playTimeSinceStart = timeManager.getPlayTimeSinceStart();

    for (let key in dataConfig){

        const infoDict = dataConfig[key];

        if (infoDict.status && 
            playTimeSinceStart - infoDict.lastFetchTime > infoDict.timePeriod){
            
            const timeDifferene = playTimeSinceStart - infoDict.lastFetchTime;

            if (useMedia)
                _setEvents(infoDict.calculator.getMediaEvents(timeDifferene));
            
            // always collecting default events
            _setEvents(infoDict.calculator.getEvents(timeDifferene));
                
            infoDict.lastFetchTime = playTimeSinceStart;

        }

    }

}
function tick ( ) { performanceCollector . tick ( ) ; const useMedia = dataManager . getMediaState ( ) ; const playTimeSinceStart = timeManager . getPlayTimeSinceStart ( ) ; for ( let key in dataConfig ) { const infoDict = dataConfig [ key ] ; if ( infoDict . status && playTimeSinceStart - infoDict . lastFetchTime > infoDict . timePeriod ) { const timeDifferene = playTimeSinceStart - infoDict . lastFetchTime ; if ( useMedia ) _setEvents ( infoDict . calculator . getMediaEvents ( timeDifferene ) ) ; // always collecting default events _setEvents ( infoDict . calculator . getEvents ( timeDifferene ) ) ; infoDict . lastFetchTime = playTimeSinceStart ; } } }
Checks if any default data needs to be collected after each frame
@memberof DataCollector
Checks if any default data needs to be collected after each frame