refactor for async

This commit is contained in:
Quentin Leonetti
2019-07-16 20:49:22 +02:00
parent 71dc7440f7
commit acea1ad26d
9 changed files with 74 additions and 98 deletions

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