0 purchases
spritexp
SpritExp #
Kinda like a regular expression language, but for Sprites
Installation 💻 #
❗ In order to start using SpritExp you must have the Flutter SDK installed on your machine.
Add spritexp to your pubspec.yaml:
dependencies:
spritexp:
copied to clipboard
Install it:
flutter packages get
copied to clipboard
Using it #
SpritExp basic syntax structure is the following:
{SPRITE COORDINATES AND SIZE}[ * MULTIPLIERS]
copied to clipboard
Breaking it down, coordinates and size of the sprite are informed by numbers separated by commas, and
a couple of formats are accepted:
// {Size} - position defaults to 0,0
{16}
// {X and Y, Width and Height}
{16, 32}
// {X, Y, Width, Height}
{0, 16, 32, 32}
copied to clipboard
Multipliers are meant to create a sequential list of sprites, based in a a sprite definition explained above.
So, to generate a horizontal list of 2 sprites, the following example can be used:
{0, 16} * 2x
copied to clipboard
The above will generate two sprites, the first starting at X0 Y0, with a square dimension of 16, and
the second at X16 Y0, also with the same dimension.
On the other hand, the following:
{0, 16} * 2y
copied to clipboard
Will generate two sprites, the first starting at X0 Y0, with a square dimension of 16, and
the second at X0 Y16, also with the same dimension.
You can also get a grid of sprites by adding both x and y to the expression:
{0, 16} * 2xy
copied to clipboard
By default, SpritExp assumes that multipliers are horizontal, so the x can be omitted, meaning
that {0, 16} * 2 and {0, 16} * 2x are the same expression.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.