mirror of
https://github.com/TangentFoxy/lovebird.git
synced 2025-07-28 11:02:19 +00:00
Updated README.md to reflected changes and additions
This commit is contained in:
29
README.md
29
README.md
@@ -1,5 +1,5 @@
|
|||||||
# lovebird
|
# lovebird
|
||||||
A debug console for [LÖVE](http://love2d.org) which runs in the browser.
|
A browser-based debug console for the [LÖVE](http://love2d.org) framework.
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
@@ -8,18 +8,18 @@ place the following line at the top of your `love.update()` function:
|
|||||||
```lua
|
```lua
|
||||||
require("lovebird").update()
|
require("lovebird").update()
|
||||||
```
|
```
|
||||||
The console can then be accessed by opening the following URL in your web
|
The console can then be accessed by opening the following URL in a web browser:
|
||||||
browser:
|
|
||||||
```
|
```
|
||||||
http://localhost:8000
|
http://localhost:8000
|
||||||
```
|
```
|
||||||
See the section below on *lovebird.whitelist* if you want to access lovebird
|
If you want to access lovebird from another computer on the same network then
|
||||||
from a computer other than the one which LÖVE is running on.
|
`localhost` should be replaced with the IP address of the computer which LÖVE
|
||||||
|
is running on.
|
||||||
|
|
||||||
|
|
||||||
## Additional Functionality
|
## Additional Functionality
|
||||||
To make use of additional functionality, the lovebird module can be assigned to
|
To make use of additional functionality, the module can be assigned to a
|
||||||
a variable when it is required:
|
variable when it is required:
|
||||||
```lua
|
```lua
|
||||||
lovebird = require "lovebird"
|
lovebird = require "lovebird"
|
||||||
```
|
```
|
||||||
@@ -32,7 +32,7 @@ The port which lovebird listens for connections on. By default this is `8000`
|
|||||||
A table of hosts which lovebird will accept connections from. Any connection
|
A table of hosts which lovebird will accept connections from. Any connection
|
||||||
made from a host which is not on the whitelist is logged and closed
|
made from a host which is not on the whitelist is logged and closed
|
||||||
immediately. If `lovebird.whitelist` is set to nil then all connections are
|
immediately. If `lovebird.whitelist` is set to nil then all connections are
|
||||||
accepted. The default is `{ "127.0.0.1", "localhost" }`.
|
accepted. The default is `{ "127.0.0.1", "192.168.*.*" }`.
|
||||||
|
|
||||||
### lovebird.wrapprint
|
### lovebird.wrapprint
|
||||||
Whether lovebird should wrap the `print()` function or not. If this is true
|
Whether lovebird should wrap the `print()` function or not. If this is true
|
||||||
@@ -43,20 +43,19 @@ then all the calls to print will also be output to lovebird's console. This is
|
|||||||
The maximum number of lines lovebird should store in its console's output
|
The maximum number of lines lovebird should store in its console's output
|
||||||
buffer. By default this is `200`.
|
buffer. By default this is `200`.
|
||||||
|
|
||||||
### lovebird.refreshrate
|
### lovebird.updateinterval
|
||||||
The rate in seconds which the output buffer is refreshed on lovebird's page.
|
The interval in seconds that the page's information is updated; this is `0.5`
|
||||||
This is `0.5` by default.
|
by default.
|
||||||
|
|
||||||
### lovebird.allowhtml
|
### lovebird.allowhtml
|
||||||
Whether prints should allow HTML. If this is true then any HTML which is
|
Whether prints should allow HTML. If this is true then any HTML which is
|
||||||
printed will be rendered as HTML; if it false then all HTML is rendered as
|
printed will be rendered as HTML; if it false then all HTML is rendered as
|
||||||
text. This is `true` by default.
|
text. This is `true` by default.
|
||||||
|
|
||||||
### lovebird.page
|
|
||||||
The HTML page template which is used when lovebird is accessed by the browser.
|
|
||||||
The default is too long to list here, see [lovebird.lua](lovebird.lua).
|
|
||||||
|
|
||||||
### lovebird.print(...)
|
### lovebird.print(...)
|
||||||
Prints its arguments to lovebird's console. If `lovebird.wrapprint` is set to
|
Prints its arguments to lovebird's console. If `lovebird.wrapprint` is set to
|
||||||
true this function is automatically called when print() is called.
|
true this function is automatically called when print() is called.
|
||||||
|
|
||||||
|
### lovebird.clear()
|
||||||
|
Clears the contents of the console, returning it to an empty state.
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user