(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}})(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.
(draw-animated-sprite {:keys [pos rotation w h spritesheet current-animation
animation-frame]
:as s})(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}})(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}})(text-sprite content
pos
&
{:keys [offsets sprite-group font size color update-fn draw-fn]
:or {offsets [:center]
sprite-group :text
font qpu/default-font
size qpu/default-text-size
color qpu/black
update-fn identity
draw-fn draw-text-sprite}})cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |