Skip to content
Back to search

pixelfx

MarketplaceWorks with Claude CodeGitHub

pixelfx by Patch: pixel art effects and animations as code.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

Its scripts were only partly scanned.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/bayshier/pixelfx-zh with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/bayshier/pixelfx-zh'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/bayshier--pixelfx-zh/badge.svg)](/listings/bayshier--pixelfx-zh)

HTML

<a href="/listings/bayshier--pixelfx-zh"><img src="/api/listings/bayshier--pixelfx-zh/badge.svg" alt="findsafeskills safety rating" /></a>

Install

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 17 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "pixelfx",
  3. "description": "pixelfx by Patch: pixel art effects and animations as code.",
  4. "owner": {
  5. "name": "Patch",
  6. "url": "https://patch.gg"
  7. },
  8. "plugins": [
  9. {
  10. "name": "pixelfx",
  11. "source": "./",
  12. "description": "A skill for pixel art effects and sprite animations: use, recolor and export the library's effects, or draft, render, look at and refine new ones until they look hand-animated.",
  13. "category": "gamedev",
  14. "tags": ["pixel-art", "vfx", "animation", "sprite-sheet", "gamedev"]
  15. }
  16. ]
  17. }
README.md · README · 205 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="docs/readme/montage.gif" width="800" alt="A grid of pixel art effects playing at once: a campfire, a burning skull, a waterfall, a plasma ball, a portal, a tornado and more.">
  3. </p>
  4. # pixelfx.
  5. <p align="center"><a href="README.zh.md">📘 简体中文版说明</a></p>
  6. **<!-- count -->244<!-- /count --> pixel art effects and animations, every one a small piece of code.** Fire,
  7. explosions, magic, weather, UI, pickups, critters and more. Play them live, recolor and mirror them, drop them into
  8. a browser game, or export sprite sheets for any engine. Plus a Claude Code skill that makes new ones the way a
  9. picky pixel artist would: draft, render, look, refine.
  10. Every effect that involves a character is **acted out**: he winds up, lets go, freezes on contact and recovers, and a
  11. target takes the hit. Twelve whole moves chain the effects into attacks from wind-up to recovery.
  12. **[open the gallery](https://patch-gg.github.io/pixelfx/)** · [catalog](docs/CATALOG.md) · [acting](#acting) ·
  13. [the skill](#the-skill) · [make your own](#make-your-own) · [how it works](#how-it-works)
  14. The method is [Hugo Duprez](https://x.com/HugoDuprez)'s, from [How to make (good) pixel art effects with
  15. Claude](https://www.spritefusion.com/blog/how-to-make-good-pixel-art-effects-with-claude): code is clay, trust your
  16. eyes, feed your references. His [open-source effects](https://www.spritefusion.com/pixel-art-vfx) at Sprite Fusion
  17. set the bar, and `src/core/sim.js` and the effects that say so at the top adapt his code. This repo is our take on
  18. the idea at library scale, with a skill to keep going.
  19. ## what's in it.
  20. <!-- catalog -->
  21. | category | effects | some of them |
  22. |---|---|---|
  23. | **moves** | 12 | arrow shot, dash strike, earth stomp, fireball throw, ground pound, holy smite… |
  24. | **fire** | 12 | brazier, campfire, candle, fire breath, fire ring, fire tornado… |
  25. | **explosions** | 12 | barrel explosion, big explosion, cartoon pow, dirt explosion, firework burst, firework rocket… |
  26. | **water** | 12 | bubbles, drip, fountain, geyser, rain splash, ripples… |
  27. | **ice** | 10 | blizzard vortex, freeze, frost breath, frost nova, ice crystal, ice lance… |
  28. | **lightning** | 11 | ball lightning, chain lightning, charge up, electrified, lightning strike, plasma ball… |
  29. | **sci-fi** | 12 | emp blast, energy core, force field, glitch, hologram, jetpack… |
  30. | **melee** | 12 | claw swipe, dagger flurry, double slash, hammer smash, heavy cleave, scythe reap… |
  31. | **impacts** | 11 | blunt hit, bullet impact, critical hit, ground slam, heavy landing, hit flash… |
  32. | **projectiles** | 13 | arrow, bullet tracer, cannon shot, energy disc, signal flare, homing missile… |
  33. | **spawn & death** | 10 | coin drop, disintegrate, dissolve burn, egg hatch, poof, respawn beam… |
  34. | **arcane** | 12 | arcane beam, arcane missiles, arcane orb, blink in, blink out, magic circle cast… |
  35. | **holy** | 10 | blessing, divine shield, feather burst, halo, heal, healing ring… |
  36. | **shadow** | 12 | black hole, curse, dark explosion, eclipse, grasping hands, hex sigil… |
  37. | **status** | 13 | bleeding, burning, charmed, confused, cursed, frozen… |
  38. | **nature** | 13 | acid splash, boulder, earth spike, healing bloom, leaf storm, poison cloud… |
  39. | **weather** | 12 | aurora, blizzard, cherry blossoms, clouds, falling leaves, fireflies… |
  40. | **ui** | 12 | achievement, coin collect, combo counter, confetti, countdown, crit number… |
  41. | **pickups** | 11 | chest open, coin spin, collect burst, crystal shard, gem spin, heart pickup… |
  42. | **transitions** | 10 | blinds, burn away, crt off, diamond wipe, glitch wipe, iris… |
  43. | **critters** | 12 | bat, bird, butterfly, eyeball, fish school, flying skull… |
  44. <!-- /catalog -->
  45. Every effect is a file in `src/fx/<category>/<name>.js`. The [catalog](docs/CATALOG.md) lists them all.
  46. ## use one.
  47. **In a browser game** (canvas, Phaser, PixiJS, Kaplay, three.js), use the code. No dependencies.
  48. ```js
  49. import { createFrame, clearFrame, createFx, composite } from "pixelfx";
  50. import * as frostNova from "pixelfx/fx/ice/frost-nova";
  51. const frame = createFrame(320, 180); // your game's pixel resolution
  52. const img = new ImageData(320, 180);
  53. const fx = createFx(frostNova, { x: 160, y: 140 }); // also: flip, angle, seed, palette, light...
  54. function tick(dt) {
  55. fx.update(dt);
  56. clearFrame(frame);
  57. fx.draw(frame, "back"); // behind characters
  58. drawCharacters();
  59. fx.draw(frame, "front");
  60. composite(frame, img.data, backgroundColor); // color, then light added on top
  61. ctx.putImageData(img, 0, 0); // scale up with image-rendering: pixelated
  62. }
  63. ```
  64. Install from GitHub with `npm i github:patch-gg/pixelfx`, or copy `src/core` and the effects you want.
  65. **In any engine** (Godot, Unity, GameMaker, Defold, LÖVE, Bevy), use sprite sheets:
  66. ```bash
  67. node tools/render.mjs ice/frost-nova --sheet
  68. ```
  69. That writes a transparent PNG of every frame in a grid and an Aseprite-style JSON (frame rects, durations, and
  70. `meta.pixelfx` with fps, loop, columns and the pivot). Phaser's atlas loader and the Aseprite importers for Godot
  71. and Unity read it. `node tools/sheets.mjs` exports the whole library to `sheets/`.
  72. Any effect takes a `palette` (a dark-to-bright ramp of hex colors), so a fire can burn blue and a heal can glow
  73. pink without touching its code:
  74. ```bash
  75. node tools/render.mjs fire/torch --gif --opts '{"palette": ["#102","#215","#43a","#8cf","#cff","#fff"]}'
  76. ```
  77. ## acting.
  78. <p align="center">
  79. <img src="docs/readme/acts.gif" width="800" alt="A grey dummy fighting a straw target: a three-stroke sword combo, a hammer smash, a ground pound, a holy smite, a frost nova and a run with after-images, each with a wind-up, a freeze on contact and a recovery.">
  80. </p>
  81. An effect on its own looks like a sticker. What sells a hit is the body around it: the wind-up that says something is
  82. coming, the freeze on contact, the target rocking back, the recovery. So the 61 effects with a character, and the 12
  83. moves, say what the body does and when:
  84. ```js
  85. export const act = {
  86. target: { x: 58 },
  87. poses: [
  88. [-0.55, GUARD], // he starts before the effect does (t = 0 is the effect's first frame)
  89. [-0.3, WIND_UP],
  90. [0, CUT, "snap"], // "snap" holds the last pose and jumps on the key
  91. [0.06, FOLLOW_THROUGH, "snap"],
  92. [0.86, GUARD],
  93. ],
  94. hits: [{ t: 0.06, stop: 0.14, shake: 0.18, amp: 2, push: 2.8, straw: 18 }], // freeze for 0.14 s on contact
  95. };
  96. ```
  97. **Play the whole thing**, character and target included, by swapping `createFx` for `createAct`:
  98. ```js
  99. import { createFrame, clearFrame, createAct, composite } from "pixelfx";
  100. import * as slash from "pixelfx/fx/melee/sword-slash";
  101. const act = createAct(slash, { x: 80, y: 140 });
  102. function tick(dt) {
  103. act.update(dt); // holds still by itself during a freeze
  104. clearFrame(frame);
  105. act.draw(frame); // { body: false } and { target: false } leave them out
  106. composite(frame, img.data, backgroundColor);
  107. const [sx, sy] = act.shake; // throw the picture this far
  108. ctx.putImageData(img, sx, sy);
  109. }
  110. ```
  111. **Got your own character?** Effect ids haven't changed and a sprite sheet is still the effect alone, so existing games
  112. keep working. (Effects drawn on the body paint the stock dummy, so regenerate those if you ship them.) The timing is plain data: read `slash.act`, or `meta.pixelfx.act` in a sprite sheet's
  113. JSON (`windup`, `recovery`, `hits` with `t` and `freeze`, `poses`). Start your own wind-up animation that long before the effect, and
  114. stop updating everything for `freeze` seconds at each hit.
  115. Effects drawn on the body (frost, poison, a scan line) are written against the standing character and follow him
  116. wherever he goes: each pixel of a pose knows which pixel of the standing body it came from. `node tools/act.mjs
  117. <id> --sheet` bakes a whole act, character included, into a sprite sheet.
  118. The body is yours to use too: `skeleton(pose)` gives you every joint of a pose in 3D, to hang your own things on, and
  119. `posedParts(pose)` gives you each part drawn on its own.
  120. ## the skill.
  121. The `pixelfx` skill teaches Claude Code to find, use, export and make effects. Install it as a plugin:
  122. ```
  123. /plugin marketplace add patch-gg/pixelfx
  124. /plugin install pixelfx@pixelfx
  125. ```
  126. or copy `skills/pixelfx` into `~/.claude/skills/`. Then ask for what you want:
  127. - "Add a frost nova to my mage's ultimate."
  128. - "Make five takes on a coin pickup sparkle and show me the best two."
  129. - "Export the fire and explosions categories as sprite sheets for Godot."
  130. - "This hit effect feels floaty. Make it punchier."
  131. - "Give this spell a wind-up and make the enemy react to it."
  132. ## make your own.
  133. ```bash
  134. node tools/new.mjs arcane/my-spell # a working starting point (add --loop for a loop)
  135. node tools/render.mjs arcane/my-spell # records/arcane/my-spell/contact.png: look at it
  136. node tools/check.mjs arcane/my-spell # spills, seams, unseeded randomness, slow frames
  137. ```
  138. Then go round: look at the contact sheet, fix the worst thing, render again. `--gif` and `--mp4` show the motion,
  139. `--all` shows every frame. `node tools/act.mjs arcane/my-spell` shows an act as consecutive 12 fps steps, because motion
  140. bugs don't show in samples. [docs/AUTHORING.md](docs/AUTHORING.md) has the contract, the drawing API and the quality
  141. bar. `node tools/serve.mjs` runs the gallery locally with your effects in it.
  142. ## how it works.
  143. - **Two kinds of effect, no images.** Pure effects export `draw(p, t, o)`, the frame at `t` seconds from `t` alone, so
  144. loops tile with no seam. Simulated effects export `create(o)` and step real particles, debris and lights at 120 Hz,
  145. so sparks bounce and smoke rolls the same at any frame rate.
  146. - **Two buffers.** `color` takes pixels: opaque, dithered or truly translucent. `light` takes additive glow, added on
  147. top. Hot things look hot because of the light buffer.
  148. - **Seeded everything.** Every random number comes from the effect's seed, so frame 40 is the same every time.
  149. - **Local space.** Effects draw around their own origin; the painter places, mirrors and rotates them. Directional
  150. effects face right. A 24×38 stock character stands in for status effects, auras and hits.
  151. - **A real skeleton, drawn down to pixels.** The grey dummy is neutral on purpose, so the eye goes to the move and any effect's
  152. colors read on it. He's a 3D skeleton with fixed-length bones, pelvis to spine to shoulders, rendered in a few flat tones with one clean
  153. ink line, the way Dead Cells makes its sprites. So he can twist, bend and really turn round, and depth decides what's in front. Poses hold on 12 fps
  154. steps, the way hand-drawn sprites do, while particles run at full rate.
  155. - **Same frame shape as Sprite Fusion's VFX** (`{ w, h, ox, oy, color, light }`), so both libraries can draw into
  156. one frame.
  157. ## license.
  158. MIT, code and effects. Use them in anything, commercial included. Parts are adapted from Hugo Duprez's MIT effects
  159. and from Hollow Crown's MIT source, and the Patch Pixel font in `gallery/fonts` is Patch's own and not covered: see
  160. [NOTICE.md](NOTICE.md).
  161. Made by [Patch](https://patch.gg).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.