(->font-entity game data baked-font)

(->font-entity game data width height)

Returns an entity with all characters in the font. The second arity is for backwards compatibility and should not be used.

Example

(play-cljc.gl.text/->font-entity game data baked-font)

Source

(defn ->font-entity "Returns an entity with all characters in the font. The second arity is for backwards\n compatibility and should not be used." ([game data baked-font] (-> (->font-entity game data (:bitmap-width baked-font) (:bitmap-height baked-font)) (assoc :baked-font baked-font) map->FontEntity)) ([game data width height] (-> (e/->image-entity game data width height) (assoc :vertex font-vertex-shader :fragment font-fragment-shader) (update :uniforms merge {'u_color [0 0 0 1], 'u_scale_matrix (m/identity-matrix 3), 'u_translate_matrix (m/identity-matrix 3)}) #?(:clj (assoc-in [:uniforms (quote u_image) :opts] {:mip-level 0, :internal-fmt (gl game RED), :width width, :height height, :border 0, :src-fmt (gl game RED), :src-type (gl game UNSIGNED_BYTE)})))))