-
Notifications
You must be signed in to change notification settings - Fork 8
/
big_chicken.clj
64 lines (55 loc) · 1.63 KB
/
big_chicken.clj
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
(ns lambdaisland.witchcraft.gallery.big-chicken
"A 9 block high chicken shape"
(:require [lambdaisland.witchcraft :as wc]
[lambdaisland.witchcraft.shapes :as shapes]
[lambdaisland.witchcraft.events :as e]
[lambdaisland.witchcraft.palette :as p]
[lambdaisland.witchcraft.matrix :as m]))
(defn chicken-shape [pos]
(map
#(m/v+ % pos)
(concat
;; body
(shapes/box {:east-west-length 5
:north-south-length 7
:height 5
:material :white-wool
:start [0 0 0]})
;; wings
(shapes/box {:east-west-length 7
:north-south-length 4
:height 3
:material :white-wool
:start [-1 2 1]})
;; head
(shapes/box {:east-west-length 3
:north-south-length 3
:height 5
:material :white-wool
:start [1 4 -2]})
;; beak
(shapes/box {:east-west-length 3
:north-south-length 2
:height 2
:material :orange-wool
:start [1 5 -4]})
;; eyes & red thingy
[[1 7 -2 :black-wool]
[3 7 -2 :black-wool]
[2 4 -3 :red-wool]]
;; legs
(shapes/line {:start [1 -4 2]
:end [1 1 2]
:material :orange-wool})
(shapes/line {:start [3 -4 2]
:end [3 1 2]
:material :orange-wool})
;; feet
[[1 -4 1 :orange-wool]
[3 -4 1 :orange-wool]])))
(comment
(wc/set-blocks
(chicken-shape
(wc/target-block (wc/player))
))
(wc/undo!))