bobzhang/p5/dom does not have a README file
#external
pub type AudioNodepub(all) struct PointerEvent {
kind : String
x : Double
y : Double
win_x : Double
win_y : Double
moved_x : Double
moved_y : Double
button : Int
buttons : Int
pointer_id : Int
pointer_type : String
is_primary : Bool
}fn copy_region(dst : Canvas, src : ImageElement, sx : Double, sy : Double, sw : Double, sh : Double, dx : Double, dy : Double, dw : Double, dh : Double) -> Unitfn create_canvas(w : Double, h : Double, density : Double, parent : String, visible : Bool) -> Canvasfn create_capture(video : Bool, audio : Bool, flipped : Bool, parent : String, meta : (Int, Int) -> Unit, failed : (String) -> Unit) -> Elementfn create_media(kind : String, sources : FixedArray[String], parent : String, meta : (Int, Int) -> Unit, ready : () -> Unit) -> Elementfn date_part(which : Int) -> Intfn download_bytes(bytes : FixedArray[Byte], filename : String, mime : String) -> Unitfn download_text(text : String, filename : String, mime : String) -> Unitfn download_url(url : String, filename : String) -> Unitfn draw_image(ctx : Context2D, img : ImageElement, sx : Double, sy : Double, sw : Double, sh : Double, dx : Double, dy : Double, dw : Double, dh : Double) -> Unitfn draw_tinted_image(ctx : Context2D, img : ImageElement, iw : Int, ih : Int, r : Double, g : Double, b : Double, a : Double, sx : Double, sy : Double, sw : Double, sh : Double, dx : Double, dy : Double, dw : Double, dh : Double) -> Unitfn fetch_bytes(url : String, done : (FixedArray[Byte]) -> Unit, failed : (String) -> Unit) -> Unitfn fetch_text(url : String, done : (String) -> Unit, failed : (String) -> Unit) -> Unitfn fill_rect(ctx : Context2D, x : Double, y : Double, w : Double, h : Double, style : String) -> Unitfn has_query_param(name : String) -> Boolfn http_request(url : String, http_method : String, body : String, content_type : String, done : (Int, String) -> Unit, failed : (String) -> Unit) -> Unitfn listen_device(orient : (Double, Double, Double) -> Unit, motion : (Double, Double, Double) -> Unit) -> Unitfn listen_keys(f : (String, String, String, Int) -> Bool) -> Unitfn listen_pointer(c : Canvas, logical_w : () -> Double, logical_h : () -> Double, f : (PointerEvent) -> Bool) -> Unitfn load_font(url : String, family : String, done : (String) -> Unit, failed : (String) -> Unit) -> Unitfn load_font_data(data : FixedArray[Byte], family : String, done : (String) -> Unit, failed : (String) -> Unit) -> Unitfn load_image(url : String, done : (ImageElement, Int, Int) -> Unit, failed : (String) -> Unit) -> Unitfn number_to_fixed(n : Double, digits : Int) -> Stringfn path_bezier_curve_to(p : Path2D, c1x : Double, c1y : Double, c2x : Double, c2y : Double, x : Double, y : Double) -> Unitfn path_ellipse(p : Path2D, cx : Double, cy : Double, rx : Double, ry : Double, rotation : Double, start : Double, end : Double) -> Unitfn path_round_rect(p : Path2D, x : Double, y : Double, w : Double, h : Double, tl : Double, tr : Double, br : Double, bl : Double) -> Unitfn post_text(url : String, body : String) -> Unitfn query_param(name : String) -> Stringfn request_animation_frame(f : (Double) -> Unit) -> Unitfn screen_orientation_type() -> Stringfn set_text_style(ctx : Context2D, font : String, align : String, baseline : String, direction : String) -> Unitfn set_transform(ctx : Context2D, a : Double, b : Double, c : Double, d : Double, e : Double, f : Double) -> Unitfn storage_get(key : String) -> Stringfn storage_set(key : String, value : String) -> Unitfn stroke_text(ctx : Context2D, text : String, x : Double, y : Double, style : String, width : Double, join : String) -> Unitfn upload_canvas_png(c : Canvas, url : String, index : Int, done : () -> Unit, failed : (String) -> Unit) -> UnitInstall
Download zipA port of p5.js 2.x to MoonBit (JS backend): 2D canvas and WEBGL, fonts, SVG, GIF, shaders; pixel-identical with p5.js on its parity suite.