Merge branch 'master' into feature/guru-examples

This commit is contained in:
ngradwohl
2019-07-17 06:35:17 +02:00
25 changed files with 1969 additions and 209 deletions

13
examples/animate.lisp Normal file
View 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)
)

View File

@@ -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")
)

View File

@@ -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))
)

View File

@@ -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)
)

View File

@@ -1,5 +0,0 @@
; load file
((clear)
(print (folder))
)

View File

@@ -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)
)

View File

@@ -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)
)

View File

@@ -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)
)

View File

@@ -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))))
)

View File

@@ -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)
)

View File

@@ -1,5 +1,4 @@
(
(run "../examples/recursive.lisp")
(echo value)
(echo (addOne value))
(include "../examples/recursive.lisp")
(echo line-color)
)