@laser-dac/simulator
    TypeScript icon, indicating that this package has built-in type declarations

    0.3.4 • Public • Published

    @laser-dac/simulator

    This package can simulate a physical laser DAC so you can develop without having a laser or DAC at all. It has a web-based simulator for the laser, that tries its best to mimick the limitations of the laser.

    yarn add @laser-dac/simulator
    npm i @laser-dac/simulator
    

    Usage

    import { DAC } from '@laser-dac/core';
    import { Simulator } from '@laser-dac/simulator';
    
    const dac = new DAC();
    dac.use(new Simulator());
    const started = await dac.start();
    if (started) {
      // draw a horizontal red line from left to right in the center
      // @laser-dac/draw can help you with drawing points!
      const scene = {
        points: [
          { x: 0.1, y: 0.5, r: 1, g: 0, b: 0 },
          { x: 0.9, y: 0.5, r: 1, g: 0, b: 0 },
        ],
      };
      dac.stream(scene);
    }

    See for more usage info and examples the Laser DAC project on GitHub.

    Install

    npm i @laser-dac/simulator

    DownloadsWeekly Downloads

    11

    Version

    0.3.4

    License

    MIT

    Unpacked Size

    103 kB

    Total Files

    10

    Last publish

    Collaborators

    • spacek33z
    • rutgerschimmel