LICK/README.md

32 lines
987 B
Markdown
Raw Normal View History

2021-11-27 19:55:40 +00:00
# livecoding library for LÖVE
2020-01-29 02:51:37 +00:00
This is a small live coding library for [LÖVE](https://love2d.org).
2020-01-29 02:47:45 +00:00
2020-01-29 02:50:06 +00:00
It contains a customized [love.run](https://love2d.org/wiki/love.run) which watches for file changes in your source and loads if necessary. Errors get redirected to the command line or on screen.
2020-01-29 02:47:45 +00:00
Needs LÖVE 11.3.
2017-04-18 09:42:47 +00:00
# Optional Parameters
* lick.file = "<INSERT CUSTOM FILE HERE>" -- default is "main.lua"
* lick.debug = true -- displays errors in love window
2021-11-27 20:11:04 +00:00
* lick.reset = true -- calls love.load everytime you save the file, if set to false it will only be called when starting LÖVE
* lick.clearFlag = false -- overrides the clear() function in love.run
2020-01-29 02:50:38 +00:00
# Example main.lua
2012-06-10 11:38:04 +00:00
```Lua
lick = require "lick"
2021-11-27 20:09:50 +00:00
lick.reset = true -- reload love.load everytime you save
2012-06-10 11:38:04 +00:00
function love.load()
circle = {}
circle.x = 1
end
function love.update(dt)
circle.x = circle.x + dt*5
end
function love.draw(dt)
love.graphics.circle("fill", 400+100*math.sin(circle.x), 300, 16,16)
2020-01-29 02:25:12 +00:00
end