(rotation-example game)

Example

(play-cljc.gl.core/render game (-> entity (assoc :viewport {:x 0, :y 0, :width game-width, :height game-height}) (play-cljc.transforms/project game-width game-height) (play-cljc.transforms/translate tx ty) (play-cljc.transforms/rotate r) (play-cljc.transforms/color [1 0 0.5 1]) (play-cljc.transforms/translate -50 -75)))

Source

(defn rotation-example [game] (gl game disable (gl game CULL_FACE)) (gl game disable (gl game DEPTH_TEST)) (let [entity (-> (c/compile game (e/->entity game data/f-2d)) (assoc :clear {:color [0 0 0 0], :depth 1})) tx 100 ty 100 *state (atom {:tx tx, :ty ty, :r 0})] (eu/listen-for-mouse game *state) (assoc game :entity entity :*state *state)))