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
66fa8463
Commit
66fa8463
authored
Dec 29, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix hover scale
parent
9fd16189
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/ui/Duel/hands_.tsx
src/ui/Duel/hands_.tsx
+4
-2
No files found.
src/ui/Duel/hands_.tsx
View file @
66fa8463
...
...
@@ -29,6 +29,7 @@ const DuelHands = () => {
const
DuelHand
=
(
props
:
{
state
:
Card
;
idx
:
number
})
=>
{
const
handShape
=
CONFIG
.
HandShape
();
const
hoverScale
=
CONFIG
.
HandHoverScaling
();
const
defaultScale
=
new
BABYLON
.
Vector3
(
1
,
1
,
1
);
const
planeRef
=
useRef
(
null
);
const
[
state
,
idx
]
=
[
props
.
state
,
props
.
idx
];
const
[
hovered
,
setHovered
]
=
useState
(
false
);
...
...
@@ -68,8 +69,9 @@ const DuelHand = (props: { state: Card; idx: number }) => {
<
plane
name=
{
`hand-${idx}`
}
ref=
{
planeRef
}
width=
{
hovered
?
handShape
.
width
*
hoverScale
.
x
:
handShape
.
width
}
height=
{
hovered
?
handShape
.
height
*
hoverScale
.
z
:
handShape
.
height
}
width=
{
handShape
.
width
}
height=
{
handShape
.
height
}
scaling=
{
hovered
?
hoverScale
:
defaultScale
}
position=
{
new
BABYLON
.
Vector3
(
state
.
transform
.
position
?.
x
,
...
...
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