feat(时间轴): 动作片段支持拖拽调整起止时间

This commit is contained in:
tongtong committed 2026-09-18 10:55:48 +08:00
1 parent efe44a35a6
commit 9d3a5b9bea
14 files changed
+366 -18

No files matched your search

+8 -2
View File
@@ -11,6 +11,10 @@ interface CharacterModelProps {
rigState?: CharacterRigState;
motionTime?: number;
characterId?: string;
/** 动作片段起点(秒):基础动作只在该时间区间内驱动角色,缺省视为时间轴开头 */
motionStartTime?: number;
/** 动作片段终点(秒):缺省视为时间轴末尾 */
motionEndTime?: number;
}
class CharacterModelBoundary extends Component<
@@ -33,8 +37,8 @@ class CharacterModelBoundary extends Component<
}
}
export function CharacterModel({ bodyType, color, onLabelAnchorYChange, rigState, motionTime, characterId }: CharacterModelProps) {
const fallback = <PrimitiveMannequin bodyType={bodyType} color={color} rigState={rigState} motionTime={motionTime} characterId={characterId} />;
export function CharacterModel({ bodyType, color, onLabelAnchorYChange, rigState, motionTime, characterId, motionStartTime, motionEndTime }: CharacterModelProps) {
const fallback = <PrimitiveMannequin bodyType={bodyType} color={color} rigState={rigState} motionTime={motionTime} characterId={characterId} motionStartTime={motionStartTime} motionEndTime={motionEndTime} />;
if (rigState?.rigType !== "ue4-mannequin") {
return fallback;
@@ -49,6 +53,8 @@ export function CharacterModel({ bodyType, color, onLabelAnchorYChange, rigState
rigState={rigState}
motionTime={motionTime}
characterId={characterId}
motionStartTime={motionStartTime}
motionEndTime={motionEndTime}
/>
</CharacterModelBoundary>
);