(animation duration textures & options)
Returns an Animation.
(animation 0.2 [walk-1 walk-2 walk-3] :set-play-mode (play-mode :loop-pingpong))
Returns an [Animation](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/Animation.html). (animation 0.2 [walk-1 walk-2 walk-3] :set-play-mode (play-mode :loop-pingpong))
(animation! object k & options)
Calls a single method on an animation
.
(animation! object :set-play-mode (play-mode :loop))
Calls a single method on an `animation`. (animation! object :set-play-mode (play-mode :loop))
(animation->texture {:keys [total-time] :as screen} animation)
(animation->texture {:keys [total-time] :as screen} animation is-looping?)
Returns a texture
entity with a frame from animation
based on the total
time the screen
has been showing.
(animation->texture screen anim)
Returns a `texture` entity with a frame from `animation` based on the total time the `screen` has been showing. (animation->texture screen anim)
(bitmap-font & [path & options])
Returns a BitmapFont.
(bitmap-font) (bitmap-font "default.fnt")
Returns a [BitmapFont](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/BitmapFont.html). (bitmap-font) (bitmap-font "default.fnt")
(bitmap-font! object k & options)
Calls a single method on a bitmap-font
.
Calls a single method on a `bitmap-font`.
(nine-patch arg & options)
Returns an entity based on NinePatch.
(nine-patch "image.png") (nine-patch "image.png" :set-color (color :blue))
Returns an entity based on [NinePatch](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/NinePatch.html). (nine-patch "image.png") (nine-patch "image.png" :set-color (color :blue))
(nine-patch! entity k & options)
Calls a single method on a nine-patch
.
(nine-patch! entity :set-color (color :blue)) (nine-patch! entity :get-middle-width)
Calls a single method on a `nine-patch`. (nine-patch! entity :set-color (color :blue)) (nine-patch! entity :get-middle-width)
(nine-patch? entity)
Returns true if entity
is a nine-patch
.
Returns true if `entity` is a `nine-patch`.
(particle-effect & [path & options])
Returns an entity based on ParticleEffect.
(particle-effect) (particle-effect "particles/fire.p")
Returns an entity based on [ParticleEffect](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/ParticleEffect.html). (particle-effect) (particle-effect "particles/fire.p")
(particle-effect! entity k & options)
Calls a single method on a particle-effect
.
(particle-effect! entity :set-position 10 10)
Calls a single method on a `particle-effect`. (particle-effect! entity :set-position 10 10)
(particle-effect? entity)
Returns true if entity
is a particle-effect
.
Returns true if `entity` is a `particle-effect`.
(play-mode k)
Returns a static field from Animation.PlayMode.
(play-mode :loop)
Returns a static field from [Animation.PlayMode](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/Animation.PlayMode.html). (play-mode :loop)
(sprite! entity k & options)
Calls a single method on a sprite
.
(sprite! entity :flip true false) (sprite! entity :set-alpha 0.5)
Calls a single method on a `sprite`. (sprite! entity :flip true false) (sprite! entity :set-alpha 0.5)
(sprite? entity)
Returns true if entity
is a sprite
.
Returns true if `entity` is a `sprite`.
(texture arg & options)
Returns an entity based on TextureRegion.
; load image.png (texture "image.png") ; load image.png, flip it, and only display the specified region (texture "image.png" :flip true false :set-region 0 0 100 100) ; create a new texture based on an existing one (texture (texture "image.png")) ; rotate a texture 45 degress (assoc (texture "image.png") :angle 45)
Returns an entity based on [TextureRegion](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureRegion.html). ; load image.png (texture "image.png") ; load image.png, flip it, and only display the specified region (texture "image.png" :flip true false :set-region 0 0 100 100) ; create a new texture based on an existing one (texture (texture "image.png")) ; rotate a texture 45 degress (assoc (texture "image.png") :angle 45)
(texture! entity k & options)
Calls a single method on a texture
.
(texture! entity :flip true false) (texture! entity :get-region-width)
Calls a single method on a `texture`. (texture! entity :flip true false) (texture! entity :get-region-width)
(texture-atlas path & options)
Returns a TextureAtlas.
(texture-atlas "packed.txt")
Returns a [TextureAtlas](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/graphics/g2d/TextureAtlas.html). (texture-atlas "packed.txt")
(texture-atlas! object k & options)
Calls a single method on a texture-atlas
.
(texture-atlas! object :create-patch "test")
Calls a single method on a `texture-atlas`. (texture-atlas! object :create-patch "test")
(texture? entity)
Returns true if entity
is a texture
.
Returns true if `entity` is a `texture`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close