Liking cljdoc? Tell your friends :D

clunk.tween

Tween library for interpolating game object properties between absolute or relative values.

Comprehensive easing functions for different interpolation curves.

Tween library for interpolating game object properties between
absolute or relative values.

Comprehensive easing functions for different interpolation curves.
raw docstring

add-tweenclj

(add-tween {:keys [tweens] :as sprite} tween)

apply-tweenclj

(apply-tween sprite
             {:keys [delay field update-fn yoyo? yoyoing? yoyo-update-fn
                     total-change normalized-deltas progress resetting?]})

complete-repetitionclj

(complete-repetition {:keys [repeat-times on-repeat-delay resetting?]
                      :as tween})

ease-in-backclj

(ease-in-back x)

ease-in-bounceclj

(ease-in-bounce x)

ease-in-circclj

(ease-in-circ x)

ease-in-cubicclj

(ease-in-cubic x)

ease-in-elasticclj

(ease-in-elastic x)

ease-in-expoclj

(ease-in-expo x)

ease-in-out-backclj

(ease-in-out-back x)

ease-in-out-bounceclj

(ease-in-out-bounce x)

ease-in-out-circclj

(ease-in-out-circ x)

ease-in-out-cubicclj

(ease-in-out-cubic x)

ease-in-out-elasticclj

(ease-in-out-elastic x)

ease-in-out-expoclj

(ease-in-out-expo x)

ease-in-out-quadclj

(ease-in-out-quad x)

ease-in-out-quartclj

(ease-in-out-quart x)

ease-in-out-quintclj

(ease-in-out-quint x)

ease-in-out-sineclj

(ease-in-out-sine x)

ease-in-quadclj

(ease-in-quad x)

ease-in-quartclj

(ease-in-quart x)

ease-in-quintclj

(ease-in-quint x)

ease-in-sineclj

(ease-in-sine x)

ease-linearclj


ease-out-backclj

(ease-out-back x)

ease-out-bounceclj

(ease-out-bounce x)

ease-out-circclj

(ease-out-circ x)

ease-out-cubicclj

(ease-out-cubic x)

ease-out-elasticclj

(ease-out-elastic x)

ease-out-expoclj

(ease-out-expo x)

ease-out-quadclj

(ease-out-quad x)

ease-out-quartclj

(ease-out-quart x)

ease-out-quintclj

(ease-out-quint x)

ease-out-sineclj

(ease-out-sine x)

ease-sigmoidclj

(ease-sigmoid x)

handle-on-completesclj

(handle-on-completes {:keys [tweens] :as sprite})

handle-on-repeatsclj

(handle-on-repeats {:keys [tweens] :as sprite})

handle-on-yoyosclj

(handle-on-yoyos {:keys [tweens] :as sprite})

normalized-deltasclj

(normalized-deltas easing-fn step-count)

remove-completed-tweensclj

(remove-completed-tweens sprites)

tweenclj

(tween field
       to-value
       &
       {:keys [from-value easing-fn update-fn step-count yoyo? yoyo-update-fn
               on-yoyo-fn repeat-times on-repeat-fn on-repeat-delay
               on-complete-fn initial-delay]
        :or {yoyo? false
             step-count 100
             from-value 0
             on-repeat-delay 0
             on-complete-fn identity
             initial-delay 0
             yoyo-update-fn -
             easing-fn ease-linear
             update-fn +
             on-repeat-fn identity
             repeat-times 1
             on-yoyo-fn identity}})

Create a new tween for modifying a field on a sprite over time.

Create a new tween for modifying a field on a sprite over time.
raw docstring

tween-to-colorclj

(tween-to-color s c)
(tween-to-color {sprite-color :color :as sprite} target-color opts)

Add appropriate tweens to a sprite with 3 or 4 length :color vector to morph it to a desired colour.

The optional opts argument can contain any of the standard tween options.

Add appropriate tweens to a sprite with 3 or 4 length `:color` vector
to morph it to a desired colour.

The optional `opts` argument can contain any of the standard tween
options.
raw docstring

tween-x-fnclj

(tween-x-fn [x y] d)

tween-x-yoyo-fnclj

(tween-x-yoyo-fn [x y] d)

tween-y-fnclj

(tween-y-fn [x y] d)

tween-y-yoyo-fnclj

(tween-y-yoyo-fn [x y] d)

update-spriteclj

(update-sprite {:keys [tweens] :as sprite})

update-stateclj

(update-state {:keys [current-scene] :as state})

update-tweenclj

(update-tween {:keys [delay progress step-count yoyo? yoyoing? repeat-times]
               :as tween})

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close