water sounds nice.

This commit is contained in:
2015-05-29 20:04:11 -07:00
parent 0045dbcde7
commit 59a2df0788
6 changed files with 53 additions and 24 deletions

View File

@@ -239,3 +239,17 @@
(def default-night-merge {:r 0.08 :g 0.1 :b 0.36 :multiply-amount 1.0 :hue-amount 1.0})
(def default-night-merge-sprite {:r 0.08 :g 0.1 :b 0.36 :multiply-amount 0.3 :hue-amount 0.4})
(defn clamp-volume [vol]
(max vol 0.005))
(defn proximity-volume [entities [x y] & {:keys [scale]}]
(-> (max 0.0
(- 1.0 (/ (dist x y
(get-in entities [:room :entities :ego :x])
(get-in entities [:room :entities :ego :y])
:y-sign 2.0
:x-sign (/ 1.0 (get-in entities [:room :entities :ego :scale-x])))
175.0)))
(* (or scale 1.0))
(clamp-volume)))