(perspective-animation-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 0 0 -360) (play-cljc.transforms/rotate rx :x) (play-cljc.transforms/rotate ry :y) (play-cljc.transforms/rotate rz :z)))

Source

(defn perspective-animation-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 {:rx (m/deg->rad 190), :ry (m/deg->rad 40), :rz (m/deg->rad 320)}] (assoc game :entity entity :state state)))