Commit 07f8fde7 authored by chechunchi's avatar chechunchi

fix small

parent b33ff7f5
Pipeline #19461 passed with stages
in 4 minutes and 52 seconds
...@@ -5,9 +5,7 @@ import { ...@@ -5,9 +5,7 @@ import {
selectOpCemetery, selectOpCemetery,
} from "../../reducers/duel/cemeretySlice"; } from "../../reducers/duel/cemeretySlice";
import { useAppSelector } from "../../hook"; import { useAppSelector } from "../../hook";
import SingleSlot from "./singleSlot"; import SingleSlot, { Depth } from "./singleSlot";
const depth = 0.005;
const Cemeteries = () => { const Cemeteries = () => {
const meCemetery = useAppSelector(selectMeCemetery).inner; const meCemetery = useAppSelector(selectMeCemetery).inner;
...@@ -31,7 +29,7 @@ const Cemeteries = () => { ...@@ -31,7 +29,7 @@ const Cemeteries = () => {
const cemeteryPosition = (player: number, cemeteryLength: number) => { const cemeteryPosition = (player: number, cemeteryLength: number) => {
const x = player == 0 ? 3.2 : -3.2; const x = player == 0 ? 3.2 : -3.2;
const y = (depth * cemeteryLength) / 2 + CONFIG.Floating; const y = (Depth * cemeteryLength) / 2 + CONFIG.Floating;
const z = player == 0 ? -2.0 : 2.0; const z = player == 0 ? -2.0 : 2.0;
return new BABYLON.Vector3(x, y, z); return new BABYLON.Vector3(x, y, z);
......
...@@ -2,9 +2,7 @@ import * as BABYLON from "@babylonjs/core"; ...@@ -2,9 +2,7 @@ import * as BABYLON from "@babylonjs/core";
import * as CONFIG from "../../config/ui"; import * as CONFIG from "../../config/ui";
import { useAppSelector } from "../../hook"; import { useAppSelector } from "../../hook";
import { selectMeDeck, selectOpDeck } from "../../reducers/duel/deckSlice"; import { selectMeDeck, selectOpDeck } from "../../reducers/duel/deckSlice";
import SingleSlot from "./singleSlot"; import SingleSlot, { Depth } from "./singleSlot";
const depth = 0.005;
const Deck = () => ( const Deck = () => (
<> <>
...@@ -61,7 +59,7 @@ const ExtraDeck = () => { ...@@ -61,7 +59,7 @@ const ExtraDeck = () => {
const deckPosition = (player: number, deckLength: number) => { const deckPosition = (player: number, deckLength: number) => {
const x = player == 0 ? 3.2 : -3.2; const x = player == 0 ? 3.2 : -3.2;
const y = (depth * deckLength) / 2 + CONFIG.Floating; const y = (Depth * deckLength) / 2 + CONFIG.Floating;
const z = player == 0 ? -3.3 : 3.3; const z = player == 0 ? -3.3 : 3.3;
return new BABYLON.Vector3(x, y, z); return new BABYLON.Vector3(x, y, z);
......
...@@ -5,9 +5,7 @@ import { ...@@ -5,9 +5,7 @@ import {
selectMeExclusion, selectMeExclusion,
selectopExclusion, selectopExclusion,
} from "../../reducers/duel/exclusionSlice"; } from "../../reducers/duel/exclusionSlice";
import SingleSlot from "./singleSlot"; import SingleSlot, { Depth } from "./singleSlot";
const depth = 0.02;
const Exclusion = () => { const Exclusion = () => {
const meExclusion = useAppSelector(selectMeExclusion).inner; const meExclusion = useAppSelector(selectMeExclusion).inner;
...@@ -31,7 +29,7 @@ const Exclusion = () => { ...@@ -31,7 +29,7 @@ const Exclusion = () => {
const exclusionPosition = (player: number, exclusionLength: number) => { const exclusionPosition = (player: number, exclusionLength: number) => {
const x = player == 0 ? 3.2 : -3.2; const x = player == 0 ? 3.2 : -3.2;
const y = (depth * exclusionLength) / 2 + CONFIG.Floating; const y = (Depth * exclusionLength) / 2 + CONFIG.Floating;
const z = player == 0 ? -0.7 : 0.7; const z = player == 0 ? -0.7 : 0.7;
return new BABYLON.Vector3(x, y, z); return new BABYLON.Vector3(x, y, z);
......
...@@ -10,7 +10,7 @@ import { ...@@ -10,7 +10,7 @@ import {
} from "../../reducers/duel/mod"; } from "../../reducers/duel/mod";
const shape = CONFIG.SingleSlotShape; const shape = CONFIG.SingleSlotShape;
const depth = 0.005; export const Depth = 0.005;
const SingleSlot = (props: { const SingleSlot = (props: {
state: CardState[]; state: CardState[];
...@@ -53,7 +53,7 @@ const SingleSlot = (props: { ...@@ -53,7 +53,7 @@ const SingleSlot = (props: {
new BABYLON.Vector3( new BABYLON.Vector3(
shape.width, shape.width,
shape.height, shape.height,
depth * props.state.length Depth * props.state.length
) )
} }
position={props.position} position={props.position}
......
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