Sudha247 / ocaml-joy

MIT License
21 stars 14 forks source link

Canvas backend and module functors #98

Open FayCarsons opened 5 months ago

FayCarsons commented 5 months ago

Integrated the HTML canvas backend and added module functors so that backends can be created easily.

I went with JSOO as Melange seems immature and documentation is less than ideal. It was unclear how Melange would integrate with a library that targets both native and the browser.

Adding new backends should now be easy as there's a Joy module functor that takes a Backend module signature and injects geometry/transformation/types modularly. The Cairo backend is now available under Joy.SVG and the canvas backend Joy.Canvas.