@doufunao123/asset-gateway 0.12.2 → 0.13.0

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -914,19 +914,19 @@ function createGenerateCommand() {
914
914
  })
915
915
  );
916
916
  command.addCommand(
917
- new Command3("sprite").description("Animate a sprite image using PixelEngine AI").requiredOption("--prompt <text>", "Animation prompt describing the desired motion").requiredOption("--input <path>", "Input sprite image (local path or URL)").option("--model <model>", "Model: pixel-engine-v1.1 or frame-engine-v1.1", "pixel-engine-v1.1").option("--output-frames <n>", "Number of animation frames (even integer)", "8").option("--output-format <fmt>", "Output format: spritesheet, webp, gif", "spritesheet").option("--colors <n>", "Pixel palette color count (2-256, pixel model only)").option("--negative-prompt <text>", "What to avoid in the generation").option("--seed <n>", "Seed for reproducibility").option("--matte-color <hex>", "Matte color for alpha flattening (6-char hex)").option("--enhance-prompt", "Enhance the prompt before generation").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
917
+ new Command3("sprite").description("Generate sprite animation using SpriteForge AI").requiredOption("--prompt <text>", "Character description").option("--input <path>", "Reference image (local path or URL)").option("--animation-type <type>", "Animation type (idle, walk, run, attack, death, jump, cast, dance, or any custom)", "idle").option("--direction <dir>", "Facing direction: right, left, front, back", "right").option("--grid-size <size>", "Grid size: 2x2, 3x3, 4x4", "3x3").option("--style <style>", "Visual style (e.g. pixel art, hand-drawn, chibi)").option("--output-format <fmt>", "Output format: spritesheet or gif", "spritesheet").option("--fps <n>", "GIF frame rate", "8").option("--output-dir <dir>", "Directory to save output", ".").action(async function(options) {
918
918
  try {
919
919
  const ctx = createContext(this);
920
920
  const params = {
921
- output_frames: Number(options.outputFrames),
922
- output_format: options.outputFormat
921
+ animation_type: options.animationType,
922
+ direction: options.direction,
923
+ grid_size: options.gridSize,
924
+ output_format: options.outputFormat,
925
+ fps: Number(options.fps)
923
926
  };
924
- if (options.colors) params.pixel_config = { colors: Number(options.colors) };
925
- if (options.negativePrompt) params.negative_prompt = options.negativePrompt;
926
- if (options.seed) params.seed = Number(options.seed);
927
- if (options.matteColor) params.matte_color = options.matteColor;
927
+ if (options.style) params.style = options.style;
928
928
  let inputFile = options.input;
929
- if (existsSync3(inputFile)) {
929
+ if (inputFile && existsSync3(inputFile)) {
930
930
  const ext = extname(inputFile).toLowerCase();
931
931
  const mime = ext === ".jpg" || ext === ".jpeg" ? "image/jpeg" : "image/png";
932
932
  const b64 = readFileSync2(inputFile).toString("base64");
@@ -935,10 +935,9 @@ function createGenerateCommand() {
935
935
  const body = {
936
936
  asset_type: "sprite",
937
937
  prompt: options.prompt,
938
- model: options.model,
939
- input_file: inputFile,
940
938
  params
941
939
  };
940
+ if (inputFile) body.input_file = inputFile;
942
941
  const data = await ctx.client.post("/api/generate", body);
943
942
  const localPath = await saveOutput(data, "sprite", options.outputDir);
944
943
  if (localPath) data.local_path = localPath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doufunao123/asset-gateway",
3
- "version": "0.12.2",
3
+ "version": "0.13.0",
4
4
  "description": "Universal asset generation gateway CLI",
5
5
  "type": "module",
6
6
  "bin": {