Skip to content

Commit

Permalink
chore(player): 恢复 L2D 调试功能
Browse files Browse the repository at this point in the history
  • Loading branch information
mark9804 committed Oct 30, 2024
1 parent 0f14d8a commit 5c21f37
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions lib/ba-story-player/src/components/ModifyLive2DOption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,14 @@ eventBus.on("loaded", () => {
}
});
function loadAnimationNames(url: string) {
return;
const {
app: { loader },
} = usePlayerStore();
const resource = loader?.resources[url];
const resource = usePlayerStore().l2dSpineData;
if (resource) {
availableAnimationName.value = resource.spineData.animations.map(
availableAnimationName.value = resource.animations.map(
it => `${it.name}(${it.duration}s)`
);
selectedAnimationName.value = "";
} else {
loader.add(url).load(resource => {
Assets.load({ src: url, alias: url }).then(resource => {
availableAnimationName.value = resource.spineData.animations.map(
it => `${it.name}(${it.duration}s)`
);
Expand Down

0 comments on commit 5c21f37

Please sign in to comment.