Add loop property to play animation interaction links and update migration script
This commit is contained in:
@@ -1806,7 +1806,8 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
sourceEntityId: link.sourceEntityId,
|
sourceEntityId: link.sourceEntityId,
|
||||||
trigger: link.trigger,
|
trigger: link.trigger,
|
||||||
targetModelInstanceId,
|
targetModelInstanceId,
|
||||||
clipName: link.action.clipName
|
clipName: link.action.clipName,
|
||||||
|
loop: link.action.loop
|
||||||
}),
|
}),
|
||||||
"Updated play animation link target."
|
"Updated play animation link target."
|
||||||
);
|
);
|
||||||
@@ -1836,12 +1837,32 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
sourceEntityId: link.sourceEntityId,
|
sourceEntityId: link.sourceEntityId,
|
||||||
trigger: link.trigger,
|
trigger: link.trigger,
|
||||||
targetModelInstanceId: link.action.targetModelInstanceId,
|
targetModelInstanceId: link.action.targetModelInstanceId,
|
||||||
clipName
|
clipName,
|
||||||
|
loop: link.action.loop
|
||||||
}),
|
}),
|
||||||
"Updated play animation clip."
|
"Updated play animation clip."
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const updatePlayAnimationLinkLoop = (link: InteractionLink, loop: boolean) => {
|
||||||
|
if (link.action.type !== "playAnimation") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
commitInteractionLinkChange(
|
||||||
|
link,
|
||||||
|
createPlayAnimationInteractionLink({
|
||||||
|
id: link.id,
|
||||||
|
sourceEntityId: link.sourceEntityId,
|
||||||
|
trigger: link.trigger,
|
||||||
|
targetModelInstanceId: link.action.targetModelInstanceId,
|
||||||
|
clipName: link.action.clipName,
|
||||||
|
loop
|
||||||
|
}),
|
||||||
|
"Updated play animation loop setting."
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const handleAddPlayAnimationLink = (sourceEntity: InteractionSourceEntity) => {
|
const handleAddPlayAnimationLink = (sourceEntity: InteractionSourceEntity) => {
|
||||||
const firstInstance = modelInstanceDisplayList[0];
|
const firstInstance = modelInstanceDisplayList[0];
|
||||||
|
|
||||||
|
|||||||
@@ -904,7 +904,8 @@ function readInteractionLink(value: unknown, label: string): InteractionLink {
|
|||||||
sourceEntityId: expectString(value.sourceEntityId, `${label}.sourceEntityId`),
|
sourceEntityId: expectString(value.sourceEntityId, `${label}.sourceEntityId`),
|
||||||
trigger,
|
trigger,
|
||||||
targetModelInstanceId: action.targetModelInstanceId,
|
targetModelInstanceId: action.targetModelInstanceId,
|
||||||
clipName: action.clipName
|
clipName: action.clipName,
|
||||||
|
loop: action.loop
|
||||||
});
|
});
|
||||||
case "stopAnimation":
|
case "stopAnimation":
|
||||||
return createStopAnimationInteractionLink({
|
return createStopAnimationInteractionLink({
|
||||||
|
|||||||
Reference in New Issue
Block a user