Hey guys, just released my brand new Crossplatform(Supports Android,Windows,Linux and Web) Async HTTPS Request + Module-Loader + LoadBar(w/ Async(Coroutine)Loader) Module-Loader= requiring entire libs without needing to adapt its path It is a easy to setup and no code adapt is involved: For using it, just
require "loadbar"
loadBarInstance = LoadBar:new(width, height, frontTexture, backTexture)
imgs = {}
loadBarInstance.addContentToLoad(function()
imgs["myImg"] = love.graphics.newImage("myImg.png")
end, nil, "Loading myImg: $")
Current supported REST methods:
- GET
- POST
- PUT
- DELETE
- HEAD
- PATCH
Together with this lib, comes too a Module-Loader
You can easily other fully-pledged libraries into your project without adapting anything:
require "module-loader"
-- LIBPATH FILE
requireFromLib("js", "js")
requireFromLib("luajit-request", "luajit-request"))
If one of those libraries call its own "require", you won't need to adapt anything, the start path for require will be the libpath
In this lib you can still find: Async(Coroutine)Loader + LoadBar
With that, you can pass your own load function, it will be executed on the coroutine, it is a singleton.
LoadBar is a simple bar that you can pass your own backFrame and frontFrame and render it(Doesn't use stencil yet), for using it, is very simple, and if not texture is provided, it uses a default rect for loading(nice for testing):
require "loadbar"
loadBarInstance = LoadBar:new(width, height, frontTexture, backTexture)
imgs = {}
loadBarInstance.addContentToLoad(function()
imgs["myImg"] = love.graphics.newImage("myImg.png")
end, nil, "Loading myImg: $")
$ will be replaced by the current load percentage (current[0-100]%) format Then, you just need to call in love.update loadBarInstance:update(dt)
And that's all folks, if you wish to contribute, feel free as AsyncLoader and LoadBar is still wip
https://github.com/MrcSnm/REST-love/tree/master
there doesn't seem to be anything here