[module] ScaleInator

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
Zatherz
Prole
Posts: 6
Joined: Sun Feb 21, 2016 2:07 am

[module] ScaleInator

Post by Zatherz »

I've made a small module for people who like perfect pixels.
This module is made for games with pixel art and low resolution graphics, where improper scaling could lead to imperfect (non-square) pixels and uglyness. It does not depend on any framework or other module and it's written in pure Lua.

With this module, in a few lines of code you can get a proper scale retaining the aspect ratio. The screen is scaled as high as it can while still keeping the aspect ratio intact and then allows you to get the size of the box, the transformation needed to be done to center the box and a factor you can scale your objects with.

Here is a link to the repository. The code is licensed under the Apache 2 license and you can use it for whatever you want :D. I also made full documentation for it that you can access here. The documentation also includes four examples, two of which use Love2D.
User avatar
milk
Prole
Posts: 39
Joined: Sun Jul 17, 2016 7:20 pm

Re: [module] ScaleInator

Post by milk »

I could kiss you for this.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: [module] ScaleInator

Post by 4aiman »

Description is very promising! :awesome:
Any screenies for us? :neko:
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests