How to use the pts.Pt function in pts

To help you get started, we’ve selected a few pts examples, based on popular ways it is used in public projects.

github alexeden / rpi-led-matrix / app / web / src / app / canvas / canvas.component.ts View on Github external
        action: (t, x, y) => subscriber.next(new Pt(x - left, y - top)),
      });
github alexeden / rpi-led-matrix / app / web / src / app / canvas / canvas.component.ts View on Github external
withLatestFrom(this.pointer, ({ t }, ptr) => {
        const radius = Math.round(Num.cycle((t % 1000) / 1000) * 10);
        const [x, y] = ptr.map(Math.round);
        const color = Color.hsl(x % 360, 1, 0.5);
        this.form
          .fill(Color.HSLtoRGB(color).toString('rgb'))
          .point(ptr, radius, 'circle')
          .textBox([new Pt(x, y).add(radius + 5, -20), new Pt(x, y).add(100, 20)], `${x + radius}, ${y}`, 'middle');
      })
    )