Fixes in lambda/function definitions (body args). Cleanup of examples and decumentation. Added convenience methods for JS interop, lists and objects.
This commit is contained in:
@@ -35,9 +35,9 @@
|
||||
|
||||
;
|
||||
(defn redraw ()
|
||||
(
|
||||
|
||||
(clear)
|
||||
(rec 300)))
|
||||
(rec 300))
|
||||
|
||||
;
|
||||
(on "animate" redraw)
|
||||
@@ -3,6 +3,9 @@
|
||||
;
|
||||
(clear)
|
||||
|
||||
(def frame
|
||||
(get-frame))
|
||||
|
||||
;
|
||||
(def gradient-line
|
||||
(line frame:c 0 frame:c frame:h))
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
(clear)
|
||||
|
||||
(def frame
|
||||
(get-frame))
|
||||
|
||||
|
||||
; times
|
||||
|
||||
@@ -26,13 +29,13 @@
|
||||
; position on a circle from angle
|
||||
|
||||
(defn circle-pos
|
||||
(cx cy r a) {:x
|
||||
(cx cy r a) (object "x"
|
||||
(add cx
|
||||
(mul r
|
||||
(cos a))) :y
|
||||
(cos a))) "y"
|
||||
(add cy
|
||||
(mul r
|
||||
(sin a)))})
|
||||
(sin a)))))
|
||||
|
||||
|
||||
; draw
|
||||
@@ -42,10 +45,10 @@
|
||||
(
|
||||
(stroke
|
||||
(line cx cy
|
||||
(:x
|
||||
(circle-pos cx cy r a))
|
||||
(:y
|
||||
(circle-pos cx cy r a))) "white" 2)))
|
||||
(get
|
||||
(circle-pos cx cy r a) "x")
|
||||
(get
|
||||
(circle-pos cx cy r a) "y")) "white" 2)))
|
||||
|
||||
;
|
||||
(defn draw-star
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
|
||||
(def theme
|
||||
(get-theme))
|
||||
|
||||
(def frame
|
||||
(get-frame))
|
||||
|
||||
; ex: theme:f_high
|
||||
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
(clear)
|
||||
|
||||
(def theme
|
||||
(get-theme))
|
||||
|
||||
(def frame
|
||||
(get-frame))
|
||||
|
||||
(defn branch
|
||||
(v)
|
||||
(if
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
(clear)
|
||||
|
||||
(def theme
|
||||
(get-theme))
|
||||
|
||||
(transform:move 150 150)
|
||||
|
||||
(fill
|
||||
|
||||
Reference in New Issue
Block a user