nanometer is a small framework I made in TypeScript to control ILDA show lasers via the Ether Dream DAC.
It consists of two parts:
- A WebSocket server, which requests a stream of points (defined as an X/Y position and RGB color values) from a connected client and forwards them to the DAC using its TCP interface.
- A library for writing clients, which connect to the server and provide points. Included in the library are helper classes for defining computational point generators, as well as functions for assembling multiple point generators into a scene, complete with 3-D translation, rotation, and projection!
Splitting it up like this over WebSockers lets you rapidly iterate without having to reconnect to the laser and lets you write a client from within a web browser including within a framework like p5.js.
nanometer uses @laser-dac's Ether Dream driver and its virtual laser which can run inside of a web browser to give the developer freedom to prototype a client without a physical laser.
Here's an example demo that simply generates points, and here's another one that uses the included vector graphics helper library.