种子字段的对外类型改成普通数字,不再导出 bigint
- shared-contracts:多视图请求与文生 / 图生参数的 seed 注记从 `bigint | null` 改成 `number | null`,并写明只支持 JS 安全整数范围(2^53-1)内的取值;Rust 侧仍是 `Option<i64>`,反序列化行为不变 - packages/shared:重新生成 model3d 绑定,seed 变成 `number | null`,请求体可以直接 JSON 序列化(带 bigint 的请求在 JSON.stringify 阶段必定抛错);顺带补上此前漏生成的多视图请求文档注释(「多视图生 3D」→「多视图生成 3D」) - docs/technical:在 Tripo Provider 集成方案里写明 seed 为什么按 number 导出、代价是超出 2^53-1 的取值无法从 TS 侧精确构造
This commit is contained in:
@@ -17,8 +17,8 @@ import type { Model3dTextureVersion } from '../common/Model3dTextureVersion';
|
||||
export type Model3dImageToModelParams = {
|
||||
model: Model3dModelVersion;
|
||||
enableImageAutofix?: boolean | null;
|
||||
modelSeed?: bigint | null;
|
||||
textureSeed?: bigint | null;
|
||||
modelSeed?: number | null;
|
||||
textureSeed?: number | null;
|
||||
texture?: boolean | null;
|
||||
pbr?: boolean | null;
|
||||
textureQuality?: Model3dTextureQuality | null;
|
||||
|
||||
+3
-3
@@ -10,7 +10,7 @@ import type { Model3dTextureVersion } from '../common/Model3dTextureVersion';
|
||||
import type { Model3dMultiviewInputs } from './Model3dMultiviewInputs';
|
||||
|
||||
/**
|
||||
* 多视图生 3D 的请求:`inputs` 必填,其余生成参数可选。
|
||||
* 多视图生成 3D 的请求:`inputs` 必填,其余生成参数可选。
|
||||
*
|
||||
* 严格反序列化:顶层与 `inputs` 分支都不接受未知字段,字段取值非法在反序列化阶段即拒绝;
|
||||
* 组合合法性(模型能力、参数互斥)由 provider 侧提交前统一校验。
|
||||
@@ -27,11 +27,11 @@ export type Model3dMultiviewToModelRequest = {
|
||||
/**
|
||||
* 模型随机种子;固定后可复现同一几何体。
|
||||
*/
|
||||
modelSeed?: bigint | null;
|
||||
modelSeed?: number | null;
|
||||
/**
|
||||
* 贴图随机种子;固定后可复现同一贴图。
|
||||
*/
|
||||
textureSeed?: bigint | null;
|
||||
textureSeed?: number | null;
|
||||
/**
|
||||
* 是否生成贴图;`false` 时只产出白模几何体。
|
||||
*/
|
||||
|
||||
@@ -16,9 +16,9 @@ export type Model3dTextToModelParams = {
|
||||
prompt: string;
|
||||
model: Model3dModelVersion;
|
||||
negativePrompt?: string | null;
|
||||
imageSeed?: bigint | null;
|
||||
modelSeed?: bigint | null;
|
||||
textureSeed?: bigint | null;
|
||||
imageSeed?: number | null;
|
||||
modelSeed?: number | null;
|
||||
textureSeed?: number | null;
|
||||
texture?: boolean | null;
|
||||
pbr?: boolean | null;
|
||||
textureQuality?: Model3dTextureQuality | null;
|
||||
|
||||
Reference in New Issue
Block a user