(translation-3d-example game)

Example

(play-cljc.gl.core/render game (-> entity (assoc :clear {:color [1 1 1 1], :depth 1} :viewport {:x 0, :y 0, :width game-width, :height game-height}) (play-cljc.transforms/project 0 game-width game-height 0 400 -400) (play-cljc.transforms/translate x y 0) (play-cljc.transforms/rotate (play-cljc.math/deg->rad 40) :x) (play-cljc.transforms/rotate (play-cljc.math/deg->rad 25) :y) (play-cljc.transforms/rotate (play-cljc.math/deg->rad 325) :z)))

Source

(defn translation-3d-example [game] (gl game enable (gl game CULL_FACE)) (gl game enable (gl game DEPTH_TEST)) (let [entity (f-entity game data/f-3d) *state (atom {:x 0, :y 0})] (eu/listen-for-mouse game *state) (assoc game :entity entity :*state *state)))