@nodetool-ai/video-nodes 0.8.1
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 +58 -0
- package/dist/.nodetool-build-stamp +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/ffmpeg-helpers.d.ts +77 -0
- package/dist/nodes/ffmpeg-helpers.d.ts.map +1 -0
- package/dist/nodes/ffmpeg-helpers.js +220 -0
- package/dist/nodes/ffmpeg-helpers.js.map +1 -0
- package/dist/nodes/lib-video-download.d.ts +29 -0
- package/dist/nodes/lib-video-download.d.ts.map +1 -0
- package/dist/nodes/lib-video-download.js +353 -0
- package/dist/nodes/lib-video-download.js.map +1 -0
- package/dist/nodes/model3d/analysis.d.ts +16 -0
- package/dist/nodes/model3d/analysis.d.ts.map +1 -0
- package/dist/nodes/model3d/analysis.js +38 -0
- package/dist/nodes/model3d/analysis.js.map +1 -0
- package/dist/nodes/model3d/base.d.ts +28 -0
- package/dist/nodes/model3d/base.d.ts.map +1 -0
- package/dist/nodes/model3d/base.js +20 -0
- package/dist/nodes/model3d/base.js.map +1 -0
- package/dist/nodes/model3d/boolean-ops.d.ts +2 -0
- package/dist/nodes/model3d/boolean-ops.d.ts.map +1 -0
- package/dist/nodes/model3d/boolean-ops.js +172 -0
- package/dist/nodes/model3d/boolean-ops.js.map +1 -0
- package/dist/nodes/model3d/cleanup.d.ts +56 -0
- package/dist/nodes/model3d/cleanup.d.ts.map +1 -0
- package/dist/nodes/model3d/cleanup.js +144 -0
- package/dist/nodes/model3d/cleanup.js.map +1 -0
- package/dist/nodes/model3d/convert.d.ts +27 -0
- package/dist/nodes/model3d/convert.d.ts.map +1 -0
- package/dist/nodes/model3d/convert.js +66 -0
- package/dist/nodes/model3d/convert.js.map +1 -0
- package/dist/nodes/model3d/defaults.d.ts +34 -0
- package/dist/nodes/model3d/defaults.d.ts.map +1 -0
- package/dist/nodes/model3d/defaults.js +28 -0
- package/dist/nodes/model3d/defaults.js.map +1 -0
- package/dist/nodes/model3d/document-ops.d.ts +4 -0
- package/dist/nodes/model3d/document-ops.d.ts.map +1 -0
- package/dist/nodes/model3d/document-ops.js +40 -0
- package/dist/nodes/model3d/document-ops.js.map +1 -0
- package/dist/nodes/model3d/generation.d.ts +56 -0
- package/dist/nodes/model3d/generation.d.ts.map +1 -0
- package/dist/nodes/model3d/generation.js +203 -0
- package/dist/nodes/model3d/generation.js.map +1 -0
- package/dist/nodes/model3d/glb.d.ts +29 -0
- package/dist/nodes/model3d/glb.d.ts.map +1 -0
- package/dist/nodes/model3d/glb.js +255 -0
- package/dist/nodes/model3d/glb.js.map +1 -0
- package/dist/nodes/model3d/index.d.ts +22 -0
- package/dist/nodes/model3d/index.d.ts.map +1 -0
- package/dist/nodes/model3d/index.js +41 -0
- package/dist/nodes/model3d/index.js.map +1 -0
- package/dist/nodes/model3d/io.d.ts +81 -0
- package/dist/nodes/model3d/io.d.ts.map +1 -0
- package/dist/nodes/model3d/io.js +162 -0
- package/dist/nodes/model3d/io.js.map +1 -0
- package/dist/nodes/model3d/mesh-ops.d.ts +40 -0
- package/dist/nodes/model3d/mesh-ops.d.ts.map +1 -0
- package/dist/nodes/model3d/mesh-ops.js +775 -0
- package/dist/nodes/model3d/mesh-ops.js.map +1 -0
- package/dist/nodes/model3d/nodes.d.ts +2 -0
- package/dist/nodes/model3d/nodes.d.ts.map +1 -0
- package/dist/nodes/model3d/nodes.js +2 -0
- package/dist/nodes/model3d/nodes.js.map +1 -0
- package/dist/nodes/model3d/ops.d.ts +44 -0
- package/dist/nodes/model3d/ops.d.ts.map +1 -0
- package/dist/nodes/model3d/ops.js +142 -0
- package/dist/nodes/model3d/ops.js.map +1 -0
- package/dist/nodes/model3d/render.d.ts +51 -0
- package/dist/nodes/model3d/render.d.ts.map +1 -0
- package/dist/nodes/model3d/render.js +124 -0
- package/dist/nodes/model3d/render.js.map +1 -0
- package/dist/nodes/model3d/render3d-core.d.ts +177 -0
- package/dist/nodes/model3d/render3d-core.d.ts.map +1 -0
- package/dist/nodes/model3d/render3d-core.js +366 -0
- package/dist/nodes/model3d/render3d-core.js.map +1 -0
- package/dist/nodes/model3d/render3d-headless.d.ts +75 -0
- package/dist/nodes/model3d/render3d-headless.d.ts.map +1 -0
- package/dist/nodes/model3d/render3d-headless.js +190 -0
- package/dist/nodes/model3d/render3d-headless.js.map +1 -0
- package/dist/nodes/model3d/render3d-page.d.ts +16 -0
- package/dist/nodes/model3d/render3d-page.d.ts.map +1 -0
- package/dist/nodes/model3d/render3d-page.js +51 -0
- package/dist/nodes/model3d/render3d-page.js.map +1 -0
- package/dist/nodes/model3d/transforms.d.ts +56 -0
- package/dist/nodes/model3d/transforms.d.ts.map +1 -0
- package/dist/nodes/model3d/transforms.js +148 -0
- package/dist/nodes/model3d/transforms.js.map +1 -0
- package/dist/nodes/model3d/types.d.ts +82 -0
- package/dist/nodes/model3d/types.d.ts.map +1 -0
- package/dist/nodes/model3d/types.js +2 -0
- package/dist/nodes/model3d/types.js.map +1 -0
- package/dist/nodes/model3d/utils.d.ts +46 -0
- package/dist/nodes/model3d/utils.d.ts.map +1 -0
- package/dist/nodes/model3d/utils.js +190 -0
- package/dist/nodes/model3d/utils.js.map +1 -0
- package/dist/nodes/model3d.d.ts +2 -0
- package/dist/nodes/model3d.d.ts.map +1 -0
- package/dist/nodes/model3d.js +2 -0
- package/dist/nodes/model3d.js.map +1 -0
- package/dist/nodes/placeholder-values.d.ts +10 -0
- package/dist/nodes/placeholder-values.d.ts.map +1 -0
- package/dist/nodes/placeholder-values.js +19 -0
- package/dist/nodes/placeholder-values.js.map +1 -0
- package/dist/nodes/script.d.ts +161 -0
- package/dist/nodes/script.d.ts.map +1 -0
- package/dist/nodes/script.js +673 -0
- package/dist/nodes/script.js.map +1 -0
- package/dist/nodes/storyboard.d.ts +269 -0
- package/dist/nodes/storyboard.d.ts.map +1 -0
- package/dist/nodes/storyboard.js +1017 -0
- package/dist/nodes/storyboard.js.map +1 -0
- package/dist/nodes/timeline/assetFiles.d.ts +19 -0
- package/dist/nodes/timeline/assetFiles.d.ts.map +1 -0
- package/dist/nodes/timeline/assetFiles.js +52 -0
- package/dist/nodes/timeline/assetFiles.js.map +1 -0
- package/dist/nodes/timeline/compositeRender.d.ts +60 -0
- package/dist/nodes/timeline/compositeRender.d.ts.map +1 -0
- package/dist/nodes/timeline/compositeRender.js +508 -0
- package/dist/nodes/timeline/compositeRender.js.map +1 -0
- package/dist/nodes/timeline/contactSheet.d.ts +43 -0
- package/dist/nodes/timeline/contactSheet.d.ts.map +1 -0
- package/dist/nodes/timeline/contactSheet.js +78 -0
- package/dist/nodes/timeline/contactSheet.js.map +1 -0
- package/dist/nodes/timeline/outputFormats.d.ts +69 -0
- package/dist/nodes/timeline/outputFormats.d.ts.map +1 -0
- package/dist/nodes/timeline/outputFormats.js +173 -0
- package/dist/nodes/timeline/outputFormats.js.map +1 -0
- package/dist/nodes/timeline/pngSequence.d.ts +44 -0
- package/dist/nodes/timeline/pngSequence.d.ts.map +1 -0
- package/dist/nodes/timeline/pngSequence.js +172 -0
- package/dist/nodes/timeline/pngSequence.js.map +1 -0
- package/dist/nodes/timeline/rasterizers.d.ts +47 -0
- package/dist/nodes/timeline/rasterizers.d.ts.map +1 -0
- package/dist/nodes/timeline/rasterizers.js +103 -0
- package/dist/nodes/timeline/rasterizers.js.map +1 -0
- package/dist/nodes/timeline/rawFrames.d.ts +149 -0
- package/dist/nodes/timeline/rawFrames.d.ts.map +1 -0
- package/dist/nodes/timeline/rawFrames.js +598 -0
- package/dist/nodes/timeline/rawFrames.js.map +1 -0
- package/dist/nodes/timeline.d.ts +206 -0
- package/dist/nodes/timeline.d.ts.map +1 -0
- package/dist/nodes/timeline.js +1395 -0
- package/dist/nodes/timeline.js.map +1 -0
- package/dist/nodes/video.d.ts +705 -0
- package/dist/nodes/video.d.ts.map +1 -0
- package/dist/nodes/video.js +2672 -0
- package/dist/nodes/video.js.map +1 -0
- package/dist/render3d-page.js +4118 -0
- package/package.json +95 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BaseNode } from "@nodetool-ai/node-sdk";
|
|
2
|
+
import type { ProcessingContext } from "@nodetool-ai/runtime";
|
|
3
|
+
import type { ImageRefLike } from "./types.js";
|
|
4
|
+
declare const SUPPORTED_OUTPUT_FORMATS: readonly ["glb", "obj", "fbx", "usdz"];
|
|
5
|
+
type OutputFormat = (typeof SUPPORTED_OUTPUT_FORMATS)[number];
|
|
6
|
+
/**
|
|
7
|
+
* What a `model_3d_model` slot carries. snake_case matches the persisted
|
|
8
|
+
* workflow JSON; the provider layer uses camelCase.
|
|
9
|
+
*/
|
|
10
|
+
type Model3DModelRef = {
|
|
11
|
+
provider?: string;
|
|
12
|
+
id?: string;
|
|
13
|
+
name?: string;
|
|
14
|
+
supported_tasks?: string[];
|
|
15
|
+
output_formats?: string[];
|
|
16
|
+
};
|
|
17
|
+
export declare class TextTo3DNode extends BaseNode {
|
|
18
|
+
static readonly nodeType = "nodetool.model3d.TextTo3D";
|
|
19
|
+
static readonly body = "content_card";
|
|
20
|
+
static readonly title = "Text To 3D";
|
|
21
|
+
static readonly description = "Generate 3D models from text prompts using AI providers (Meshy, Rodin).\n 3d, generation, AI, text-to-3d, t3d, mesh, create\n\n Use cases:\n - Create 3D models from text descriptions\n - Generate game assets from prompts\n - Prototype 3D concepts quickly\n - Create 3D content for AR/VR";
|
|
22
|
+
static readonly metadataOutputTypes: {
|
|
23
|
+
output: string;
|
|
24
|
+
};
|
|
25
|
+
static readonly inlineFields: never[];
|
|
26
|
+
static readonly inputFields: string[];
|
|
27
|
+
model: Model3DModelRef;
|
|
28
|
+
prompt: string;
|
|
29
|
+
negative_prompt: string;
|
|
30
|
+
art_style: string;
|
|
31
|
+
output_format: OutputFormat;
|
|
32
|
+
enable_textures: boolean;
|
|
33
|
+
seed: number;
|
|
34
|
+
timeout_seconds: number;
|
|
35
|
+
process(context?: ProcessingContext): Promise<Record<string, unknown>>;
|
|
36
|
+
}
|
|
37
|
+
export declare class ImageTo3DNode extends BaseNode {
|
|
38
|
+
static readonly nodeType = "nodetool.model3d.ImageTo3D";
|
|
39
|
+
static readonly body = "content_card";
|
|
40
|
+
static readonly title = "Image To 3D";
|
|
41
|
+
static readonly description = "Generate 3D models from images using AI providers (Meshy, Rodin).\n 3d, generation, AI, image-to-3d, i3d, mesh, reconstruction\n\n Use cases:\n - Convert product photos to 3D models\n - Create 3D assets from concept art\n - Generate 3D characters from drawings\n - Reconstruct objects from images";
|
|
42
|
+
static readonly metadataOutputTypes: {
|
|
43
|
+
output: string;
|
|
44
|
+
};
|
|
45
|
+
static readonly inlineFields: never[];
|
|
46
|
+
static readonly inputFields: string[];
|
|
47
|
+
model: Model3DModelRef;
|
|
48
|
+
image: ImageRefLike;
|
|
49
|
+
prompt: string;
|
|
50
|
+
output_format: OutputFormat;
|
|
51
|
+
seed: number;
|
|
52
|
+
timeout_seconds: number;
|
|
53
|
+
process(context?: ProcessingContext): Promise<Record<string, unknown>>;
|
|
54
|
+
}
|
|
55
|
+
export {};
|
|
56
|
+
//# sourceMappingURL=generation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../../../src/nodes/model3d/generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAQ,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAc9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,QAAA,MAAM,wBAAwB,YAAI,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAU,CAAC;AAExE,KAAK,YAAY,GAAG,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9D;;;GAGG;AACH,KAAK,eAAe,GAAG;IACrB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,YAAY,UAAM;IAClC,MAAM,CAAC,QAAQ,CAAC,WAAW,WAAa;IAQhC,KAAK,EAAE,eAAe,CAAC;IAGvB,KAAK,EAAE,YAAY,CAAC;IAGpB,MAAM,EAAE,MAAM,CAAC;IAGf,aAAa,EAAE,YAAY,CAAC;IAG5B,IAAI,EAAE,MAAM,CAAC;IAGb,eAAe,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAmC3E;CACF"}
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { BaseNode, prop } from "@nodetool-ai/node-sdk";
|
|
8
|
+
import { DEFAULT_IMAGE, DEFAULT_IMAGE_TO_3D_MODEL, DEFAULT_TEXT_TO_3D_MODEL } from "./defaults.js";
|
|
9
|
+
import { glbOutput } from "./base.js";
|
|
10
|
+
import { imageRefToBytes } from "./utils.js";
|
|
11
|
+
import { isFiniteNumber, isNonEmptyString } from "@nodetool-ai/node-sdk";
|
|
12
|
+
const SUPPORTED_OUTPUT_FORMATS = ["glb", "obj", "fbx", "usdz"];
|
|
13
|
+
/**
|
|
14
|
+
* Build the {@link Model3D} object expected by the runtime providers from the
|
|
15
|
+
* `model_3d_model`-shaped value carried by the node prop. The node prop uses
|
|
16
|
+
* snake_case (`supported_tasks`, `output_formats`) to match the persisted
|
|
17
|
+
* workflow JSON; the provider layer uses camelCase.
|
|
18
|
+
*/
|
|
19
|
+
function nodeModelToProviderModel(raw) {
|
|
20
|
+
const provider = (raw.provider ?? "").trim();
|
|
21
|
+
const id = (raw.id ?? "").trim();
|
|
22
|
+
if (!provider)
|
|
23
|
+
throw new Error("3D model is missing a provider id");
|
|
24
|
+
if (!id)
|
|
25
|
+
throw new Error("3D model is missing a model id");
|
|
26
|
+
return {
|
|
27
|
+
id,
|
|
28
|
+
name: raw.name ?? id,
|
|
29
|
+
provider,
|
|
30
|
+
supportedTasks: raw.supported_tasks,
|
|
31
|
+
outputFormats: raw.output_formats
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
/** Treat 0 (the field's "use provider default" sentinel) as undefined. */
|
|
35
|
+
function normalizeTimeoutSeconds(v) {
|
|
36
|
+
if (!isFiniteNumber(v) || v <= 0)
|
|
37
|
+
return null;
|
|
38
|
+
return v;
|
|
39
|
+
}
|
|
40
|
+
/** -1 is the random-seed sentinel; convert to null so providers omit it. */
|
|
41
|
+
function normalizeSeed(v) {
|
|
42
|
+
if (!isFiniteNumber(v) || v < 0)
|
|
43
|
+
return null;
|
|
44
|
+
return v;
|
|
45
|
+
}
|
|
46
|
+
function normalizeOutputFormat(value, model, nodeType) {
|
|
47
|
+
const format = value.trim().toLowerCase();
|
|
48
|
+
if (!SUPPORTED_OUTPUT_FORMATS.includes(format)) {
|
|
49
|
+
throw new Error(`${nodeType} output_format must be one of: ${SUPPORTED_OUTPUT_FORMATS.join(", ")}`);
|
|
50
|
+
}
|
|
51
|
+
const modelFormats = (model.outputFormats ?? [])
|
|
52
|
+
.map((f) => String(f).trim().toLowerCase())
|
|
53
|
+
.filter((f) => f.length > 0);
|
|
54
|
+
if (modelFormats.length > 0 && !modelFormats.includes(format)) {
|
|
55
|
+
throw new Error(`Model "${model.id}" does not support output format "${format}". Supported formats: ${modelFormats.join(", ")}`);
|
|
56
|
+
}
|
|
57
|
+
return format;
|
|
58
|
+
}
|
|
59
|
+
export class TextTo3DNode extends BaseNode {
|
|
60
|
+
static nodeType = "nodetool.model3d.TextTo3D";
|
|
61
|
+
static body = "content_card";
|
|
62
|
+
static title = "Text To 3D";
|
|
63
|
+
static description = "Generate 3D models from text prompts using AI providers (Meshy, Rodin).\n 3d, generation, AI, text-to-3d, t3d, mesh, create\n\n Use cases:\n - Create 3D models from text descriptions\n - Generate game assets from prompts\n - Prototype 3D concepts quickly\n - Create 3D content for AR/VR";
|
|
64
|
+
static metadataOutputTypes = {
|
|
65
|
+
output: "model_3d"
|
|
66
|
+
};
|
|
67
|
+
static inlineFields = [];
|
|
68
|
+
static inputFields = ["prompt"];
|
|
69
|
+
async process(context) {
|
|
70
|
+
if (!context) {
|
|
71
|
+
throw new Error("TextTo3DNode requires a ProcessingContext to resolve the provider");
|
|
72
|
+
}
|
|
73
|
+
if (!isNonEmptyString(this.prompt)) {
|
|
74
|
+
throw new Error("Prompt is required");
|
|
75
|
+
}
|
|
76
|
+
const model = nodeModelToProviderModel(this.model);
|
|
77
|
+
const params = {
|
|
78
|
+
model,
|
|
79
|
+
prompt: this.prompt,
|
|
80
|
+
negativePrompt: this.negative_prompt || null,
|
|
81
|
+
artStyle: this.art_style || null,
|
|
82
|
+
outputFormat: normalizeOutputFormat(this.output_format, model, "TextTo3DNode"),
|
|
83
|
+
seed: normalizeSeed(this.seed),
|
|
84
|
+
timeoutSeconds: normalizeTimeoutSeconds(this.timeout_seconds),
|
|
85
|
+
enableTextures: this.enable_textures
|
|
86
|
+
};
|
|
87
|
+
// Through the generation seam, so the render is a ledger row with a cost
|
|
88
|
+
// (docs/media-generation-tracking-design.md F6).
|
|
89
|
+
const bytes = (await context.runProviderPrediction({
|
|
90
|
+
provider: model.provider,
|
|
91
|
+
capability: "text_to_3d",
|
|
92
|
+
model: model.id,
|
|
93
|
+
nodeId: this.__node_id || undefined,
|
|
94
|
+
params: {
|
|
95
|
+
model,
|
|
96
|
+
prompt: params.prompt,
|
|
97
|
+
negative_prompt: params.negativePrompt,
|
|
98
|
+
art_style: params.artStyle,
|
|
99
|
+
output_format: params.outputFormat,
|
|
100
|
+
seed: params.seed,
|
|
101
|
+
timeout_seconds: params.timeoutSeconds,
|
|
102
|
+
enable_textures: params.enableTextures
|
|
103
|
+
}
|
|
104
|
+
}));
|
|
105
|
+
return glbOutput(bytes);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
__decorate([
|
|
109
|
+
prop({
|
|
110
|
+
type: "model_3d_model",
|
|
111
|
+
default: DEFAULT_TEXT_TO_3D_MODEL,
|
|
112
|
+
title: "Model",
|
|
113
|
+
description: "The 3D generation model to use"
|
|
114
|
+
})
|
|
115
|
+
], TextTo3DNode.prototype, "model", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
prop({ type: "str", default: "", title: "Prompt", description: "Text description of the 3D model to generate" })
|
|
118
|
+
], TextTo3DNode.prototype, "prompt", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
prop({ type: "str", default: "", title: "Negative Prompt", description: "Elements to avoid in the generated model" })
|
|
121
|
+
], TextTo3DNode.prototype, "negative_prompt", void 0);
|
|
122
|
+
__decorate([
|
|
123
|
+
prop({ type: "str", default: "", title: "Art Style", description: "Art style for the model (e.g., 'realistic', 'cartoon', 'low-poly')" })
|
|
124
|
+
], TextTo3DNode.prototype, "art_style", void 0);
|
|
125
|
+
__decorate([
|
|
126
|
+
prop({ type: "enum", default: "glb", title: "Output Format", description: "Output format for the 3D model", values: [...SUPPORTED_OUTPUT_FORMATS] })
|
|
127
|
+
], TextTo3DNode.prototype, "output_format", void 0);
|
|
128
|
+
__decorate([
|
|
129
|
+
prop({ type: "bool", default: true, title: "Enable Textures", description: "Generate PBR textures after shape generation (Meshy only; adds a second API call)" })
|
|
130
|
+
], TextTo3DNode.prototype, "enable_textures", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
prop({ type: "int", default: -1, title: "Seed", description: "Random seed for reproducibility (-1 for random)", min: -1 })
|
|
133
|
+
], TextTo3DNode.prototype, "seed", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
prop({ type: "int", default: 600, title: "Timeout Seconds", description: "Timeout in seconds for API calls (0 = use provider default)", min: 0, max: 7200 })
|
|
136
|
+
], TextTo3DNode.prototype, "timeout_seconds", void 0);
|
|
137
|
+
export class ImageTo3DNode extends BaseNode {
|
|
138
|
+
static nodeType = "nodetool.model3d.ImageTo3D";
|
|
139
|
+
static body = "content_card";
|
|
140
|
+
static title = "Image To 3D";
|
|
141
|
+
static description = "Generate 3D models from images using AI providers (Meshy, Rodin).\n 3d, generation, AI, image-to-3d, i3d, mesh, reconstruction\n\n Use cases:\n - Convert product photos to 3D models\n - Create 3D assets from concept art\n - Generate 3D characters from drawings\n - Reconstruct objects from images";
|
|
142
|
+
static metadataOutputTypes = {
|
|
143
|
+
output: "model_3d"
|
|
144
|
+
};
|
|
145
|
+
static inlineFields = [];
|
|
146
|
+
static inputFields = ["image"];
|
|
147
|
+
async process(context) {
|
|
148
|
+
if (!context) {
|
|
149
|
+
throw new Error("ImageTo3DNode requires a ProcessingContext to resolve the provider");
|
|
150
|
+
}
|
|
151
|
+
const model = nodeModelToProviderModel(this.model);
|
|
152
|
+
const imageBytes = await imageRefToBytes(this.image, context);
|
|
153
|
+
if (imageBytes.length === 0) {
|
|
154
|
+
throw new Error("Image input is empty");
|
|
155
|
+
}
|
|
156
|
+
const params = {
|
|
157
|
+
model,
|
|
158
|
+
prompt: this.prompt || null,
|
|
159
|
+
outputFormat: normalizeOutputFormat(this.output_format, model, "ImageTo3DNode"),
|
|
160
|
+
seed: normalizeSeed(this.seed),
|
|
161
|
+
timeoutSeconds: normalizeTimeoutSeconds(this.timeout_seconds)
|
|
162
|
+
};
|
|
163
|
+
const bytes = (await context.runProviderPrediction({
|
|
164
|
+
provider: model.provider,
|
|
165
|
+
capability: "image_to_3d",
|
|
166
|
+
model: model.id,
|
|
167
|
+
nodeId: this.__node_id || undefined,
|
|
168
|
+
params: {
|
|
169
|
+
model,
|
|
170
|
+
images: [imageBytes],
|
|
171
|
+
prompt: params.prompt,
|
|
172
|
+
output_format: params.outputFormat,
|
|
173
|
+
seed: params.seed,
|
|
174
|
+
timeout_seconds: params.timeoutSeconds
|
|
175
|
+
}
|
|
176
|
+
}));
|
|
177
|
+
return glbOutput(bytes);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
__decorate([
|
|
181
|
+
prop({
|
|
182
|
+
type: "model_3d_model",
|
|
183
|
+
default: DEFAULT_IMAGE_TO_3D_MODEL,
|
|
184
|
+
title: "Model",
|
|
185
|
+
description: "The 3D generation model to use"
|
|
186
|
+
})
|
|
187
|
+
], ImageTo3DNode.prototype, "model", void 0);
|
|
188
|
+
__decorate([
|
|
189
|
+
prop({ type: "image", default: DEFAULT_IMAGE, title: "Image", description: "Input image to convert to 3D" })
|
|
190
|
+
], ImageTo3DNode.prototype, "image", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
prop({ type: "str", default: "", title: "Prompt", description: "Optional text prompt to guide the 3D generation" })
|
|
193
|
+
], ImageTo3DNode.prototype, "prompt", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
prop({ type: "enum", default: "glb", title: "Output Format", description: "Output format for the 3D model", values: [...SUPPORTED_OUTPUT_FORMATS] })
|
|
196
|
+
], ImageTo3DNode.prototype, "output_format", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
prop({ type: "int", default: -1, title: "Seed", description: "Random seed for reproducibility (-1 for random)", min: -1 })
|
|
199
|
+
], ImageTo3DNode.prototype, "seed", void 0);
|
|
200
|
+
__decorate([
|
|
201
|
+
prop({ type: "int", default: 600, title: "Timeout Seconds", description: "Timeout in seconds for API calls (0 = use provider default)", min: 0, max: 7200 })
|
|
202
|
+
], ImageTo3DNode.prototype, "timeout_seconds", void 0);
|
|
203
|
+
//# sourceMappingURL=generation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generation.js","source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AAgC,EAAE,MAAM,EAAE,CAAC,GAAG,wBAAwB,CAAC,EAAE,CAAC;oDACjH;AAG5B;IADP,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,iDAAiD,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;2CACtG;AAGb;IADP,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,6DAA6D,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;sDAC7H"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { GltfAccessor, GltfBufferView, GltfJson, Model3DMetadata, Model3DRefLike } from "./types.js";
|
|
2
|
+
export declare const GLB_MAGIC = 1179937895;
|
|
3
|
+
export declare const CHUNK_JSON = 1313821514;
|
|
4
|
+
export declare const CHUNK_BIN = 5130562;
|
|
5
|
+
export declare const COMP_UNSIGNED_SHORT = 5123;
|
|
6
|
+
export declare const COMP_UNSIGNED_INT = 5125;
|
|
7
|
+
export declare const COMP_FLOAT = 5126;
|
|
8
|
+
export declare function parseGlb(data: Uint8Array): {
|
|
9
|
+
json: GltfJson;
|
|
10
|
+
bin: Uint8Array;
|
|
11
|
+
} | null;
|
|
12
|
+
export declare function buildGlb(json: GltfJson, bin: Uint8Array): Uint8Array;
|
|
13
|
+
export declare function glbReadVec3(bin: Uint8Array, acc: GltfAccessor, bv: GltfBufferView): Float32Array;
|
|
14
|
+
export declare function glbWriteVec3(bin: Uint8Array, acc: GltfAccessor, bv: GltfBufferView, data: Float32Array): void;
|
|
15
|
+
export declare function glbReadIndices(bin: Uint8Array, acc: GltfAccessor, bv: GltfBufferView): Uint32Array | null;
|
|
16
|
+
export declare function glbWriteIndices(bin: Uint8Array, acc: GltfAccessor, bv: GltfBufferView, data: Uint32Array): void;
|
|
17
|
+
export declare function glbUpdateMinMax(acc: GltfAccessor, data: Float32Array): void;
|
|
18
|
+
export declare function glbGetVec3Accessor(json: GltfJson, accIdx: number): {
|
|
19
|
+
acc: GltfAccessor;
|
|
20
|
+
bv: GltfBufferView;
|
|
21
|
+
} | null;
|
|
22
|
+
export declare function glbGetIndexAccessor(json: GltfJson, accIdx: number): {
|
|
23
|
+
acc: GltfAccessor;
|
|
24
|
+
bv: GltfBufferView;
|
|
25
|
+
} | null;
|
|
26
|
+
export declare function analyzeGlbMetadata(model: Model3DRefLike, bytes: Uint8Array): Model3DMetadata;
|
|
27
|
+
export declare function fallbackMetadata(model: Model3DRefLike, bytes: Uint8Array): Model3DMetadata;
|
|
28
|
+
export declare function requireGlbBytes(model: Model3DRefLike, bytes: Uint8Array, purpose: string): Uint8Array;
|
|
29
|
+
//# sourceMappingURL=glb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"glb.d.ts","sourceRoot":"","sources":["../../../src/nodes/model3d/glb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,cAAc,EACd,QAAQ,EACR,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAGpB,eAAO,MAAM,SAAS,aAAa,CAAC;AACpC,eAAO,MAAM,UAAU,aAAa,CAAC;AACrC,eAAO,MAAM,SAAS,UAAa,CAAC;AACpC,eAAO,MAAM,mBAAmB,OAAO,CAAC;AACxC,eAAO,MAAM,iBAAiB,OAAO,CAAC;AACtC,eAAO,MAAM,UAAU,OAAO,CAAC;AAE/B,wBAAgB,QAAQ,CACtB,IAAI,EAAE,UAAU,GACf;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,UAAU,CAAA;CAAE,GAAG,IAAI,CAqB5C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,GAAG,UAAU,CAsBpE;AAED,wBAAgB,WA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} from "./utils.js";
|
|
2
|
+
export const GLB_MAGIC = 0x46546c67;
|
|
3
|
+
export const CHUNK_JSON = 0x4e4f534a;
|
|
4
|
+
export const CHUNK_BIN = 0x004e4942;
|
|
5
|
+
export const COMP_UNSIGNED_SHORT = 5123;
|
|
6
|
+
export const COMP_UNSIGNED_INT = 5125;
|
|
7
|
+
export const COMP_FLOAT = 5126;
|
|
8
|
+
export function parseGlb(data) {
|
|
9
|
+
if (data.length < 12)
|
|
10
|
+
return null;
|
|
11
|
+
const dv = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
12
|
+
if (dv.getUint32(0, true) !== GLB_MAGIC)
|
|
13
|
+
return null;
|
|
14
|
+
let off = 12;
|
|
15
|
+
let json = {};
|
|
16
|
+
let bin = new Uint8Array(0);
|
|
17
|
+
while (off + 8 <= data.length) {
|
|
18
|
+
const len = dv.getUint32(off, true);
|
|
19
|
+
const type = dv.getUint32(off + 4, true);
|
|
20
|
+
off += 8;
|
|
21
|
+
if (type === CHUNK_JSON) {
|
|
22
|
+
json = JSON.parse(new TextDecoder().decode(data.slice(off, off + len)));
|
|
23
|
+
}
|
|
24
|
+
else if (type === CHUNK_BIN) {
|
|
25
|
+
bin = data.slice(off, off + len);
|
|
26
|
+
}
|
|
27
|
+
off += len;
|
|
28
|
+
}
|
|
29
|
+
return { json, bin };
|
|
30
|
+
}
|
|
31
|
+
export function buildGlb(json, bin) {
|
|
32
|
+
const jsonStr = JSON.stringify(json);
|
|
33
|
+
const encodedJsonBytes = new TextEncoder().encode(jsonStr);
|
|
34
|
+
const jsonPad = (4 - (encodedJsonBytes.length % 4)) % 4;
|
|
35
|
+
const jsonBytes = new Uint8Array(encodedJsonBytes.length + jsonPad);
|
|
36
|
+
jsonBytes.set(encodedJsonBytes);
|
|
37
|
+
jsonBytes.fill(0x20, encodedJsonBytes.length);
|
|
38
|
+
const binPad = (4 - (bin.length % 4)) % 4;
|
|
39
|
+
const total = 12 + 8 + jsonBytes.length + 8 + bin.length + binPad;
|
|
40
|
+
const out = new Uint8Array(total);
|
|
41
|
+
const dv = new DataView(out.buffer);
|
|
42
|
+
dv.setUint32(0, GLB_MAGIC, true);
|
|
43
|
+
dv.setUint32(4, 2, true);
|
|
44
|
+
dv.setUint32(8, total, true);
|
|
45
|
+
dv.setUint32(12, jsonBytes.length, true);
|
|
46
|
+
dv.setUint32(16, CHUNK_JSON, true);
|
|
47
|
+
out.set(jsonBytes, 20);
|
|
48
|
+
const binOff = 20 + jsonBytes.length;
|
|
49
|
+
dv.setUint32(binOff, bin.length + binPad, true);
|
|
50
|
+
dv.setUint32(binOff + 4, CHUNK_BIN, true);
|
|
51
|
+
out.set(bin, binOff + 8);
|
|
52
|
+
return out;
|
|
53
|
+
}
|
|
54
|
+
export function glbReadVec3(bin, acc, bv) {
|
|
55
|
+
const baseOff = (bv.byteOffset ?? 0) + (acc.byteOffset ?? 0);
|
|
56
|
+
const stride = bv.byteStride ?? 12;
|
|
57
|
+
const result = new Float32Array(acc.count * 3);
|
|
58
|
+
const dv = new DataView(bin.buffer, bin.byteOffset);
|
|
59
|
+
for (let i = 0; i < acc.count; i++) {
|
|
60
|
+
const o = baseOff + i * stride;
|
|
61
|
+
result[i * 3] = dv.getFloat32(o, true);
|
|
62
|
+
result[i * 3 + 1] = dv.getFloat32(o + 4, true);
|
|
63
|
+
result[i * 3 + 2] = dv.getFloat32(o + 8, true);
|
|
64
|
+
}
|
|
65
|
+
return result;
|
|
66
|
+
}
|
|
67
|
+
export function glbWriteVec3(bin, acc, bv, data) {
|
|
68
|
+
const baseOff = (bv.byteOffset ?? 0) + (acc.byteOffset ?? 0);
|
|
69
|
+
const stride = bv.byteStride ?? 12;
|
|
70
|
+
const dv = new DataView(bin.buffer, bin.byteOffset);
|
|
71
|
+
for (let i = 0; i < acc.count; i++) {
|
|
72
|
+
const o = baseOff + i * stride;
|
|
73
|
+
dv.setFloat32(o, data[i * 3], true);
|
|
74
|
+
dv.setFloat32(o + 4, data[i * 3 + 1], true);
|
|
75
|
+
dv.setFloat32(o + 8, data[i * 3 + 2], true);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
export function glbReadIndices(bin, acc, bv) {
|
|
79
|
+
const baseOff = (bv.byteOffset ?? 0) + (acc.byteOffset ?? 0);
|
|
80
|
+
const dv = new DataView(bin.buffer, bin.byteOffset);
|
|
81
|
+
const result = new Uint32Array(acc.count);
|
|
82
|
+
if (acc.componentType === COMP_UNSIGNED_SHORT) {
|
|
83
|
+
for (let i = 0; i < acc.count; i++) {
|
|
84
|
+
result[i] = dv.getUint16(baseOff + i * 2, true);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else if (acc.componentType === COMP_UNSIGNED_INT) {
|
|
88
|
+
for (let i = 0; i < acc.count; i++) {
|
|
89
|
+
result[i] = dv.getUint32(baseOff + i * 4, true);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
return result;
|
|
96
|
+
}
|
|
97
|
+
export function glbWriteIndices(bin, acc, bv, data) {
|
|
98
|
+
const baseOff = (bv.byteOffset ?? 0) + (acc.byteOffset ?? 0);
|
|
99
|
+
const dv = new DataView(bin.buffer, bin.byteOffset);
|
|
100
|
+
if (acc.componentType === COMP_UNSIGNED_SHORT) {
|
|
101
|
+
for (let i = 0; i < data.length; i++) {
|
|
102
|
+
dv.setUint16(baseOff + i * 2, data[i], true);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
else if (acc.componentType === COMP_UNSIGNED_INT) {
|
|
106
|
+
for (let i = 0; i < data.length; i++) {
|
|
107
|
+
dv.setUint32(baseOff + i * 4, data[i], true);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
export function glbUpdateMinMax(acc, data) {
|
|
112
|
+
if (acc.type !== "VEC3")
|
|
113
|
+
return;
|
|
114
|
+
const min = [Infinity, Infinity, Infinity];
|
|
115
|
+
const max = [-Infinity, -Infinity, -Infinity];
|
|
116
|
+
for (let i = 0; i < data.length; i += 3) {
|
|
117
|
+
for (let j = 0; j < 3; j++) {
|
|
118
|
+
if (data[i + j] < min[j])
|
|
119
|
+
min[j] = data[i + j];
|
|
120
|
+
if (data[i + j] > max[j])
|
|
121
|
+
max[j] = data[i + j];
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
acc.min = min;
|
|
125
|
+
acc.max = max;
|
|
126
|
+
}
|
|
127
|
+
export function glbGetVec3Accessor(json, accIdx) {
|
|
128
|
+
const acc = json.accessors?.[accIdx];
|
|
129
|
+
if (!acc || acc.componentType !== COMP_FLOAT || acc.type !== "VEC3") {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const bv = json.bufferViews?.[acc.bufferView];
|
|
133
|
+
if (!bv)
|
|
134
|
+
return null;
|
|
135
|
+
return { acc, bv };
|
|
136
|
+
}
|
|
137
|
+
export function glbGetIndexAccessor(json, accIdx) {
|
|
138
|
+
const acc = json.accessors?.[accIdx];
|
|
139
|
+
if (!acc)
|
|
140
|
+
return null;
|
|
141
|
+
const bv = json.bufferViews?.[acc.bufferView];
|
|
142
|
+
if (!bv)
|
|
143
|
+
return null;
|
|
144
|
+
return { acc, bv };
|
|
145
|
+
}
|
|
146
|
+
export function analyzeGlbMetadata(model, bytes) {
|
|
147
|
+
const glb = parseGlb(bytes);
|
|
148
|
+
if (!glb) {
|
|
149
|
+
throw new Error("Expected valid GLB bytes.");
|
|
150
|
+
}
|
|
151
|
+
let vertexCount = 0;
|
|
152
|
+
let faceCount = 0;
|
|
153
|
+
let primitiveCount = 0;
|
|
154
|
+
const meshCount = glb.json.meshes?.length ?? 0;
|
|
155
|
+
const min = [Infinity, Infinity, Infinity];
|
|
156
|
+
const max = [-Infinity, -Infinity, -Infinity];
|
|
157
|
+
let hasBounds = false;
|
|
158
|
+
for (const mesh of glb.json.meshes ?? []) {
|
|
159
|
+
for (const primitive of mesh.primitives) {
|
|
160
|
+
primitiveCount += 1;
|
|
161
|
+
const posIndex = primitive.attributes["POSITION"];
|
|
162
|
+
if (posIndex !== undefined) {
|
|
163
|
+
const accessorRef = glbGetVec3Accessor(glb.json, posIndex);
|
|
164
|
+
if (accessorRef) {
|
|
165
|
+
vertexCount += accessorRef.acc.count;
|
|
166
|
+
const accMin = accessorRef.acc.min;
|
|
167
|
+
const accMax = accessorRef.acc.max;
|
|
168
|
+
if (accMin && accMax && accMin.length >= 3 && accMax.length >= 3) {
|
|
169
|
+
for (let i = 0; i < 3; i++) {
|
|
170
|
+
if (accMin[i] < min[i])
|
|
171
|
+
min[i] = accMin[i];
|
|
172
|
+
if (accMax[i] > max[i])
|
|
173
|
+
max[i] = accMax[i];
|
|
174
|
+
}
|
|
175
|
+
hasBounds = true;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
const positions = glbReadVec3(glb.bin, accessorRef.acc, accessorRef.bv);
|
|
179
|
+
for (let i = 0; i < positions.length; i += 3) {
|
|
180
|
+
for (let j = 0; j < 3; j++) {
|
|
181
|
+
if (positions[i + j] < min[j])
|
|
182
|
+
min[j] = positions[i + j];
|
|
183
|
+
if (positions[i + j] > max[j])
|
|
184
|
+
max[j] = positions[i + j];
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
hasBounds = positions.length > 0 || hasBounds;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
const mode = primitive.mode ?? 4;
|
|
192
|
+
if (mode !== 4)
|
|
193
|
+
continue;
|
|
194
|
+
if (primitive.indices !== undefined) {
|
|
195
|
+
const indexRef = glbGetIndexAccessor(glb.json, primitive.indices);
|
|
196
|
+
if (indexRef) {
|
|
197
|
+
faceCount += Math.floor(indexRef.acc.count / 3);
|
|
198
|
+
continue;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const positionAccessor = posIndex !== undefined ? glbGetVec3Accessor(glb.json, posIndex) : null;
|
|
202
|
+
if (positionAccessor) {
|
|
203
|
+
faceCount += Math.floor(positionAccessor.acc.count / 3);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
uri: model.uri ?? "",
|
|
209
|
+
format: "glb",
|
|
210
|
+
size_bytes: bytes.length,
|
|
211
|
+
vertices: vertexCount,
|
|
212
|
+
faces: faceCount,
|
|
213
|
+
vertex_count: vertexCount,
|
|
214
|
+
face_count: faceCount,
|
|
215
|
+
mesh_count: meshCount,
|
|
216
|
+
primitive_count: primitiveCount,
|
|
217
|
+
bounds_min: hasBounds ? min : [],
|
|
218
|
+
bounds_max: hasBounds ? max : [],
|
|
219
|
+
is_watertight: false,
|
|
220
|
+
center_of_mass: null,
|
|
221
|
+
volume: null,
|
|
222
|
+
surface_area: null
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
export function fallbackMetadata(model, bytes) {
|
|
226
|
+
const vertices = model.vertices ?? Math.floor(bytes.length / 32);
|
|
227
|
+
const faces = model.faces ?? Math.floor(vertices / 3);
|
|
228
|
+
return {
|
|
229
|
+
uri: model.uri ?? "",
|
|
230
|
+
format: modelFormat(model),
|
|
231
|
+
size_bytes: bytes.length,
|
|
232
|
+
vertices,
|
|
233
|
+
faces,
|
|
234
|
+
vertex_count: vertices,
|
|
235
|
+
face_count: faces,
|
|
236
|
+
mesh_count: 0,
|
|
237
|
+
primitive_count: 0,
|
|
238
|
+
bounds_min: [],
|
|
239
|
+
bounds_max: [],
|
|
240
|
+
is_watertight: false,
|
|
241
|
+
center_of_mass: null,
|
|
242
|
+
volume: null,
|
|
243
|
+
surface_area: null
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
export function requireGlbBytes(model, bytes, purpose) {
|
|
247
|
+
if (modelFormat(model) !== "glb") {
|
|
248
|
+
throw new Error(`Unsupported model ${purpose}: only GLB is supported.`);
|
|
249
|
+
}
|
|
250
|
+
if (!parseGlb(bytes)) {
|
|
251
|
+
throw new Error(`Unsupported model ${purpose}: expected valid GLB bytes.`);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CAAC;IAC1E,CAAC;IACD,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CAAC,qBAAqB,OAAO,6BAA6B,CAAC,CAAC;IAC7E,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { GlbTransformNode, glbOutput } from "./base.js";
|
|
2
|
+
export * from "./defaults.js";
|
|
3
|
+
export * from "./io.js";
|
|
4
|
+
export * from "./convert.js";
|
|
5
|
+
export * from "./analysis.js";
|
|
6
|
+
export * from "./transforms.js";
|
|
7
|
+
export * from "./cleanup.js";
|
|
8
|
+
export * from "./ops.js";
|
|
9
|
+
export * from "./generation.js";
|
|
10
|
+
export * from "./render.js";
|
|
11
|
+
import { LoadModel3DFileNode } from "./io.js";
|
|
12
|
+
import { SaveModel3DFileNode } from "./io.js";
|
|
13
|
+
import { SaveModel3DNode } from "./io.js";
|
|
14
|
+
import { FormatConverterNode } from "./convert.js";
|
|
15
|
+
import { GetModel3DMetadataNode } from "./analysis.js";
|
|
16
|
+
import { Transform3DNode, CenterMeshNode, NormalizeModel3DNode } from "./transforms.js";
|
|
17
|
+
import { DecimateNode, Boolean3DNode, MergeMeshesNode } from "./ops.js";
|
|
18
|
+
import { RecalculateNormalsNode, FlipNormalsNode, ExtractLargestComponentNode, RepairMeshNode } from "./cleanup.js";
|
|
19
|
+
import { TextTo3DNode, ImageTo3DNode } from "./generation.js";
|
|
20
|
+
import { RenderToImageNode } from "./render.js";
|
|
21
|
+
export declare const MODEL3D_NODES: readonly [typeof LoadModel3DFileNode, typeof SaveModel3DFileNode, typeof SaveModel3DNode, typeof FormatConverterNode, typeof GetModel3DMetadataNode, typeof Transform3DNode, typeof DecimateNode, typeof Boolean3DNode, typeof RecalculateNormalsNode, typeof CenterMeshNode, typeof FlipNormalsNode, typeof NormalizeModel3DNode, typeof ExtractLargestComponentNode, typeof RepairMeshNode, typeof MergeMeshesNode, typeof TextTo3DNode, typeof ImageTo3DNode, typeof RenderToImageNode];
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/nodes/model3d/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACxD,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAE5B,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,2BAA2B,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACpH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,aAAa,4dAmBhB,CAAC"}
|