gd-icon-renderer
A rust Geometry Dash icon renderer. Shout out to gd-icon-renderer, this project is just a rewrite but not in libvips
and crystal-lang
for mostly personal use.
Usage
Provide your GJ_GameSheet02-uhd
, GJ_GameSheetGlow-uhd
, Robot_AnimDesc2
, and Spider_AnimDesc2
files along with their corresponding *.plist
files. Rendering an icon is as follows:
-
Import the library:
use gd_icon_renderer;
-
Load your spritesheets:
// Replace filepaths for whatever you need for your usecase let game_sheet_02 = load_spritesheet; let game_sheet_glow = load_spritesheet; let robot_sheet = load_animations; let spider_sheet = load_animations;
-
Render the icon out:
let icon_img = render_icon.expect;
You'll now be given a
DynamicImage
-
You'll most likely want to save the resulting image somewhere:
icon_img.save.unwrap;
Todo
- Improve gamemode selection
- Add examples to the repo.
- I think theres some weird shifting and offsets going on, please investigate 🥺. Really big on
spider_16
for some reason?? Related issue on the inspired project here.