Removed old examples
This commit is contained in:
parent
95abe4b1dc
commit
177b4766d1
@ -1,26 +0,0 @@
|
|||||||
(echo (map '(add %1 1) (1 2 3)))
|
|
||||||
|
|
||||||
(echo (first (1 2 3)))
|
|
||||||
(echo (rest (1 2 3)))
|
|
||||||
|
|
||||||
(echo
|
|
||||||
(filter
|
|
||||||
'(eq 0 (mod %1 2))
|
|
||||||
(1 2 3 4 5))
|
|
||||||
)
|
|
||||||
|
|
||||||
(clear)
|
|
||||||
(map
|
|
||||||
'(stroke (rect (mul a 30) 20 50 50)
|
|
||||||
1 "red")
|
|
||||||
(range 0 20 5))
|
|
||||||
|
|
||||||
(map
|
|
||||||
'(stroke
|
|
||||||
(rect
|
|
||||||
(mul %1 10)
|
|
||||||
(add 250 (mul (sin %1) 250))
|
|
||||||
(mul 4 %1)
|
|
||||||
(add 20 (mul (cos %1) 50))) 1 "red")
|
|
||||||
(range 0 200 5))
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
|||||||
(clear)
|
|
||||||
(def a (import
|
|
||||||
"../static/crystal.jpg"
|
|
||||||
(rect 0 0 400 400)))
|
|
||||||
(echo a)
|
|
@ -1,3 +0,0 @@
|
|||||||
; include
|
|
||||||
(include "../examples/recursive.lisp")
|
|
||||||
(echo line-color)
|
|
@ -1,17 +0,0 @@
|
|||||||
; objects
|
|
||||||
|
|
||||||
(test "symbols" :a "a")
|
|
||||||
|
|
||||||
(def ob {:a "fantastic" :b 2})
|
|
||||||
|
|
||||||
((of (js) :console :log) ob)
|
|
||||||
|
|
||||||
(echo (of ob :a))
|
|
||||||
|
|
||||||
(echo (keys ob))
|
|
||||||
(echo (values ob))
|
|
||||||
|
|
||||||
(set ob :a 4)
|
|
||||||
(echo (of ob :a))
|
|
||||||
|
|
||||||
(echo (map '(add %1 2) (4 5 6))
|
|
@ -1,14 +0,0 @@
|
|||||||
; filesystem
|
|
||||||
|
|
||||||
; get files
|
|
||||||
(def files
|
|
||||||
(dir
|
|
||||||
(dirpath)))
|
|
||||||
; pick a random file
|
|
||||||
(def random-index
|
|
||||||
(floor
|
|
||||||
(random
|
|
||||||
(len files))))
|
|
||||||
; print random file name
|
|
||||||
(echo
|
|
||||||
(get files random-index))
|
|
@ -1,5 +0,0 @@
|
|||||||
; resize
|
|
||||||
|
|
||||||
(clear)
|
|
||||||
(open "../../PREVIEW.jpg")
|
|
||||||
(resize 0.5 0.5)
|
|
@ -1,44 +0,0 @@
|
|||||||
; guides
|
|
||||||
(def frame-rect (frame))
|
|
||||||
(defn draw-cross
|
|
||||||
(pos)
|
|
||||||
(guide {:x (floor pos:x) :y (floor pos:y)}))
|
|
||||||
; top
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.25)
|
|
||||||
(mul frame-rect:h 0.25)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.5)
|
|
||||||
(mul frame-rect:h 0.25)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.75)
|
|
||||||
(mul frame-rect:h 0.25)))
|
|
||||||
; middle
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.25)
|
|
||||||
(mul frame-rect:h 0.5)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.5)
|
|
||||||
(mul frame-rect:h 0.5)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.75)
|
|
||||||
(mul frame-rect:h 0.5)))
|
|
||||||
; bottom
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.25)
|
|
||||||
(mul frame-rect:h 0.75)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.5)
|
|
||||||
(mul frame-rect:h 0.75)))
|
|
||||||
(draw-cross
|
|
||||||
(pos
|
|
||||||
(mul frame-rect:w 0.75)
|
|
||||||
(mul frame-rect:h 0.75)))
|
|
Loading…
x
Reference in New Issue
Block a user