A Node.js module for rendering Minecraft character skins and capes using Sharp image processing.
npm install @cookie-cms/renderer- Render character faces, full body 2D views
- Render cape front views
- Support for HD skins (64x64) and standard skins (64x32)
- Pixel-perfect scaling with nearest-neighbor interpolation
- Transparent background support
- Configurable output sizes
import renderer from '@cookie-cms/renderer';
// Render character head
const headBuffer = await renderer.renderHead('path/to/skin.png', 300);
// Render full body 2D view
const bodyBuffer = await renderer.renderBody2D('path/to/skin.png', 300);
// Render cape front view
const capeBuffer = await renderer.renderCapeFront('path/to/cape.png', 300);Renders the character's head/face from a skin file.
skinPath: Path to the skin PNG filesize: Output size in pixels (default: 300)- Returns: Promise - PNG image buffer
Renders a 2D view of the character's full body.
skinPath: Path to the skin PNG filesize: Output height in pixels (default: 300)- Returns: Promise - PNG image buffer
Renders the front view of a cape.
capePath: Path to the cape PNG filesize: Output height in pixels (default: 300)- Returns: Promise - PNG image buffer
- sharp ^0.33.5 - High performance Node.js image processing
MIT © Cookie-cms