Pivoting my game for the 3rd time
About meat_popsicle
Entries
Ludum Dare 26 |
meat_popsicle's Trophies
meat_popsicle's Archive
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.
Tools: Crafty (engine), Pixen 3 Beta (graphics, if any), WebStorm (editor)