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
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
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
love_飞影
Neos
Commits
4d7402c3
Commit
4d7402c3
authored
Dec 31, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'optimize/ui/edge' into 'main'
Optimize/ui/edge See merge request
!57
parents
0e476ba3
7b428da2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
src/ui/Duel/hands.tsx
src/ui/Duel/hands.tsx
+5
-0
src/ui/Duel/monsters.tsx
src/ui/Duel/monsters.tsx
+2
-0
No files found.
src/ui/Duel/hands.tsx
View file @
4d7402c3
...
...
@@ -42,6 +42,8 @@ const CHand = (props: { state: Hand; idx: number; gap: number }) => {
const
rotation
=
CONFIG
.
HandRotation
();
const
hoverScale
=
CONFIG
.
HandHoverScaling
();
const
defaultScale
=
new
BABYLON
.
Vector3
(
1
,
1
,
1
);
const
edgesWidth
=
2.0
;
const
edgesColor
=
BABYLON
.
Color4
.
FromColor3
(
BABYLON
.
Color3
.
Yellow
());
const
planeRef
=
useRef
(
null
);
const
[
state
,
idx
]
=
[
props
.
state
,
props
.
idx
];
const
[
hovered
,
setHovered
]
=
useState
(
false
);
...
...
@@ -127,6 +129,9 @@ const CHand = (props: { state: Hand; idx: number; gap: number }) => {
scaling=
{
hovered
?
hoverScale
:
defaultScale
}
position=
{
spring
.
position
}
rotation=
{
rotation
}
enableEdgesRendering
edgesWidth=
{
state
.
interactivities
.
length
==
0
?
0
:
edgesWidth
}
edgesColor=
{
edgesColor
}
>
<
animated
.
standardMaterial
name=
{
`hand-mat-${idx}`
}
...
...
src/ui/Duel/monsters.tsx
View file @
4d7402c3
...
...
@@ -9,6 +9,7 @@ import { sendSelectPlaceResponse } from "../../api/ocgcore/ocgHelper";
import
{
clearMonsterSelectInfo
,
setCardModalImgUrl
,
setCardModalInteractivies
,
setCardModalIsOpen
,
setCardModalText
,
}
from
"
../../reducers/duel/mod
"
;
...
...
@@ -73,6 +74,7 @@ const CommonMonster = (props: { state: Monster }) => {
`https://cdn02.moecube.com:444/images/ygopro-images-zh-CN/
${
props
.
state
.
occupant
.
id
}
.jpg`
)
);
dispatch
(
setCardModalInteractivies
([]));
// TODO
dispatch
(
setCardModalIsOpen
(
true
));
}
},
...
...
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