add glitch example
This commit is contained in:
parent
90e7b52867
commit
2e4dcf08d8
24
examples/glitch.lisp
Normal file
24
examples/glitch.lisp
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
; pixels
|
||||||
|
|
||||||
|
(
|
||||||
|
(clear)
|
||||||
|
|
||||||
|
; Filter
|
||||||
|
|
||||||
|
(defn glitch
|
||||||
|
(rec)
|
||||||
|
(if (gt rec 1)
|
||||||
|
((clone
|
||||||
|
(rect (random 400) (random 400) 2 2)
|
||||||
|
(rect (random 400) (random 400)
|
||||||
|
(random 10) (random 30)))
|
||||||
|
(glitch (sub rec 1))))
|
||||||
|
)
|
||||||
|
|
||||||
|
; Draw photo
|
||||||
|
|
||||||
|
(draw
|
||||||
|
"../static/crystal.jpg"
|
||||||
|
(rect 0 0 400 400)
|
||||||
|
(lambda () (glitch 2000)))
|
||||||
|
)
|
Loading…
x
Reference in New Issue
Block a user