Log inGet started
Package

fx.module

README.md

fx

Paints the twoDKit's effect and pickup sprite sheets and saves them to art/fx/ as nearest-filtered textures with sprite-shader materials. Run it again whenever the art code changes.

local FX = require("twoDKit.artgen.fx")
FX.generate()                 -- saves art/fx/fx and art/fx/checkpoint (+ materials)
local fxSheet, cp = FX.paint() -- canvases only, for previews
local gem = FX.fxRows.gem      -- { row = 5, frames = 6 }

All pixels are fully opaque or fully clear, as the alpha-cut sprite shader needs. Fades happen by puffs splitting, shrinking and dimming, never by partial alpha.

fx: 128x128, 16x16 frames, 8 columns

Identity: twoDKit.art.fx.fx. Rows are numbered from the top, starting at 0.

RowName (fxRows)FramesWhat
0dust6Small grey-white puff that grows, splits and fades (run and jump dust).
1land6Landing burst: two puffs spreading left and right along the ground, anchored on the bottom row.
2sparkle4Collect twinkle: a star that flares, then scatters glints.
3dash4Dash ring with trailing wind streaks, pointing right; flip it for a left dash.
4wallKick4Wall-jump kick dust; the wall is on the right edge, so flip it for a wall on the left.
5gem6Collectible gem spinning: a faceted cyan and magenta crystal about 10x12, bottom at y=13.
6goal6Goal trophy: a gold star in a pulsing glow ring with an orbiting glint.
7heart4Heart pickup bobbing above a small ground shadow.

checkpoint: 128x64, 16x32 frames, 8 columns x 2 rows

Identity: twoDKit.art.fx.checkpoint. The pole's stone base sits on the frame's bottom row, centred on x=8.

RowName (checkpointRows)FramesWhat
0idle4Not yet reached: a dim knob and a grey flag hanging low, fluttering slightly.
1reached8Reached: a red and gold flag raised to the top and waving, with a glowing cyan gem and pulsing sparkles.