@bitmagic/asset-core 0.2.19-dev.0 → 0.2.19-dev.10
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/art-style.d.ts +32 -0
- package/dist/art-style.d.ts.map +1 -0
- package/dist/art-style.js +42 -0
- package/dist/art-style.js.map +1 -0
- package/dist/cover-prompt.d.ts +26 -2
- package/dist/cover-prompt.d.ts.map +1 -1
- package/dist/cover-prompt.js +40 -4
- package/dist/cover-prompt.js.map +1 -1
- package/dist/forger-client.d.ts +14 -0
- package/dist/forger-client.d.ts.map +1 -1
- package/dist/forger-client.js +14 -1
- package/dist/forger-client.js.map +1 -1
- package/dist/generators/animation-from-video.d.ts +26 -0
- package/dist/generators/animation-from-video.d.ts.map +1 -1
- package/dist/generators/animation-from-video.js +32 -0
- package/dist/generators/animation-from-video.js.map +1 -1
- package/dist/generators/animation.d.ts +2 -2
- package/dist/generators/character.d.ts +33 -0
- package/dist/generators/character.d.ts.map +1 -1
- package/dist/generators/character.js +69 -8
- package/dist/generators/character.js.map +1 -1
- package/dist/generators/video.d.ts +112 -0
- package/dist/generators/video.d.ts.map +1 -0
- package/dist/generators/video.js +157 -0
- package/dist/generators/video.js.map +1 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/dist/reference-prompt.d.ts +24 -2
- package/dist/reference-prompt.d.ts.map +1 -1
- package/dist/reference-prompt.js +10 -6
- package/dist/reference-prompt.js.map +1 -1
- package/dist/terminal-failure.d.ts +31 -7
- package/dist/terminal-failure.d.ts.map +1 -1
- package/dist/terminal-failure.js +11 -19
- package/dist/terminal-failure.js.map +1 -1
- package/dist/types.d.ts +3 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The game's declared art style — the one switch that says whether a 3D game is built from
|
|
3
|
+
* voxels or from low-poly meshes.
|
|
4
|
+
*
|
|
5
|
+
* It lives in `src/work/game.json` as `artStyle`, beside `physicsMode`, and is absent on every
|
|
6
|
+
* game made before it existed: absent means `voxel`, which is what every generator produced
|
|
7
|
+
* until now. The engine repeats the literal union in `game/src/types/game.ts` (it cannot import
|
|
8
|
+
* this package) and copies the field onto `GameData` in `mergeGameData`; a test here pins the
|
|
9
|
+
* two lists to each other through the generated world schema.
|
|
10
|
+
*
|
|
11
|
+
* What reads it: the cover and reference prompt builders (`cover-prompt.ts`,
|
|
12
|
+
* `reference-prompt.ts`), the character generator (`voxelize`), the CLI's asset defaults
|
|
13
|
+
* (`assets add`, `generate model|prop|character`), the judge's fallback art direction, and
|
|
14
|
+
* the engine's lighting/bloom presets. What does NOT: the web lane's planner, which still
|
|
15
|
+
* builds voxel games only — its agent has no way to author a low-poly level.
|
|
16
|
+
*
|
|
17
|
+
* Published as the `@bitmagic/asset-core/art-style` subpath so browser consumers can read
|
|
18
|
+
* the enum without the root barrel's generators. No network, no node APIs.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ART_STYLES: readonly ["voxel", "low-poly"];
|
|
21
|
+
export type ArtStyle = (typeof ART_STYLES)[number];
|
|
22
|
+
/** What an absent `artStyle` means — every game made before the field existed. */
|
|
23
|
+
export declare const DEFAULT_ART_STYLE: ArtStyle;
|
|
24
|
+
/** The exact member or `undefined`; never coerces, so a typo is visible to the caller. */
|
|
25
|
+
export declare function parseArtStyle(value: unknown): ArtStyle | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* The medium in a sentence, for a GAME-DESIGN.md `## Art direction` that nobody has written
|
|
28
|
+
* yet and for the judge when that heading is missing — so a low-poly game is never graded
|
|
29
|
+
* as "faceted" and a voxel game never as "blocky" by default.
|
|
30
|
+
*/
|
|
31
|
+
export declare function describeArtStyle(style: ArtStyle): string;
|
|
32
|
+
//# sourceMappingURL=art-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"art-style.d.ts","sourceRoot":"","sources":["../src/art-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,eAAO,MAAM,UAAU,gCAAiC,CAAC;AACzD,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEnD,kFAAkF;AAClF,eAAO,MAAM,iBAAiB,EAAE,QAAkB,CAAC;AAEnD,0FAA0F;AAC1F,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,CAIlE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAOxD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The game's declared art style — the one switch that says whether a 3D game is built from
|
|
3
|
+
* voxels or from low-poly meshes.
|
|
4
|
+
*
|
|
5
|
+
* It lives in `src/work/game.json` as `artStyle`, beside `physicsMode`, and is absent on every
|
|
6
|
+
* game made before it existed: absent means `voxel`, which is what every generator produced
|
|
7
|
+
* until now. The engine repeats the literal union in `game/src/types/game.ts` (it cannot import
|
|
8
|
+
* this package) and copies the field onto `GameData` in `mergeGameData`; a test here pins the
|
|
9
|
+
* two lists to each other through the generated world schema.
|
|
10
|
+
*
|
|
11
|
+
* What reads it: the cover and reference prompt builders (`cover-prompt.ts`,
|
|
12
|
+
* `reference-prompt.ts`), the character generator (`voxelize`), the CLI's asset defaults
|
|
13
|
+
* (`assets add`, `generate model|prop|character`), the judge's fallback art direction, and
|
|
14
|
+
* the engine's lighting/bloom presets. What does NOT: the web lane's planner, which still
|
|
15
|
+
* builds voxel games only — its agent has no way to author a low-poly level.
|
|
16
|
+
*
|
|
17
|
+
* Published as the `@bitmagic/asset-core/art-style` subpath so browser consumers can read
|
|
18
|
+
* the enum without the root barrel's generators. No network, no node APIs.
|
|
19
|
+
*/
|
|
20
|
+
export const ART_STYLES = ['voxel', 'low-poly'];
|
|
21
|
+
/** What an absent `artStyle` means — every game made before the field existed. */
|
|
22
|
+
export const DEFAULT_ART_STYLE = 'voxel';
|
|
23
|
+
/** The exact member or `undefined`; never coerces, so a typo is visible to the caller. */
|
|
24
|
+
export function parseArtStyle(value) {
|
|
25
|
+
return typeof value === 'string' && ART_STYLES.includes(value)
|
|
26
|
+
? value
|
|
27
|
+
: undefined;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The medium in a sentence, for a GAME-DESIGN.md `## Art direction` that nobody has written
|
|
31
|
+
* yet and for the judge when that heading is missing — so a low-poly game is never graded
|
|
32
|
+
* as "faceted" and a voxel game never as "blocky" by default.
|
|
33
|
+
*/
|
|
34
|
+
export function describeArtStyle(style) {
|
|
35
|
+
switch (style) {
|
|
36
|
+
case 'voxel':
|
|
37
|
+
return 'Voxel art: every object built from visible cubes, MagicaVoxel-style blocky geometry with crisp cube edges.';
|
|
38
|
+
case 'low-poly':
|
|
39
|
+
return 'Low-poly art: flat-shaded polygon meshes with clean facets and simple colour blocking; visible polygons and hard edges are the medium, not a defect.';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=art-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"art-style.js","sourceRoot":"","sources":["../src/art-style.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,UAAU,CAAU,CAAC;AAGzD,kFAAkF;AAClF,MAAM,CAAC,MAAM,iBAAiB,GAAa,OAAO,CAAC;AAEnD,0FAA0F;AAC1F,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,UAAgC,CAAC,QAAQ,CAAC,KAAK,CAAC;QACnF,CAAC,CAAE,KAAkB;QACrB,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB,CAAC,KAAe;IAC9C,QAAQ,KAAK,EAAE,CAAC;QACd,KAAK,OAAO;YACV,OAAO,4GAA4G,CAAC;QACtH,KAAK,UAAU;YACb,OAAO,sJAAsJ,CAAC;IAClK,CAAC;AACH,CAAC"}
|
package/dist/cover-prompt.d.ts
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* No network, no credentials: this module composes strings. Each lane calls its
|
|
10
10
|
* own image generator with the result.
|
|
11
|
+
*
|
|
12
|
+
* The style is a parameter with `voxel` as its default: the web lane never
|
|
13
|
+
* passes one and keeps rendering exactly what it always has, while the CLI
|
|
14
|
+
* passes the project's `artStyle` (game.json) so a low-poly game's cover is
|
|
15
|
+
* not a cube-built picture of a mesh-built world.
|
|
11
16
|
*/
|
|
17
|
+
import { type ArtStyle } from './art-style.js';
|
|
12
18
|
/**
|
|
13
19
|
* Short voxel-geometry directive that OPENS every cover and reference prompt.
|
|
14
20
|
*
|
|
@@ -32,16 +38,34 @@ export declare const VOXEL_STYLE_LEAD = "Voxel art: every object built from visi
|
|
|
32
38
|
* away from blocky ones.
|
|
33
39
|
*/
|
|
34
40
|
export declare const PIXAR_VOXEL_STYLE: string;
|
|
41
|
+
/**
|
|
42
|
+
* The low-poly counterpart of `VOXEL_STYLE_LEAD`: same position, same job. It
|
|
43
|
+
* names what the geometry IS (flat-shaded facets) and what it is NOT (cubes),
|
|
44
|
+
* because the voxel lead trained every downstream prompt in this product and a
|
|
45
|
+
* model that has seen "Bitmagic" material will otherwise drift back to cubes.
|
|
46
|
+
*/
|
|
47
|
+
export declare const LOW_POLY_STYLE_LEAD = "Low-poly art: flat-shaded polygon meshes with clean facets and hard edges, simple colour blocking, no visible cubes, no voxels.";
|
|
48
|
+
/**
|
|
49
|
+
* The low-poly counterpart of `PIXAR_VOXEL_STYLE`: the same polished-render tail
|
|
50
|
+
* and the same wordless directive, with faceted vocabulary in place of cubic.
|
|
51
|
+
*/
|
|
52
|
+
export declare const PIXAR_LOW_POLY_STYLE: string;
|
|
53
|
+
/** The lead that opens a cover or reference prompt for this style. */
|
|
54
|
+
export declare function styleLead(style: ArtStyle): string;
|
|
55
|
+
/** The tail that closes a cover or reference prompt for this style. */
|
|
56
|
+
export declare function styleTail(style: ArtStyle): string;
|
|
57
|
+
/** The adjective the prompt bodies use for the scene: "a voxel game scene", "a low-poly world". */
|
|
58
|
+
export declare function styleNoun(style: ArtStyle): string;
|
|
35
59
|
/** How much of the design text reaches the image model; the rest is dropped. */
|
|
36
60
|
export declare const MAX_COVER_DESIGN_CHARS = 1500;
|
|
37
61
|
/**
|
|
38
62
|
* Compose the image prompt for a cover image from a game's design text
|
|
39
63
|
* (GAME-DESIGN.md content or, during planning, the pitch/plan doc). Falls back
|
|
40
|
-
* to a generic
|
|
64
|
+
* to a generic scene in the style when none is present.
|
|
41
65
|
*
|
|
42
66
|
* The game name is deliberately NEVER injected — naming the game makes image
|
|
43
67
|
* models render the title as on-image text. We describe a wordless scene and
|
|
44
68
|
* append a strong no-text directive.
|
|
45
69
|
*/
|
|
46
|
-
export declare function buildCoverArtPrompt(gameDesign: string): string;
|
|
70
|
+
export declare function buildCoverArtPrompt(gameDesign: string, artStyle?: ArtStyle): string;
|
|
47
71
|
//# sourceMappingURL=cover-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cover-prompt.d.ts","sourceRoot":"","sources":["../src/cover-prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cover-prompt.d.ts","sourceRoot":"","sources":["../src/cover-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;GASG;AACH,eAAO,MAAM,gBAAgB,qHACuF,CAAC;AAErH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,QAIsD,CAAC;AAErF;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,oIACmG,CAAC;AAEpI;;;GAGG;AACH,eAAO,MAAM,oBAAoB,QAImD,CAAC;AAErF,sEAAsE;AACtE,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAED,uEAAuE;AACvE,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAED,mGAAmG;AACnG,wBAAgB,SAAS,CAAC,KAAK,EAAE,QAAQ,GAAG,MAAM,CAEjD;AAED,gFAAgF;AAChF,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,GAAE,QAA4B,GAAG,MAAM,CAWtG"}
|
package/dist/cover-prompt.js
CHANGED
|
@@ -8,7 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* No network, no credentials: this module composes strings. Each lane calls its
|
|
10
10
|
* own image generator with the result.
|
|
11
|
+
*
|
|
12
|
+
* The style is a parameter with `voxel` as its default: the web lane never
|
|
13
|
+
* passes one and keeps rendering exactly what it always has, while the CLI
|
|
14
|
+
* passes the project's `artStyle` (game.json) so a low-poly game's cover is
|
|
15
|
+
* not a cube-built picture of a mesh-built world.
|
|
11
16
|
*/
|
|
17
|
+
import { DEFAULT_ART_STYLE } from './art-style.js';
|
|
12
18
|
/**
|
|
13
19
|
* Short voxel-geometry directive that OPENS every cover and reference prompt.
|
|
14
20
|
*
|
|
@@ -35,22 +41,52 @@ export const PIXAR_VOXEL_STYLE = 'Voxel art built from visible small cubes: Magi
|
|
|
35
41
|
'rendered as a highly polished 3D scene with the craft of a Pixar-quality animated film, ' +
|
|
36
42
|
'cinematic lighting that fits the scene, soft ambient occlusion, rich detail and expressive composition. ' +
|
|
37
43
|
'Wordless illustration, no text, no title, no words, no letters, no logos, no UI.';
|
|
44
|
+
/**
|
|
45
|
+
* The low-poly counterpart of `VOXEL_STYLE_LEAD`: same position, same job. It
|
|
46
|
+
* names what the geometry IS (flat-shaded facets) and what it is NOT (cubes),
|
|
47
|
+
* because the voxel lead trained every downstream prompt in this product and a
|
|
48
|
+
* model that has seen "Bitmagic" material will otherwise drift back to cubes.
|
|
49
|
+
*/
|
|
50
|
+
export const LOW_POLY_STYLE_LEAD = 'Low-poly art: flat-shaded polygon meshes with clean facets and hard edges, simple colour blocking, no visible cubes, no voxels.';
|
|
51
|
+
/**
|
|
52
|
+
* The low-poly counterpart of `PIXAR_VOXEL_STYLE`: the same polished-render tail
|
|
53
|
+
* and the same wordless directive, with faceted vocabulary in place of cubic.
|
|
54
|
+
*/
|
|
55
|
+
export const PIXAR_LOW_POLY_STYLE = 'Low-poly art with flat-shaded facets and hard edges on every object, no cubes, no voxels, ' +
|
|
56
|
+
'rendered as a highly polished 3D scene with the craft of a Pixar-quality animated film, ' +
|
|
57
|
+
'cinematic lighting that fits the scene, soft ambient occlusion, rich detail and expressive composition. ' +
|
|
58
|
+
'Wordless illustration, no text, no title, no words, no letters, no logos, no UI.';
|
|
59
|
+
/** The lead that opens a cover or reference prompt for this style. */
|
|
60
|
+
export function styleLead(style) {
|
|
61
|
+
return style === 'low-poly' ? LOW_POLY_STYLE_LEAD : VOXEL_STYLE_LEAD;
|
|
62
|
+
}
|
|
63
|
+
/** The tail that closes a cover or reference prompt for this style. */
|
|
64
|
+
export function styleTail(style) {
|
|
65
|
+
return style === 'low-poly' ? PIXAR_LOW_POLY_STYLE : PIXAR_VOXEL_STYLE;
|
|
66
|
+
}
|
|
67
|
+
/** The adjective the prompt bodies use for the scene: "a voxel game scene", "a low-poly world". */
|
|
68
|
+
export function styleNoun(style) {
|
|
69
|
+
return style === 'low-poly' ? 'low-poly' : 'voxel';
|
|
70
|
+
}
|
|
38
71
|
/** How much of the design text reaches the image model; the rest is dropped. */
|
|
39
72
|
export const MAX_COVER_DESIGN_CHARS = 1500;
|
|
40
73
|
/**
|
|
41
74
|
* Compose the image prompt for a cover image from a game's design text
|
|
42
75
|
* (GAME-DESIGN.md content or, during planning, the pitch/plan doc). Falls back
|
|
43
|
-
* to a generic
|
|
76
|
+
* to a generic scene in the style when none is present.
|
|
44
77
|
*
|
|
45
78
|
* The game name is deliberately NEVER injected — naming the game makes image
|
|
46
79
|
* models render the title as on-image text. We describe a wordless scene and
|
|
47
80
|
* append a strong no-text directive.
|
|
48
81
|
*/
|
|
49
|
-
export function buildCoverArtPrompt(gameDesign) {
|
|
82
|
+
export function buildCoverArtPrompt(gameDesign, artStyle = DEFAULT_ART_STYLE) {
|
|
50
83
|
const excerpt = gameDesign.trim().slice(0, MAX_COVER_DESIGN_CHARS);
|
|
84
|
+
const lead = styleLead(artStyle);
|
|
85
|
+
const tail = styleTail(artStyle);
|
|
86
|
+
const noun = styleNoun(artStyle);
|
|
51
87
|
if (!excerpt) {
|
|
52
|
-
return `${
|
|
88
|
+
return `${lead} A charming, inviting ${noun} adventure game scene, colorful and full of character. ${tail}`;
|
|
53
89
|
}
|
|
54
|
-
return `${
|
|
90
|
+
return `${lead}\nA ${noun} game scene based on this game design:\n${excerpt}\n\nDepict the world and atmosphere as a single illustrated scene. ${tail}`;
|
|
55
91
|
}
|
|
56
92
|
//# sourceMappingURL=cover-prompt.js.map
|
package/dist/cover-prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cover-prompt.js","sourceRoot":"","sources":["../src/cover-prompt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"cover-prompt.js","sourceRoot":"","sources":["../src/cover-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iBAAiB,EAAiB,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAC3B,kHAAkH,CAAC;AAErH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAC5B,qHAAqH;IACrH,0FAA0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,2CAA2C,OAAO,sEAAsE,IAAI,EAAE,CAAC;AAC1J,CAAC"}
|
package/dist/forger-client.d.ts
CHANGED
|
@@ -9,6 +9,20 @@ export interface AssetForgerCredentials {
|
|
|
9
9
|
username: string;
|
|
10
10
|
password: string;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* How long a forge job may run before the client stops waiting.
|
|
14
|
+
*
|
|
15
|
+
* Raised from 8 to 20 minutes when the Meshy 6 mesh model was added: that lane
|
|
16
|
+
* measured 283s end to end (mesh 247s, Uthana rigging 32s, Blender 2.6s) and
|
|
17
|
+
* Runware's own spread runs to 6m19s for the mesh alone, so the old ceiling
|
|
18
|
+
* could abandon a job that was still running and already billed. Characters and
|
|
19
|
+
* props (`hq-asset-jobs`) poll on this default rather than naming their own.
|
|
20
|
+
*
|
|
21
|
+
* The cost is that a genuinely wedged forge now hangs a caller for 20 minutes
|
|
22
|
+
* instead of 8. Generators that know their own ceiling still set it explicitly
|
|
23
|
+
* via `JobWaitOptions` — `video.ts` caps itself at 10 minutes.
|
|
24
|
+
*/
|
|
25
|
+
export declare const DEFAULT_JOB_TIMEOUT_MS: number;
|
|
12
26
|
export declare class AssetForgerClient implements ForgerClient {
|
|
13
27
|
private readonly baseUrl;
|
|
14
28
|
private readonly credentials;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forger-client.d.ts","sourceRoot":"","sources":["../src/forger-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE3E;;;;;GAKG;AAEH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;
|
|
1
|
+
{"version":3,"file":"forger-client.d.ts","sourceRoot":"","sources":["../src/forger-client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,M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
|
+
* How long a forge job may run before the client stops waiting.
|
|
5
|
+
*
|
|
6
|
+
* Raised from 8 to 20 minutes when the Meshy 6 mesh model was added: that lane
|
|
7
|
+
* measured 283s end to end (mesh 247s, Uthana rigging 32s, Blender 2.6s) and
|
|
8
|
+
* Runware's own spread runs to 6m19s for the mesh alone, so the old ceiling
|
|
9
|
+
* could abandon a job that was still running and already billed. Characters and
|
|
10
|
+
* props (`hq-asset-jobs`) poll on this default rather than naming their own.
|
|
11
|
+
*
|
|
12
|
+
* The cost is that a genuinely wedged forge now hangs a caller for 20 minutes
|
|
13
|
+
* instead of 8. Generators that know their own ceiling still set it explicitly
|
|
14
|
+
* via `JobWaitOptions` — `video.ts` caps itself at 10 minutes.
|
|
15
|
+
*/
|
|
16
|
+
export const DEFAULT_JOB_TIMEOUT_MS = 20 * 60 * 1000;
|
|
4
17
|
export class AssetForgerClient {
|
|
5
18
|
constructor(logger) {
|
|
6
19
|
this.baseUrl = process.env.ASSET_FORGER_URL || 'https://asset-forger.staging.bitmagic.cloud';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forger-client.js","sourceRoot":"","sources":["../src/forger-client.ts"],"names":[],"mappings":"AAcA,sEAAsE;AACtE,MAAM,cAAc,GAAG,KAAM,CAAC;AAE9B,MAAM,sBAAsB,GAAG,
|
|
1
|
+
{"version":3,"file":"forger-client.js","sourceRoot":"","sources":["../src/forger-client.ts"],"names":[],"mappings":"AAcA,sEAAsE;AACtE,MAAM,cAAc,GAAG,KAAM,CAAC;AAE9B;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAErD,MAAM,OAAO,iBAAiB;IAK5B,YAAY,MAAkB;QAJb,YAAO,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,6CAA6C,CAAC;QAKvG,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC;QAClB,MAAM,QAAQ,GAAG,O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AC,UAAU,CAAC,MAAM,EAAE,CAAC;oBACvB,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,8BAA8B,CAAC,CAAC;gBAC9D,CAAC;gBACD,OAAO,UAAU,CAAC,MAAM,CAAC;YAC3B,CAAC;YAED,IAAI,UAAU,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;gBACnC,MAAM,MAAM,GAAG,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ;oBACjD,CAAC,CAAC,UAAU,CAAC,KAAK;oBAClB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,IAAI,eAAe,CAAC,CAAC;gBACxD,MAAM,QAAQ,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,gBAAgB,UAAU,CAAC,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACvF,MAAM,IAAI,KAAK,CAAC,OAAO,KAAK,UAAU,QAAQ,KAAK,MAAM,EAAE,CAAC,CAAC;YAC/D,CAAC;QACH,CAAC;IACH,CAAC;CACF"}
|
|
@@ -39,6 +39,32 @@ export interface TrimAnalysisJobResult {
|
|
|
39
39
|
export declare const MIN_TRIM_KEPT_SECONDS = 2;
|
|
40
40
|
/** Uthana processing has no documented bound; 20 minutes covers a 60 s clip with margin. */
|
|
41
41
|
export declare const ANIMATION_FROM_VIDEO_TIMEOUT_MS: number;
|
|
42
|
+
/**
|
|
43
|
+
* Framing appended to a `--video-prompt` description before it is sent to the
|
|
44
|
+
* video generator, so the clip that comes back is something Uthana can read.
|
|
45
|
+
*
|
|
46
|
+
* Uthana wants one centred person, whole body visible, from a fixed camera
|
|
47
|
+
* (BitmagicLab/uthana.py:610). Video models default to cinema: they answer "a
|
|
48
|
+
* cartwheel" with a cropped hero shot, a dolly move and a cut. That footage is
|
|
49
|
+
* rejected as `upstream-failed` AFTER both legs have been paid for, so the
|
|
50
|
+
* steering is not a nicety — it is what makes the lane work. Measured 2026-09:
|
|
51
|
+
* with this wording, seedance-fast clips of a walk and a wave both produced
|
|
52
|
+
* usable Mixamo-rigged motion, arm-dominant for the wave and leg-dominant for
|
|
53
|
+
* the walk. Same reasoning as the product-shot framing forge-voxels adds.
|
|
54
|
+
*/
|
|
55
|
+
export declare const MOTION_SOURCE_FRAMING: string;
|
|
56
|
+
/**
|
|
57
|
+
* Uthana's floor, which is higher than the video lane's own 1 s minimum — a clip
|
|
58
|
+
* short enough for `generate-video` can still be too short to capture.
|
|
59
|
+
*/
|
|
60
|
+
export declare const MOTION_SOURCE_MIN_SECONDS = 2;
|
|
61
|
+
/** Long enough to hold a whole gesture; every extra second is billed. */
|
|
62
|
+
export declare const MOTION_SOURCE_DEFAULT_SECONDS = 5;
|
|
63
|
+
/**
|
|
64
|
+
* `"a person waving"` -> the same, plus the framing above. The description is
|
|
65
|
+
* kept first so the model reads the motion before the staging notes.
|
|
66
|
+
*/
|
|
67
|
+
export declare function buildMotionSourcePrompt(description: string): string;
|
|
42
68
|
export declare const animationFromVideoParamsSchema: z.ZodEffects<z.ZodObject<{
|
|
43
69
|
videoUrl: z.ZodString;
|
|
44
70
|
name: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-from-video.d.ts","sourceRoot":"","sources":["../../src/generators/animation-from-video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAK7E;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,sBAAsB,+EAIzB,CAAC;AACX,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzE,eAAO,MAAM,iBAAiB,kCAAmC,CAAC;AAClE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEjE,eAAO,MAAM,kCAAkC,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B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAkBrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,2BAA2B,EAAE,qBAAqB,GAAG,mBAAmB,CAAC,GAAG,MAAM,CAG/H;AAED,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,wBAAwB,EAChC,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,wBAAwB,CAAC,CAsDnC"}
|
|
@@ -31,6 +31,38 @@ export const ANIMATION_TRIM_ANALYSIS_JOBS_ENDPOINT = '/ai/v1/analyse-motion-trim
|
|
|
31
31
|
export const MIN_TRIM_KEPT_SECONDS = 2;
|
|
32
32
|
/** Uthana processing has no documented bound; 20 minutes covers a 60 s clip with margin. */
|
|
33
33
|
export const ANIMATION_FROM_VIDEO_TIMEOUT_MS = 20 * 60 * 1000;
|
|
34
|
+
/**
|
|
35
|
+
* Framing appended to a `--video-prompt` description before it is sent to the
|
|
36
|
+
* video generator, so the clip that comes back is something Uthana can read.
|
|
37
|
+
*
|
|
38
|
+
* Uthana wants one centred person, whole body visible, from a fixed camera
|
|
39
|
+
* (BitmagicLab/uthana.py:610). Video models default to cinema: they answer "a
|
|
40
|
+
* cartwheel" with a cropped hero shot, a dolly move and a cut. That footage is
|
|
41
|
+
* rejected as `upstream-failed` AFTER both legs have been paid for, so the
|
|
42
|
+
* steering is not a nicety — it is what makes the lane work. Measured 2026-09:
|
|
43
|
+
* with this wording, seedance-fast clips of a walk and a wave both produced
|
|
44
|
+
* usable Mixamo-rigged motion, arm-dominant for the wave and leg-dominant for
|
|
45
|
+
* the walk. Same reasoning as the product-shot framing forge-voxels adds.
|
|
46
|
+
*/
|
|
47
|
+
export const MOTION_SOURCE_FRAMING = 'A single person, alone in frame, filmed head to toe '
|
|
48
|
+
+ 'with the whole body visible and centred. Locked-off static camera at eye level, no zoom, '
|
|
49
|
+
+ 'no pan, no cuts. Even bright lighting, plain uncluttered background. Realistic human '
|
|
50
|
+
+ 'proportions, ordinary clothing.';
|
|
51
|
+
/**
|
|
52
|
+
* Uthana's floor, which is higher than the video lane's own 1 s minimum — a clip
|
|
53
|
+
* short enough for `generate-video` can still be too short to capture.
|
|
54
|
+
*/
|
|
55
|
+
export const MOTION_SOURCE_MIN_SECONDS = 2;
|
|
56
|
+
/** Long enough to hold a whole gesture; every extra second is billed. */
|
|
57
|
+
export const MOTION_SOURCE_DEFAULT_SECONDS = 5;
|
|
58
|
+
/**
|
|
59
|
+
* `"a person waving"` -> the same, plus the framing above. The description is
|
|
60
|
+
* kept first so the model reads the motion before the staging notes.
|
|
61
|
+
*/
|
|
62
|
+
export function buildMotionSourcePrompt(description) {
|
|
63
|
+
const trimmed = description.trim().replace(/[.\s]+$/, '');
|
|
64
|
+
return `${trimmed}. ${MOTION_SOURCE_FRAMING}`;
|
|
65
|
+
}
|
|
34
66
|
export const animationFromVideoParamsSchema = z.object({
|
|
35
67
|
videoUrl: z.string().url()
|
|
36
68
|
.describe('Public URL of the uploaded video (mp4/mov/avi/webm, 2–60 s, one full-body person).'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation-from-video.js","sourceRoot":"","sources":["../../src/generators/animation-from-video.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,qBAAqB;IACrB,qBAAqB;IACrB,oBAAoB;CACZ,CAAC;AAGX,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAU,CAAC;AAGlE,MAAM,CAAC,MAAM,kCAAkC,GA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AY,EAAE,MAAM,CAAC,YAAY;QACjC,QAAQ;QACR,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,GAAG,CAAC,MAAM,CAAC,mBAAmB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,MAAM,CAAC,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACxG,GAAG,CAAC,MAAM,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,MAAM,CAAC,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAClG,QAAQ,EAAE,IAAI;KACf,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -51,17 +51,17 @@ export declare const animationParamsSchema: z.ZodObject<{
|
|
|
51
51
|
length?: number | undefined;
|
|
52
52
|
loop?: boolean | undefined;
|
|
53
53
|
assetId?: string | undefined;
|
|
54
|
-
model?: string | undefined;
|
|
55
54
|
seed?: number | undefined;
|
|
55
|
+
model?: string | undefined;
|
|
56
56
|
inPlace?: boolean | undefined;
|
|
57
57
|
}, {
|
|
58
58
|
description: string;
|
|
59
59
|
length?: number | undefined;
|
|
60
60
|
loop?: boolean | undefined;
|
|
61
61
|
assetId?: string | undefined;
|
|
62
|
+
seed?: number | undefined;
|
|
62
63
|
model?: string | undefined;
|
|
63
64
|
cfgScale?: number | undefined;
|
|
64
|
-
seed?: number | undefined;
|
|
65
65
|
footIk?: boolean | undefined;
|
|
66
66
|
inPlace?: boolean | undefined;
|
|
67
67
|
}>;
|
|
@@ -23,13 +23,17 @@ export declare const characterParamsSchema: z.ZodObject<{
|
|
|
23
23
|
headScale: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
24
24
|
assetId: z.ZodOptional<z.ZodString>;
|
|
25
25
|
useLibrary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
26
|
+
voxelize: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
27
|
+
meshModel: z.ZodOptional<z.ZodString>;
|
|
26
28
|
}, "strict", z.ZodTypeAny, {
|
|
27
29
|
name: string;
|
|
28
30
|
prompt: string;
|
|
29
31
|
applyToPlayer: boolean;
|
|
30
32
|
headScale: number;
|
|
31
33
|
useLibrary: boolean;
|
|
34
|
+
voxelize: boolean;
|
|
32
35
|
assetId?: string | undefined;
|
|
36
|
+
meshModel?: string | undefined;
|
|
33
37
|
}, {
|
|
34
38
|
name: string;
|
|
35
39
|
prompt: string;
|
|
@@ -37,6 +41,8 @@ export declare const characterParamsSchema: z.ZodObject<{
|
|
|
37
41
|
applyToPlayer?: boolean | undefined;
|
|
38
42
|
headScale?: number | undefined;
|
|
39
43
|
useLibrary?: boolean | undefined;
|
|
44
|
+
voxelize?: boolean | undefined;
|
|
45
|
+
meshModel?: string | undefined;
|
|
40
46
|
}>;
|
|
41
47
|
/**
|
|
42
48
|
* The schema's INPUT type — callers may omit the defaulted fields. The
|
|
@@ -60,5 +66,32 @@ export type CharacterResult = AssetResultBase & {
|
|
|
60
66
|
similarity: number;
|
|
61
67
|
};
|
|
62
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* The Asset Forger mesh model that forges a true low-poly body: an even remesh in
|
|
71
|
+
* an enforced A-pose rather than a decimated photoreal reconstruction.
|
|
72
|
+
*
|
|
73
|
+
* This is the DEFAULT for a low-poly character (`voxelize: false`) — see
|
|
74
|
+
* {@link meshModelFor}. It is deliberately not the default for a voxel one:
|
|
75
|
+
* there the body is rebuilt out of cubes, so the remesh, the A-pose and the
|
|
76
|
+
* texture are all discarded, and the money buys nothing.
|
|
77
|
+
*/
|
|
78
|
+
export declare const MESHY_MESH_MODEL = "runware-meshy-6";
|
|
79
|
+
/**
|
|
80
|
+
* Which mesh model forges this character.
|
|
81
|
+
*
|
|
82
|
+
* A low-poly game ships the textured rig itself, so the geometry is the product
|
|
83
|
+
* and Meshy is worth its price: an even remesh in an enforced A-pose, against a
|
|
84
|
+
* TRELLIS reconstruction that is only as low-poly as its concept image happened
|
|
85
|
+
* to be. A voxel game re-voxelizes the body, which throws all of that away.
|
|
86
|
+
*
|
|
87
|
+
* The cost is real and worth stating plainly: ~$0.80 and ~6 minutes per low-poly
|
|
88
|
+
* character, against fractions of a cent and ~40 s on the Forger default. An
|
|
89
|
+
* explicit `meshModel` overrides this in both directions — pass
|
|
90
|
+
* `unified-trellis` to opt a low-poly character back onto the cheap lane.
|
|
91
|
+
*/
|
|
92
|
+
export declare function meshModelFor(input: {
|
|
93
|
+
voxelize: boolean;
|
|
94
|
+
meshModel?: string;
|
|
95
|
+
}): string | undefined;
|
|
63
96
|
export declare function generateCharacter(params: CharacterParams, deps: GenerateDeps): Promise<CharacterResult>;
|
|
64
97
|
//# sourceMappingURL=character.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/generators/character.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAK7E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAEzD;AAED,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../src/generators/character.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAc,MAAM,aAAa,CAAC;AAK7E;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,IAAI,OAAO,CAEzD;AAED,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiCvB,CAAC;AAEZ;;;;GAIG;AACH,MAAM,MAAM,eAA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