I just came across this when I was updating some tools I had on my PC…
Maker.js is a Microsoft Garage project with source code on GitHub that looks to have a decent coding interface and looks like it might be entertaining to code things in. Their project page has some interesting demos that look intriguing!
Your compass and straightedge, in JavaScript.
Create line drawings using familiar constructs from geometry and drafting. Initially designated for CNC and laser cutters, Maker.js can also help you programmatically draw shapes for any purpose. It runs in both Node.js and web browsers.2D Export formats: DXF, SVG, PDF (Requires PDFKit)
3D Export formats: OpenJsCad script, STL (Requires OpenJsCad or openjscad-csg)