meat_popsicle

LD26

CraftyJS – TweenColor

So when using CraftyJS’s tweens, it doesn’t tween colors.

Tween::tween only works on numeric attributes.

color is stored as a string

So I’ve spent the past 3 hours figuring that out and how to fix colors.

Find my TweenColor component on github.

Small caveat: you must set colors completely through the new ::rgb method, you can call .rgb(r,g,b) or .rgb({r:r, g:g, b:b}).

.tweenColor is .tweenColor({r:r,g:g,b:b}, frames)

Maybe this helps someone. :)

Tags: color, Crafty, craftyjs, Tween

PIVOT

Pivoting my game for the 3rd time :)