Shape:setFriction

Shape:setFriction Removed in LÖVE 0.8.0 Has been replaced by Fixture:setFriction. Sets the friction of the shape. Friction determines how shapes react when they "slide" along other shapes. Low friction indicates a slippery surface, like ice, while high friction indicates a rough surface, like concrete. Range: 0.0 - 1.0. Function Synopsis Shape:setFriction( friction ) Arguments number friction The friction of the shape. Returns Nothing. See Also Shape

Shape:setMask

Shape:setMask Removed in LÖVE 0.8.0 Use Fixture:setMask instead. Sets which categories this shape should NOT collide with. With this function, you can exclude certain shape categories from collisions with this shape. The categories passed as parameters will be excluded from collisions - all others included. Function Synopsis Shape:setMask( ... ) Arguments number ... Numbers from 1-16. Returns Nothing. Examples Only collide with category 6 shape:setMask(1, 2, 3, 4, 5, 7, 8, 9, 10, 12, 1

Shape:setRestitution

Shape:setRestitution Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Sets the restitution of the shape. Restitution indicates the "bounciness" of the shape. High restitution can be used to model stuff like a rubber ball, while low restitution can be used for "dull" objects, like a bag of sand. Function Synopsis Shape:setRestitution( restitution ) Arguments number restitution The restitution of the shape. Returns Nothing. Notes A shape with a restitution

Shape:setSensor

Shape:setSensor Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Sets whether this shape should act as a sensor. Set the shape as a sensor if you want to be notified when collision between shapes occur, but don't want a physical response (for instance, maybe you want enemies to appear when the player "touches" a certain point). Function Synopsis Shape:setSensor( sensor ) Arguments boolean sensor True for sensor, false otherwise. Returns Nothing. See Also

Shape:testPoint

Shape:testPoint This is particularly useful for mouse interaction with the shapes. By looping through all shapes and testing the mouse position with this function, we can find which shapes the mouse touches. There's a bug in 0.8.0 preventing this function from working. Function Available since LÖVE 0.8.0 This variant is not supported in earlier versions. Synopsis hit = Shape:testPoint( tx, ty, tr, x, y ) Arguments number tx Translates the shape along the x-axis. number ty Translates the

Shape:testSegment

Shape:testSegment Removed in LÖVE 0.8.0 This function is not supported in that and later versions. Checks whether a line segment intersects a shape. This function will either return the "time" of impact and the surface normal at the point of collision, or nil if the line does not intersect the shape. The "time" is a value between 0.0 and 1.0 and can be used to calculate where the collision occured. Function Synopsis t, xn, yn = Shape:testSegment( x1, y1, x2, y2 ) Arguments number x1 The x

SoundData:getBitDepth

SoundData:getBitDepth Available since LÖVE 0.9.0 It has been renamed from SoundData:getBits. Returns the number of bits per sample. Function Synopsis bitdepth = SoundData:getBitDepth( ) Arguments None. Returns number bitdepth Either 8, or 16. See Also SoundData

SoundData:getBits

SoundData:getBits Removed in LÖVE 0.9.0 It has been renamed to SoundData:getBitDepth. Returns the number of bits per sample. Function Synopsis bits = SoundData:getBits( ) Arguments None. Returns number bits Either 8, or 16. See Also SoundData

SoundData:getChannels

SoundData:getChannels Returns the number of channels in the stream. Function Synopsis channels = SoundData:getChannels( ) Arguments None. Returns number channels 1 for mono, 2 for stereo. See Also SoundData

SoundData:getDuration

SoundData:getDuration Available since LÖVE 0.9.0 This function is not supported in earlier versions. Gets the duration of the sound data. Function Synopsis duration = SoundData:getDuration( ) Arguments None. Returns number duration The duration of the sound data in seconds. See Also SoundData