Adds a sprite to the batch. Sprites are drawn in the order they are added.
Available since LÖVE 0.8.0
This variant is not supported in earlier versions.
id = SpriteBatch:add( x, y, r, sx, sy, ox, oy, kx, ky )
number x
number y
number r (0)
number sx (1)
number sy (sx)
number ox (0)
number oy (0)
number kx (0)
number ky (0)
number id
Available since LÖVE 0.9.0
This variant has replaced SpriteBatch:addq.
Adds a Quad to the batch.
id = SpriteBatch:add( quad, x, y, r, sx, sy, ox, oy, kx, ky )
Quad quad
number x
number y
number r (0)
number sx (1)
number sy (sx)
number ox (0)
number oy (0)
number kx (0)
number ky (0)
number id
Removed in LÖVE 0.8.0
This variant is not supported in that and later versions.
SpriteBatch:add( x, y, r, sx, sy, ox, oy )
number x
number y
number r (0)
number sx (1)
number sy (sx)
number ox (0)
number oy (0)
Nothing.
The returned id
s range from 1 to the set buffer size. If the buffer size is exceeded the returned id
will default to 0 and the sprite won't be drawn.
© 2006–2016 LÖVE Development Team
Licensed under the GNU Free Documentation License, Version 1.3.
https://love2d.org/wiki/SpriteBatch:add