Liking cljdoc? Tell your friends :D

quip.sprite


animated-spriteclj

(animated-sprite sprite-group
                 pos
                 w
                 h
                 spritesheet-file
                 &
                 {:keys [rotation vel update-fn draw-fn animations
                         current-animation points bounds-fn]
                  :or {rotation 0
                       vel [0 0]
                       update-fn update-animated-sprite
                       draw-fn draw-animated-sprite
                       animations {:none
                                     {:frames 1 :y-offset 0 :frame-delay 100}}
                       current-animation :none}})
source

default-bounding-polyclj

(default-bounding-poly {:keys [w h]})

Generates a bounding polygon based off the w by h rectangle of the sprite.

Generates a bounding polygon based off the `w` by `h` rectangle of
the sprite.
sourceraw docstring

draw-animated-spriteclj

(draw-animated-sprite {:keys [pos rotation w h spritesheet current-animation
                              animation-frame]
                       :as s})
source

draw-image-spriteclj

(draw-image-sprite {:keys [pos w h image]})
source

draw-text-spriteclj

(draw-text-sprite {:keys [content pos offsets font size color]})
source

image-spriteclj

(image-sprite sprite-group
              pos
              w
              h
              image-file
              &
              {:keys [rotation vel update-fn draw-fn points bounds-fn]
               :or {rotation 0
                    vel [0 0]
                    update-fn update-image-sprite
                    draw-fn draw-image-sprite}})
source

memo-graphicsclj

source

offset-posclj

(offset-pos [x y] w h)
source

set-animationclj

(set-animation s animation)
source

static-spriteclj

(static-sprite sprite-group
               pos
               w
               h
               image-file
               &
               {:keys [rotation update-fn draw-fn points bounds-fn]
                :or {rotation 0 update-fn identity draw-fn draw-image-sprite}})
source

text-spriteclj

(text-sprite content
             pos
             &
             {:keys [offsets sprite-group font size color draw-fn]
              :or {offsets [:center]
                   sprite-group :text
                   font qpu/default-font
                   size qpu/default-text-size
                   color qpu/black
                   draw-fn draw-text-sprite}})
source

update-animated-spriteclj

(update-animated-sprite s)
source

update-animationclj

(update-animation {:keys [current-animation delay-count] :as s})
source

update-frame-delayclj

(update-frame-delay {:keys [current-animation] :as s})
source

update-image-spriteclj

(update-image-sprite s)
source

update-posclj

(update-pos {:keys [pos vel] :as s})
source

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

× close