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 [field update-fn yoyo? yoyoing? yoyo-update-fn total-change
normalized-deltas progress resetting?]})
(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-complete-fn]
:or {yoyo? false
step-count 100
from-value 0
on-complete-fn identity
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 [progress step-count yoyo? yoyoing? repeat-times]
:as tween})
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close