-
-
Save mharju/2a31909da1ff277a8384 to your computer and use it in GitHub Desktop.
How to get stuff added to a global var?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn draw [] | |
(let [canvas-center-x (/ (width) 2) | |
canvas-center-y (/ (height) 2) | |
rads (radians (frame-count)) | |
color (* 255 (+ 1.0 (sin rads))) | |
r 100] | |
(background 128) | |
(fill color color 0) | |
(ellipse canvas-center-x canvas-center-y r r))) | |
(defn mouse-dragged [] | |
(println "mouse Dragged!" (mouse-x) (mouse-y)) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment