Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 555 Bytes

README.md

File metadata and controls

20 lines (16 loc) · 555 Bytes

SpriteColor for CraftyJS

A CraftyJS component to apply a color to a sprite. Idea of this topic.


##Demo

http://jsfiddle.net/luizbills/ZegWr/

Crafty.sprite(16, "http://craftyjs.com/demos/tutorial/sprite.png", {player:[0,3]});

Crafty.modules({ SpriteColor: 'DEV' }, function () {
    Crafty.e("2D, Canvas, player, SpriteColor")
        .spriteColor("FF0000", 0.5) // red with 50% transparency
});

##License Dual licensed under MIT and GPL.