# HG changeset patch # User Robert McIntyre # Date 1329399574 25200 # Node ID decdbb24ef7ceb35e3e83fd4a00644cc40375515 # Parent 3dd13e6095e54663020a13f83c43e3df22bb6108 adding touch to the hand diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-creature/finger-tip.png Binary file assets/Models/test-creature/finger-tip.png has changed diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-creature/finger-tip.xcf Binary file assets/Models/test-creature/finger-tip.xcf has changed diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-creature/hand.blend Binary file assets/Models/test-creature/hand.blend has changed diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-creature/mid-finger.png Binary file assets/Models/test-creature/mid-finger.png has changed diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-creature/mid-finger.xcf Binary file assets/Models/test-creature/mid-finger.xcf has changed diff -r 3dd13e6095e5 -r decdbb24ef7c assets/Models/test-touch/touch-cube.blend Binary file assets/Models/test-touch/touch-cube.blend has changed diff -r 3dd13e6095e5 -r decdbb24ef7c org/integration.org --- a/org/integration.org Wed Feb 15 16:58:33 2012 -0700 +++ b/org/integration.org Thu Feb 16 06:39:34 2012 -0700 @@ -60,51 +60,42 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; fix-display (gen-fix-display)] - (apply - world - (with-movement - (.getChild creature "palm") - ["key-r" "key-t" - "key-f" "key-g" - "key-v" "key-b"] - [10 10 10 10 1 1] - [(nodify [creature - (box 10 2 10 :position (Vector3f. 0 -9 0) - :color ColorRGBA/Gray :mass 0) - me]) - (merge standard-debug-controls - {"key-return" - (fn [_ value] - (if value - (do - (println-repl "play-sound") - (.play bell)))) - "key-h" - (fn [_ value] - (if value - (swap! muscle-exertion (partial + 20)))) - "key-n" - (fn [_ value] - (if value - (swap! muscle-exertion (fn [v] (- v 20)))))}) - (fn [world] - (.setTimer world (RatchetTimer. 60)) - (light-up-everything world) - (enable-debug world) - (add-camera! world - (add-eye! creature - (.getChild - (.getChild creature "eyes") "eye")) - (comp (view-image) BufferedImage!)) - (speed-up world)) - (fn [world tpf] - (prop-display (prop)) - (touch-display (map #(% (.getRootNode world)) touch)) - (vision-display (map #(% world) vision)) - (hearing-display (map #(% world) hearing)) - (muscle-display (map #(% @muscle-exertion) muscles)) - (.setLocalTranslation me (.getLocation (.getCamera world))) - (fix-display world))]))))) + (world + (nodify [creature + (box 10 2 10 :position (Vector3f. 0 -9 0) + :color ColorRGBA/Gray :mass 0) + me]) + (merge standard-debug-controls + {"key-return" + (fn [_ value] + (if value + (.play bell))) + "key-h" + (fn [_ value] + (if value + (swap! muscle-exertion (partial + 20)))) + "key-n" + (fn [_ value] + (if value + (swap! muscle-exertion (fn [v] (- v 20)))))}) + (fn [world] + (.setTimer world (RatchetTimer. 60)) + (light-up-everything world) + (enable-debug world) + (add-camera! world + (add-eye! creature + (.getChild + (.getChild creature "eyes") "eye")) + (comp (view-image) BufferedImage!)) + (speed-up world)) + (fn [world tpf] + (prop-display (prop)) + (touch-display (map #(% (.getRootNode world)) touch)) + (vision-display (map #(% world) vision)) + (hearing-display (map #(% world) hearing)) + (muscle-display (map #(% @muscle-exertion) muscles)) + (.setLocalTranslation me (.getLocation (.getCamera world))) + (fix-display world)))))) #+end_src #+results: integration