main function stringlengths 8 40 | chunks stringlengths 41 8.32k | repo_name stringclasses 1
value |
|---|---|---|
ParticleSystem:setSpinVariation | ParticleSystem:setSpinVariation
Sets the amount of spin variation (0 meaning no variation and 1 meaning full variation between start and end).
ParticleSystem:setSpinVariation( variation )
variation number The amount of variation (0 meaning no variation and 1 meaning full variation between start and end). | love2d-community.github.io/love-api |
ParticleSystem:setSpread | ParticleSystem:setSpread
Sets the amount of spread for the system.
ParticleSystem:setSpread( spread )
spread number The amount of spread (radians). | love2d-community.github.io/love-api |
ParticleSystem:setTangentialAcceleration | ParticleSystem:setTangentialAcceleration
Sets the tangential acceleration (acceleration perpendicular to the particle's direction).
ParticleSystem:setTangentialAcceleration( min, max )
min number The minimum acceleration.
max (min) number The maximum acceleration. | love2d-community.github.io/love-api |
ParticleSystem:setTexture | ParticleSystem:setTexture
Sets the texture (Image or Canvas) to be used for the particles.
ParticleSystem:setTexture( texture )
texture Texture An Image or Canvas to use for the particles. | love2d-community.github.io/love-api |
ParticleSystem:start | ParticleSystem:start
Starts the particle emitter.
ParticleSystem:start() | love2d-community.github.io/love-api |
ParticleSystem:stop | ParticleSystem:stop
Stops the particle emitter, resetting the lifetime counter.
ParticleSystem:stop() | love2d-community.github.io/love-api |
ParticleSystem:update | ParticleSystem:update
Updates the particle system; moving, creating and killing particles.
ParticleSystem:update( dt )
dt number The time (seconds) since last frame. | love2d-community.github.io/love-api |
Quad:getTextureDimensions | Quad:getTextureDimensions
Gets reference texture dimensions initially specified in love.graphics.newQuad.
sw, sh = Quad:getTextureDimensions()
sw number The Texture width used by the Quad.
sh number The Texture height used by the Quad. | love2d-community.github.io/love-api |
Quad:getViewport | Quad:getViewport
Gets the current viewport of this Quad.
x, y, w, h = Quad:getViewport()
x number The top-left corner along the x-axis.
y number The top-left corner along the y-axis.
w number The width of the viewport.
h number The height of the viewport. | love2d-community.github.io/love-api |
Quad:setViewport | Quad:setViewport
Sets the texture coordinates according to a viewport.
Quad:setViewport( x, y, w, h, sw, sh )
x number The top-left corner along the x-axis.
y number The top-left corner along the y-axis.
w number The width of the viewport.
h number The height of the viewport.
sw number The reference width, the width of... | love2d-community.github.io/love-api |
Shader:getWarnings | Shader:getWarnings
Returns any warning and error messages from compiling the shader code. This can be used for debugging your shaders if there's anything the graphics hardware doesn't like.
warnings = Shader:getWarnings()
warnings string Warning and error messages (if any). | love2d-community.github.io/love-api |
Shader:hasUniform | Shader:hasUniform
Gets whether a uniform / extern variable exists in the Shader.
If a graphics driver's shader compiler determines that a uniform / extern variable doesn't affect the final output of the shader, it may optimize the variable out. This function will return false in that case.
hasuniform = Shader:hasUnifo... | love2d-community.github.io/love-api |
Shader:send | Shader:send
Sends one or more values to a special (''uniform'') variable inside the shader. Uniform variables have to be marked using the ''uniform'' or ''extern'' keyword, e.g.
uniform float time; // 'float' is the typical number type used in GLSL shaders.
uniform float varsvec2 light_pos;
uniform vec4 colors[4;
T... | love2d-community.github.io/love-api |
Shader:sendColor | Shader:sendColor
Sends one or more colors to a special (''extern'' / ''uniform'') vec3 or vec4 variable inside the shader. The color components must be in the range of 1. The colors are gamma-corrected if global gamma-correction is enabled.
Extern variables must be marked using the ''extern'' keyword, e.g.
extern vec... | love2d-community.github.io/love-api |
SpriteBatch:add | SpriteBatch:add
Adds a sprite to the batch. Sprites are drawn in the order they are added.
id = SpriteBatch:add( x, y, r, sx, sy, ox, oy, kx, ky )
x number The position to draw the object (x-axis).
y number The position to draw the object (y-axis).
r (0) number Orientation (radians).
sx (1) number Scale factor (x-axis)... | love2d-community.github.io/love-api |
SpriteBatch:addLayer | SpriteBatch:addLayer
Adds a sprite to a batch created with an Array Texture.
spriteindex = SpriteBatch:addLayer( layerindex, x, y, r, sx, sy, ox, oy, kx, ky )
layerindex number The index of the layer to use for this sprite.
x (0) number The position to draw the sprite (x-axis).
y (0) number The position to draw the spr... | love2d-community.github.io/love-api |
SpriteBatch:attachAttribute | SpriteBatch:attachAttribute
Attaches a per-vertex attribute from a Mesh onto this SpriteBatch, for use when drawing. This can be combined with a Shader to augment a SpriteBatch with per-vertex or additional per-sprite information instead of just having per-sprite colors.
Each sprite in a SpriteBatch has 4 vertices in ... | love2d-community.github.io/love-api |
SpriteBatch:clear | SpriteBatch:clear
Removes all sprites from the buffer.
SpriteBatch:clear() | love2d-community.github.io/love-api |
SpriteBatch:flush | SpriteBatch:flush
Immediately sends all new and modified sprite data in the batch to the graphics card.
Normally it isn't necessary to call this method as love.graphics.draw(spritebatch, ...) will do it automatically if needed, but explicitly using SpriteBatch:flush gives more control over when the work happens.
If t... | love2d-community.github.io/love-api |
SpriteBatch:getBufferSize | SpriteBatch:getBufferSize
Gets the maximum number of sprites the SpriteBatch can hold.
size = SpriteBatch:getBufferSize()
size number The maximum number of sprites the batch can hold. | love2d-community.github.io/love-api |
SpriteBatch:getColor | SpriteBatch:getColor
Gets the color that will be used for the next add and set operations.
If no color has been set with SpriteBatch:setColor or the current SpriteBatch color has been cleared, this method will return nil.
In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0... | love2d-community.github.io/love-api |
SpriteBatch:getCount | SpriteBatch:getCount
Gets the number of sprites currently in the SpriteBatch.
count = SpriteBatch:getCount()
count number The number of sprites currently in the batch. | love2d-community.github.io/love-api |
SpriteBatch:getTexture | SpriteBatch:getTexture
Gets the texture (Image or Canvas) used by the SpriteBatch.
texture = SpriteBatch:getTexture()
texture Texture The Image or Canvas used by the SpriteBatch. | love2d-community.github.io/love-api |
SpriteBatch:set | SpriteBatch:set
Changes a sprite in the batch. This requires the sprite index returned by SpriteBatch:add or SpriteBatch:addLayer.
SpriteBatch:set( spriteindex, x, y, r, sx, sy, ox, oy, kx, ky )
spriteindex number The index of the sprite that will be changed.
x number The position to draw the object (x-axis).
y number ... | love2d-community.github.io/love-api |
SpriteBatch:setColor | SpriteBatch:setColor
Sets the color that will be used for the next add and set operations. Calling the function without arguments will disable all per-sprite colors for the SpriteBatch.
In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
In version 0.9.2 and older, t... | love2d-community.github.io/love-api |
SpriteBatch:setDrawRange | SpriteBatch:setDrawRange
Restricts the drawn sprites in the SpriteBatch to a subset of the total.
SpriteBatch:setDrawRange( start, count )
start number The index of the first sprite to draw. Index 1 corresponds to the first sprite added with SpriteBatch:add.
count number The number of sprites to draw.
SpriteBatch:setDr... | love2d-community.github.io/love-api |
SpriteBatch:setLayer | SpriteBatch:setLayer
Changes a sprite previously added with add or addLayer, in a batch created with an Array Texture.
SpriteBatch:setLayer( spriteindex, layerindex, x, y, r, sx, sy, ox, oy, kx, ky )
spriteindex number The index of the existing sprite to replace.
layerindex number The index of the layer in the Array Te... | love2d-community.github.io/love-api |
SpriteBatch:setTexture | SpriteBatch:setTexture
Sets the texture (Image or Canvas) used for the sprites in the batch, when drawing.
SpriteBatch:setTexture( texture )
texture Texture The new Image or Canvas to use for the sprites in the batch. | love2d-community.github.io/love-api |
Text:add | Text:add
Adds additional colored text to the Text object at the specified position.
index = Text:add( textstring, x, y, angle, sx, sy, ox, oy, kx, ky )
textstring string The text to add to the object.
x (0) number The position of the new text on the x-axis.
y (0) number The position of the new text on the y-axis.
angle... | love2d-community.github.io/love-api |
Text:addf | Text:addf
Adds additional formatted / colored text to the Text object at the specified position.
The word wrap limit is applied before any scaling, rotation, and other coordinate transformations. Therefore the amount of text per line stays constant given the same wrap limit, even if the scale arguments change.
index =... | love2d-community.github.io/love-api |
Text:clear | Text:clear
Clears the contents of the Text object.
Text:clear() | love2d-community.github.io/love-api |
Text:getDimensions | Text:getDimensions
Gets the width and height of the text in pixels.
width, height = Text:getDimensions()
width number The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned.
height number The height of the text. If multiple sub-strings have been added ... | love2d-community.github.io/love-api |
Text:getFont | Text:getFont
Gets the Font used with the Text object.
font = Text:getFont()
font Font The font used with this Text object. | love2d-community.github.io/love-api |
Text:getHeight | Text:getHeight
Gets the height of the text in pixels.
height = Text:getHeight()
height number The height of the text. If multiple sub-strings have been added with Text:add, the height of the last sub-string is returned.
height = Text:getHeight( index )
index number An index number returned by Text:add or Text:addf.
hei... | love2d-community.github.io/love-api |
Text:getWidth | Text:getWidth
Gets the width of the text in pixels.
width = Text:getWidth()
width number The width of the text. If multiple sub-strings have been added with Text:add, the width of the last sub-string is returned.
width = Text:getWidth( index )
index number An index number returned by Text:add or Text:addf.
width number... | love2d-community.github.io/love-api |
Text:set | Text:set
Replaces the contents of the Text object with a new unformatted string.
Text:set( textstring )
textstring string The new string of text to use.
Text:set( coloredtext )
coloredtext table A table containing colors and strings to use as the new text, in the form of {color1, string1, color2, string2, ...}.
colored... | love2d-community.github.io/love-api |
Text:setFont | Text:setFont
Replaces the Font used with the text.
Text:setFont( font )
font Font The new font to use with this Text object. | love2d-community.github.io/love-api |
Text:setf | Text:setf
Replaces the contents of the Text object with a new formatted string.
Text:setf( textstring, wraplimit, align )
textstring string The new string of text to use.
wraplimit number The maximum width in pixels of the text before it gets automatically wrapped to a new line.
align AlignMode The alignment of the tex... | love2d-community.github.io/love-api |
Texture:getDPIScale | Texture:getDPIScale
Gets the DPI scale factor of the Texture.
The DPI scale factor represents relative pixel density. A DPI scale factor of 2 means the texture has twice the pixel density in each dimension (4 times as many pixels in the same area) compared to a texture with a DPI scale factor of 1.
For example, a tex... | love2d-community.github.io/love-api |
Texture:getDepth | Texture:getDepth
Gets the depth of a Volume Texture. Returns 1 for 2D, Cubemap, and Array textures.
depth = Texture:getDepth()
depth number The depth of the volume Texture. | love2d-community.github.io/love-api |
Texture:getDepthSampleMode | Texture:getDepthSampleMode
Gets the comparison mode used when sampling from a depth texture in a shader.
Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D.
compare = Texture:getDepthSampleMode()
compare (nil) CompareMode The comparison mode used when sampling ... | love2d-community.github.io/love-api |
Texture:getDimensions | Texture:getDimensions
Gets the width and height of the Texture.
width, height = Texture:getDimensions()
width number The width of the Texture.
height number The height of the Texture. | love2d-community.github.io/love-api |
Texture:getFilter | Texture:getFilter
Gets the filter mode of the Texture.
min, mag, anisotropy = Texture:getFilter()
min FilterMode Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels).
mag FilterMode Filter mode to use when magnifying the texture (rendering it at a smaller size... | love2d-community.github.io/love-api |
Texture:getFormat | Texture:getFormat
Gets the pixel format of the Texture.
format = Texture:getFormat()
format PixelFormat The pixel format the Texture was created with. | love2d-community.github.io/love-api |
Texture:getHeight | Texture:getHeight
Gets the height of the Texture.
height = Texture:getHeight()
height number The height of the Texture. | love2d-community.github.io/love-api |
Texture:getLayerCount | Texture:getLayerCount
Gets the number of layers / slices in an Array Texture. Returns 1 for 2D, Cubemap, and Volume textures.
layers = Texture:getLayerCount()
layers number The number of layers in the Array Texture. | love2d-community.github.io/love-api |
Texture:getMipmapCount | Texture:getMipmapCount
Gets the number of mipmaps contained in the Texture. If the texture was not created with mipmaps, it will return 1.
mipmaps = Texture:getMipmapCount()
mipmaps number The number of mipmaps in the Texture. | love2d-community.github.io/love-api |
Texture:getMipmapFilter | Texture:getMipmapFilter
Gets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images.
mode, sharpness = Texture:getMipmapFilter()
mode FilterMode The filter mode used in between mipmap levels. nil if mipmap filtering is not enabled.
sharpness number Value used to determine whether the imag... | love2d-community.github.io/love-api |
Texture:getPixelDimensions | Texture:getPixelDimensions
Gets the width and height in pixels of the Texture.
Texture:getDimensions gets the dimensions of the texture in units scaled by the texture's DPI scale factor, rather than pixels. Use getDimensions for calculations related to drawing the texture (calculating an origin offset, for example), a... | love2d-community.github.io/love-api |
Texture:getPixelHeight | Texture:getPixelHeight
Gets the height in pixels of the Texture.
DPI scale factor, rather than pixels. Use getHeight for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelHeight only when dealing specifically with pixels, for example when using Canvas:newImageData.
pi... | love2d-community.github.io/love-api |
Texture:getPixelWidth | Texture:getPixelWidth
Gets the width in pixels of the Texture.
DPI scale factor, rather than pixels. Use getWidth for calculations related to drawing the texture (calculating an origin offset, for example), and getPixelWidth only when dealing specifically with pixels, for example when using Canvas:newImageData.
pixelw... | love2d-community.github.io/love-api |
Texture:getTextureType | Texture:getTextureType
Gets the type of the Texture.
texturetype = Texture:getTextureType()
texturetype TextureType The type of the Texture. | love2d-community.github.io/love-api |
Texture:getWidth | Texture:getWidth
Gets the width of the Texture.
width = Texture:getWidth()
width number The width of the Texture. | love2d-community.github.io/love-api |
Texture:getWrap | Texture:getWrap
Gets the wrapping properties of a Texture.
This function returns the currently set horizontal and vertical wrapping modes for the texture.
horiz, vert, depth = Texture:getWrap()
horiz WrapMode Horizontal wrapping mode of the texture.
vert WrapMode Vertical wrapping mode of the texture.
depth WrapMode W... | love2d-community.github.io/love-api |
Texture:isReadable | Texture:isReadable
Gets whether the Texture can be drawn and sent to a Shader.
Canvases created with stencil and/or depth PixelFormats are not readable by default, unless readable=true is specified in the settings table passed into love.graphics.newCanvas.
Non-readable Canvases can still be rendered to.
readable = Te... | love2d-community.github.io/love-api |
Texture:setDepthSampleMode | Texture:setDepthSampleMode
Sets the comparison mode used when sampling from a depth texture in a shader. Depth texture comparison modes are advanced low-level functionality typically used with shadow mapping in 3D.
When using a depth texture with a comparison mode set in a shader, it must be declared as a sampler2DSha... | love2d-community.github.io/love-api |
Texture:setFilter | Texture:setFilter
Sets the filter mode of the Texture.
Texture:setFilter( min, mag, anisotropy )
min FilterMode Filter mode to use when minifying the texture (rendering it at a smaller size on-screen than its size in pixels).
mag (min) FilterMode Filter mode to use when magnifying the texture (rendering it at a larger ... | love2d-community.github.io/love-api |
Texture:setMipmapFilter | Texture:setMipmapFilter
Sets the mipmap filter mode for a Texture. Prior to 11.0 this method only worked on Images.
Mipmapping is useful when drawing a texture at a reduced scale. It can improve performance and reduce aliasing issues.
In created with the mipmaps flag enabled for the mipmap filter to have any effect. ... | love2d-community.github.io/love-api |
Texture:setWrap | Texture:setWrap
Sets the wrapping properties of a Texture.
This function sets the way a Texture is repeated when it is drawn with a Quad that is larger than the texture's extent, or when a custom Shader is used which uses texture coordinates outside of [0, 1]. A texture may be clamped or set to repeat in both horizont... | love2d-community.github.io/love-api |
Video:getDimensions | Video:getDimensions
Gets the width and height of the Video in pixels.
width, height = Video:getDimensions()
width number The width of the Video.
height number The height of the Video. | love2d-community.github.io/love-api |
Video:getFilter | Video:getFilter
Gets the scaling filters used when drawing the Video.
min, mag, anisotropy = Video:getFilter()
min FilterMode The filter mode used when scaling the Video down.
mag FilterMode The filter mode used when scaling the Video up.
anisotropy number Maximum amount of anisotropic filtering used. | love2d-community.github.io/love-api |
Video:getHeight | Video:getHeight
Gets the height of the Video in pixels.
height = Video:getHeight()
height number The height of the Video. | love2d-community.github.io/love-api |
Video:getSource | Video:getSource
Gets the audio Source used for playing back the video's audio. May return nil if the video has no audio, or if Video:setSource is called with a nil argument.
source = Video:getSource()
source Source The audio Source used for audio playback, or nil if the video has no audio. | love2d-community.github.io/love-api |
Video:getStream | Video:getStream
Gets the VideoStream object used for decoding and controlling the video.
stream = Video:getStream()
stream VideoStream The VideoStream used for decoding and controlling the video. | love2d-community.github.io/love-api |
Video:getWidth | Video:getWidth
Gets the width of the Video in pixels.
width = Video:getWidth()
width number The width of the Video. | love2d-community.github.io/love-api |
Video:isPlaying | Video:isPlaying
Gets whether the Video is currently playing.
playing = Video:isPlaying()
playing boolean Whether the video is playing. | love2d-community.github.io/love-api |
Video:pause | Video:pause
Pauses the Video.
Video:pause() | love2d-community.github.io/love-api |
Video:play | Video:play
Starts playing the Video. In order for the video to appear onscreen it must be drawn with love.graphics.draw.
Video:play() | love2d-community.github.io/love-api |
Video:rewind | Video:rewind
Rewinds the Video to the beginning.
Video:rewind() | love2d-community.github.io/love-api |
Video:seek | Video:seek
Sets the current playback position of the Video.
Video:seek( offset )
offset number The time in seconds since the beginning of the Video. | love2d-community.github.io/love-api |
Video:setFilter | Video:setFilter
Sets the scaling filters used when drawing the Video.
Video:setFilter( min, mag, anisotropy )
min FilterMode The filter mode used when scaling the Video down.
mag FilterMode The filter mode used when scaling the Video up.
anisotropy (1) number Maximum amount of anisotropic filtering used. | love2d-community.github.io/love-api |
Video:setSource | Video:setSource
Sets the audio Source used for playing back the video's audio. The audio Source also controls playback speed and synchronization.
Video:setSource( source )
source (nil) Source The audio Source used for audio playback, or nil to disable audio synchronization. | love2d-community.github.io/love-api |
Video:tell | Video:tell
Gets the current playback position of the Video.
seconds = Video:tell()
seconds number The time in seconds since the beginning of the Video. | love2d-community.github.io/love-api |
love.image.isCompressed | love.image.isCompressed
Determines whether a file can be loaded as CompressedImageData.
compressed = love.image.isCompressed( filename )
filename string The filename of the potentially compressed image file.
compressed boolean Whether the file can be loaded as CompressedImageData or not.
compressed = love.image.isCompr... | love2d-community.github.io/love-api |
love.image.newCompressedData | love.image.newCompressedData
Create a new CompressedImageData object from a compressed image file. LÖVE supports several compressed texture formats, enumerated in the CompressedImageFormat page.
compressedImageData = love.image.newCompressedData( filename )
filename string The filename of the compressed image file.
com... | love2d-community.github.io/love-api |
love.image.newImageData | love.image.newImageData
Creates a new ImageData object.
imageData = love.image.newImageData( width, height )
width number The width of the ImageData.
height number The height of the ImageData.
imageData ImageData The new blank ImageData object. Each pixel's color values, (including the alpha values!) will be set to zer... | love2d-community.github.io/love-api |
CompressedImageData:getDimensions | CompressedImageData:getDimensions
Gets the width and height of the CompressedImageData.
width, height = CompressedImageData:getDimensions()
width number The width of the CompressedImageData.
height number The height of the CompressedImageData.
width, height = CompressedImageData:getDimensions( level )
level number A mi... | love2d-community.github.io/love-api |
CompressedImageData:getFormat | CompressedImageData:getFormat
Gets the format of the CompressedImageData.
format = CompressedImageData:getFormat()
format CompressedImageFormat The format of the CompressedImageData. | love2d-community.github.io/love-api |
CompressedImageData:getHeight | CompressedImageData:getHeight
Gets the height of the CompressedImageData.
height = CompressedImageData:getHeight()
height number The height of the CompressedImageData.
height = CompressedImageData:getHeight( level )
level number A mipmap level. Must be in the range of CompressedImageData:getMipmapCount().
height number... | love2d-community.github.io/love-api |
CompressedImageData:getMipmapCount | CompressedImageData:getMipmapCount
Gets the number of mipmap levels in the CompressedImageData. The base mipmap level (original image) is included in the count.
mipmaps = CompressedImageData:getMipmapCount()
mipmaps number The number of mipmap levels stored in the CompressedImageData. | love2d-community.github.io/love-api |
CompressedImageData:getWidth | CompressedImageData:getWidth
Gets the width of the CompressedImageData.
width = CompressedImageData:getWidth()
width number The width of the CompressedImageData.
width = CompressedImageData:getWidth( level )
level number A mipmap level. Must be in the range of CompressedImageData:getMipmapCount().
width number The widt... | love2d-community.github.io/love-api |
ImageData:encode | ImageData:encode
Encodes the ImageData and optionally writes it to the save directory.
filedata = ImageData:encode( format, filename )
format ImageFormat The format to encode the image as.
filename (nil) string The filename to write the file to. If nil, no file will be written but the FileData will still be returned.
f... | love2d-community.github.io/love-api |
ImageData:getDimensions | ImageData:getDimensions
Gets the width and height of the ImageData in pixels.
width, height = ImageData:getDimensions()
width number The width of the ImageData in pixels.
height number The height of the ImageData in pixels. | love2d-community.github.io/love-api |
ImageData:getHeight | ImageData:getHeight
Gets the height of the ImageData in pixels.
height = ImageData:getHeight()
height number The height of the ImageData in pixels. | love2d-community.github.io/love-api |
ImageData:getPixel | ImageData:getPixel
Gets the color of a pixel at a specific position in the image.
Valid x and y values start at 0 and go up to image width and height minus 1. Non-integer values are floored.
In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
r, g, b, a = ImageData:g... | love2d-community.github.io/love-api |
ImageData:getWidth | ImageData:getWidth
Gets the width of the ImageData in pixels.
width = ImageData:getWidth()
width number The width of the ImageData in pixels. | love2d-community.github.io/love-api |
ImageData:mapPixel | ImageData:mapPixel
Transform an image by applying a function to every pixel.
This function is a higher-order function. It takes another function as a parameter, and calls it once for each pixel in the ImageData.
The passed function is called with six parameters for each pixel in turn. The parameters are numbers that ... | love2d-community.github.io/love-api |
ImageData:paste | ImageData:paste
Paste into ImageData from another source ImageData.
ImageData:paste( source, dx, dy, sx, sy, sw, sh )
source ImageData Source ImageData from which to copy.
dx number Destination top-left position on x-axis.
dy number Destination top-left position on y-axis.
sx number Source top-left position on x-axis.
... | love2d-community.github.io/love-api |
ImageData:setPixel | ImageData:setPixel
Sets the color of a pixel at a specific position in the image.
Valid x and y values start at 0 and go up to image width and height minus 1.
In versions prior to 11.0, color component values were within the range of 0 to 255 instead of 0 to 1.
ImageData:setPixel( x, y, r, g, b, a )
x number The posi... | love2d-community.github.io/love-api |
ImageData:getFormat | ImageData:getFormat
Gets the pixel format of the ImageData.
format = ImageData:getFormat()
format PixelFormat The pixel format the ImageData was created with. | love2d-community.github.io/love-api |
love.joystick.getGamepadMappingString | love.joystick.getGamepadMappingString
Gets the full gamepad mapping string of the Joysticks which have the given GUID, or nil if the GUID isn't recognized as a gamepad.
The mapping string contains binding information used to map the Joystick's buttons an axes to the standard gamepad layout, and can be used later with ... | love2d-community.github.io/love-api |
love.joystick.getJoystickCount | love.joystick.getJoystickCount
Gets the number of connected joysticks.
joystickcount = love.joystick.getJoystickCount()
joystickcount number The number of connected joysticks. | love2d-community.github.io/love-api |
love.joystick.getJoysticks | love.joystick.getJoysticks
Gets a list of connected Joysticks.
joysticks = love.joystick.getJoysticks()
joysticks table The list of currently connected Joysticks. | love2d-community.github.io/love-api |
love.joystick.loadGamepadMappings | love.joystick.loadGamepadMappings
Loads a gamepad mappings string or file created with love.joystick.saveGamepadMappings.
It also recognizes any SDL gamecontroller mapping string, such as those created with Steam's Big Picture controller configure interface, or this nice database. If a new mapping is loaded for an alr... | love2d-community.github.io/love-api |
love.joystick.saveGamepadMappings | love.joystick.saveGamepadMappings
Saves the virtual gamepad mappings of all recognized as gamepads and have either been recently used or their gamepad bindings have been modified.
The mappings are stored as a string for use with love.joystick.loadGamepadMappings.
mappings = love.joystick.saveGamepadMappings( filename ... | love2d-community.github.io/love-api |
love.joystick.setGamepadMapping | love.joystick.setGamepadMapping
Binds a virtual gamepad input to a button, axis or hat for all Joysticks of a certain type. For example, if this function is used with a GUID returned by a Dualshock 3 controller in OS X, the binding will affect Joystick:getGamepadAxis and Joystick:isGamepadDown for ''all'' Dualshock 3 c... | love2d-community.github.io/love-api |
Joystick:getAxes | Joystick:getAxes
Gets the direction of each axis.
axisDir1, axisDir2, axisDirN = Joystick:getAxes()
axisDir1 number Direction of axis1.
axisDir2 number Direction of axis2.
axisDirN number Direction of axisN. | love2d-community.github.io/love-api |
Joystick:getAxis | Joystick:getAxis
Gets the direction of an axis.
direction = Joystick:getAxis( axis )
axis number The index of the axis to be checked.
direction number Current value of the axis. | love2d-community.github.io/love-api |
Joystick:getAxisCount | Joystick:getAxisCount
Gets the number of axes on the joystick.
axes = Joystick:getAxisCount()
axes number The number of axes available. | love2d-community.github.io/love-api |
Joystick:getButtonCount | Joystick:getButtonCount
Gets the number of buttons on the joystick.
buttons = Joystick:getButtonCount()
buttons number The number of buttons available. | love2d-community.github.io/love-api |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.