Merge branch 'master' into feature/guru-examples
This commit is contained in:
13
examples/animate.lisp
Normal file
13
examples/animate.lisp
Normal file
@@ -0,0 +1,13 @@
|
||||
; animate
|
||||
|
||||
(
|
||||
(def start (get ronin "animate"))
|
||||
|
||||
(def t (sin (div (time) 100)))
|
||||
|
||||
(def pos (add 200 (mul 30 t)))
|
||||
(defn square (a) (rect a a a a))
|
||||
(stroke (square pos) 1 "red")
|
||||
|
||||
(start)
|
||||
)
|
||||
@@ -1,10 +0,0 @@
|
||||
; animation
|
||||
; click Project > Toggle Animation
|
||||
|
||||
(
|
||||
(def t (sin (div (time) 100)))
|
||||
|
||||
(def pos (add 200 (mul 30 t)))
|
||||
(defn square (a) (rect a a a a))
|
||||
(stroke (square pos) 1 "red")
|
||||
)
|
||||
@@ -2,15 +2,6 @@
|
||||
|
||||
(
|
||||
(clear)
|
||||
|
||||
; Filter
|
||||
|
||||
(def filter-action
|
||||
(lambda () (crop (rect 100 100 400 400))))
|
||||
|
||||
; Draw photo
|
||||
|
||||
(open
|
||||
"../../PREVIEW.jpg"
|
||||
filter-action)
|
||||
(open "../static/crystal.jpg")
|
||||
(crop (rect 100 100 400 400))
|
||||
)
|
||||
@@ -3,7 +3,7 @@
|
||||
(
|
||||
(clear)
|
||||
|
||||
; Filter
|
||||
; Glitch
|
||||
|
||||
(defn glitch
|
||||
(rec)
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
(draw
|
||||
"../static/crystal.jpg"
|
||||
(rect 0 0 400 400)
|
||||
(lambda () (glitch 2000)))
|
||||
(rect 0 0 400 400))
|
||||
|
||||
(glitch 500)
|
||||
)
|
||||
@@ -1,5 +0,0 @@
|
||||
; load file
|
||||
|
||||
((clear)
|
||||
(print (folder))
|
||||
)
|
||||
@@ -1,13 +1,9 @@
|
||||
; scale file
|
||||
(
|
||||
; Filter
|
||||
|
||||
(def filter-action
|
||||
(lambda () (pixels
|
||||
(frame)
|
||||
saturation
|
||||
0.5)
|
||||
))
|
||||
|
||||
(open (path "/Users/VillaMoirai/Desktop/clip.jpg") filter-action)
|
||||
(open "../static/crystal.jpg")
|
||||
(pixels
|
||||
(frame)
|
||||
saturation
|
||||
12)
|
||||
)
|
||||
@@ -2,20 +2,11 @@
|
||||
|
||||
(
|
||||
(clear)
|
||||
|
||||
; Filter
|
||||
|
||||
(def filter-action
|
||||
(lambda () (pixels
|
||||
(rect 0 0 500 500)
|
||||
saturation
|
||||
0.5)
|
||||
))
|
||||
|
||||
; Draw photo
|
||||
|
||||
(draw
|
||||
"../../PREVIEW.jpg"
|
||||
(frame)
|
||||
filter-action)
|
||||
(frame))
|
||||
(pixels
|
||||
(rect 0 0 500 500)
|
||||
saturation
|
||||
0.5)
|
||||
)
|
||||
@@ -6,15 +6,16 @@
|
||||
(defn place
|
||||
(rec)
|
||||
(if (gt rec 0)
|
||||
((draw "../static/crystal.jpg"
|
||||
(rect
|
||||
(random 200)
|
||||
(random 200)
|
||||
(random 200)
|
||||
(random 200))
|
||||
(lambda () (place (sub rec 1)))
|
||||
)))
|
||||
)
|
||||
(
|
||||
(draw "../static/crystal.jpg"
|
||||
(rect
|
||||
(random 200)
|
||||
(random 200)
|
||||
(random 200)
|
||||
(random 200)))
|
||||
(place (sub rec 1))
|
||||
))
|
||||
)
|
||||
|
||||
(place 30)
|
||||
)
|
||||
@@ -2,13 +2,14 @@
|
||||
|
||||
(
|
||||
(clear)
|
||||
(def line-color "red")
|
||||
(defn rec
|
||||
(v)
|
||||
(if (gt v 0)
|
||||
((stroke (circle
|
||||
(mul 5 v)
|
||||
(mul 5 v)
|
||||
(mul 5 v)) 1 "red")
|
||||
(mul 5 v)) 1 line-color)
|
||||
(rec (sub v 5))))
|
||||
)
|
||||
|
||||
|
||||
@@ -2,15 +2,6 @@
|
||||
|
||||
(
|
||||
(clear)
|
||||
|
||||
; Filter
|
||||
|
||||
(def filter-action
|
||||
(lambda () (resize 0.5 0.5)))
|
||||
|
||||
; Draw photo
|
||||
|
||||
(open
|
||||
"../../PREVIEW.jpg"
|
||||
filter-action)
|
||||
(open "../../PREVIEW.jpg")
|
||||
(resize 0.5 0.5)
|
||||
)
|
||||
@@ -1,5 +1,4 @@
|
||||
(
|
||||
(run "../examples/recursive.lisp")
|
||||
(echo value)
|
||||
(echo (addOne value))
|
||||
(include "../examples/recursive.lisp")
|
||||
(echo line-color)
|
||||
)
|
||||
Reference in New Issue
Block a user