plugins/sigma.layout.forceAtlas2/worker.js
function(e) {
      switch (e.data.action) {
        case 'start':
          init(
            new Float32Array(e.data.nodes),
            new Float32Array(e.data.edges),
            e.data.config
          );

          // First iteration(s)
          run(W.settings.startingIterations);
          break;

        case 'loop':
          NodeMatrix = new Float32Array(e.data.nodes);
          run(W.settings.iterationsPerRender);
          break;

        case 'config':

          // Merging new settings
          configure(e.data.config);
          break;

        case 'kill':

          // Deleting context for garbage collection
          __emptyObject(W);
          NodeMatrix = null;
          EdgeMatrix = null;
          RegionMatrix = null;
          self.removeEventListener('message', listener);
          break;

        default:
      }
    }
function(e) {
      switch (e.data.action) {
        case 'start':
          init(
            new Float32Array(e.data.nodes),
            new Float32Array(e.data.edges),
            e.data.config
          );

          // First iteration(s)
          run(W.settings.startingIterations);
          break;

        case 'loop':
          NodeMatrix = new Float32Array(e.data.nodes);
          run(W.settings.iterationsPerRender);
          break;

        case 'config':

          // Merging new settings
          configure(e.data.config);
          break;

        case 'kill':

          // Deleting context for garbage collection
          __emptyObject(W);
          NodeMatrix = null;
          EdgeMatrix = null;
          RegionMatrix = null;
          self.removeEventListener('message', listener);
          break;

        default:
      }
    }
function ( e ) { switch ( e . data . action ) { case 'start' : init ( new Float32Array ( e . data . nodes ) , new Float32Array ( e . data . edges ) , e . data . config ) ; // First iteration(s) run ( W . settings . startingIterations ) ; break ; case 'loop' : NodeMatrix = new Float32Array ( e . data . nodes ) ; run ( W . settings . iterationsPerRender ) ; break ; case 'config' : // Merging new settings configure ( e . data . config ) ; break ; case 'kill' : // Deleting context for garbage collection __emptyObject ( W ) ; NodeMatrix = null ; EdgeMatrix = null ; RegionMatrix = null ; self . removeEventListener ( 'message' , listener ) ; break ; default : } }
On supervisor message
On supervisor message