Use pinky condition

This commit is contained in:
Leo Lou 2018-06-13 19:14:47 +09:00
parent c4ec3e1833
commit 71cfc6915a

View file

@ -23,7 +23,7 @@
(def column-style (def column-style
(if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed (if (> nrows 5) :orthographic :standard)) ; options include :standard, :orthographic, and :fixed
; (def column-style :fixed) ; (def column-style :fixed)
(def pinky-15u true) (def pinky-15u false)
(defn column-offset [column] (cond (defn column-offset [column] (cond
(= column 2) [0 2.82 -4.5] (= column 2) [0 2.82 -4.5]
@ -170,9 +170,7 @@
(def column-x-delta (+ -1 (- (* column-radius (Math/sin β))))) (def column-x-delta (+ -1 (- (* column-radius (Math/sin β)))))
(defn offset-for-column [col] (defn offset-for-column [col]
(cond (if (and (true? pinky-15u) (= col lastcol)) 5.5 0))
(= col lastcol) 5.5
:else 0))
(defn apply-key-geometry [translate-fn rotate-x-fn rotate-y-fn column row shape] (defn apply-key-geometry [translate-fn rotate-x-fn rotate-y-fn column row shape]
(let [column-angle (* β (- centercol column)) (let [column-angle (* β (- centercol column))
placed-shape (->> shape placed-shape (->> shape
@ -264,10 +262,16 @@
(def web-post-br (translate [(- (/ mount-width 2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) (def web-post-br (translate [(- (/ mount-width 2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post))
; wide posts for 1.5u keys in the main cluster ; wide posts for 1.5u keys in the main cluster
(def wide-post-tr (translate [(- (/ mount-width 1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post))
(if (true? pinky-15u)
(do (def wide-post-tr (translate [(- (/ mount-width 1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post))
(def wide-post-tl (translate [(+ (/ mount-width -1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post)) (def wide-post-tl (translate [(+ (/ mount-width -1.2) post-adj) (- (/ mount-height 2) post-adj) 0] web-post))
(def wide-post-bl (translate [(+ (/ mount-width -1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) (def wide-post-bl (translate [(+ (/ mount-width -1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post))
(def wide-post-br (translate [(- (/ mount-width 1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)) (def wide-post-br (translate [(- (/ mount-width 1.2) post-adj) (+ (/ mount-height -2) post-adj) 0] web-post)))
(do (def wide-post-tr web-post-tr)
(def wide-post-tl web-post-tl)
(def wide-post-bl web-post-bl)
(def wide-post-br web-post-br)))
(defn triangle-hulls [& shapes] (defn triangle-hulls [& shapes]
(apply union (apply union