refactor for async
This commit is contained in:
@@ -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,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,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)
|
||||
)
|
||||
Reference in New Issue
Block a user