Skip to content

Instantly share code, notes, and snippets.

View luishendrix92's full-sized avatar

Luis Felipe López G. luishendrix92

View GitHub Profile
@saolsen
saolsen / draw-2d.cljs
Last active June 22, 2021 06:45
2d canvas drawing in clojurescript
(ns saolsen.draw-2d)
;; Draw stuff (and never care about ie ever)
;; There's obviously a ton this lib doesn't do, just adding what
;; I need when I need it.
(def request-animation-frame
(or js/requestAnimationFrame
js/webkitRequestAnimationFrame))
(defn get-canvas-context-from-id