(scale-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 tx ty 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) (play-cljc.transforms/scale rx ry 1)))

Source

(defn scale-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) tx 100 ty 100 *state (atom {:tx tx, :ty ty, :rx 1, :ry 1})] (eu/listen-for-mouse game *state) (assoc game :entity entity :*state *state)))