docs/demo/synclib/build/synclib.js
// return a simple version of the object, good for debugging
return a simple version of the object, good for debugging
return a simple version of the object good for debugging
function simpleTimegraph(graph) {
    let simpleGraph = graph.map(g => {
        let events = g.events.map(e => {
            let event = {
                eventType: e.eventType,
                elapsed: e.elapsed,
                nodeType: e.node.type,
                nodeId: e.node._id,
                nodeSrc: e.node.src,
                nodeSelector: e.node.selector,
                dur: e.node.dur
            };
            if (e.node.hasOwnProperty('clipBegin')) {
                event.clipBegin = e.node.clipBegin;
            }
            if (e.node.hasOwnProperty('clipEnd')) {
                event.clipEnd = e.node.clipEnd;
            }
            return event;
        });
        return {
            timestamp: g.timestamp,
            events
        };
    });
    return simpleGraph;
}
function simpleTimegraph ( graph ) { let simpleGraph = graph . map ( g => { let events = g . events . map ( e => { let event = { eventType : e . eventType , elapsed : e . elapsed , nodeType : e . node . type , nodeId : e . node . _id , nodeSrc : e . node . src , nodeSelector : e . node . selector , dur : e . node . dur } ; if ( e . node . hasOwnProperty ( 'clipBegin' ) ) { event . clipBegin = e . node . clipBegin ; } if ( e . node . hasOwnProperty ( 'clipEnd' ) ) { event . clipEnd = e . node . clipEnd ; } return event ; } ) ; return { timestamp : g . timestamp , events } ; } ) ; return simpleGraph ; }
return a simple version of the object, good for debugging
return a simple version of the object good for debugging