This sketch shows how to control DMX-512 over a Serial UART connection using the WebSerial API. Specifically, it uses the p5.webserial library developed by Jordan Yoon-Buck.
Plug your DMX-to-USB converter into your laptop, then click the "choose port" to choose it. Then the three sliders onscreen correspond to the first three channels of a DMX-512 universe. They will control whatever you have on DMX addresses 1, 2, and 3.
It has been tested with two USB-to-DMX devices: a DMXKing UltraDMX Micro and an Enttec DMX USB PRO Mk2
Info on the USB-to-DMX packet format thanks to Nate Albrecht and Enttec.
See the source code at this link