love-qrcode is a QR Code rendering library for LÖVE, utilizing Luaqrcode under the hood. This library allows you to generate and render QR codes in your LÖVE projects.
- Generate QR codes from text
- Render QR codes on the screen
- Easy to integrate and use in LÖVE projects
- Clone the repository or download the zip file:
git clone https://github.com/Nawias/love-qrcode.git
- Place the
love-qrcode
folder in your LÖVE project directory.
-- require the library in your `main.lua`:
local QRCode = require("love-qrcode")
-- Create a QR code instance:
local qr = QRCode("Hello, World!")
-- Draw the QR code in the `love.draw` callback:
function love.draw()
qr:draw(100, 100)
end
QRCode(text)
text
(string): The text to be encoded into the QR code.
Draws the QR code on the screen. The parameters passed are the standard love.graphics.draw
parameters.
Returns the current text value.
- Returns: (string) The text encoded in the QR code.
Changes the text value and updates the QR code.
text
(string): The new text to be encoded.
Gets the size of the QR code in pixels.
- Returns: (number) The size of the QR code.
This library is based on Luaqrcode. Many thanks to the original authors for their work.
love-qrcode - QR Code rendering library for LÖVE
Copyright 2024 Michał Wójcik
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENTs SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.