<head>
  <style>
    body { margin: 0; }

    #emit-particles-btn {
      position: absolute;
      top: 10px;
      right: 10px;
      font-size: 13px;
    }
  </style>

  <script src="//cdn.jsdelivr.net/npm/force-graph"></script>
  <!--<script src="../../dist/force-graph.js"></script>-->
</head>

<body>
  <div id="graph"></div>
  <button id="emit-particles-btn">Emit 10 Random Particles</button>

  <script>
    // Random tree
    const N = 50;
    const links = [...Array(N).keys()]
    .filter(id => id)
  