@meshy-ai/cli 0.4.2 → 0.4.3
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/dist/cmd/image-to-3d.d.ts +4 -4
- package/dist/cmd/image-to-3d.d.ts.map +1 -1
- package/dist/cmd/image-to-3d.js +19 -14
- package/dist/cmd/image-to-3d.js.map +1 -1
- package/dist/cmd/multi-image-to-3d.d.ts +2 -2
- package/dist/cmd/multi-image-to-3d.js +2 -2
- package/dist/cmd/text-to-3d.d.ts +3 -3
- package/dist/cmd/text-to-3d.d.ts.map +1 -1
- package/dist/cmd/text-to-3d.js +14 -13
- package/dist/cmd/text-to-3d.js.map +1 -1
- package/dist/internal/smart-topology.d.ts +17 -0
- package/dist/internal/smart-topology.d.ts.map +1 -0
- package/dist/internal/smart-topology.js +39 -0
- package/dist/internal/smart-topology.js.map +1 -0
- package/package.json +1 -1
- package/skills/meshy-cli/SKILL.md +3 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* image-to-3d — https://docs.meshy.ai/en/api/image-to-3d
|
|
3
3
|
*
|
|
4
|
-
* The mode
|
|
4
|
+
* The mode picks the model:
|
|
5
5
|
* - standard → meshy-7.1 (server default "latest") — full-detail
|
|
6
6
|
* generation; polycount is remesh's job afterwards.
|
|
7
|
-
* - smart-topology → meshy-t2 (server default)
|
|
8
|
-
*
|
|
9
|
-
* geometry.
|
|
7
|
+
* - smart-topology → meshy-t2 (server default), or meshy-t2.5 with
|
|
8
|
+
* --ai-model — component-aware low-poly with a native
|
|
9
|
+
* --target-polycount; the budget pick for game-ready geometry.
|
|
10
10
|
*
|
|
11
11
|
* The Ultra geometry pass (--geometry-resolution 2k|4k, or the deprecated
|
|
12
12
|
* --ultra-mode) rides on standard only: it needs meshy-7.1, so pairing it with
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;
|
|
1
|
+
{"version":3,"file":"image-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAkLH,eAAO,MAAM,gBAAgB,6BAA6B,CAAC"}
|
package/dist/cmd/image-to-3d.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* image-to-3d — https://docs.meshy.ai/en/api/image-to-3d
|
|
3
3
|
*
|
|
4
|
-
* The mode
|
|
4
|
+
* The mode picks the model:
|
|
5
5
|
* - standard → meshy-7.1 (server default "latest") — full-detail
|
|
6
6
|
* generation; polycount is remesh's job afterwards.
|
|
7
|
-
* - smart-topology → meshy-t2 (server default)
|
|
8
|
-
*
|
|
9
|
-
* geometry.
|
|
7
|
+
* - smart-topology → meshy-t2 (server default), or meshy-t2.5 with
|
|
8
|
+
* --ai-model — component-aware low-poly with a native
|
|
9
|
+
* --target-polycount; the budget pick for game-ready geometry.
|
|
10
10
|
*
|
|
11
11
|
* The Ultra geometry pass (--geometry-resolution 2k|4k, or the deprecated
|
|
12
12
|
* --ultra-mode) rides on standard only: it needs meshy-7.1, so pairing it with
|
|
@@ -16,6 +16,7 @@ import { Option } from "commander";
|
|
|
16
16
|
import { parseBool, parseCsv, parseInt10 } from "../internal/flags.js";
|
|
17
17
|
import { UsageError } from "../internal/errors.js";
|
|
18
18
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
19
|
+
import { checkSmartTopology, defaultPolycount, SMART_TOPOLOGY_MODELS } from "../internal/smart-topology.js";
|
|
19
20
|
const spec = {
|
|
20
21
|
name: "image-to-3d",
|
|
21
22
|
description: "Generate a 3D model from a single reference image (clean backgrounds and clear edges " +
|
|
@@ -29,8 +30,9 @@ const spec = {
|
|
|
29
30
|
return cmd
|
|
30
31
|
.option("--image-url <src>", "reference image; http(s) URL or local file path")
|
|
31
32
|
.option("--input-task-id <id>", "alternative to --image-url: a SUCCEEDED text-to-image or image-to-image task whose output becomes the source image")
|
|
32
|
-
.addOption(new Option("--model-type <kind>", "standard (default; meshy-7.1 full-detail generation) | smart-topology (
|
|
33
|
-
.
|
|
33
|
+
.addOption(new Option("--model-type <kind>", "standard (default; meshy-7.1 full-detail generation) | smart-topology (component-aware low-poly: clean topology, separated parts; meshy-t2, or --ai-model meshy-t2.5)").choices(["standard", "smart-topology"]))
|
|
34
|
+
.addOption(new Option("--ai-model <model>", "smart-topology only: meshy-t2 (the API's choice when omitted) | meshy-t2.5 (polycount up to 30000)").choices([...SMART_TOPOLOGY_MODELS]))
|
|
35
|
+
.option("--target-polycount <n>", "smart-topology only: target triangle count — meshy-t2 100-15000 (default: 10000), meshy-t2.5 100-30000 (default: the API's 15000). For standard outputs use remesh", parseInt10)
|
|
34
36
|
.addOption(new Option("--geometry-resolution <res>", "standard mode only: standard (default) | 2k | 4k — the Ultra geometry pass at 2048³ / 4096³ for finer surface detail (needs meshy-7.1 / latest, the default; billed on top of the mesh)").choices(["standard", "2k", "4k"]))
|
|
35
37
|
.option("--ultra-mode <bool>", "deprecated: use --geometry-resolution 2k (true is the same pass)", parseBool)
|
|
36
38
|
.option("--should-texture <bool>", "generate textures (default: false — draft white mesh, the preview stage; texture later with retexture)", parseBool)
|
|
@@ -52,10 +54,10 @@ const spec = {
|
|
|
52
54
|
}
|
|
53
55
|
// The Ultra pass needs meshy-7.1, which only standard mode resolves to.
|
|
54
56
|
if (opts.ultraMode === true && smart) {
|
|
55
|
-
throw new UsageError("--ultra-mode applies to --model-type standard only (it needs meshy-7.1
|
|
57
|
+
throw new UsageError("--ultra-mode applies to --model-type standard only (it needs meshy-7.1)");
|
|
56
58
|
}
|
|
57
59
|
if (smart && opts.geometryResolution !== undefined && opts.geometryResolution !== "standard") {
|
|
58
|
-
throw new UsageError("--geometry-resolution 2k/4k applies to --model-type standard only (it needs meshy-7.1
|
|
60
|
+
throw new UsageError("--geometry-resolution 2k/4k applies to --model-type standard only (it needs meshy-7.1)");
|
|
59
61
|
}
|
|
60
62
|
if (opts.ultraMode !== undefined && opts.geometryResolution !== undefined) {
|
|
61
63
|
throw new UsageError("--ultra-mode is the deprecated spelling of --geometry-resolution 2k; pass only --geometry-resolution");
|
|
@@ -76,6 +78,7 @@ const spec = {
|
|
|
76
78
|
image_url: opts.imageUrl,
|
|
77
79
|
input_task_id: opts.inputTaskId,
|
|
78
80
|
model_type: opts.modelType,
|
|
81
|
+
ai_model: opts.aiModel,
|
|
79
82
|
target_polycount: opts.targetPolycount,
|
|
80
83
|
ultra_mode: opts.ultraMode,
|
|
81
84
|
geometry_resolution: opts.geometryResolution,
|
|
@@ -95,9 +98,10 @@ const spec = {
|
|
|
95
98
|
// texturing is its own step, and the API rejects texture knobs on
|
|
96
99
|
// untextured runs, so they ride only when texturing is on — then the
|
|
97
100
|
// game-ready defaults apply: full PBR map set, 4k base color. The
|
|
98
|
-
// model
|
|
99
|
-
//
|
|
100
|
-
// gets the rigging-friendly 10k polycount.
|
|
101
|
+
// model follows the mode (standard → meshy-7.1, smart-topology →
|
|
102
|
+
// meshy-t2, both server defaults) unless --ai-model picks meshy-t2.5.
|
|
103
|
+
// meshy-t2 gets the rigging-friendly 10k polycount; meshy-t2.5 keeps
|
|
104
|
+
// the API's 15k (D-078). The Ultra pass stays off
|
|
101
105
|
// unless asked for: it bills extra. GLB-only output — omitting target_formats
|
|
102
106
|
// makes the API produce every format.
|
|
103
107
|
const texturing = opts.shouldTexture === true;
|
|
@@ -105,16 +109,17 @@ const spec = {
|
|
|
105
109
|
should_texture: false,
|
|
106
110
|
enable_pbr: texturing ? true : undefined,
|
|
107
111
|
texture_resolution: texturing ? "4k" : undefined,
|
|
108
|
-
target_polycount: opts
|
|
112
|
+
target_polycount: defaultPolycount(opts),
|
|
109
113
|
target_formats: ["glb"],
|
|
110
114
|
};
|
|
111
115
|
},
|
|
112
116
|
validatePayload(payload) {
|
|
113
|
-
|
|
117
|
+
checkSmartTopology(payload);
|
|
118
|
+
// Smart topology has neither knob; v1 answers 400 for either (it does not ignore them).
|
|
114
119
|
if (payload.model_type === "smart-topology") {
|
|
115
120
|
for (const [flag, key] of [["--remove-lighting", "remove_lighting"], ["--image-enhancement", "image_enhancement"]]) {
|
|
116
121
|
if (payload[key] !== undefined) {
|
|
117
|
-
throw new UsageError(`${flag} applies to --model-type standard only (
|
|
122
|
+
throw new UsageError(`${flag} applies to --model-type standard only (the API refuses it for smart-topology)`);
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-to-3d.js","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"image-to-3d.js","sourceRoot":"","sources":["../../src/cmd/image-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,oBAAoB,EAA4B,MAAM,6BAA6B,CAAC;AAC7F,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAE5G,MAAM,IAAI,GAAwB;IAChC,IAAI,EAAE,aAAa;IACnB,WAAW,EACT,uFAAuF;QACvF,oFAAoF;QACpF,+EAA+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,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBACxC,kBAAkB,EAAE,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBAChD,gBAAgB,EAAE,gBAAgB,CAAC,IAAI,CAAC;gBACxC,cAAc,EAAE,CAAC,KAAK,CAAC;aACxB,CAAC;QACJ,CAAC;QACD,eAAe,CAAC,OAAO;YACrB,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC5B,wFAAwF;YACxF,IAAI,OAAO,CAAC,UAAU,KAAK,gBAAgB,EAAE,CAAC;gBAC5C,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,EAAE,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAU,EAAE,CAAC;oBAC5H,IAAI,OAAO,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;wBAC/B,MAAM,IAAI,UAAU,CAAC,GAAG,IAAI,gFAAgF,CAAC,CAAC;oBAChH,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;KACF;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS;CAC/B,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* multi-image-to-3d — https://docs.meshy.ai/en/api/multi-image-to-3d
|
|
3
3
|
*
|
|
4
|
-
* No model flag
|
|
5
|
-
* "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
4
|
+
* No model flag (the Smart Topology models are not offered here): the API
|
|
5
|
+
* default "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
6
6
|
* credits; the same geometry setting as the web app's Ultra 2K) and needs
|
|
7
7
|
* meshy-7.1 / latest; the deprecated ultra_mode boolean is its old spelling.
|
|
8
8
|
* "4k" is single-image only — the API refuses it here. Only the enum is
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* multi-image-to-3d — https://docs.meshy.ai/en/api/multi-image-to-3d
|
|
3
3
|
*
|
|
4
|
-
* No model flag
|
|
5
|
-
* "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
4
|
+
* No model flag (the Smart Topology models are not offered here): the API
|
|
5
|
+
* default "latest" is Meshy 7.1. geometry_resolution "2k" runs the Ultra pass (+5
|
|
6
6
|
* credits; the same geometry setting as the web app's Ultra 2K) and needs
|
|
7
7
|
* meshy-7.1 / latest; the deprecated ultra_mode boolean is its old spelling.
|
|
8
8
|
* "4k" is single-image only — the API refuses it here. Only the enum is
|
package/dist/cmd/text-to-3d.d.ts
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* The flag surface is deliberately minimal: topology and polycount are
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
9
|
* resize's job, deprecated parameters (symmetry_mode, lowpoly, ultra_mode)
|
|
10
|
-
* are gone, and
|
|
11
|
-
*
|
|
12
|
-
* `--data` escape hatch still reaches anything the API accepts.
|
|
10
|
+
* are gone, and the mode picks the model: standard runs the server default
|
|
11
|
+
* "latest" (Meshy 7.1), smart-topology runs meshy-t2, or meshy-t2.5 with
|
|
12
|
+
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
|
13
13
|
*/
|
|
14
14
|
export declare const textTo3dCommand: import("commander").Command;
|
|
15
15
|
//# sourceMappingURL=text-to-3d.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"text-to-3d.d.ts","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsIH,eAAO,MAAM,eAAe,6BAA6B,CAAC"}
|
package/dist/cmd/text-to-3d.js
CHANGED
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
* The flag surface is deliberately minimal: topology and polycount are
|
|
8
8
|
* remesh's job (except smart topology's native polycount), resizing is
|
|
9
9
|
* resize's job, deprecated parameters (symmetry_mode, lowpoly, ultra_mode)
|
|
10
|
-
* are gone, and
|
|
11
|
-
*
|
|
12
|
-
* `--data` escape hatch still reaches anything the API accepts.
|
|
10
|
+
* are gone, and the mode picks the model: standard runs the server default
|
|
11
|
+
* "latest" (Meshy 7.1), smart-topology runs meshy-t2, or meshy-t2.5 with
|
|
12
|
+
* --ai-model. The `--data` escape hatch still reaches anything the API accepts.
|
|
13
13
|
*/
|
|
14
14
|
import { Option } from "commander";
|
|
15
15
|
import { parseBool, parseCsv, parseInt10 } from "../internal/flags.js";
|
|
16
16
|
import { UsageError } from "../internal/errors.js";
|
|
17
17
|
import { buildResourceCommand } from "../internal/task-command.js";
|
|
18
|
+
import { checkSmartTopology, defaultPolycount, SMART_TOPOLOGY_MODELS } from "../internal/smart-topology.js";
|
|
18
19
|
const spec = {
|
|
19
20
|
name: "text-to-3d",
|
|
20
21
|
description: "Generate 3D models from text prompts (two-stage: preview → refine). " +
|
|
@@ -30,8 +31,9 @@ const spec = {
|
|
|
30
31
|
"consumes the preview's latents, so uploaded models or image-to-3d/remesh outputs " +
|
|
31
32
|
"cannot be refined (use retexture for those)")
|
|
32
33
|
.addOption(new Option("--pose-mode <pose>", "preview only. a-pose | t-pose pre-pose characters for rigging; auto (default) lets the model decide").choices(["a-pose", "t-pose", "auto"]))
|
|
33
|
-
.addOption(new Option("--model-type <kind>", "preview only. standard (default; full-detail generation) | smart-topology (
|
|
34
|
-
.
|
|
34
|
+
.addOption(new Option("--model-type <kind>", "preview only. standard (default; full-detail generation) | smart-topology (clean triangle topology, separated parts, native --target-polycount; meshy-t2, or --ai-model meshy-t2.5)").choices(["standard", "smart-topology"]))
|
|
35
|
+
.addOption(new Option("--ai-model <model>", "preview, smart-topology only: meshy-t2 (the API's choice when omitted) | meshy-t2.5 (polycount up to 30000)").choices([...SMART_TOPOLOGY_MODELS]))
|
|
36
|
+
.option("--target-polycount <n>", "preview, smart-topology only: target face count — meshy-t2 100-15000 (default: 10000), meshy-t2.5 100-30000 (default: the API's 15000)", parseInt10)
|
|
35
37
|
.addOption(new Option("--geometry-resolution <res>", "preview, standard only: standard (default) | 2k | 4k — the Ultra geometry pass at 2048³ / 4096³ (needs meshy-7.1 / latest, the default; billed on top)").choices(["standard", "2k", "4k"]))
|
|
36
38
|
.option("--enable-pbr <bool>", "refine only. Generate normal/metallic/roughness maps, plus an emission map on meshy-6 below 8k (default: true, so game-engine imports carry the full map set)", parseBool)
|
|
37
39
|
.option("--texture-prompt <text>", "refine only. Extra texture guidance (max 800 chars)")
|
|
@@ -48,7 +50,7 @@ const spec = {
|
|
|
48
50
|
throw new UsageError("--mode refine requires --preview-task-id");
|
|
49
51
|
}
|
|
50
52
|
if (mode === "refine") {
|
|
51
|
-
for (const [flag, value] of [["--model-type", opts.modelType], ["--target-polycount", opts.targetPolycount], ["--geometry-resolution", opts.geometryResolution]]) {
|
|
53
|
+
for (const [flag, value] of [["--model-type", opts.modelType], ["--ai-model", opts.aiModel], ["--target-polycount", opts.targetPolycount], ["--geometry-resolution", opts.geometryResolution]]) {
|
|
52
54
|
if (value !== undefined)
|
|
53
55
|
throw new UsageError(`${flag} applies to --mode preview only (refine inherits the preview's geometry)`);
|
|
54
56
|
}
|
|
@@ -57,11 +59,8 @@ const spec = {
|
|
|
57
59
|
if (opts.targetPolycount !== undefined && !smart) {
|
|
58
60
|
throw new UsageError("--target-polycount applies to --model-type smart-topology only; for standard outputs chain `remesh` afterwards");
|
|
59
61
|
}
|
|
60
|
-
if (opts.targetPolycount !== undefined && (opts.targetPolycount < 100 || opts.targetPolycount > 15000)) {
|
|
61
|
-
throw new UsageError("--target-polycount must be between 100 and 15000");
|
|
62
|
-
}
|
|
63
62
|
if (smart && opts.geometryResolution !== undefined && opts.geometryResolution !== "standard") {
|
|
64
|
-
throw new UsageError("--geometry-resolution 2k/4k needs meshy-7.1 (standard)
|
|
63
|
+
throw new UsageError("--geometry-resolution 2k/4k needs meshy-7.1 (standard), not smart-topology");
|
|
65
64
|
}
|
|
66
65
|
return {
|
|
67
66
|
mode,
|
|
@@ -70,6 +69,7 @@ const spec = {
|
|
|
70
69
|
// "auto" means "let the model decide" — the API's default, expressed by omission.
|
|
71
70
|
pose_mode: opts.poseMode === "auto" ? undefined : opts.poseMode,
|
|
72
71
|
model_type: opts.modelType,
|
|
72
|
+
ai_model: opts.aiModel,
|
|
73
73
|
target_polycount: opts.targetPolycount,
|
|
74
74
|
geometry_resolution: opts.geometryResolution,
|
|
75
75
|
enable_pbr: opts.enablePbr,
|
|
@@ -88,15 +88,16 @@ const spec = {
|
|
|
88
88
|
// removed on meshy-6/7) apply otherwise. `make` still asks for 4k: it
|
|
89
89
|
// made the preview itself, on latest.
|
|
90
90
|
// GLB-only output — omitting target_formats makes the API produce
|
|
91
|
-
// every format. Smart topology
|
|
92
|
-
//
|
|
91
|
+
// every format. Smart topology defaults like image-to-3d: 10k on
|
|
92
|
+
// meshy-t2, the API's 15k on meshy-t2.5 (D-078).
|
|
93
93
|
const refine = opts.mode === "refine";
|
|
94
94
|
return {
|
|
95
95
|
enable_pbr: refine ? true : undefined,
|
|
96
|
-
target_polycount: opts
|
|
96
|
+
target_polycount: defaultPolycount(opts),
|
|
97
97
|
target_formats: ["glb"],
|
|
98
98
|
};
|
|
99
99
|
},
|
|
100
|
+
validatePayload: checkSmartTopology,
|
|
100
101
|
},
|
|
101
102
|
endpointOf: (c) => c.textTo3d,
|
|
102
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-to-3d.js","sourceRoot":"","sources":["../../src/cmd/text-to-3d.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAE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C,iBAAiB;gBAC1C,eAAe,EAAE,IAAI,CAAC,cAAc;gBACpC,cAAc,EAAE,IAAI,CAAC,aAAa;aACnC,CAAC;QACJ,CAAC;QACD,UAAU,CAAC,IAAI;YACb,wEAAwE;YACxE,wEAAwE;YACxE,+DAA+D;YAC/D,wEAAwE;YACxE,qEAAqE;YACrE,sEAAsE;YACtE,sCAAsC;YACtC,kEAAkE;YAClE,iEAAiE;YACjE,iDAAiD;YACjD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC;YACtC,OAAO;gBACL,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBACrC,gBAAgB,EAAE,gBAAgB,CAAC,IAAI,CAAC;gBACxC,cAAc,EAAE,CAAC,KAAK,CAAC;aACxB,CAAC;QACJ,CAAC;QACD,eAAe,EAAE,kBAAkB;KACpC;IACD,UAAU,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ;CAC9B,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smart Topology models, shared by image-to-3d and text-to-3d preview so the
|
|
3
|
+
* two commands cannot drift apart.
|
|
4
|
+
*
|
|
5
|
+
* Without --ai-model the request carries no ai_model and the API picks
|
|
6
|
+
* meshy-t2. meshy-t2.5 takes a polycount up to 30,000 (meshy-t2: 15,000).
|
|
7
|
+
* Both need model_type "smart-topology", and both output triangles only.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SMART_TOPOLOGY_MODELS: readonly ["meshy-t2", "meshy-t2.5"];
|
|
10
|
+
/**
|
|
11
|
+
* The CLI's polycount default (D-078): 10,000 for meshy-t2 (D-076); meshy-t2.5
|
|
12
|
+
* is left to the API's own 15,000. Follows --ai-model only.
|
|
13
|
+
*/
|
|
14
|
+
export declare function defaultPolycount(opts: Record<string, unknown>): number | undefined;
|
|
15
|
+
/** Checks the merged payload, so values sent through --data meet the same rules. */
|
|
16
|
+
export declare function checkSmartTopology(payload: Record<string, unknown>): void;
|
|
17
|
+
//# sourceMappingURL=smart-topology.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-topology.d.ts","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,eAAO,MAAM,qBAAqB,YAAI,UAAU,EAAE,YAAY,CAAU,CAAC;AAIzE;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAElF;AAED,oFAAoF;AACpF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAmBzE"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Smart Topology models, shared by image-to-3d and text-to-3d preview so the
|
|
3
|
+
* two commands cannot drift apart.
|
|
4
|
+
*
|
|
5
|
+
* Without --ai-model the request carries no ai_model and the API picks
|
|
6
|
+
* meshy-t2. meshy-t2.5 takes a polycount up to 30,000 (meshy-t2: 15,000).
|
|
7
|
+
* Both need model_type "smart-topology", and both output triangles only.
|
|
8
|
+
*/
|
|
9
|
+
import { UsageError } from "./errors.js";
|
|
10
|
+
export const SMART_TOPOLOGY_MODELS = ["meshy-t2", "meshy-t2.5"];
|
|
11
|
+
const MAX_POLYCOUNT = { "meshy-t2": 15_000, "meshy-t2.5": 30_000 };
|
|
12
|
+
/**
|
|
13
|
+
* The CLI's polycount default (D-078): 10,000 for meshy-t2 (D-076); meshy-t2.5
|
|
14
|
+
* is left to the API's own 15,000. Follows --ai-model only.
|
|
15
|
+
*/
|
|
16
|
+
export function defaultPolycount(opts) {
|
|
17
|
+
return opts.modelType === "smart-topology" && opts.aiModel !== "meshy-t2.5" ? 10_000 : undefined;
|
|
18
|
+
}
|
|
19
|
+
/** Checks the merged payload, so values sent through --data meet the same rules. */
|
|
20
|
+
export function checkSmartTopology(payload) {
|
|
21
|
+
const model = typeof payload.ai_model === "string" ? payload.ai_model : undefined;
|
|
22
|
+
const smart = payload.model_type === "smart-topology";
|
|
23
|
+
if (model && model in MAX_POLYCOUNT && !smart) {
|
|
24
|
+
throw new UsageError(`${model} is a Smart Topology model: pass --model-type smart-topology`);
|
|
25
|
+
}
|
|
26
|
+
if (!smart)
|
|
27
|
+
return;
|
|
28
|
+
if (payload.topology === "quad") {
|
|
29
|
+
throw new UsageError("smart-topology output is triangle-only; for quads chain `remesh --topology quad` afterwards");
|
|
30
|
+
}
|
|
31
|
+
const n = payload.target_polycount;
|
|
32
|
+
const max = MAX_POLYCOUNT[model ?? "meshy-t2"]; // another model sent through --data is left to the API
|
|
33
|
+
if (max !== undefined && typeof n === "number" && (n < 100 || n > max)) {
|
|
34
|
+
throw new UsageError(model === "meshy-t2.5"
|
|
35
|
+
? "--target-polycount must be between 100 and 30000 on meshy-t2.5"
|
|
36
|
+
: "--target-polycount must be between 100 and 15000 on meshy-t2 (--ai-model meshy-t2.5 takes up to 30000)");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=smart-topology.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smart-topology.js","sourceRoot":"","sources":["../../src/internal/smart-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,UAAU,EAAE,YAAY,CAAU,CAAC;AAEzE,MAAM,aAAa,GAAqC,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;AAErG;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA6B;IA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
|
4
4
|
"description": "Official command-line interface for the Meshy AI API — text-to-3D, image-to-3D, text-to-motion, remesh, UV unwrap, rigging, animate, retexture, 2D images, printability, auto split, multi-color print, Creative Lab, balance and usage — plus selective downloads, project folders, face checks, OBJ print preparation and slicer launch.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -165,8 +165,9 @@ These are API rules, not preferences — ignoring them produces failed tasks:
|
|
|
165
165
|
`--geometry-resolution 2k|4k` runs the Ultra geometry pass (+5 credits;
|
|
166
166
|
text-to-3d: preview only; multi-image: `2k` only; not with smart-topology);
|
|
167
167
|
`--ultra-mode` on image-to-3d is its deprecated spelling of `2k`.
|
|
168
|
-
`--model-type smart-topology` (
|
|
169
|
-
|
|
168
|
+
`--model-type smart-topology` (text-to-3d and image-to-3d) has a native
|
|
169
|
+
`--target-polycount`: meshy-t2 100-15000 (default 10000); `--ai-model
|
|
170
|
+
meshy-t2.5` up to 30000 (default 15000). `retexture`'s
|
|
170
171
|
`--multiview-image-urls` needs Meshy 7 — it takes 1-4 views of **the same
|
|
171
172
|
object**, not style references.
|
|
172
173
|
- Printing: `analyze-`/`repair-printability` take `--printer-type
|