TheSpyder / rescript-webapi

ReScript bindings to the DOM and other Web APIs
http://tinymce.github.io/rescript-webapi/api/Webapi/
Other
149 stars 36 forks source link

Path 2D module #133

Open utenma opened 2 months ago

utenma commented 2 months ago

As result of https://github.com/TheSpyder/rescript-webapi/issues/132

Path2d module added with following js bindings, see on MDN

Syntax

open Webapi.Canvas

let path1 = Path2d.make()
let path2 = Path2d.make(~d="M10 10 h 80 v 80 h -80 Z", ())

path1->Path2d.addPath(path2)

path1->Path2d.arc(~x=1.,~y =2.,~r=3.,~a1 = 4., ~a2 =5.,())

Changelog

Breaking

TODO

utenma commented 2 months ago

@TheSpyder what do you do with the generated js files from tests? are they used besides compile check?

TheSpyder commented 1 month ago

@utenma sorry I haven't looked at this yet. The "tests" are indeed a compile check; it ensures changes made do not impact the compiled JS (unless that's intentional).

I hope to one day have full library coverage, if you could add a few extra test calls to methods you've added that would be great 👍

Should we delete the old binding methods you're replacing?

utenma commented 1 month ago

updated list of breaking changes