(translation-example game)

Example

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

Source

(defn translation-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})) *state (atom {:x 0, :y 0})] (eu/listen-for-mouse game *state) (assoc game :entity entity :*state *state)))