       (.setAnim "Walk" 0.5)
       (.setLoopMode LoopMode/Loop))))
 
-(def on-action {:key-space walk})
-
 (defn cycle-done
   [app control channel]
   (doto channel


(ns maqueta.hello.animation
  (:use (maqueta application assets))
  (:import com.jme3.math.ColorRGBA
           com.jme3.math.Vector3f
           com.jme3.scene.Node
           (com.jme3.animation AnimControl LoopMode)
           com.jme3.light.DirectionalLight))

(def light (DirectionalLight.))


    (.setLoopMode LoopMode/DontLoop)
    (.setSpeed 1)))

(defn setup-fn
  [app]
  (let [root-node (.getRootNode app)
        viewport (.getViewPort app)]
    (.setBackgroundColor viewport ColorRGBA/LightGray)
    (.setDirection light (.normalizeLocal (Vector3f. -0.1 -1 -1)))
    (.setLocalScale player (Vector3f. 0.5 0.5 0.5))
    (.addListener control app)
    (.setAnim channel "stand")
    (doto root-node
      (.attachChild player)
      (.addLight light))))

(defn -main
  [& args]
  (.start (make-app :setup-fn setup-fn
                    :on-action {:key-space walk}
                    :on-anim-cycle-done {"Walk" cycle-done})))
