Liking cljdoc? Tell your friends :D

play-clj.g2d


animationcljmacro

(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))
sourceraw docstring

animation!cljmacro

(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))
sourceraw docstring

animation*clj

(animation* duration textures)
source

animation->textureclj

(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)
sourceraw docstring

bitmap-fontcljmacro

(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")
sourceraw docstring

bitmap-font!cljmacro

(bitmap-font! object k & options)

Calls a single method on a bitmap-font.

Calls a single method on a `bitmap-font`.
sourceraw docstring

bitmap-font*clj

(bitmap-font* path)
source

nine-patchcljmacro

(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))
sourceraw docstring

nine-patch!cljmacro

(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)
sourceraw docstring

nine-patch*clj

(nine-patch* arg)
source

nine-patch?clj

(nine-patch? entity)

Returns true if entity is a nine-patch.

Returns true if `entity` is a `nine-patch`.
sourceraw docstring

particle-effectcljmacro

(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")
sourceraw docstring

particle-effect!cljmacro

(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)
sourceraw docstring

particle-effect*clj

(particle-effect* path)
source

particle-effect?clj

(particle-effect? entity)

Returns true if entity is a particle-effect.

Returns true if `entity` is a `particle-effect`.
sourceraw docstring

play-modecljmacro

(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)
sourceraw docstring

spritecljmacro

(sprite arg & options)
source

sprite!cljmacro

(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)
sourceraw docstring

sprite*clj

(sprite* arg)
source

sprite?clj

(sprite? entity)

Returns true if entity is a sprite.

Returns true if `entity` is a `sprite`.
sourceraw docstring

texturecljmacro

(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)
sourceraw docstring

texture!cljmacro

(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)
sourceraw docstring

texture*clj

(texture* arg)
source

texture-atlascljmacro

(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")
sourceraw docstring

texture-atlas!cljmacro

(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")
sourceraw docstring

texture-atlas*clj

(texture-atlas* path)
source

texture?clj

(texture? entity)

Returns true if entity is a texture.

Returns true if `entity` is a `texture`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close