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
f12960ff
Commit
f12960ff
authored
Dec 28, 2022
by
Chunchi Che
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix small but not done
parent
294a516d
Pipeline
#18879
passed with stages
in 3 minutes and 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
19 deletions
+26
-19
src/ui/Duel/babylon.tsx
src/ui/Duel/babylon.tsx
+22
-12
src/ui/Duel/hands_.tsx
src/ui/Duel/hands_.tsx
+4
-7
No files found.
src/ui/Duel/babylon.tsx
View file @
f12960ff
...
@@ -3,19 +3,29 @@ import { Engine, Scene } from "react-babylonjs";
...
@@ -3,19 +3,29 @@ import { Engine, Scene } from "react-babylonjs";
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
import
DuelHands
from
"
./hands_
"
;
import
DuelHands
from
"
./hands_
"
;
import
{
selectMeHands
}
from
"
../../reducers/duel/handsSlice
"
;
import
{
useAppSelector
}
from
"
../../hook
"
;
import
CardModal
from
"
./cardModal
"
;
import
HintNotification
from
"
./hintNotification
"
;
const
BabylonCanvas
=
()
=>
(
const
BabylonCanvas
=
()
=>
{
<
div
>
const
hands
=
useAppSelector
(
selectMeHands
).
cards
;
<
Engine
antialias
adaptToDeviceRatio
canvasId=
"babylonJS"
>
<
Scene
>
return
(
<
DuelCamera
/>
<
div
>
<
DuelLight
/>
<
Engine
antialias
adaptToDeviceRatio
canvasId=
"babylonJS"
>
<
DuelHands
/>
<
Scene
>
<
DuelGround
/>
<
DuelCamera
/>
</
Scene
>
<
DuelLight
/>
</
Engine
>
<
DuelHands
hands=
{
hands
}
/>
</
div
>
<
DuelGround
/>
);
</
Scene
>
</
Engine
>
<
CardModal
/>
<
HintNotification
/>
</
div
>
);
};
const
DuelCamera
=
()
=>
(
const
DuelCamera
=
()
=>
(
<
freeCamera
<
freeCamera
...
...
src/ui/Duel/hands_.tsx
View file @
f12960ff
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
*
as
BABYLON
from
"
@babylonjs/core
"
;
import
{
useAppSelector
}
from
"
../../hook
"
;
import
{
selectMeHands
}
from
"
../../reducers/duel/handsSlice
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
import
*
as
CONFIG
from
"
../../config/ui
"
;
import
{
Card
,
InteractType
}
from
"
../../reducers/duel/util
"
;
import
{
Card
,
InteractType
}
from
"
../../reducers/duel/util
"
;
import
{
import
{
...
@@ -13,13 +11,11 @@ import { store } from "../../store";
...
@@ -13,13 +11,11 @@ import { store } from "../../store";
import
{
useClick
,
useHover
}
from
"
react-babylonjs
"
;
import
{
useClick
,
useHover
}
from
"
react-babylonjs
"
;
import
{
useState
,
useRef
}
from
"
react
"
;
import
{
useState
,
useRef
}
from
"
react
"
;
const
DuelHands
=
()
=>
{
const
DuelHands
=
(
props
:
{
hands
:
Card
[]
})
=>
{
const
hands
=
useAppSelector
(
selectMeHands
).
cards
;
return
(
return
(
<>
<>
{
hands
.
map
((
hand
,
idx
)
=>
{
{
props
.
hands
.
map
((
hand
,
idx
)
=>
{
return
<
DuelHand
state=
{
hand
}
idx=
{
idx
}
/>;
return
<
DuelHand
state=
{
hand
}
idx=
{
idx
}
key=
{
idx
}
/>;
})
}
})
}
</>
</>
);
);
...
@@ -58,6 +54,7 @@ const DuelHand = (props: { state: Card; idx: number }) => {
...
@@ -58,6 +54,7 @@ const DuelHand = (props: { state: Card; idx: number }) => {
);
);
dispatch
(
setCardModalIsOpen
(
true
));
dispatch
(
setCardModalIsOpen
(
true
));
},
planeRef
);
},
planeRef
);
return
(
return
(
<>
<>
<
plane
<
plane
...
...
Chunchi Che
@SKTT1Ryze
mentioned in commit
13746858
·
Dec 28, 2022
mentioned in commit
13746858
mentioned in commit 13746858dc85cfba16f6fdb1131e0a85b559dbea
Toggle commit list
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