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
803df485
Commit
803df485
authored
Mar 10, 2024
by
Chunchi Che
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
c65739fa
Pipeline
#25727
passed with stages
in 14 minutes and 15 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
15 deletions
+13
-15
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
+0
-2
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
+5
-5
src/ui/Duel/PlayMat/Card/springs/types.ts
src/ui/Duel/PlayMat/Card/springs/types.ts
+7
-7
src/ui/Shared/YgoCard/index.tsx
src/ui/Shared/YgoCard/index.tsx
+1
-1
No files found.
src/ui/Duel/PlayMat/Card/springs/moveToGround.ts
View file @
803df485
import
{
easings
}
from
"
@react-spring/web
"
;
import
{
ygopro
}
from
"
@/api
"
;
import
{
isMe
}
from
"
@/stores
"
;
import
{
matConfig
}
from
"
@/ui/Shared
"
;
...
...
src/ui/Duel/PlayMat/Card/springs/moveToOutside.ts
View file @
803df485
...
...
@@ -22,10 +22,10 @@ export const moveToOutside: MoveFunc = async (props) => {
const
{
zone
,
controller
,
position
,
sequence
}
=
card
.
location
;
let
x
=
BLOCK_WIDTH
*
2.5
+
COL_GAP
*
2
+
BLOCK_OUTSIDE_OFFSET_X
+
CARD_HEIGHT_O
*
CARD_RATIO
*
0.5
,
BLOCK_WIDTH
*
2.5
+
COL_GAP
*
2
+
BLOCK_OUTSIDE_OFFSET_X
+
CARD_HEIGHT_O
*
CARD_RATIO
*
0.5
,
y
=
ROW_GAP
+
BLOCK_HEIGHT_M
+
(
BLOCK_HEIGHT_M
-
CARD_HEIGHT_O
)
/
2
;
if
(
zone
===
REMOVED
)
y
-=
ROW_GAP
+
CARD_HEIGHT_O
;
if
(
!
isMe
(
controller
))
{
...
...
@@ -35,7 +35,7 @@ export const moveToOutside: MoveFunc = async (props) => {
api
.
set
({
z
:
0
,
subZ
:
100
,
})
})
;
await
asyncStart
(
api
)({
x
,
y
,
...
...
src/ui/Duel/PlayMat/Card/springs/types.ts
View file @
803df485
...
...
@@ -22,11 +22,11 @@ export interface SpringApiProps {
subZ
:
number
;
// 0 -> 100,这是为了让卡片移动过程中,稍微上浮一些,避免一些奇怪的遮挡问题
config
?:
Partial
<
{
mass
:
number
,
tension
:
number
,
friction
:
number
,
clamp
:
boolean
}
>
mass
:
number
;
tension
:
number
;
friction
:
number
;
clamp
:
boolean
;
}
>
;
}
export
type
SpringApi
=
SpringRef
<
SpringApiProps
>
;
...
...
@@ -44,7 +44,7 @@ export type MoveFunc = OptionsToFunc<MoveOptions>;
export
type
AttackOptions
=
|
{
directAttack
:
true
;
}
directAttack
:
true
;
}
|
{
directAttack
:
false
;
target
:
ygopro
.
CardLocation
};
export
type
AttackFunc
=
OptionsToFunc
<
AttackOptions
>
;
src/ui/Shared/YgoCard/index.tsx
View file @
803df485
import
classNames
from
"
classnames
"
;
import
{
CSSProperties
,
use
Memo
,
use
Effect
,
useState
}
from
"
react
"
;
import
{
CSSProperties
,
useEffect
,
useState
}
from
"
react
"
;
import
{
useConfig
}
from
"
@/config
"
;
import
{
isSuperReleaseCard
}
from
"
@/superPreRelease
"
;
...
...
Chunchi Che
@SKTT1Ryze
mentioned in commit
dee97f8c
·
Mar 10, 2024
mentioned in commit
dee97f8c
mentioned in commit dee97f8c01cf1850a78a455ba3b5a569c8779514
Toggle commit list
Chunchi Che
@SKTT1Ryze
mentioned in commit
647eaabc
·
Mar 10, 2024
mentioned in commit
647eaabc
mentioned in commit 647eaabc3f81761e4d68122d04a83596315b12bd
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