A more complete list of new things is here, but here's a list of some of the new functions:
Font:getAscent
Font:getDescent
Font:getBaseline
Font:get/setFilter
Font:hasGlyph
love.graphics.newGeometry
[wiki]Geometry:setVertexColors[/wiki]
[wiki]Geometry:setVertex[/wiki]
[wiki]Geometry:getVertex[/wiki]
[wiki]Geometry:hasVertexColors[/wiki]
[wiki]Geometry:getVertexCount[/wiki]
[wiki]Geometry:flip[/wiki]
love.thread.newChannel
love.thread.getChannel
[wiki]Channel:push[/wiki]
[wiki]Channel:pop[/wiki]
[wiki]Channel:demand[/wiki]
[wiki]Channel:clear[/wiki]
[wiki]Channel:supply[/wiki]
[wiki]Channel:getCount[/wiki]
[wiki]Thread:getError[/wiki]
love.graphics.setBlendMode("replace")
love.graphics.setCanvases
love.graphics.setColorMask
love.graphics.setAlphaTest
love.graphics.origin
love.graphics.getRendererInfo
love.graphics.isSupported("mipmap")
love.graphics.isSupported("dxt")
love.graphics.isSupported("bc5")
love.graphics.isSupported("hdrcanvas")
love.graphics.isSupported("multicanvas")
love.image.newCompressedData
love.image.isCompressed
CompressedData:getMipmapCount
Image:isCompressed
Image:refresh
Image:getData
Image:get/setMipmapFilter
love.math.randomseed
love.math.random
love.math.randomnormal
love.math.newRandomGenerator
[wiki]RandomGenerator:randomseed[/wiki]
[wiki]RandomGenerator:random[/wiki]
[wiki]RandomGenerator:randomnormal[/wiki]
love.math.newBezierCurve
BezierCurve:getDegree
BezierCurve:setControlPoint
BezierCurve:getControlPoint
BezierCurve:insertControlPoint
BezierCurve:eval
BezierCurve:render
love.math.triangulate
love.math.isConvex
love.math.noise
love.timer.getAverageDelta
love.window.setMode
love.window.isVisible
love.mousefocus
love.window.hasMouseFocus
love.resize
love.visible
love.joystickaxis
love.joystickhat
love.joystick.reload
Contact:getChildren
ParticleSystem:emit
ParticleSystem:setRelativeDirection
ParticleSystem:setAreaSpread
Here's an example showcasing [wiki]ParticleSystem:emit[/wiki], as well as some other changes:
Code: Select all
function love.load()
-- love.graphics.newImage can accept FileData.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t4uhP8pkNQJbjNkbZPCIYTKn7uYqjSVW3kfJATuYWNjKLPmW8aEYbAT2IGCbNiCwhDdasjrJn1CQHxUeblwNDQbYHTz9sYx3JuDoh+EWzWROApJYyT8m+pykJAdK1g2drtbcB/b40EbuBOHo5KAZhEyA8CBhcVJB5i37WzqdMT3+jrVXtzQ0HPXzIGWnx3P9OWmkJO/96BoB90jJ+cq5wFeqwFf+ltQ4JZ7+AnD/oN6MfkK1AAAAAElFTkSuQmCC', '', 'base64'))
-- ParticleSystems have a default buffer size of 1000.
p = love.graphics.newParticleSystem(image)
p:setPosition(400, 300)
p:setSpread(2*math.pi)
p:setSpeed(100, 200)
-- Colors as tables with optional alpha.
pink = {255, 0, 200}
blue = {0, 200, 255, 0}
p:setColors(pink, blue)
-- Name changes ahead.
p:setEmitterLifetime(-1)
p:setParticleLifetime(2)
end
function love.keypressed()
-- Manually emitting particles.
p:emit(100)
end
function love.update(dt)
p:update(dt)
end
function love.draw()
love.graphics.draw(p)
end