love.filesystem.remove

love.filesystem.remove Removes a file or empty directory. Function Synopsis success = love.filesystem.remove( name ) Arguments string name The file or directory to remove. Returns boolean success True if the file/directory was removed, false otherwise. Notes The directory must be empty before removal or else it will fail. Simply remove all files and folders in the directory beforehand. If the file exists in the .love but not in the save directory, it returns false as well. An opened Fi

love.graphics.setCanvas

love.graphics.setCanvas Available since LÖVE 0.8.0 It has been renamed from love.graphics.setRenderTarget. Captures drawing operations to a Canvas. Function Sets the render target to a specified Canvas. All drawing operations until the next love.graphics.setCanvas call will be redirected to the Canvas and not shown on the screen. Synopsis love.graphics.setCanvas( canvas ) Arguments Canvas canvas The new target. Returns Nothing. Function Resets the render target to the screen, i.e. re-

Object:typeOf

Object:typeOf Checks whether an object is of a certain type. If the object has the type with the specified name in its hierarchy, this function will return true. Function Synopsis b = Object:typeOf( name ) Arguments string name The name of the type to check for. Returns boolean b True if the object is of the specified type, false otherwise. Examples Checking the type of an object image = love.graphics.newImage("test.png") print(image:typeOf("Object")) -- outputs: true print(image:typeOf(

Fixture:getUserData

Fixture:getUserData Available since LÖVE 0.8.0 This method is not supported in earlier versions. Returns the Lua value associated with this fixture. Use this function in one thread and one thread only. Using it in more threads will make Lua cry and most likely crash. Function Synopsis value = Fixture:getUserData( ) Arguments None. Returns any value The Lua value associated with the fixture. See Also Fixture Fixture:setUserData

Mesh:setAttributeEnabled

Mesh:setAttributeEnabled Available since LÖVE 0.10.0 This function is not supported in earlier versions. Enables or disables a specific vertex attribute in the Mesh. Vertex data from disabled attributes is not used when drawing the Mesh. Function Synopsis Mesh:setAttributeEnabled( name, enable ) Arguments string name The name of the vertex attribute to enable or disable. boolean enable Whether the vertex attribute is used when drawing this Mesh. Returns Nothing. Notes If a Mesh wasn't

love.graphics.newSpriteBatch

love.graphics.newSpriteBatch Creates a new SpriteBatch object. This function can be slow if it is called repeatedly, such as from love.update or love.draw. If you need to use a specific resource often, create it once and store it somewhere it can be reused! Function Synopsis spriteBatch = love.graphics.newSpriteBatch( image, maxsprites ) Arguments Image image The Image to use for the sprites. number maxsprites (1000) The maximum number of sprites that the SpriteBatch can contain at any give

(File):getMode

(File):getMode Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the FileMode the file has been opened with. Function Synopsis mode = File:getMode( ) Arguments None. Returns FileMode mode The mode this file has been opened with. See Also File FileMode

BezierCurve:getDegree

BezierCurve:getDegree Available since LÖVE 0.9.0 This function is not supported in earlier versions. Get degree of the Bézier curve. The degree is equal to number-of-control-points - 1. Function Synopsis degree = BezierCurve:getDegree( ) Arguments None. Returns number degree Degree of the Bézier curve. See Also BezierCurve BezierCurve:getControlPoint BezierCurve:setControlPoint BezierCurve:insertControlPoint love.math

Shader:getExternVariable

Shader:getExternVariable Available since LÖVE 0.9.2 This function is not supported in earlier versions. Gets information about an 'extern' ('uniform') variable in the shader. Returns nil if the variable name doesn't exist in the shader, or if the video driver's shader compiler has determined that the variable doesn't affect the final output of the shader. Function Synopsis type, components, arrayelements = Shader:getExternVariable( name ) Arguments string name The name of the extern vari

ChainShape:setPreviousVertex

ChainShape:setPreviousVertex Available since LÖVE 0.9.0 It has been renamed from ChainShape:setPrevVertex. Sets a vertex that establishes a connection to the previous shape. This can help prevent unwanted collisions when a flat shape slides along the edge and moves over to the new shape. Function Synopsis ChainShape:setPreviousVertex( x, y ) Arguments number x The x-component of the vertex. number y The y-component of the vertex. Returns Nothing. See Also ChainShape ChainShape:set