feat: 收口角色动作资产发布前端与验证文档

This commit is contained in:
2026-04-23 20:40:03 +08:00
parent 27e84c46a0
commit 349a397888
7 changed files with 1101 additions and 28 deletions

View File

@@ -62,7 +62,6 @@ import {
type ScenePresetInfo,
WorldType,
} from '../../types';
import { buildAnimationClipFromVideoSource } from '../asset-studio/characterAssetWorkflowModel';
import {
type CharacterAnimationGenerationPayload,
generateCharacterAnimationDraft,
@@ -3832,28 +3831,19 @@ function RoleSkillEditorModal({
throw new Error('当前技能动作预览仅支持图生视频生成。');
}
const clip = await buildAnimationClipFromVideoSource(
generationResult.previewVideoPath,
{
animation: AnimationState.ATTACK,
fps: 10,
loop: false,
frameCount: 8,
applyChromaKey: true,
},
);
const publishResult = await publishCharacterAnimationAssets({
characterId: role.id,
visualAssetId: role.generatedVisualAssetId,
animations: {
[actionKey]: {
framesDataUrls: clip.frames,
fps: clip.fps,
loop: clip.loop,
frameWidth: clip.frameWidth,
frameHeight: clip.frameHeight,
previewVideoPath: clip.previewVideoPath,
framesDataUrls: [],
fps: 10,
loop: false,
frameWidth: 192,
frameHeight: 256,
frameCount: 8,
applyChromaKey: true,
previewVideoPath: generationResult.previewVideoPath,
},
},
updateCharacterOverride: false,