Commit dc12d558 authored by Chunchi Che's avatar Chunchi Che

update

parent 7b46d5c0
Pipeline #20700 passed with stages
in 17 minutes and 5 seconds
...@@ -31,8 +31,6 @@ import { ...@@ -31,8 +31,6 @@ import {
selectMeInitInfo, selectMeInitInfo,
selectOpInitInfo, selectOpInitInfo,
} from "../../reducers/duel/initInfoSlice"; } from "../../reducers/duel/initInfoSlice";
//@ts-ignore
import rustInit from "rust-src";
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126 // Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const NeosDuel = () => { const NeosDuel = () => {
...@@ -41,8 +39,6 @@ const NeosDuel = () => { ...@@ -41,8 +39,6 @@ const NeosDuel = () => {
useEffect(() => { useEffect(() => {
const init = async () => { const init = async () => {
await initStrings(); await initStrings();
const wasm = await rustInit();
console.log(wasm);
}; };
if (initialRender.current) { if (initialRender.current) {
......
...@@ -44,6 +44,8 @@ import { useParams } from "react-router-dom"; ...@@ -44,6 +44,8 @@ import { useParams } from "react-router-dom";
import { selectDuelStart } from "../reducers/moraSlice"; import { selectDuelStart } from "../reducers/moraSlice";
import NeosConfig from "../../neos.config.json"; import NeosConfig from "../../neos.config.json";
import YGOProDeck from "ygopro-deck-encode"; import YGOProDeck from "ygopro-deck-encode";
//@ts-ignore
import rustInit from "rust-src";
const READY_STATE = "ready"; const READY_STATE = "ready";
...@@ -75,6 +77,10 @@ const WaitRoom = () => { ...@@ -75,6 +77,10 @@ const WaitRoom = () => {
cmd: sqliteCmd.INIT, cmd: sqliteCmd.INIT,
initInfo: { dbUrl: NeosConfig.cardsDbUrl }, initInfo: { dbUrl: NeosConfig.cardsDbUrl },
}); });
// 初始化wasm
const wasm = await rustInit();
console.log(wasm);
}; };
init(); init();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment