sketch.js
// between particles which are less than a certain distance apart
between particles which are less than a certain distance apart
between particles which are less than a certain distance apart
joinParticles(particles) {
    particles.forEach((element) => {
      let dis = dist(this.x, this.y, element.x, element.y);
      if (dis < 85) {
        stroke('rgba(0,255,255,0.5)');
        line(this.x, this.y, element.x, element.y);
      }
    });
  }
joinParticles ( particles ) { particles . forEach ( ( element ) => { let dis = dist ( this . x , this . y , element . x , element . y ) ; if ( dis < 85 ) { stroke ( 'rgba(0,255,255,0.5)' ) ; line ( this . x , this . y , element . x , element . y ) ; } } ) ; }
between particles which are less than a certain distance apart
between particles which are less than a certain distance apart