Commit 409b9de6 authored by Chunchi Che's avatar Chunchi Che

add CardModal and HintNotification in BabylonCanvas

parent 9f7b0964
......@@ -4,22 +4,28 @@ import { ReactReduxContext, Provider } from "react-redux";
import * as BABYLON from "@babylonjs/core";
import * as CONFIG from "../../config/ui";
import DuelHands from "./hands_";
import CardModal from "./cardModal";
import HintNotification from "./hintNotification";
const BabylonCanvas = () => (
<ReactReduxContext.Consumer>
{({ store }) => (
<Engine antialias adaptToDeviceRatio canvasId="babylonJS">
<Scene>
<Provider store={store}>
<DuelCamera />
<DuelLight />
<DuelHands />
<DuelGround />
</Provider>
</Scene>
</Engine>
)}
</ReactReduxContext.Consumer>
<>
<ReactReduxContext.Consumer>
{({ store }) => (
<Engine antialias adaptToDeviceRatio canvasId="babylonJS">
<Scene>
<Provider store={store}>
<DuelCamera />
<DuelLight />
<DuelHands />
<DuelGround />
</Provider>
</Scene>
</Engine>
)}
</ReactReduxContext.Consumer>
<CardModal />
<HintNotification />
</>
);
const DuelCamera = () => (
......
......@@ -13,7 +13,7 @@ export default function () {
<Route path="/" element={<JoinRoom />} />
<Route path="/:player/:passWd/:ip" element={<WaitRoom />} />
<Route path="/mora" element={<Mora />} />
<Route path="/duel" element={<Duel />} />
<Route path="/duel" element={<BabylonCanvas />} />
<Route path="/react-babylon" element={<BabylonCanvas />} />
</Routes>
);
......
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