Skip to content

Commit

Permalink
incorporate randomized greyscale palette
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed May 27, 2024
1 parent 0a0d9f5 commit e6b0122
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/shimmers/sketches/regular_tilings.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@
(disj faces face)
(conj annotation (vary-meta shape' assoc :stroke "red"))))))))

(def palette ["#666" "#999" "#CCC" "#FFF"])
(defn shapes [{:keys [structure annotation faces]}]
(conj (concat structure (if (:debug @ui-state) annotation []))
(conj (concat (mapv (fn [s] (vary-meta s assoc :fill (dr/rand-nth palette)))
structure)
(if (:debug @ui-state) annotation []))
(csvg/group {:stroke-width 2.0}
(mapv (fn [[p q]] (gl/line2 p q)) faces))))
(mapv (fn [[p q]] (gl/line2 p q)) faces))))

(defn scene [generated]
(csvg/svg-timed {:width width
Expand Down

0 comments on commit e6b0122

Please sign in to comment.