Added kinetic bones?!
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
; gradients
|
||||
(clear)
|
||||
;
|
||||
(def frame-rect (frame))
|
||||
(def radius
|
||||
(frame-rect:m))
|
||||
;
|
||||
|
||||
29
examples/basics/theme.lisp
Normal file
29
examples/basics/theme.lisp
Normal file
@@ -0,0 +1,29 @@
|
||||
; display color from the theme.
|
||||
; ex: theme:f_high
|
||||
(clear)
|
||||
(fill
|
||||
(frame) theme:background)
|
||||
(def color-box
|
||||
(div
|
||||
(:h
|
||||
(frame)) 10))
|
||||
(defn print-value
|
||||
(item id)
|
||||
(
|
||||
(def box-y
|
||||
(add
|
||||
(mul id color-box)
|
||||
(div color-box 2)))
|
||||
(fill
|
||||
(circle color-box box-y
|
||||
(div color-box 2)) item)
|
||||
(fill
|
||||
(text 140 box-y 30 id) "white")
|
||||
(fill
|
||||
(text 200 box-y 30
|
||||
(of
|
||||
(keys theme) id)) "white")
|
||||
(fill
|
||||
(text 400 box-y 30 item) "white")))
|
||||
(map
|
||||
(values theme) print-value)
|
||||
@@ -1,37 +0,0 @@
|
||||
; theme
|
||||
; reads color from the theme.
|
||||
(clear)
|
||||
(def col
|
||||
(λ
|
||||
(i)
|
||||
(of
|
||||
(
|
||||
(theme "f_high")
|
||||
(theme "f_med")
|
||||
(theme "f_low")
|
||||
(theme "f_inv")
|
||||
(theme "b_high")
|
||||
(theme "b_med")
|
||||
(theme "b_low")
|
||||
(theme "b_inv"))
|
||||
(mod i 8))))
|
||||
(def rec
|
||||
(λ
|
||||
(v i)
|
||||
(if
|
||||
(gt v 0)
|
||||
(
|
||||
(fill
|
||||
(circle
|
||||
(add
|
||||
(div
|
||||
frame-rect:w 1.6)
|
||||
(mul 1.5 v))
|
||||
(mul 10 v)
|
||||
(mul v
|
||||
(div v 5)))
|
||||
(col i))
|
||||
(rec
|
||||
(sub v 3)
|
||||
(add i 1))))))
|
||||
(rec 40 0)
|
||||
Reference in New Issue
Block a user