title: pts.js: Speed up animation of grid cells?
body: <p>I'm using <a href="https://ptsjs.org/" rel="nofollow noreferrer">Pts.js</a> to create a grid of cells and then color these cells depending on their distance to the mouse pointer. My code is largely based on <a href="https://ptsjs.org/demo/edit/?name=create.gridcells" rel="nofollow noreferrer">a demo from the official Pts.js Website</a>.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>Pts.quickStart("#pt", "#123");
  //
  let pts = [];
  var follower = new Pt();
  
  space.add({
    start: (bound) =&gt; {
      pts = Create.gridCells(space.innerBound, 40, 20);
      follower = space.center;
    },
    //
    animate: (time, ftime) =&gt; {
      follower = follower.add(space.pointer.$subtract(follower).divide(20));
      form.stroke("#123");
      //
      let rects = pts.map((p) =&gt; {
        let color;
        let mag = follower.$subtract(Rectangle.center(p)).magnitude();
        let r = Rectangle.fromCenter(Rectangle.center(p), Rectangle.size(p));
        //
        if (mag &gt;= 100) {
          color = "#000"
        } else {
          color = "#f00"
        }
        //
        form.fill(color).rect(r);
      })
      //
      form.fillOnly("#fff").point(space.pointer, 10, "circle");
    }
  })
  //
  space.bindMouse().bindTouch().play();</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>#pt {
    width: 800px;
    height: 600px;
    margin: 30px auto 0;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://unpkg.com/pts@0.9.4/dist/pts.min.js"&gt;&lt;/script&gt;
  
  &lt;div id="pt"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>The implementation works absolutely fine. But I'd like to increase the speed with which the »coloring« of the cells »follows« the cursor, i.e. reduce the delay with which the red space around the cursor is animated. Ideally, I'd like to have no delay.</p>
  <p>I'm new to Pts.js, so still wrapping my head around the docs, and I can't find an option or explanation for how to control the animation's speed. If anyone could point me to what I need to do here, that'd be great.</p>