Nocare3/love2dapi_chunks huggingface dataset:
love.directorydropped
Callback function triggered when a directory is dragged and dropped onto the window.
love.directorydropped( path )
path string The full platform-dependent path to the directory. It can be used as an argument to love.filesystem.mount, in order to gain read access to the directory with love.filesystem.
love.displayrotated
Called when the device display orientation changed, for example, user rotated their phone 180 degrees.
love.displayrotated( index, orientation )
index number The index of the display that changed orientation.
orientation DisplayOrientation The new orientation.
love.draw
Callback function used to draw on the screen every frame.
love.draw()
love.errorhandler
The error handler, used to display error messages.
mainLoop = love.errorhandler( msg )
msg string The error message.
mainLoop function Function which handles one frame, including events and rendering, when called. If this is nil then LÖVE exits immediately.
love.filedropped
Callback function triggered when a file is dragged and dropped onto the window.
love.filedropped( file )
file DroppedFile The unopened File object representing the file that was dropped.
love.focus
Callback function triggered when window receives or loses focus.
love.focus( focus )
focus boolean True if the window gains focus, false if it loses focus.
love.gamepadaxis
Called when a Joystick's virtual gamepad axis is moved.
love.gamepadaxis( joystick, axis, value )
joystick Joystick The joystick object.
axis GamepadAxis The virtual gamepad axis.
value number The new axis value.
love.gamepadpressed
Called when a Joystick's virtual gamepad button is pressed.
love.gamepadpressed( joystick, button )
joystick Joystick The joystick object.
button GamepadButton The virtual gamepad button.
love.gamepadreleased
Called when a Joystick's virtual gamepad button is released.
love.gamepadreleased( joystick, button )
joystick Joystick The joystick object.
button GamepadButton The virtual gamepad button.
love.joystickadded
Called when a Joystick is connected.
love.joystickadded( joystick )
joystick Joystick The newly connected Joystick object.
love.joystickaxis
Called when a joystick axis moves.
love.joystickaxis( joystick, axis, value )
joystick Joystick The joystick object.
axis number The axis number.
value number The new axis value.
love.joystickhat
Called when a joystick hat direction changes.
love.joystickhat( joystick, hat, direction )
joystick Joystick The joystick object.
hat number The hat number.
direction JoystickHat The new hat direction.
love.joystickpressed
Called when a joystick button is pressed.
love.joystickpressed( joystick, button )
joystick Joystick The joystick object.
button number The button number.
love.joystickreleased
Called when a joystick button is released.
love.joystickreleased( joystick, button )
joystick Joystick The joystick object.
button number The button number.
love.joystickremoved
Called when a Joystick is disconnected.
love.joystickremoved( joystick )
joystick Joystick The now-disconnected Joystick object.
love.keypressed
Callback function triggered when a key is pressed.
love.keypressed( key, scancode, isrepeat )
key KeyConstant Character of the pressed key.
scancode Scancode The scancode representing the pressed key.
isrepeat boolean Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.
love.keypressed( key, isrepeat )
key KeyConstant Character of the key pressed.
isrepeat boolean Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.
Callback function triggered when a key is pressed.
love.keypressed( key, scancode, isrepeat )
key KeyConstant Character of the pressed key.
scancode Scancode The scancode representing the pressed key.
isrepeat boolean Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.
love.keypressed( key, isrepeat )
key KeyConstant Character of the key pressed.
isrepeat boolean Whether this keypress event is a repeat. The delay between key repeats depends on the user's system settings.
love.keyreleased
Callback function triggered when a keyboard key is released.
love.keyreleased( key, scancode )
key KeyConstant Character of the released key.
scancode Scancode The scancode representing the released key.
love.load
This function is called exactly once at the beginning of the game.
love.load( arg, unfilteredArg )
arg table Command-line arguments given to the game.
unfilteredArg table Unfiltered command-line arguments given to the executable (see #Notes).
love.lowmemory
Callback function triggered when the system is running out of memory on mobile devices.

Mobile operating systems may forcefully kill the game if it uses too much memory, so any non-critical resource should be removed if possible (by setting all variables referencing the resources to '''nil'''), when this event is triggered. Sounds and images in particular tend to use the most memory.
love.lowmemory()
love.mousefocus
Callback function triggered when window receives or loses mouse focus.
love.mousefocus( focus )
focus boolean Whether the window has mouse focus or not.
love.mousemoved
Callback function triggered when the mouse is moved.
love.mousemoved( x, y, dx, dy, istouch )
x number The mouse position on the x-axis.
y number The mouse position on the y-axis.
dx number The amount moved along the x-axis since the last time love.mousemoved was called.
dy number The amount moved along the y-axis since the last time love.mousemoved was called.
istouch boolean True if the mouse button press originated from a touchscreen touch-press.
love.mousepressed
Callback function triggered when a mouse button is pressed.
love.mousepressed( x, y, button, istouch, presses )
x number Mouse x position, in pixels.
y number Mouse y position, in pixels.
button number The button index that was pressed. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.
istouch boolean True if the mouse button press originated from a touchscreen touch-press.
presses number The number of presses in a short time frame and small area, used to simulate double, triple clicks
love.mousereleased
Callback function triggered when a mouse button is released.
love.mousereleased( x, y, button, istouch, presses )
x number Mouse x position, in pixels.
y number Mouse y position, in pixels.
button number The button index that was released. 1 is the primary mouse button, 2 is the secondary mouse button and 3 is the middle button. Further buttons are mouse dependent.
istouch boolean True if the mouse button release originated from a touchscreen touch-release.
presses number The number of presses in a short time frame and small area, used to simulate double, triple clicks
love.quit
Callback function triggered when the game is closed.
r = love.quit()
r boolean Abort quitting. If true, do not close the game.
love.resize
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.
love.resize( w, h )
w number The new width.
h number The new height.
love.run
The main function, containing the main loop. A sensible default is used when left out.
mainLoop = love.run()
mainLoop function Function which handlers one frame, including events and rendering when called.
love.textedited
Called when the candidate text for an IME (Input Method Editor) has changed.

The candidate text is not the final text that the user will eventually choose. Use love.textinput for that.
love.textedited( text, start, length )
text string The UTF-8 encoded unicode candidate text.
start number The start cursor of the selected candidate text.
length number The length of the selected candidate text. May be 0.
love.textinput
Called when text has been entered by the user. For example if shift-2 is pressed on an American keyboard layout, the text '@' will be generated.
love.textinput( text )
text string The UTF-8 encoded unicode text.
love.threaderror
Callback function triggered when a Thread encounters an error.
love.threaderror( thread, errorstr )
thread Thread The thread which produced the error.
errorstr string The error message.
love.touchmoved
Callback function triggered when a touch press moves inside the touch screen.
love.touchmoved( id, x, y, dx, dy, pressure )
id light userdata The identifier for the touch press.
x number The x-axis position of the touch inside the window, in pixels.
y number The y-axis position of the touch inside the window, in pixels.
dx number The x-axis movement of the touch inside the window, in pixels.
dy number The y-axis movement of the touch inside the window, in pixels.
pressure number The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
love.touchpressed
Callback function triggered when the touch screen is touched.
love.touchpressed( id, x, y, dx, dy, pressure )
id light userdata The identifier for the touch press.
x number The x-axis position of the touch press inside the window, in pixels.
y number The y-axis position of the touch press inside the window, in pixels.
dx number The x-axis movement of the touch press inside the window, in pixels. This should always be zero.
dy number The y-axis movement of the touch press inside the window, in pixels. This should always be zero.
pressure number The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
love.touchreleased
Callback function triggered when the touch screen stops being touched.
love.touchreleased( id, x, y, dx, dy, pressure )
id light userdata The identifier for the touch press.
x number The x-axis position of the touch inside the window, in pixels.
y number The y-axis position of the touch inside the window, in pixels.
dx number The x-axis movement of the touch inside the window, in pixels.
dy number The y-axis movement of the touch inside the window, in pixels.
pressure number The amount of pressure being applied. Most touch screens aren't pressure sensitive, in which case the pressure will be 1.
love.update
Callback function used to update the state of the game every frame.
love.update( dt )
dt number Time since the last update in seconds.
love.visible
Callback function triggered when window is minimized/hidden or unminimized by the user.
love.visible( visible )
visible boolean True if the window is visible, false if it isn't.
love.wheelmoved
Callback function triggered when the mouse wheel is moved.
love.wheelmoved( x, y )
x number Amount of horizontal mouse wheel movement. Positive values indicate movement to the right.
y number Amount of vertical mouse wheel movement. Positive values indicate upward movement.
Data:clone
Creates a new copy of the Data object.
clone = Data:clone()
clone Data The new copy.
Data:getFFIPointer
Gets an FFI pointer to the Data.

This function should be preferred instead of Data:getPointer because the latter uses light userdata which can't store more all possible memory addresses on some new ARM64 architectures, when LuaJIT is used.
pointer = Data:getFFIPointer()
pointer cdata A raw void* pointer to the Data, or nil if FFI is unavailable.
Data:getPointer
Gets a pointer to the Data. Can be used with libraries such as LuaJIT's FFI.
pointer = Data:getPointer()
pointer light userdata A raw pointer to the Data.
Data:getSize
Gets the Data's size in bytes.
size = Data:getSize()
size number The size of the Data in bytes.
Data:getString
Gets the full Data as a string.
data = Data:getString()
data string The raw data.
Object:release
Destroys the object's Lua reference. The object will be completely deleted if it's not referenced by any other LÖVE object or thread.

This method can be used to immediately clean up resources without waiting for Lua's garbage collector.
success = Object:release()
success boolean True if the object was released by this call, false if it had been previously released.
Object:type
Gets the type of the object as a string.
type = Object:type()
type string The type as a string.
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.
b = Object:typeOf( name )
name string The name of the type to check for.
b boolean True if the object is of the specified type, false otherwise.
love.audio.getActiveEffects
Gets a list of the names of the currently enabled effects.
effects = love.audio.getActiveEffects()
effects table The list of the names of the currently enabled effects.
love.audio.getActiveSourceCount
Gets the current number of simultaneously playing sources.
count = love.audio.getActiveSourceCount()
count number The current number of simultaneously playing sources.
love.audio.getDistanceModel
Returns the distance attenuation model.
model = love.audio.getDistanceModel()
model DistanceModel The current distance model. The default is 'inverseclamped'.
love.audio.getDopplerScale
Gets the current global scale factor for velocity-based doppler effects.
scale = love.audio.getDopplerScale()
scale number The current doppler scale factor.
love.audio.getEffect
Gets the settings associated with an effect.
settings = love.audio.getEffect( name )
name string The name of the effect.
settings table The settings associated with the effect.
love.audio.getMaxSceneEffects
Gets the maximum number of active effects supported by the system.
maximum = love.audio.getMaxSceneEffects()
maximum number The maximum number of active effects.
love.audio.getMaxSourceEffects
Gets the maximum number of active Effects in a single Source object, that the system can support.
maximum = love.audio.getMaxSourceEffects()
maximum number The maximum number of active Effects per Source.
love.audio.getOrientation
Returns the orientation of the listener.
fx, fy, fz, ux, uy, uz = love.audio.getOrientation()
fx, fy, fz number Forward vector of the listener orientation.
ux, uy, uz number Up vector of the listener orientation.
love.audio.getPosition
Returns the position of the listener. Please note that positional audio only works for mono (i.e. non-stereo) sources.
x, y, z = love.audio.getPosition()
x number The X position of the listener.
y number The Y position of the listener.
z number The Z position of the listener.
love.audio.getRecordingDevices
Gets a list of RecordingDevices on the system.

The first device in the list is the user's default recording device. The list may be empty if there are no microphones connected to the system.

Audio recording is currently not supported on iOS.
devices = love.audio.getRecordingDevices()
devices table The list of connected recording devices.
love.audio.getVelocity
Returns the velocity of the listener.
x, y, z = love.audio.getVelocity()
x number The X velocity of the listener.
y number The Y velocity of the listener.
z number The Z velocity of the listener.
love.audio.getVolume
Returns the master volume.
volume = love.audio.getVolume()
volume number The current master volume
love.audio.isEffectsSupported
Gets whether audio effects are supported in the system.
supported = love.audio.isEffectsSupported()
supported boolean True if effects are supported, false otherwise.
love.audio.newQueueableSource
Creates a new Source usable for real-time generated sound playback with Source:queue.
source = love.audio.newQueueableSource( samplerate, bitdepth, channels, buffercount )
samplerate number Number of samples per second when playing.
bitdepth number Bits per sample (8 or 16).
channels number 1 for mono or 2 for stereo.
buffercount (0) number The number of buffers that can be queued up at any given time with Source:queue. Cannot be greater than 64. A sensible default (~8) is chosen if no value is specified.
source Source The new Source usable with Source:queue.
love.audio.newSource
Creates a new Source from a filepath, File, Decoder or SoundData.

Sources created from SoundData are always static.
source = love.audio.newSource( filename, type )
filename string The filepath to the audio file.
type SourceType Streaming or static source.
source Source A new Source that can play the specified audio.
source = love.audio.newSource( file, type )
file File A File pointing to an audio file.
type SourceType Streaming or static source.
source Source A new Source that can play the specified audio.
source = love.audio.newSource( decoder, type )
decoder Decoder The Decoder to create a Source from.
type SourceType Streaming or static source.
source Source A new Source that can play the specified audio.
source = love.audio.newSource( data, type )
data FileData The FileData to create a Source from.
type SourceType Streaming or static source.
source Source A new Source that can play the specified audio.
source = love.audio.newSource( data )
data SoundData The SoundData to create a Source from.
source Source A new Source that can play the specified audio. The SourceType of the returned audio is 'static'.
love.audio.pause
Pauses specific or all currently played Sources.
Sources = love.audio.pause()
Sources table A table containing a list of Sources that were paused by this call.
love.audio.pause( source, ... )
source Source The first Source to pause.
... Source Additional Sources to pause.
love.audio.pause( sources )
sources table A table containing a list of Sources to pause.
love.audio.play
Plays the specified Source.
love.audio.play( source )
source Source The Source to play.
love.audio.play( sources )
sources table Table containing a list of Sources to play.
love.audio.play( source1, source2, ... )
source1 Source The first Source to play.
source2 Source The second Source to play.
... Source Additional Sources to play.
love.audio.setDistanceModel
Sets the distance attenuation model.
love.audio.setDistanceModel( model )
model DistanceModel The new distance model.
love.audio.setDopplerScale
Sets a global scale factor for velocity-based doppler effects. The default scale value is 1.
love.audio.setDopplerScale( scale )
scale number The new doppler scale factor. The scale must be greater than 0.
love.audio.setEffect
Defines an effect that can be applied to a Source.

Not all system supports audio effects. Use love.audio.isEffectsSupported to check.
success = love.audio.setEffect( name, settings )
name string The name of the effect.
settings table The settings to use for this effect, with the following fields:
settings.type EffectType The type of effect to use.
settings.volume number The volume of the effect.
settings.... number Effect-specific settings. See EffectType for available effects and their corresponding settings.
success boolean Whether the effect was successfully created.
success = love.audio.setEffect( name, enabled )
name string The name of the effect.
enabled (true) boolean If false and the given effect name was previously set, disables the effect.
success boolean Whether the effect was successfully disabled.
love.audio.setMixWithSystem
Sets whether the system should mix the audio with the system's audio.
success = love.audio.setMixWithSystem( mix )
mix boolean True to enable mixing, false to disable it.
success boolean True if the change succeeded, false otherwise.
love.audio.setOrientation
Sets the orientation of the listener.
love.audio.setOrientation( fx, fy, fz, ux, uy, uz )
fx, fy, fz number Forward vector of the listener orientation.
ux, uy, uz number Up vector of the listener orientation.
love.audio.setPosition
Sets the position of the listener, which determines how sounds play.
love.audio.setPosition( x, y, z )
x number The x position of the listener.
y number The y position of the listener.
z number The z position of the listener.
love.audio.setVelocity
Sets the velocity of the listener.
love.audio.setVelocity( x, y, z )
x number The X velocity of the listener.
y number The Y velocity of the listener.
z number The Z velocity of the listener.
love.audio.setVolume
Sets the master volume.
love.audio.setVolume( volume )
volume number 1.0 is max and 0.0 is off.
love.audio.stop
Stops currently played sources.
love.audio.stop()
love.audio.stop( source )
source Source The source on which to stop the playback.
love.audio.stop( source1, source2, ... )
source1 Source The first Source to stop.
source2 Source The second Source to stop.
... Source Additional Sources to stop.
love.audio.stop( sources )
sources table A table containing a list of Sources to stop.
RecordingDevice:getBitDepth
Gets the number of bits per sample in the data currently being recorded.
bits = RecordingDevice:getBitDepth()
bits number The number of bits per sample in the data that's currently being recorded.
RecordingDevice:getChannelCount
Gets the number of channels currently being recorded (mono or stereo).
channels = RecordingDevice:getChannelCount()
channels number The number of channels being recorded (1 for mono, 2 for stereo).
RecordingDevice:getData
Gets all recorded audio SoundData stored in the device's internal ring buffer.

The internal ring buffer is cleared when this function is called, so calling it again will only get audio recorded after the previous call. If the device's internal ring buffer completely fills up before getData is called, the oldest data that doesn't fit into the buffer will be lost.
data = RecordingDevice:getData()
data SoundData The recorded audio data, or nil if the device isn't recording.
RecordingDevice:getName
Gets the name of the recording device.
name = RecordingDevice:getName()
name string The name of the device.
RecordingDevice:getSampleCount
Gets the number of currently recorded samples.
samples = RecordingDevice:getSampleCount()
samples number The number of samples that have been recorded so far.
RecordingDevice:getSampleRate
Gets the number of samples per second currently being recorded.
rate = RecordingDevice:getSampleRate()
rate number The number of samples being recorded per second (sample rate).
RecordingDevice:isRecording
Gets whether the device is currently recording.
recording = RecordingDevice:isRecording()
recording boolean True if the recording, false otherwise.
RecordingDevice:start
Begins recording audio using this device.
success = RecordingDevice:start( samplecount, samplerate, bitdepth, channels )
samplecount number The maximum number of samples to store in an internal ring buffer when recording. RecordingDevice:getData clears the internal buffer when called.
samplerate (8000) number The number of samples per second to store when recording.
bitdepth (16) number The number of bits per sample.
channels (1) number Whether to record in mono or stereo. Most microphones don't support more than 1 channel.
success boolean True if the device successfully began recording using the specified parameters, false if not.
RecordingDevice:stop
Stops recording audio from this device. Any sound data currently in the device's buffer will be returned.
data = RecordingDevice:stop()
data SoundData The sound data currently in the device's buffer, or nil if the device wasn't recording.
Source:clone
Creates an identical copy of the Source in the stopped state.

Static Sources will use significantly less memory and take much less time to be created if Source:clone is used to create them instead of love.audio.newSource, so this method should be preferred when making multiple Sources which play the same sound.
source = Source:clone()
source Source The new identical copy of this Source.
Source:getActiveEffects
Gets a list of the Source's active effect names.
effects = Source:getActiveEffects()
effects table A list of the source's active effect names.
Source:getAirAbsorption
Gets the amount of air absorption applied to the Source.

By default the value is set to 0 which means that air absorption effects are disabled. A value of 1 will apply high frequency attenuation to the Source at a rate of 0.05 dB per meter.
amount = Source:getAirAbsorption()
amount number The amount of air absorption applied to the Source.