角色多方向图生成

This commit is contained in:
2026-08-12 18:14:25 +08:00
parent 1575afc92c
commit 132bf7db35
16 changed files with 727 additions and 26 deletions
@@ -1228,6 +1228,41 @@ describe('ImageCanvasGenerationDialogModel', () => {
});
});
it('restores a multi-direction character sheet recipe into the character composer', () => {
expect(
createSameSourceGenerationDialogDraft({
sourceLayer: createLayer({
id: 'layer-sheet-result',
resourceId: 'resource-sheet-result',
sourceType: 'generated',
assetKind: 'icon-spritesheet',
generationInputs: {
version: 2,
action: 'character-sheet.generate',
fields: [
{ id: 'prompt', title: '角色设定', value: '日系魔法少女' },
{ id: 'model', title: '模型', value: 'nanobanana2' },
{ id: 'viewSet', title: '视角集合', value: '八视图' },
{ id: 'aspectRatio', title: '比例', value: '1:1' },
{ id: 'imageSize', title: '尺寸', value: '1K' },
],
references: [],
},
}),
canvasSize: { width: 960, height: 720 },
viewport: { x: 0, y: 0, scale: 1 },
mode: 'redraw',
}),
).toMatchObject({
mode: 'character',
prompt: '日系魔法少女',
sourceLayerId: 'layer-sheet-result',
style: 'none',
characterSheetEnabled: true,
characterSheetViewSet: '8',
});
});
it('maps legacy ui spec.generate inputs to the unified icon spec composer', () => {
expect(
createSameSourceGenerationDialogDraft({