Skip to content

Instantly share code, notes, and snippets.

@henriquegogo
Last active April 10, 2022 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henriquegogo/f066423d6bde786193db5eb1496e939d to your computer and use it in GitHub Desktop.
Save henriquegogo/f066423d6bde786193db5eb1496e939d to your computer and use it in GitHub Desktop.
Lua LÖVE file reference for autocomplete
-- takes all
love = {
audio = {
getActiveEffects = function(...) end, --Gets a list of the names of the currently enabled effects.
getActiveSourceCount = function(...) end, --Gets the current number of simultaneously playing sources.
getDistanceModel = function(...) end, --Returns the distance attenuation model.
getDopplerScale = function(...) end, --Gets the global scale factor for doppler effects.
getEffect = function(...) end, --Gets the settings associated with an effect.
getMaxSceneEffects = function(...) end, --Gets the maximum number of active effects.
getMaxSourceEffects = function(...) end, --Gets the maximum number of active Effects for each Source.
getNumSources = function(...) end, --Gets the current number of simultaneously playing sources.
getOrientation = function(...) end, --Returns the orientation of the listener.
getPosition = function(...) end, --Returns the position of the listener.
getRecordingDevices = function(...) end, --Gets a list of RecordingDevices on the system.
getSourceCount = function(...) end, --Gets the current number of simultaneously playing sources.
getVelocity = function(...) end, --Returns the velocity of the listener.
getVolume = function(...) end, --Returns the master volume.
isEffectsSupported = function(...) end, --Gets whether Effects are supported in the system.
newQueueableSource = function(...) end, --Creates a new Source usable for real-time generated sound playback with Source:queue.
newSource = function(...) end, --Creates a new Source from a file, SoundData, or Decoder.
pause = function(...) end, --Pauses specific or all currently played Sources.
play = function(...) end, --Plays the specified Source.
resume = function(...) end, --Resumes all audio.
rewind = function(...) end, --Rewinds all playing audio.
setDistanceModel = function(...) end, --Sets the distance attenuation model.
setDopplerScale = function(...) end, --Sets a global scale factor for doppler effects.
setEffect = function(...) end, --Defines an effect that can be applied to a Source.
setMixWithSystem = function(...) end, --Sets whether the system should mix the audio with the system's audio.
setOrientation = function(...) end, --Sets the orientation of the listener.
setPosition = function(...) end, --Sets the position of the listener.
setVelocity = function(...) end, --Sets the velocity of the listener.
setVolume = function(...) end, --Sets the master volume.
stop = function(...) end --Stops currently played sources.
},
data = {
compress = function(...) end, --Compresses a string or data using a specific compression algorithm.
decode = function(...) end, --Decode Data or a string from any of the EncodeFormats to Data or string.
decompress = function(...) end, --Decompresses a CompressedData or previously compressed string or Data object.
encode = function(...) end, --Encode Data or a string to a Data or string in one of the EncodeFormats.
getPackedSize = function(...) end, --Gets the size in bytes that a given format used with love.data.pack will use.
hash = function(...) end, --Compute message digest using specific hash algorithm.
newByteData = function(...) end, --Creates a new Data object containing arbitrary bytes.
newDataView = function(...) end, --Creates a new Data referencing a subsection of an existing Data object.
pack = function(...) end, --Packs (serializes) simple Lua values.
unpack = function(...) end --Unpacks (deserializes) a byte-string or Data into simple Lua values.
},
event = {
clear = function(...) end, --Clears the event queue.
poll = function(...) end, --Returns an iterator for messages in the event queue.
pump = function(...) end, --Pump events into the event queue.
push = function(...) end, --Adds an event to the event queue.
quit = function(...) end, --Exits or restarts the LÖVE program.
wait = function(...) end, --Like love.event.poll(), but blocks until there is an event in the queue.
},
filesystem = {
append = function(...) end, --Append data to an existing file.
areSymlinksEnabled = function(...) end, --Gets whether follows symbolic links.
createDirectory = function(...) end, --Creates a directory.
enumerate = function(...) end, --Returns all the files and subdirectories in the directory.
exists = function(...) end, --Check whether a file or directory exists.
getAppdataDirectory = function(...) end, --Returns the application data directory (could be the same as getUserDirectory)
getCRequirePath = function(...) end, --Gets the filesystem paths that will be searched for c libraries when require is called.
getDirectoryItems = function(...) end, --Returns all the files and subdirectories in the directory.
getIdentity = function(...) end, --Gets the write directory name for your game.
getInfo = function(...) end, --Gets information about the specified file or directory.
getLastModified = function(...) end, --Gets the last modification time of a file.
getRealDirectory = function(...) end, --Gets the absolute path of the directory containing a filepath.
getRequirePath = function(...) end, --Gets the filesystem paths that will be searched when require is called.
getSaveDirectory = function(...) end, --Gets the full path to the designated save directory.
getSize = function(...) end, --Gets the size in bytes of a file.
getSource = function(...) end, --Returns the full path to the .love file or directory.
getSourceBaseDirectory = function(...) end, --Returns the full path to the directory containing the .love file.
getUserDirectory = function(...) end, --Returns the path of the user's directory
getWorkingDirectory = function(...) end, --Gets the current working directory.
init = function(...) end, --Initializes will be called internally, so should not be used explicitly.
isDirectory = function(...) end, --Check whether something is a directory.
isFile = function(...) end, --Check whether something is a file.
isFused = function(...) end, --Gets whether the game is in fused mode or not.
isSymlink = function(...) end, --Gets whether a filepath is actually a symbolic link.
lines = function(...) end, --Iterate over the lines in a file.
load = function(...) end, --Loads a Lua file (but does not run it).
mkdir = function(...) end, --Creates a directory.
mount = function(...) end, --Mounts a zip file or folder in the game's save directory for reading.
newFile = function(...) end, --Creates a new File object.
newFileData = function(...) end, --Creates a new FileData object from a file on disk, or from a string in memory.
read = function(...) end, --Read the contents of a file.
remove = function(...) end, --Removes a file (or directory).
setCRequirePath = function(...) end, --Sets the filesystem paths that will be searched for c libraries when require is called.
setIdentity = function(...) end, --Sets the write directory for your game.
setRequirePath = function(...) end, --Sets the filesystem paths that will be searched when require is called.
setSource = function(...) end, --Sets the source of the game, where the code is present. Used internally.
setSymlinksEnabled = function(...) end, --Sets whether follows symbolic links.
unmount = function(...) end, --Unmounts a zip file or folder previously mounted with mount.
write = function(...) end --Write data to a file.
},
font = {},
graphics = {},
image = {},
joystick = {},
keyboard = {},
math = {},
mouse = {},
physics = {},
sound = {},
system = {},
thread = {},
timer = {},
touch = {},
video = {},
window = {},
getVersion = {},
hasDeprecationOutput = {},
isVersionCompatible = {},
setDeprecationOutput = {},
displayrotated = {},
draw = {},
errhand = {},
errorhandler = {},
load = {},
lowmemory = {},
quit = {},
run = {},
threaderror = {},
update = {},
directorydropped = {},
filedropped = {},
focus = {},
mousefocus = {},
resize = {},
visible = {},
keypressed = function(...) end, --Callback function triggered when a key is pressed.
keyreleased = function(...) end, --Callback function triggered when a keyboard key is released.
textedited = function(...) end, --Called when the candidate text for an IME has changed.
textinput = function(...) end, --Called when text has been entered by the user.
mousemoved = function(...) end, --Callback function triggered when the mouse is moved.
mousepressed = function(...) end, --Callback function triggered when a mouse button is pressed.
mousereleased = function(...) end, --Callback function triggered when a mouse button is released.
wheelmoved = function(...) end, --Callback function triggered when the mouse wheel is moved.
gamepadaxis = function(...) end, --Called when a Joystick's virtual gamepad axis is moved.
gamepadpressed = function(...) end, --Called when a Joystick's virtual gamepad button is pressed.
gamepadreleased = function(...) end, --Called when a Joystick's virtual gamepad button is released.
joystickadded = function(...) end, --Called when a Joystick is connected.
joystickaxis = function(...) end, --Called when a joystick axis moves.
joystickhat = function(...) end, --Called when a joystick hat direction changes.
joystickpressed = function(...) end, --Called when a joystick button is pressed.
joystickreleased = function(...) end, --Called when a joystick button is released.
joystickremoved = function(...) end, --Called when a Joystick is disconnected.
touchmoved = function(...) end, --Callback function triggered when a touch press moves inside the touch screen.
touchpressed = function(...) end, --Callback function triggered when the touch screen is touched.
touchreleased = function(...) end --Callback function triggered when the touch screen stops being touched.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment