Skip to content
baenvPublic

About

Pixel-art effects drawn as code: a Claude Code plugin that designs VFX from words or a reference image and exports sprite sheets, Aseprite JSON and gifs.

Topics

Resources

Contributing

Stars

82 stars

Watchers

0 watching

Forks

Repository files navigation

beanfx

Pixel-art effects drawn as code. Describe an effect, and the /beanfx skill for Claude Code draws it in Rust and exports a sprite sheet with JSON that any engine plays.

Heavenly tribulation cast by the staff caster Ten-slash combo on the sword caster The sword caster cuts a space rift, runs into it and steps out of a second rift ahead

Live demo and gallery

Install

/plugin marketplace add baenv/beanfx
/plugin install beanfx@beanfx

Needs Rust (cargo, from https://rustup.rs). The first run builds the beanfx binary into .beanfx/bin/ in your project. Each draft is a small Rust crate that links the skill's kit (drawing, sheet export and checks, sound, preview page).

Use

/beanfx a fire burst, 64x64, side view, one-shot, strong glow
/beanfx path/to/reference.png make this a looping aura

The skill asks about anything the prompt leaves open, then writes the effect to drafts/<name>/:

  • src/main.rs: the effect as code; edit it and run cargo run --release again
  • out/sheets/<name>.png and .json: the sprite sheet and its JSON, the files a game loads
  • out/<name>.html: a preview page that opens with a double click

Two game characters ship with the plugin (a sword caster and a staff caster, side and top-down), so an effect can be drawn on a real sprite: pick "Game character" when the skill asks about a caster.

Examples

These three ran on Claude Sonnet 5.5. Each time is one run, from the prompt to the first finished sheet, without the wait for usage limits. Average first pass: about 8 min.

Five element sword array

Five element sword array

Five swords appear in the generating order, shadow swords join, and all strike the centre. Generation time: about 16 min, including four rounds of brief questions.

/beanfx five element sword array, an ultimate: five main swords summoned one by one in the generating order,
shadow swords, all converging into a finisher hit. effect area 256x240, 6 s.
view: top-down 3/4. style: painterly HD, no outline.
palette: pale jade xianxia (low saturation, white only at the hottest core), light #12262a #3f7a72 #bfe6d4 #ffffff.
glow: strong. clarity: hazy. 24 fps.
caster: nghich_tien_kiem_topdown with a body aura. no sound.

Moon cleaving blade

Moon cleaving blade

A green dragon crescent blade cuts a hanging moon in two. Generation time: about 3 min, or 8 min with two upgrade rounds.

/beanfx moon cleaving blade
view: top-down 3/4. style: painterly HD, no outline.
palette: pale jade xianxia (low saturation, white only at the hottest core), light #12262a #3f7a72 #bfe6d4 #ffffff.
glow: strong. clarity: hazy. 24 fps.
caster: nghich_tien_kiem_topdown with a body aura. no sound.

Rain calling

Rain calling

Wind brings the clouds, lightning strikes, jade rain falls. Generation time: about 6 min, or 10 min with two upgrade rounds.

/beanfx rain calling
view: top-down 3/4. style: painterly HD, no outline.
palette: pale jade xianxia (low saturation, white only at the hottest core).
glow: strong. clarity: hazy. 24 fps.
caster: nghich_tien_kiem_topdown with a body aura. no sound.

Play it in a game

import { loadFx, createFx } from "./beanfx.js";   // runtime/beanfx.js in the skill
const fx = createFx(await loadFx("fx/fire_burst.json"), { x: 160, y: 140 });
// each frame: fx.update(dt); fx.draw(ctx);

Phaser reads the JSON with load.aseprite. More: the JSON fields · engines and porting

More

Contributing · Changelog · MIT, see LICENSE

The light layer learns from pixelfx (MIT, Patch); beanfx reimplements it in Rust and ships no pixelfx code.

About

Pixel-art effects drawn as code: a Claude Code plugin that designs VFX from words or a reference image and exports sprite sheets, Aseprite JSON and gifs.

Topics

Resources

Contributing

Stars

82 stars

Watchers

0 watching

Forks

Used by

Contributors

Languages