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.
(apply-tween sprite
{:keys [delay field update-fn yoyo? yoyoing? yoyo-update-fn
total-change normalized-deltas progress resetting?]})(complete-repetition {:keys [repeat-times on-repeat-delay resetting?]
:as tween})(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.
(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.
(update-tween {:keys [delay progress step-count yoyo? yoyoing? repeat-times]
:as tween})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 |