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