voidless-mcp 1.6.15 → 1.6.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +1 -1
- package/tools.js +46 -0
package/README.md
CHANGED
|
@@ -113,6 +113,7 @@ Or just the hosted connector, no key: `claude mcp add --transport http voidless
|
|
|
113
113
|
| `generate_sfx` / `generate_music` | Sound effect, or a music track with length, tempo and key |
|
|
114
114
|
| `generate_video` / `extend_video` | Short clip from a prompt and reference images, or continue one |
|
|
115
115
|
| `generate_3d_model` / `rig_3d_model` / `animate_3d_model` | 3D model, rig it, animate it |
|
|
116
|
+
| `render_3d_sprites` | A 3D model's move (or the model standing) as 2D sprites: 8, 4, platformer, isometric or front views, 16 frames, 32-512 px; free |
|
|
116
117
|
|
|
117
118
|
Generation tools create new content in your library; none deletes or overwrites existing assets. Each tool's description lists its credit cost.
|
|
118
119
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "voidless-mcp",
|
|
3
3
|
"mcpName": "dev.voidless/voidless",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.16",
|
|
5
5
|
"description": "MCP server for Voidless: generate game sprites, animations, sound, music, video and 3D models",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "Voidless Dev Inc. <contact@voidless.dev>",
|
package/tools.js
CHANGED
|
@@ -49,6 +49,7 @@ const GALLERY_TOOLS = [
|
|
|
49
49
|
"generate_image", "upload_image", "edit_image", "make_normal_map", "make_glow_map", "rotate_sprite", "animate_sprite", "generate_animation_set",
|
|
50
50
|
"flip_left_side", "generate_video", "generate_sfx", "generate_music", "generate_3d_model", "get_asset",
|
|
51
51
|
"list_assets", "extract_parts", "pixelate_image", "extend_video", "clean_up_sprite", "check_generation",
|
|
52
|
+
"render_3d_sprites",
|
|
52
53
|
];
|
|
53
54
|
const GALLERY_HTML = readFileSync(new URL("./gallery.html", import.meta.url), "utf8");
|
|
54
55
|
|
|
@@ -61,6 +62,7 @@ const LONG_PATHS = new Set([
|
|
|
61
62
|
"/generate/image", "/generate/image-edit", "/generate/bbox-edit", "/generate/image-rotations", "/generate/image-parts",
|
|
62
63
|
"/generate/image-animation", "/generate/multi-animation", "/generate/video", "/generate/video-extend",
|
|
63
64
|
"/generate/sfx", "/generate/music", "/generate/3d-model", "/generate/model-rig", "/generate/model-animation",
|
|
65
|
+
"/generate/model-sprites",
|
|
64
66
|
]);
|
|
65
67
|
const WAIT_MS = Number(process.env.VOIDLESS_WAIT_MS) || 80_000;
|
|
66
68
|
const CUT_OFF = /\((502|504|520|522|524)\)|fetch failed|ECONNRESET|socket|terminated|other side closed/i;
|
|
@@ -1237,6 +1239,50 @@ export function createVoidlessServer(API_KEY) {
|
|
|
1237
1239
|
})
|
|
1238
1240
|
);
|
|
1239
1241
|
|
|
1242
|
+
server.tool(
|
|
1243
|
+
"render_3d_sprites",
|
|
1244
|
+
"Render a 3D model as 2D game sprites: one of its moves (from animate_3d_model) or the model standing, " +
|
|
1245
|
+
"seen from 8 directions, 4, the two sides of a platformer, 4 isometric diagonals, or the front. 16 frames " +
|
|
1246
|
+
"by default, at 32-512 px (pixel art up to 128, from the same pass as generated sprites; smooth above). Saved as an " +
|
|
1247
|
+
"animated sprite asset linked to the model, one animation per direction, ready to export as a sheet or " +
|
|
1248
|
+
"edit. Every render of the same model goes onto that one asset. Free.",
|
|
1249
|
+
{
|
|
1250
|
+
id: z.number().int().describe("3D model asset ID"),
|
|
1251
|
+
animation: z
|
|
1252
|
+
.string()
|
|
1253
|
+
.optional()
|
|
1254
|
+
.describe("The move to render: its name ('walk'), preset or animation id. Empty = the model standing"),
|
|
1255
|
+
directions: z
|
|
1256
|
+
.enum(["eight", "four", "platformer", "isometric", "front"])
|
|
1257
|
+
.default("eight")
|
|
1258
|
+
.describe("Which views: 8 around, 4 (down/right/up/left), platformer (right, left, side-on), isometric diagonals, or the front"),
|
|
1259
|
+
size: z
|
|
1260
|
+
.union([z.literal(32), z.literal(64), z.literal(128), z.literal(256), z.literal(512)])
|
|
1261
|
+
.default(128)
|
|
1262
|
+
.describe("Sprite size in pixels: 32-128 come out as pixel art, 256 and 512 as smooth renders"),
|
|
1263
|
+
frames: z.number().int().min(2).max(32).default(16).describe("Frames per direction (default 16)"),
|
|
1264
|
+
},
|
|
1265
|
+
writeTool("Render 3D sprites"),
|
|
1266
|
+
tool(async (args) => {
|
|
1267
|
+
const data = await apiPost("/generate/model-sprites", args);
|
|
1268
|
+
const asset = await apiGet(`/assets/${data.assetId}`).catch(() => null);
|
|
1269
|
+
const name = String(data.animation?.name || "still").toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "").slice(0, 40);
|
|
1270
|
+
const made = ((asset?.meta_data?.frames) || [])
|
|
1271
|
+
.filter((f) => f && f.type === "animation" && String(f.name || "").startsWith(`${name}-`))
|
|
1272
|
+
.slice(-(data.directions || []).length || undefined);
|
|
1273
|
+
const head = [
|
|
1274
|
+
`${data.animation ? `"${data.animation.name}"` : "The model standing"} rendered from 3D: ` +
|
|
1275
|
+
`${(data.directions || []).length} direction${(data.directions || []).length === 1 ? "" : "s"} ` +
|
|
1276
|
+
`(${(data.directions || []).join(", ")}), ${data.frameCount} frame${data.frameCount === 1 ? "" : "s"} each at ${data.size} px, ${data.fps} fps.`,
|
|
1277
|
+
`${data.added ? "Added to" : "Saved as"} sprite asset ${data.assetId} (${APP_URL}/asset/${data.assetId}), linked to model ${args.id}.`,
|
|
1278
|
+
money(data),
|
|
1279
|
+
].filter(Boolean).join("\n");
|
|
1280
|
+
const content = [{ type: "text", text: head }];
|
|
1281
|
+
if (made.length) content.push(...(await frameContent(made)));
|
|
1282
|
+
return withGallery({ content }, made.flatMap((f) => frameItems(f, data.assetId)), "3D sprites");
|
|
1283
|
+
})
|
|
1284
|
+
);
|
|
1285
|
+
|
|
1240
1286
|
// The inline gallery, and the tools whose results it shows.
|
|
1241
1287
|
server.registerResource(
|
|
1242
1288
|
"gallery",
|