(perspective-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 (play-cljc.math/deg->rad 60) (/ game-width game-height) 1 2000) (play-cljc.transforms/translate cx cy -150) (play-cljc.transforms/rotate (play-cljc.math/deg->rad 180) :x) (play-cljc.transforms/rotate 0 :y) (play-cljc.transforms/rotate 0 :z)))

Source

(defn perspective-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 {:cx 0, :cy 0})] (eu/listen-for-mouse game *state) (assoc game :entity entity :*state *state)))