Issues

Issue #262 resolved

Allow custom colors for each sprite in SpriteBatches

Alex Szpakowski
created an issue

Optional colors for each individual sprite/quad added to a spritebatch is the one big thing I feel is missing from them, even though I believe it's possible.

Lua-side, it might look something like {{{ spritebatch:add(x, y, angle, sx, sy, ox, oy, r, g, b, a) spritebatch:addq(quad, x, y, angle, sx, sy, ox, oy, r, g, b, a) }}}

and/or

{{{ spritebatch:add(x, y, angle, sx, sy, ox, oy, {r, g, b, a}) spritebatch:addq(quad, x, y, angle, sx, sy, ox, oy, {r, g, b, a}) }}}

Comments (3)

  1. rude repo owner

    Probably, it should be spritebatch:setColor(r, g, b, a), and then that color will apply to the geometry that's added next. I don't think we can add (even) more parameters to add[q]/draw[q].

  2. Log in to comment