Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos
Commits
356becaf
Commit
356becaf
authored
Apr 14, 2023
by
timel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: sort components in ui/Duel
parent
bc14d8f1
Changes
34
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
137 additions
and
65 deletions
+137
-65
src/hook/index.ts
src/hook/index.ts
+1
-0
src/hook/useMeshClick.ts
src/hook/useMeshClick.ts
+0
-0
src/ui/Duel/Message/alert.tsx
src/ui/Duel/Message/alert.tsx
+0
-0
src/ui/Duel/Message/cardListModal.tsx
src/ui/Duel/Message/cardListModal.tsx
+1
-1
src/ui/Duel/Message/cardModal.tsx
src/ui/Duel/Message/cardModal.tsx
+4
-4
src/ui/Duel/Message/checkCardModal.tsx
src/ui/Duel/Message/checkCardModal.tsx
+1
-1
src/ui/Duel/Message/checkCardModalV2.tsx
src/ui/Duel/Message/checkCardModalV2.tsx
+1
-1
src/ui/Duel/Message/checkCardModalV3.tsx
src/ui/Duel/Message/checkCardModalV3.tsx
+1
-1
src/ui/Duel/Message/checkCounterModal.tsx
src/ui/Duel/Message/checkCounterModal.tsx
+1
-1
src/ui/Duel/Message/dragModal.tsx
src/ui/Duel/Message/dragModal.tsx
+0
-0
src/ui/Duel/Message/hintNotification.tsx
src/ui/Duel/Message/hintNotification.tsx
+1
-1
src/ui/Duel/Message/optionModal.tsx
src/ui/Duel/Message/optionModal.tsx
+0
-0
src/ui/Duel/Message/phase.tsx
src/ui/Duel/Message/phase.tsx
+4
-4
src/ui/Duel/Message/positionModal.tsx
src/ui/Duel/Message/positionModal.tsx
+0
-0
src/ui/Duel/Message/sendBox.tsx
src/ui/Duel/Message/sendBox.tsx
+0
-0
src/ui/Duel/Message/sortCardModal.tsx
src/ui/Duel/Message/sortCardModal.tsx
+1
-1
src/ui/Duel/Message/status.tsx
src/ui/Duel/Message/status.tsx
+1
-1
src/ui/Duel/Message/timeLine.tsx
src/ui/Duel/Message/timeLine.tsx
+0
-0
src/ui/Duel/Message/yesNoModal.tsx
src/ui/Duel/Message/yesNoModal.tsx
+0
-0
src/ui/Duel/PlayMat/cemetery.tsx
src/ui/Duel/PlayMat/cemetery.tsx
+2
-2
src/ui/Duel/PlayMat/deck.tsx
src/ui/Duel/PlayMat/deck.tsx
+2
-2
src/ui/Duel/PlayMat/exclusion.tsx
src/ui/Duel/PlayMat/exclusion.tsx
+2
-2
src/ui/Duel/PlayMat/extraDeck.tsx
src/ui/Duel/PlayMat/extraDeck.tsx
+2
-2
src/ui/Duel/PlayMat/field.tsx
src/ui/Duel/PlayMat/field.tsx
+2
-2
src/ui/Duel/PlayMat/fixedSlot.tsx
src/ui/Duel/PlayMat/fixedSlot.tsx
+3
-3
src/ui/Duel/PlayMat/hands.tsx
src/ui/Duel/PlayMat/hands.tsx
+4
-5
src/ui/Duel/PlayMat/magics.tsx
src/ui/Duel/PlayMat/magics.tsx
+2
-2
src/ui/Duel/PlayMat/monsters.tsx
src/ui/Duel/PlayMat/monsters.tsx
+2
-2
src/ui/Duel/PlayMat/singleSlot.tsx
src/ui/Duel/PlayMat/singleSlot.tsx
+3
-3
src/ui/Duel/main.tsx
src/ui/Duel/main.tsx
+24
-24
src/ui/Duel/utils/cardSlot.ts
src/ui/Duel/utils/cardSlot.ts
+26
-0
src/ui/Duel/utils/index.ts
src/ui/Duel/utils/index.ts
+3
-0
src/ui/Duel/utils/interactTypeToString.ts
src/ui/Duel/utils/interactTypeToString.ts
+30
-0
src/ui/Duel/utils/zip.ts
src/ui/Duel/utils/zip.ts
+13
-0
No files found.
src/hook/index.ts
View file @
356becaf
export
*
from
"
./useApp
"
;
export
*
from
"
./useApp
"
;
export
*
from
"
./useEnv
"
;
export
*
from
"
./useEnv
"
;
export
*
from
"
./useMeshClick
"
;
src/
ui/Duel/hoo
k.ts
→
src/
hook/useMeshClic
k.ts
View file @
356becaf
File moved
src/ui/Duel/alert.tsx
→
src/ui/Duel/
Message/
alert.tsx
View file @
356becaf
File moved
src/ui/Duel/cardListModal.tsx
→
src/ui/Duel/
Message/
cardListModal.tsx
View file @
356becaf
...
@@ -11,7 +11,7 @@ import {
...
@@ -11,7 +11,7 @@ import {
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
{
Drawer
,
List
,
Button
}
from
"
antd
"
;
import
{
Drawer
,
List
,
Button
}
from
"
antd
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
CARD_WIDTH
=
100
;
const
CARD_WIDTH
=
100
;
...
...
src/ui/Duel/cardModal.tsx
→
src/ui/Duel/
Message/
cardModal.tsx
View file @
356becaf
...
@@ -14,15 +14,15 @@ import {
...
@@ -14,15 +14,15 @@ import {
import
{
Modal
,
Card
,
Button
,
Row
,
Col
}
from
"
antd
"
;
import
{
Modal
,
Card
,
Button
,
Row
,
Col
}
from
"
antd
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
sendSelectIdleCmdResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
Icon
,
{
StarOutlined
}
from
"
@ant-design/icons
"
;
import
Icon
,
{
StarOutlined
}
from
"
@ant-design/icons
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../neos-assets/battle-axe.svg
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../
../
neos-assets/battle-axe.svg
"
;
import
{
ReactComponent
as
DefenceSvg
}
from
"
../../../neos-assets/checked-shield.svg
"
;
import
{
ReactComponent
as
DefenceSvg
}
from
"
../../../
../
neos-assets/checked-shield.svg
"
;
import
{
import
{
extraCardTypes
,
extraCardTypes
,
Type2StringCodeMap
,
Type2StringCodeMap
,
Attribute2StringCodeMap
,
Attribute2StringCodeMap
,
Race2StringCodeMap
,
Race2StringCodeMap
,
}
from
"
../../common
"
;
}
from
"
../../
../
common
"
;
import
{
fetchStrings
}
from
"
@/api/strings
"
;
import
{
fetchStrings
}
from
"
@/api/strings
"
;
const
{
Meta
}
=
Card
;
const
{
Meta
}
=
Card
;
...
...
src/ui/Duel/checkCardModal.tsx
→
src/ui/Duel/
Message/
checkCardModal.tsx
View file @
356becaf
...
@@ -20,7 +20,7 @@ import {
...
@@ -20,7 +20,7 @@ import {
sendSelectChainResponse
,
sendSelectChainResponse
,
}
from
"
@/api/ocgcore/ocgHelper
"
;
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
ThunderboltOutlined
}
from
"
@ant-design/icons
"
;
import
{
ThunderboltOutlined
}
from
"
@ant-design/icons
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
...
...
src/ui/Duel/checkCardModalV2.tsx
→
src/ui/Duel/
Message/
checkCardModalV2.tsx
View file @
356becaf
...
@@ -18,7 +18,7 @@ import {
...
@@ -18,7 +18,7 @@ import {
setCheckCardModalV2IsOpen
,
setCheckCardModalV2IsOpen
,
setCheckCardModalV2ResponseAble
,
setCheckCardModalV2ResponseAble
,
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
...
...
src/ui/Duel/checkCardModalV3.tsx
→
src/ui/Duel/
Message/
checkCardModalV3.tsx
View file @
356becaf
...
@@ -9,7 +9,7 @@ import {
...
@@ -9,7 +9,7 @@ import {
setCheckCardModalV3IsOpen
,
setCheckCardModalV3IsOpen
,
setCheckCardModalV3ResponseAble
,
setCheckCardModalV3ResponseAble
,
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
selectCheckCardModalV3
}
from
"
@/reducers/duel/modal/checkCardModalV3Slice
"
;
import
{
selectCheckCardModalV3
}
from
"
@/reducers/duel/modal/checkCardModalV3Slice
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
import
{
selectHint
}
from
"
@/reducers/duel/hintSlice
"
;
...
...
src/ui/Duel/checkCounterModal.tsx
→
src/ui/Duel/
Message/
checkCounterModal.tsx
View file @
356becaf
...
@@ -7,7 +7,7 @@ import { clearCheckCounter } from "@/reducers/duel/mod";
...
@@ -7,7 +7,7 @@ import { clearCheckCounter } from "@/reducers/duel/mod";
import
{
selectCheckCounterModal
}
from
"
@/reducers/duel/modal/checkCounterModalSlice
"
;
import
{
selectCheckCounterModal
}
from
"
@/reducers/duel/modal/checkCounterModalSlice
"
;
import
{
store
}
from
"
@/store
"
;
import
{
store
}
from
"
@/store
"
;
import
DragModal
from
"
./dragModal
"
;
import
DragModal
from
"
./dragModal
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
CheckCounterModal
=
()
=>
{
const
CheckCounterModal
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
const
dispatch
=
store
.
dispatch
;
...
...
src/ui/Duel/dragModal.tsx
→
src/ui/Duel/
Message/
dragModal.tsx
View file @
356becaf
File moved
src/ui/Duel/hintNotification.tsx
→
src/ui/Duel/
Message/
hintNotification.tsx
View file @
356becaf
...
@@ -7,7 +7,7 @@ import { selectDuelResult, selectWaiting } from "@/reducers/duel/mod";
...
@@ -7,7 +7,7 @@ import { selectDuelResult, selectWaiting } from "@/reducers/duel/mod";
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
useNavigate
}
from
"
react-router-dom
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
import
MsgWin
=
ygopro
.
StocGameMessage
.
MsgWin
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
HintNotification
=
()
=>
{
const
HintNotification
=
()
=>
{
const
hint
=
useAppSelector
(
selectHint
);
const
hint
=
useAppSelector
(
selectHint
);
...
...
src/ui/Duel/optionModal.tsx
→
src/ui/Duel/
Message/
optionModal.tsx
View file @
356becaf
File moved
src/ui/Duel/phase.tsx
→
src/ui/Duel/
Message/
phase.tsx
View file @
356becaf
...
@@ -20,10 +20,10 @@ import {
...
@@ -20,10 +20,10 @@ import {
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
{
Button
,
Modal
,
Space
}
from
"
antd
"
;
import
{
Button
,
Modal
,
Space
}
from
"
antd
"
;
import
Icon
from
"
@ant-design/icons
"
;
import
Icon
from
"
@ant-design/icons
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../neos-assets/crossed-swords.svg
"
;
import
{
ReactComponent
as
BattleSvg
}
from
"
../../../
../
neos-assets/crossed-swords.svg
"
;
import
{
ReactComponent
as
Main2Svg
}
from
"
../../../neos-assets/sword-in-stone.svg
"
;
import
{
ReactComponent
as
Main2Svg
}
from
"
../../../
../
neos-assets/sword-in-stone.svg
"
;
import
{
ReactComponent
as
EpSvg
}
from
"
../../../neos-assets/power-button.svg
"
;
import
{
ReactComponent
as
EpSvg
}
from
"
../../../
../
neos-assets/power-button.svg
"
;
import
{
ReactComponent
as
SurrenderSvg
}
from
"
../../../neos-assets/truce.svg
"
;
import
{
ReactComponent
as
SurrenderSvg
}
from
"
../../../
../
neos-assets/truce.svg
"
;
const
IconSize
=
"
150%
"
;
const
IconSize
=
"
150%
"
;
const
SpaceSize
=
16
;
const
SpaceSize
=
16
;
...
...
src/ui/Duel/positionModal.tsx
→
src/ui/Duel/
Message/
positionModal.tsx
View file @
356becaf
File moved
src/ui/Duel/sendBox.tsx
→
src/ui/Duel/
Message/
sendBox.tsx
View file @
356becaf
File moved
src/ui/Duel/sortCardModal.tsx
→
src/ui/Duel/
Message/
sortCardModal.tsx
View file @
356becaf
...
@@ -23,7 +23,7 @@ import { store } from "@/store";
...
@@ -23,7 +23,7 @@ import { store } from "@/store";
import
{
resetSortCardModal
}
from
"
@/reducers/duel/mod
"
;
import
{
resetSortCardModal
}
from
"
@/reducers/duel/mod
"
;
import
{
Modal
,
Button
,
Card
}
from
"
antd
"
;
import
{
Modal
,
Button
,
Card
}
from
"
antd
"
;
import
{
CardMeta
}
from
"
@/api/cards
"
;
import
{
CardMeta
}
from
"
@/api/cards
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
SortCardModal
=
()
=>
{
const
SortCardModal
=
()
=>
{
const
dispatch
=
store
.
dispatch
;
const
dispatch
=
store
.
dispatch
;
...
...
src/ui/Duel/status.tsx
→
src/ui/Duel/
Message/
status.tsx
View file @
356becaf
...
@@ -2,7 +2,7 @@ import React from "react";
...
@@ -2,7 +2,7 @@ import React from "react";
import
{
UserOutlined
}
from
"
@ant-design/icons
"
;
import
{
UserOutlined
}
from
"
@ant-design/icons
"
;
import
{
Avatar
}
from
"
antd
"
;
import
{
Avatar
}
from
"
antd
"
;
import
{
CheckCard
}
from
"
@ant-design/pro-components
"
;
import
{
CheckCard
}
from
"
@ant-design/pro-components
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
import
{
selectMeInitInfo
,
selectMeInitInfo
,
...
...
src/ui/Duel/timeLine.tsx
→
src/ui/Duel/
Message/
timeLine.tsx
View file @
356becaf
File moved
src/ui/Duel/yesNoModal.tsx
→
src/ui/Duel/
Message/
yesNoModal.tsx
View file @
356becaf
File moved
src/ui/Duel/cemetery.tsx
→
src/ui/Duel/
PlayMat/
cemetery.tsx
View file @
356becaf
...
@@ -5,8 +5,8 @@ import {
...
@@ -5,8 +5,8 @@ import {
}
from
"
@/reducers/duel/cemeretySlice
"
;
}
from
"
@/reducers/duel/cemeretySlice
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
{
cardSlotRotation
}
from
"
.
/util
"
;
import
{
cardSlotRotation
}
from
"
.
./utils
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
Cemeteries
=
()
=>
{
const
Cemeteries
=
()
=>
{
const
meCemetery
=
useAppSelector
(
selectMeCemetery
).
inner
;
const
meCemetery
=
useAppSelector
(
selectMeCemetery
).
inner
;
...
...
src/ui/Duel/deck.tsx
→
src/ui/Duel/
PlayMat/
deck.tsx
View file @
356becaf
...
@@ -2,8 +2,8 @@ import * as BABYLON from "@babylonjs/core";
...
@@ -2,8 +2,8 @@ import * as BABYLON from "@babylonjs/core";
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
selectMeDeck
,
selectOpDeck
}
from
"
@/reducers/duel/deckSlice
"
;
import
{
selectMeDeck
,
selectOpDeck
}
from
"
@/reducers/duel/deckSlice
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
{
cardSlotRotation
}
from
"
.
/util
"
;
import
{
cardSlotRotation
}
from
"
.
./utils
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
CommonDeck
=
()
=>
{
const
CommonDeck
=
()
=>
{
const
meDeck
=
useAppSelector
(
selectMeDeck
).
inner
;
const
meDeck
=
useAppSelector
(
selectMeDeck
).
inner
;
...
...
src/ui/Duel/exclusion.tsx
→
src/ui/Duel/
PlayMat/
exclusion.tsx
View file @
356becaf
...
@@ -5,8 +5,8 @@ import {
...
@@ -5,8 +5,8 @@ import {
selectopExclusion
,
selectopExclusion
,
}
from
"
@/reducers/duel/exclusionSlice
"
;
}
from
"
@/reducers/duel/exclusionSlice
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
SingleSlot
,
{
Depth
}
from
"
./singleSlot
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
cardSlotRotation
}
from
"
.
/util
"
;
import
{
cardSlotRotation
}
from
"
.
./utils
"
;
const
Exclusion
=
()
=>
{
const
Exclusion
=
()
=>
{
const
meExclusion
=
useAppSelector
(
selectMeExclusion
).
inner
;
const
meExclusion
=
useAppSelector
(
selectMeExclusion
).
inner
;
...
...
src/ui/Duel/extraDeck.tsx
→
src/ui/Duel/
PlayMat/
extraDeck.tsx
View file @
356becaf
...
@@ -5,8 +5,8 @@ import {
...
@@ -5,8 +5,8 @@ import {
selectMeExtraDeck
,
selectMeExtraDeck
,
selectOpExtraDeck
,
selectOpExtraDeck
,
}
from
"
@/reducers/duel/extraDeckSlice
"
;
}
from
"
@/reducers/duel/extraDeckSlice
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
cardSlotRotation
}
from
"
.
/util
"
;
import
{
cardSlotRotation
}
from
"
.
./utils
"
;
const
ExtraDeck
=
()
=>
{
const
ExtraDeck
=
()
=>
{
const
meExtraDeck
=
useAppSelector
(
selectMeExtraDeck
).
inner
;
const
meExtraDeck
=
useAppSelector
(
selectMeExtraDeck
).
inner
;
...
...
src/ui/Duel/field.tsx
→
src/ui/Duel/
PlayMat/
field.tsx
View file @
356becaf
...
@@ -4,8 +4,8 @@ import { selectMeMagics, selectOpMagics } from "@/reducers/duel/magicSlice";
...
@@ -4,8 +4,8 @@ import { selectMeMagics, selectOpMagics } from "@/reducers/duel/magicSlice";
import
{
clearMagicPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
{
clearMagicPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
{
Depth
}
from
"
./singleSlot
"
;
import
{
Depth
}
from
"
./singleSlot
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
import
{
cardSlotRotation
}
from
"
.
/util
"
;
import
{
cardSlotRotation
}
from
"
.
./utils
"
;
const
Field
=
()
=>
{
const
Field
=
()
=>
{
const
meField
=
useAppSelector
(
selectMeMagics
).
inner
.
find
(
const
meField
=
useAppSelector
(
selectMeMagics
).
inner
.
find
(
...
...
src/ui/Duel/fixedSlot.tsx
→
src/ui/Duel/
PlayMat/
fixedSlot.tsx
View file @
356becaf
...
@@ -2,7 +2,7 @@ import * as BABYLON from "@babylonjs/core";
...
@@ -2,7 +2,7 @@ import * as BABYLON from "@babylonjs/core";
import
{
store
}
from
"
@/store
"
;
import
{
store
}
from
"
@/store
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
useRef
}
from
"
react
"
;
import
{
useRef
}
from
"
react
"
;
import
{
useClick
}
from
"
.
/hook
"
;
import
{
useClick
}
from
"
@
/hook
"
;
import
{
sendSelectPlaceResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
sendSelectPlaceResponse
}
from
"
@/api/ocgcore/ocgHelper
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
ygopro
}
from
"
@/api/ocgcore/idl/ocgcore
"
;
import
{
import
{
...
@@ -14,8 +14,8 @@ import {
...
@@ -14,8 +14,8 @@ import {
setCardModalMeta
,
setCardModalMeta
,
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
{
ActionCreatorWithPayload
}
from
"
@reduxjs/toolkit
"
;
import
{
ActionCreatorWithPayload
}
from
"
@reduxjs/toolkit
"
;
import
{
interactTypeToString
}
from
"
.
/util
"
;
import
{
interactTypeToString
}
from
"
.
./utils
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
const
defenceRotation
=
NeosConfig
.
ui
.
card
.
defenceRotation
;
const
defenceRotation
=
NeosConfig
.
ui
.
card
.
defenceRotation
;
...
...
src/ui/Duel/hands.tsx
→
src/ui/Duel/
PlayMat/
hands.tsx
View file @
356becaf
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
useAppSelector
,
useClick
}
from
"
@/hook
"
;
import
{
selectMeHands
,
selectOpHands
}
from
"
@/reducers/duel/handsSlice
"
;
import
{
selectMeHands
,
selectOpHands
}
from
"
@/reducers/duel/handsSlice
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
import
{
...
@@ -9,11 +9,10 @@ import {
...
@@ -9,11 +9,10 @@ import {
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
{
store
}
from
"
@/store
"
;
import
{
store
}
from
"
@/store
"
;
import
{
useHover
}
from
"
react-babylonjs
"
;
import
{
useHover
}
from
"
react-babylonjs
"
;
import
{
useClick
}
from
"
./hook
"
;
import
{
useState
,
useRef
,
useEffect
}
from
"
react
"
;
import
{
useState
,
useRef
,
useEffect
}
from
"
react
"
;
import
{
useSpring
,
animated
}
from
"
./spring
"
;
import
{
useSpring
,
animated
}
from
"
.
.
/spring
"
;
import
{
zip
,
interactTypeToString
}
from
"
.
/util
"
;
import
{
zip
,
interactTypeToString
}
from
"
.
./utils
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
groundShape
=
NeosConfig
.
ui
.
ground
;
const
groundShape
=
NeosConfig
.
ui
.
ground
;
const
left
=
-
(
groundShape
.
width
/
2
);
const
left
=
-
(
groundShape
.
width
/
2
);
...
...
src/ui/Duel/magics.tsx
→
src/ui/Duel/
PlayMat/
magics.tsx
View file @
356becaf
...
@@ -2,10 +2,10 @@ import * as BABYLON from "@babylonjs/core";
...
@@ -2,10 +2,10 @@ import * as BABYLON from "@babylonjs/core";
import
{
selectMeMagics
,
selectOpMagics
}
from
"
@/reducers/duel/magicSlice
"
;
import
{
selectMeMagics
,
selectOpMagics
}
from
"
@/reducers/duel/magicSlice
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
useAppSelector
}
from
"
@/hook
"
;
import
{
zip
,
cardSlotRotation
}
from
"
.
/util
"
;
import
{
zip
,
cardSlotRotation
}
from
"
.
./utils
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
{
clearMagicPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
{
clearMagicPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
// TODO: use config
// TODO: use config
const
left
=
-
2.15
;
const
left
=
-
2.15
;
...
...
src/ui/Duel/monsters.tsx
→
src/ui/Duel/
PlayMat/
monsters.tsx
View file @
356becaf
...
@@ -6,10 +6,10 @@ import {
...
@@ -6,10 +6,10 @@ import {
selectMeMonsters
,
selectMeMonsters
,
selectOpMonsters
,
selectOpMonsters
,
}
from
"
@/reducers/duel/monstersSlice
"
;
}
from
"
@/reducers/duel/monstersSlice
"
;
import
{
zip
,
cardSlotRotation
,
cardSlotDefenceRotation
}
from
"
.
/util
"
;
import
{
zip
,
cardSlotRotation
,
cardSlotDefenceRotation
}
from
"
.
./utils
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
FixedSlot
from
"
./fixedSlot
"
;
import
{
clearMonsterPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
{
clearMonsterPlaceInteractivities
}
from
"
@/reducers/duel/mod
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
const
floating
=
NeosConfig
.
ui
.
card
.
floating
;
const
floating
=
NeosConfig
.
ui
.
card
.
floating
;
...
...
src/ui/Duel/singleSlot.tsx
→
src/ui/Duel/
PlayMat/
singleSlot.tsx
View file @
356becaf
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
CardState
}
from
"
@/reducers/duel/generic
"
;
import
{
store
}
from
"
@/store
"
;
import
{
store
}
from
"
@/store
"
;
import
{
useClick
}
from
"
.
/hook
"
;
import
{
useClick
}
from
"
@
/hook
"
;
import
{
useRef
}
from
"
react
"
;
import
{
useRef
}
from
"
react
"
;
import
{
import
{
setCardListModalInfo
,
setCardListModalInfo
,
setCardListModalIsOpen
,
setCardListModalIsOpen
,
}
from
"
@/reducers/duel/mod
"
;
}
from
"
@/reducers/duel/mod
"
;
import
{
interactTypeToString
}
from
"
.
/util
"
;
import
{
interactTypeToString
}
from
"
.
./utils
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../
../
neos.config.json
"
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
const
transform
=
NeosConfig
.
ui
.
card
.
transform
;
export
const
Depth
=
0.005
;
export
const
Depth
=
0.005
;
...
...
src/ui/Duel/main.tsx
View file @
356becaf
...
@@ -2,33 +2,33 @@ import React from "react";
...
@@ -2,33 +2,33 @@ import React from "react";
import
{
Engine
,
Scene
}
from
"
react-babylonjs
"
;
import
{
Engine
,
Scene
}
from
"
react-babylonjs
"
;
import
{
ReactReduxContext
,
Provider
}
from
"
react-redux
"
;
import
{
ReactReduxContext
,
Provider
}
from
"
react-redux
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
Hands
from
"
./hands
"
;
import
Hands
from
"
./
PlayMat/
hands
"
;
import
Monsters
from
"
./monsters
"
;
import
Monsters
from
"
./
PlayMat/
monsters
"
;
import
CardModal
from
"
./cardModal
"
;
import
CardModal
from
"
./
Message/
cardModal
"
;
import
HintNotification
from
"
./hintNotification
"
;
import
HintNotification
from
"
./
Message/
hintNotification
"
;
import
Magics
from
"
./magics
"
;
import
Magics
from
"
./
PlayMat/
magics
"
;
import
Field
from
"
./field
"
;
import
Field
from
"
./
PlayMat/
field
"
;
import
CommonDeck
from
"
./deck
"
;
import
CommonDeck
from
"
./
PlayMat/
deck
"
;
import
Exclusion
from
"
./exclusion
"
;
import
Exclusion
from
"
./
PlayMat/
exclusion
"
;
import
Cemeteries
from
"
./cemetery
"
;
import
Cemeteries
from
"
./
PlayMat/
cemetery
"
;
import
CardListModal
from
"
./cardListModal
"
;
import
CardListModal
from
"
./
Message/
cardListModal
"
;
import
CheckCardModal
from
"
./checkCardModal
"
;
import
CheckCardModal
from
"
./
Message/
checkCardModal
"
;
import
YesNoModal
from
"
./yesNoModal
"
;
import
YesNoModal
from
"
./
Message/
yesNoModal
"
;
import
PositionModal
from
"
./positionModal
"
;
import
PositionModal
from
"
./
Message/
positionModal
"
;
import
OptionModal
from
"
./optionModal
"
;
import
OptionModal
from
"
./
Message/
optionModal
"
;
import
Phase
from
"
./phase
"
;
import
Phase
from
"
./
Message/
phase
"
;
import
CheckCardModalV2
from
"
./checkCardModalV2
"
;
import
CheckCardModalV2
from
"
./
Message/
checkCardModalV2
"
;
import
ExtraDeck
from
"
./extraDeck
"
;
import
ExtraDeck
from
"
./
PlayMat/
extraDeck
"
;
import
NeosLayout
from
"
./layout
"
;
import
NeosLayout
from
"
./layout
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
DuelTimeLine
from
"
./timeLine
"
;
import
DuelTimeLine
from
"
./
Message/
timeLine
"
;
import
{
Row
}
from
"
antd
"
;
import
{
Row
}
from
"
antd
"
;
import
SendBox
from
"
./sendBox
"
;
import
SendBox
from
"
./
Message/
sendBox
"
;
import
PlayerStatus
from
"
./status
"
;
import
PlayerStatus
from
"
./
Message/
status
"
;
import
Alert
from
"
./alert
"
;
import
Alert
from
"
./
Message/
alert
"
;
import
CheckCardModalV3
from
"
./checkCardModalV3
"
;
import
CheckCardModalV3
from
"
./
Message/
checkCardModalV3
"
;
import
CheckCounterModal
from
"
./checkCounterModal
"
;
import
CheckCounterModal
from
"
./
Message/
checkCounterModal
"
;
import
SortCardModal
from
"
./sortCardModal
"
;
import
SortCardModal
from
"
./
Message/
sortCardModal
"
;
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
// Ref: https://github.com/brianzinn/react-babylonjs/issues/126
const
NeosDuel
=
()
=>
{
const
NeosDuel
=
()
=>
{
...
...
src/ui/Duel/utils/cardSlot.ts
0 → 100644
View file @
356becaf
import
NeosConfig
from
"
../../../../neos.config.json
"
;
import
{
Vector3
}
from
"
@babylonjs/core
"
;
const
cardRotation
=
NeosConfig
.
ui
.
card
.
rotation
;
const
cardReverseRotation
=
NeosConfig
.
ui
.
card
.
reverseRotation
;
const
cardDefenceRotation
=
NeosConfig
.
ui
.
card
.
defenceRotation
;
export
function
cardSlotRotation
(
reverse
?:
boolean
)
{
if
(
reverse
)
{
return
new
Vector3
(
cardReverseRotation
.
x
,
cardReverseRotation
.
y
,
cardReverseRotation
.
z
);
}
else
{
return
new
Vector3
(
cardRotation
.
x
,
cardRotation
.
y
,
cardRotation
.
z
);
}
}
export
function
cardSlotDefenceRotation
()
{
return
new
Vector3
(
cardDefenceRotation
.
x
,
cardDefenceRotation
.
y
,
cardDefenceRotation
.
z
);
}
src/ui/Duel/utils/index.ts
0 → 100644
View file @
356becaf
export
*
from
"
./zip
"
;
export
*
from
"
./interactTypeToString
"
;
export
*
from
"
./cardSlot
"
;
src/ui/Duel/util.ts
→
src/ui/Duel/util
s/interactTypeToString
.ts
View file @
356becaf
import
{
InteractType
}
from
"
@/reducers/duel/generic
"
;
import
{
InteractType
}
from
"
@/reducers/duel/generic
"
;
import
NeosConfig
from
"
../../../neos.config.json
"
;
import
{
Vector3
}
from
"
@babylonjs/core
"
;
export
function
zip
<
S1
,
S2
>
(
firstCollection
:
Array
<
S1
>
,
lastCollection
:
Array
<
S2
>
):
Array
<
[
S1
,
S2
]
>
{
const
length
=
Math
.
min
(
firstCollection
.
length
,
lastCollection
.
length
);
const
zipped
:
Array
<
[
S1
,
S2
]
>
=
[];
for
(
let
index
=
0
;
index
<
length
;
index
++
)
{
zipped
.
push
([
firstCollection
[
index
],
lastCollection
[
index
]]);
}
return
zipped
;
}
export
function
interactTypeToString
(
t
:
InteractType
):
string
{
export
function
interactTypeToString
(
t
:
InteractType
):
string
{
switch
(
t
)
{
switch
(
t
)
{
...
@@ -44,27 +28,3 @@ export function interactTypeToString(t: InteractType): string {
...
@@ -44,27 +28,3 @@ export function interactTypeToString(t: InteractType): string {
}
}
}
}
}
}
const
cardRotation
=
NeosConfig
.
ui
.
card
.
rotation
;
const
cardReverseRotation
=
NeosConfig
.
ui
.
card
.
reverseRotation
;
const
cardDefenceRotation
=
NeosConfig
.
ui
.
card
.
defenceRotation
;
export
function
cardSlotRotation
(
reverse
?:
boolean
)
{
if
(
reverse
)
{
return
new
Vector3
(
cardReverseRotation
.
x
,
cardReverseRotation
.
y
,
cardReverseRotation
.
z
);
}
else
{
return
new
Vector3
(
cardRotation
.
x
,
cardRotation
.
y
,
cardRotation
.
z
);
}
}
export
function
cardSlotDefenceRotation
()
{
return
new
Vector3
(
cardDefenceRotation
.
x
,
cardDefenceRotation
.
y
,
cardDefenceRotation
.
z
);
}
src/ui/Duel/utils/zip.ts
0 → 100644
View file @
356becaf
export
function
zip
<
S1
,
S2
>
(
firstCollection
:
Array
<
S1
>
,
lastCollection
:
Array
<
S2
>
):
Array
<
[
S1
,
S2
]
>
{
const
length
=
Math
.
min
(
firstCollection
.
length
,
lastCollection
.
length
);
const
zipped
:
Array
<
[
S1
,
S2
]
>
=
[];
for
(
let
index
=
0
;
index
<
length
;
index
++
)
{
zipped
.
push
([
firstCollection
[
index
],
lastCollection
[
index
]]);
}
return
zipped
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment