Skip to content
Patrick K. O'Brien edited this page Jan 10, 2016 · 2 revisions

What's your favorite color?


Green


[:rgba 0.42 0.33333333333333333333333 1.0 0.5]


(defn normal-abs-rgb []
"Returns an RGBA color based on the absolute value of the ortho-normal of the polygon face."
  (fn [mesh]
    (let [fc (fn [mesh face]
               (let [[r g b] (mapv mu/abs (mf/normal face))
                     alpha 1.0]
                 [r g b alpha]))]
      [mesh fc])))

Clone this wiki locally