General discussion about LÖVE, Lua, game development, puns, and unicorns.
Santos
Party member
Posts: 383
Joined: Sat Oct 22, 2011 7:37 am

Thank you all, I'm really happy it's useful!

It has been updated!

Öbey
Prole
Posts: 13
Joined: Wed Aug 08, 2012 7:18 am

Code: Select all

<html>
<meta http-equiv="Refresh" content="0; url=jar:docs.zip!/wiki/index.html" />
<body>
<a href="jar:docs.zip!/wiki/index.html">Löve Wiki</a>
</body>
</html>
Save this as docs.html
Put it in the same folder with docs.zip
Open docs.html with Firefox.
You should be able to view docs.zip without extracting its contents.

BlackBulletIV
Inner party member
Posts: 1261
Joined: Wed Dec 29, 2010 8:19 pm
Location: Queensland, Australia
Contact:

I've used Santos's excellent API script to generate a regular expression for a Love2D language definition. Since I thought you guys may find it useful, I've attached the files below.

There were a couple mistakes with API script which I've corrected:
• love.graphics.newStencil's name wasn't set to "newStencil" but the full "love.graphics.newStencil".
• love.physics.setMeter wasn't present, so I added it manually.
Attachments
api_pattern.zip

paulclinger
Party member
Posts: 225
Joined: Thu Jun 28, 2012 8:46 pm

Santos, thank you for the update. I notice couple of things that seem to be incorrect in the most recent file:

Code: Select all

					name = 'pause',
description = 'Pauses all audio',
functions = {
{}, --<-- this one
{

This section should not have the first "{}," group. This applies to pause, resume, rewind, stop (note that there are two groups, the first one is correct), setColor, and setScissor.

Also, there were several names that have spaces in them, like 'inverse clamped', 'linear clamped', and 'exponent clamped'. Not sure if it was intentional.

Santos
Party member
Posts: 383
Joined: Sat Oct 22, 2011 7:37 am

The functions that you mention actually have a variant when called with no arguments, for example calling love.audio.pause() will pause all audio, and calling love.graphics.setScissor() will disable the scissor.

Thanks for pointing it out, it made me realise that there was an inconsistency with some other functions which have variants like this, so now the information about what calling these functions without arguments does has been moved into the description of the function.

And the distance model names actually do have spaces in them, I think.

And it's been updated again just now.

Thanks for letting me know what seems out of place, and if you find anything else, please let me know!

And thanks BlackBulletIV for noticing those errors!

IndieKid
Citizen
Posts: 80
Joined: Sat Dec 22, 2012 7:05 pm
Contact:

Do anyone know if there is(or is there a way to create) offline LÖVE wiki for iOS?

Santos
Party member
Posts: 383
Joined: Sat Oct 22, 2011 7:37 am

Here's another one page HTML reference. It's... experimental. For 0.8.0.

Hover over the function names, arguments, and return values for information.
Attachments
love_reference.zip
generate_love_reference.lua
Last edited by Santos on Sun Dec 15, 2013 10:02 am, edited 1 time in total.

Mikaboshi
Prole
Posts: 12
Joined: Mon Jul 22, 2013 8:55 pm

Santos wrote:Here is the LÖVE API as a Lua table.

It may not be complete or totally accurate!

generate_love_snippets.lua is a Lua script which generates snipMate (for Vim) snippets from the LÖVE API table.
Hi Santos, do you mind divulging how you generated love_api.lua? Or was that hand-made? I'm using 0.9.0 nightly, and since ZBStudio uses your love_api.lua for autocompletion and calltips, it would be nice to update it.

Santos
Party member
Posts: 383
Joined: Sat Oct 22, 2011 7:37 am

It was actually hand-made, haha. A whole lot of copy and pasting.

I plan on updating it once 0.9.0 is released, but I might wait until then since the API is changing a bit, and so I can get the information from the wiki, hehe.

Mikaboshi
Prole
Posts: 12
Joined: Mon Jul 22, 2013 8:55 pm