Skip to content

Instantly share code, notes, and snippets.

@mbacarella
mbacarella / app.ml
Created April 15, 2020 23:05
rough translation of three.js hello world into ocaml (js_of_ocaml)
open Js_of_ocaml
let main () =
let doc = Dom_html.document in
let inner_width =
Js.Optdef.get Dom_html.window##.innerWidth (fun () -> 1000)
in
let inner_height =
Js.Optdef.get Dom_html.window##.innerHeight (fun () -> 500)
in