Commit Graph

4 Commits

Author SHA1 Message Date
k88936 9840f17189 模型版本判据不再认下原型链上的键
- src/components/image-editor/model3d-generation/Model3dGenerationValidation.ts:isModel3dModelVersion 改用 Object.hasOwn,`toString` / `__proto__` 这类继承键不再被判成契约版本(之后查表会拿到 undefined)
- src/components/image-editor/model3d-generation/Model3dGenerationFormModel.test.ts:补原型链键回落默认版本的用例
2026-09-24 17:26:49 +08:00
k88936 42c3186e13 3D 生成面板开放模型版本选择,参数按模型能力门禁
Project CI / AI game creator shell Rust crates (pull_request) Successful in 1m35s
Project CI / Backend tests (pull_request) Failing after 14s
Project CI / AI game creator shell Rust smoke (pull_request) Has been cancelled
Project CI / Frontend tests (pull_request) Has been cancelled
Project CI / Repository checks (pull_request) Has been cancelled
Project CI / AI game creator shell web tests (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 1/2 (pull_request) Has been cancelled
Project CI / AI game creator shell Rust lane 2/2 (pull_request) Has been cancelled
Project CI / Native shell tests (pull_request) Has been cancelled
- Model3dGenerationValidation.ts(新):前端唯一一份参数校验,逐条复刻 platform-tripo 的 validate_generation_options 与 api-server 的 PricingParamView::validate(模型族能力、分件三个前置条件、face_limit_bounds、平台必显式项),并给出按契约联合类型做键的 MODEL3D_MODEL_TABLE 与禁用原因文案
- Model3dGenerationFormModel:模型版本改为用户可选,可选集只取当前端点有底价的版本;报价与请求体读同一个 resolveModel3dModelVersion;换版本或切档位时按新能力收敛档位与开关并开新一代次;v2.5 的贴图档位不带 textureQuality
- Model3dGenerationForm:新增模型版本选择器(照图片面板的浮层选项形态),档位与开关按模型能力禁用并给出 title 原因
- Model3dGenerationModal:定价只读一次,模型选项与报价共用同一份快照
- Model3dGenerationSubmission / useModel3dGenerationTask:提交计划改成 endpoint 判别联合,两个端点各一个收口函数
- editorProjectClient:删掉「endpoint + 联合提交体」的单函数,改为 submitModel3dTextToModelRequest / submitModel3dImageToModelRequest 一个端点一个函数;basePrices 两层键改成契约枚举
- ImageCanvasOptionChoice.tsx(新):把图片面板的浮层选项行抽成共享组件,3D 面板复用
- 测试:新增 Model3dGenerationValidation.test.ts(12 例),FormModel / Submission / Modal / useModel3dGenerationTask 补组合表与菜单用例,共 75 例通过
- 文档:实施计划与里程碑追加本轮口径与证据,decision-log 与 pitfalls 各记两条
2026-09-24 14:55:06 +08:00
k88936 73f34ecbc9 前端补上「分件 + 方形布线 / 智能低多边形」的互斥校验
- src/components/image-editor/model3d-generation/Model3dGenerationFormModel.ts:resolveModel3dGenerationParams 增加 generateParts 与 quad / smartLowPoly 的互斥判定,与 provider 的 validate_generation_options 对齐;此前纯几何档位下这两个开关仍可同开,前端能出价、提交后才被后端拒
- src/components/image-editor/model3d-generation/Model3dGenerationFormModel.test.ts:新增该组合被拒的用例

验证:npx vitest run src/components/image-editor/model3d-generation(40 用例全绿)
2026-09-22 13:26:49 +08:00
k88936 61fe4c48af 图片画布接入 3D 资源:新增 model3d 类别、3D 预览与 3D 生成入口
Project CI / AI game creator shell Rust shard 1/4 (pull_request) Failing after 16s
Project CI / AI game creator shell Rust shard 3/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 4/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust shard 2/4 (pull_request) Failing after 18s
Project CI / AI game creator shell Rust smoke (pull_request) Failing after 16s
Project CI / Backend tests (pull_request) Failing after 16s
Project CI / AI game creator shell Rust crates (pull_request) Failing after 16s
Project CI / Native shell tests (pull_request) Failing after 16s
Project CI / Frontend tests (pull_request) Failing after 7s
Project CI / Repository checks (pull_request) Failing after 12s
Project CI / AI game creator shell web tests (pull_request) Failing after 12s
- 后端资源投影按 asset_kind 分叉,新增 project_editor_client_media_src 与 EDITOR_MODEL3D_ASSET_KIND:model3d 只投影预览图,模型本体只留 objectKey,预览缺失才回落历史口径
- tripo3d 存储新增按字节魔数识别模型 content_type 与扩展名映射,不采信 provider 声明与下载响应头
- editor_project_storage 把 model3d 加入 EDITOR_CANVAS_ASSET_KINDS 白名单
- 前端 CanvasAssetKind 与 image-canvas-core 类型新增 model3d:画布卡片渲染预览图或 3D 占位,类型角标新增「3D模型」,覆盖资格只在它与空类别之间成立
- 新增 model3d-preview 子目录(Model3dViewerModal / Model3dViewerModel),Tailwind 内联、不新增 CSS,失败原因分超限 / 格式不可识别 / 无 WebGL2 三类展示
- 选中工具条新增只读 preview-model3d 能力位,仅 objectKey 为空时置灰;打开预览同时选中图层并暂停画布快捷键与舞台交互
- 查看器包源对象 format 改为可选,新增「声明 Content-Type → 字节魔数 → 地址扩展名」三级格式判定并导出支持格式清单
- 导出工作流新增 3d_models/ 目录,模型下载按真实响应头 MIME 定扩展名、对象键扩展名兜底
- 新增 3D 生成入口:底部工具栏浮动子选项与文生 / 图生 3D 面板,落 projectResource + canvasCompletion,复用占位框与任务侧栏
- 3D 定价只读实时定价查询,段缺失即入口不可提交;幂等键由前端铸造,用户重试必须换键
- 新增 ADR 0003 / 0004 与实施计划、里程碑文档;更新 Tripo 技术方案、后端架构、CONTEXT 术语、decision-log 与 pitfalls
- .gitignore 忽略仓库根目录手工下载的 3D 样例模型
2026-09-22 10:10:00 +08:00