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 8ed2bb9 commit 369158d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/ba-story-player/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { usePlayerStore } from "../lib/stores";
import { TranslatedStoryUnit } from "../lib/types/common";
import { Language } from "../lib/types/store";
import ModifyEmotionOption from "./components/ModifyEmotionOption.vue";
// import ModifyLive2DOption from "./components/ModifyLive2DOption.vue";
import ModifyLive2DOption from "./components/ModifyLive2DOption.vue";
import TestEffect from "./components/TestEffect.vue";
import UnitTest from "./components/UnitTest.vue";
import yuuka from "./data/yuuka.json";
Expand Down Expand Up @@ -215,9 +215,9 @@ watch(
/>
</Suspense>
<UnitTest class="absolute-right-center" v-if="toolType === 'test'" />
<!-- <KeepAlive>
<KeepAlive>
<ModifyLive2DOption :class="{ hidden: toolType !== 'live2d' }" />
</KeepAlive> -->
</KeepAlive>
</div>
</div>
</template>
Expand Down
4 changes: 3 additions & 1 deletion lib/ba-story-player/src/components/ModifyLive2DOption.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { changeStoryIndex } from "../../lib/layers/uiLayer/userInteract";
import { initPrivateState, usePlayerStore } from "../../lib/stores";
import { StoryUnit } from "../../lib/types/common";
import { IL2dConfig } from "../../lib/types/l2d";
import { Assets } from "pixi.js";

const message = ref("等待资源加载...");
const messageType = ref<"info" | "error">("info");
Expand Down Expand Up @@ -113,10 +114,11 @@ eventBus.on("loaded", () => {
}
});
function loadAnimationNames(url: string) {
return;
const {
app: { loader },
} = usePlayerStore();
const resource = loader.resources[url];
const resource = loader?.resources[url];
if (resource) {
availableAnimationName.value = resource.spineData.animations.map(
it => `${it.name}(${it.duration}s)`
Expand Down

0 comments on commit 369158d

Please sign in to comment.