@bitmagic/asset-core 0.2.8-dev.0 → 0.2.8-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.
|
@@ -36,8 +36,16 @@ export declare const propVoxelGrids: readonly [0, 32, 64, 128, 256, 512];
|
|
|
36
36
|
export declare const propVoxelParamsSchema: z.ZodObject<{
|
|
37
37
|
prompt: z.ZodString;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
40
|
-
*
|
|
39
|
+
* 512 because what this returns is a MASTER, not a working asset.
|
|
40
|
+
*
|
|
41
|
+
* `resampleMaster` only ever merges cells — it refuses to upsample rather than inventing detail
|
|
42
|
+
* — so the grid forged here is the ceiling on every size the asset will ever be re-baked at.
|
|
43
|
+
* Forging at the working size is the one choice that cannot be undone later, and it costs
|
|
44
|
+
* nothing to avoid: the Modal tap generates at its native resolution either way and only
|
|
45
|
+
* downsamples afterwards, so a finer grid buys headroom for the price of a few megabytes.
|
|
46
|
+
*
|
|
47
|
+
* The web lane already forges native (`local-forge.ts` posts no grid at all); the smaller values
|
|
48
|
+
* remain for a caller that deliberately wants a working-size grid rather than a source.
|
|
41
49
|
*/
|
|
42
50
|
grid: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0>, z.ZodLiteral<32>, z.ZodLiteral<64>, z.ZodLiteral<128>, z.ZodLiteral<256>, z.ZodLiteral<512>]>>>;
|
|
43
51
|
}, "strict", z.ZodTypeAny, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-voxel.d.ts","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;IAIhC
|
|
1
|
+
{"version":3,"file":"prop-voxel.d.ts","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAIjE;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,cAAc,qCAAsC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;IAIhC;;;;;;;;;;;OAWG;;;;;;;;EAKM,CAAC;AAEZ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,MAAM,eAAe,GAAG,eAAe,GAAG;IAC9C,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAiBF,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,eAAe,EACvB,IAAI,EAAE,YAAY,GACjB,OAAO,CAAC,eAAe,CAAC,CAoD1B"}
|
|
@@ -39,13 +39,21 @@ export const propVoxelParamsSchema = z.object({
|
|
|
39
39
|
.min(1)
|
|
40
40
|
.describe('What the object should be (e.g. "a weathered stone archway covered in moss")'),
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
43
|
-
*
|
|
42
|
+
* 512 because what this returns is a MASTER, not a working asset.
|
|
43
|
+
*
|
|
44
|
+
* `resampleMaster` only ever merges cells — it refuses to upsample rather than inventing detail
|
|
45
|
+
* — so the grid forged here is the ceiling on every size the asset will ever be re-baked at.
|
|
46
|
+
* Forging at the working size is the one choice that cannot be undone later, and it costs
|
|
47
|
+
* nothing to avoid: the Modal tap generates at its native resolution either way and only
|
|
48
|
+
* downsamples afterwards, so a finer grid buys headroom for the price of a few megabytes.
|
|
49
|
+
*
|
|
50
|
+
* The web lane already forges native (`local-forge.ts` posts no grid at all); the smaller values
|
|
51
|
+
* remain for a caller that deliberately wants a working-size grid rather than a source.
|
|
44
52
|
*/
|
|
45
53
|
grid: z.union([
|
|
46
54
|
z.literal(0), z.literal(32), z.literal(64),
|
|
47
55
|
z.literal(128), z.literal(256), z.literal(512),
|
|
48
|
-
]).optional().default(
|
|
56
|
+
]).optional().default(512),
|
|
49
57
|
}).strict();
|
|
50
58
|
/**
|
|
51
59
|
* The async job route, not the synchronous one. A cold GPU container compiles CUDA kernels and
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prop-voxel.js","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAElE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5C,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;SACf,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,CAAC,8EAA8E,CAAC;IAC3F
|
|
1
|
+
{"version":3,"file":"prop-voxel.js","sourceRoot":"","sources":["../../src/generators/prop-voxel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM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