love.resize

love.resize Available since LÖVE 0.9.0 This callback is not supported in earlier versions. Called when the window is resized, for example if the user resizes the window, or if love.window.setMode is called with an unsupported width or height in fullscreen and the window chooses the closest appropriate size. Function Synopsis love.resize( w, h ) Arguments number w The new width, in pixels. number h The new height, in pixels. Returns Nothing. Notes Calls to love.window.setMode will only

love.releaseerrhand

love.releaseerrhand Removed in LÖVE 0.9.0 This callback is not supported in that and later versions. Function Synopsis love.releaseerrhand( msg ) Arguments string msg The error message. Returns Nothing. Examples The default function used if you don't supply your own. function love.releaseerrhand(msg) print("An error has occured, the game has been stopped.")   if not love.graphics or not love.event or not love.graphics.isCreated() then return end   love.graphics.setCanvas() love.g

love.quit

love.quit Available since LÖVE 0.7.0 This callback is not supported in earlier versions. Callback function triggered when the game is closed. Function Synopsis r = love.quit( ) Arguments None. Returns boolean r Abort quitting. If true, do not close the game. Example This example shows how the return value of love.quit can be used to stop the closing of the game. local quit = true function love.quit() if quit then print("We are not ready to quit yet!") quit = not qu

love.physics.setMeter

love.physics.setMeter Available since LÖVE 0.8.0 This function is not supported in earlier versions. Sets the pixels to meter scale factor. All coordinates in the physics module are divided by this number and converted to meters, and it creates a convenient way to draw the objects directly to the screen without the need for graphics transformations. It is recommended to create shapes no larger than 10 times the scale. This is important because Box2D is tuned to work well with shape sizes

love.physics.newWorld

love.physics.newWorld Creates a new World. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis world = love.physics.newWorld( xg, yg, sleep ) Arguments number xg (0) The x component of gravity. number yg (0) The y component of gravity. boolean sleep (true) Whether the bodies in this world are allowed to sleep. Returns World world A brave new World. Function Removed in LÖVE 0.8.0 This variant is not supported in that and later versions.

love.physics.newWheelJoint

love.physics.newWheelJoint Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a wheel joint. Function Synopsis joint = love.physics.newWheelJoint( body1, body2, x, y, ax, ay, collideConnected ) Arguments Body body1 The first body. Body body2 The second body. number x The x position of the anchor point. number y The y position of the anchor point. number ax The x position of the axis unit vector. number ay The y position of the axis unit vector. bo

love.physics.newWeldJoint

love.physics.newWeldJoint Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a constraint joint between two bodies. A WeldJoint essentially glues two bodies together. The constraint is a bit soft, however, due to Box2D's iterative solver. Function Synopsis joint = love.physics.newWeldJoint( body1, body2, x, y, collideConnected ) Arguments Body body1 The first body to attach to the joint. Body body2 The second body to attach to the joint. number x The

love.physics.newRopeJoint

love.physics.newRopeJoint Available since LÖVE 0.8.0 This function is not supported in earlier versions. Creates a joint between two bodies. Its only function is enforcing a max distance between these bodies. There is a bug in version 0.8.0 where the cooridnates of the anchors are divided by the number from love.physics.getMeter. As a workaround, multiply your anchor coordinates with that number and it should work like expected. Function Synopsis joint = love.physics.newRopeJoint( body1,

love.physics.newRevoluteJoint

love.physics.newRevoluteJoint Creates a pivot joint between two bodies. This joint connects two bodies to a point around which they can pivot. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis joint = love.physics.newRevoluteJoint( body1, body2, x, y, collideConnected ) Arguments Body body1 The first body. Body body2 The second body. number x The x position of the connecting point. number y The y position of the connecting point. boolean

love.physics.newRectangleShape

love.physics.newRectangleShape Shorthand for creating rectangular PolygonShapes. By default, the local origin is located at the center of the rectangle as opposed to the top left for graphics. Function Available since LÖVE 0.8.0 These variants are not supported in earlier versions. Synopsis shape = love.physics.newRectangleShape( width, height ) Arguments number width The width of the rectangle. number height The height of the rectangle. Returns PolygonShape shape A new PolygonShape.