expandNode(index){
    const color_attributes = this.node_mesh.geometry.attributes.color.array,
          size_attributes = this.node_mesh.geometry.attributes.size.array;

    const to255 = (proportion) => Math.round(proportion*255);
    const toProp = (full) => full/255;
    const brighter = d3.color(`rgb(${to255(this.nodeColors[index*3])}, ${to255(this.nodeColors[index*3 + 1])}, ${to255(this.nodeColors[index*3 + 2])})`)
    .darker();

    color_attributes[index*3]     = toProp(brighter.r);
    color_attributes[index*3 + 1] = toProp(brighter.g);
    color_attributes[index*3 + 2] = toProp(brighter.b);
    size_attributes[index]  = this.nodeSizes[index]*this.selection_size_mult;

    this.node_mesh.geometry.attributes.color.needsUpdate = true;
    this.node_mesh.geometry.attributes.size.needsUpdate = true;
  }
// highlight and expand a given node
highlight and expand a given node
highlight and expand a given node
expandNode(index){
    const color_attributes = this.node_mesh.geometry.attributes.color.array,
          size_attributes = this.node_mesh.geometry.attributes.size.array;
    const to255 = (proportion) => Math.round(proportion*255);
    const toProp = (full) => full/255;
    const brighter = d3.color(`rgb(${to255(this.nodeColors[index*3])}, ${to255(this.nodeColors[index*3 + 1])}, ${to255(this.nodeColors[index*3 + 2])})`)
    .darker();
    color_attributes[index*3]     = toProp(brighter.r);
    color_attributes[index*3 + 1] = toProp(brighter.g);
    color_attributes[index*3 + 2] = toProp(brighter.b);
    size_attributes[index]  = this.nodeSizes[index]*this.selection_size_mult;
    this.node_mesh.geometry.attributes.color.needsUpdate = true;
    this.node_mesh.geometry.attributes.size.needsUpdate = true;
  }
expandNode ( index ) { const color_attributes = this . node_mesh . geometry . attributes . color . array , size_attributes = this . node_mesh . geometry . attributes . size . array ; const to255 = ( proportion ) => Math . round ( proportion * 255 ) ; const toProp = ( full ) => full / 255 ; const brighter = d3 . color ( ` ${ to255 ( this . nodeColors [ index * 3 ] ) } ${ to255 ( this . nodeColors [ index * 3 + 1 ] ) } ${ to255 ( this . nodeColors [ index * 3 + 2 ] ) } ` ) . darker ( ) ; color_attributes [ index * 3 ] = toProp ( brighter . r ) ; color_attributes [ index * 3 + 1 ] = toProp ( brighter . g ) ; color_attributes [ index * 3 + 2 ] = toProp ( brighter . b ) ; size_attributes [ index ] = this . nodeSizes [ index ] * this . selection_size_mult ; this . node_mesh . geometry . attributes . color . needsUpdate = true ; this . node_mesh . geometry . attributes . size . needsUpdate = true ; }
highlight and expand a given node
highlight and expand a given node