jonobr1/two.js ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple 2D drawing library for modern browsers that lets me create shapes, text, and animations with one API, and have it work across canvas, SVG, and WebGL without changing my code.

I want it to be easy to drop into a plain HTML page or import into a framework project, then make things like circles, rectangles, lines, and rotating objects on the screen. It should support a full screen mode, an update loop for animation, and a clean scene style setup so I can add shapes and move them around easily.

Please include a tiny example that draws a spinning rectangle, plus a way to build a minified browser file. If anything needs current browser or build docs, look it up online and keep it compatible with modern JavaScript.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab