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
070bf272
Commit
070bf272
authored
Jun 18, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add streamer effect
parent
5bd0f57f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
4 deletions
+39
-4
src/ui/Duel/PlayMat/Card/index.scss
src/ui/Duel/PlayMat/Card/index.scss
+36
-2
src/ui/Duel/PlayMat/Card/index.tsx
src/ui/Duel/PlayMat/Card/index.tsx
+3
-2
No files found.
src/ui/Duel/PlayMat/Card/index.scss
View file @
070bf272
...
...
@@ -10,8 +10,10 @@ section#mat {
.card-img-wrap
{
transform-style
:
preserve-3d
;
position
:
relative
;
height
:
100%
;
width
:
100%
;
margin
:
auto
auto
;
top
:
2%
;
height
:
96%
;
width
:
96%
;
transform
:
translateZ
(
calc
(
var
(
--
z
)
*
1px
+
0
.1px
))
rotateY
(
calc
(
var
(
--
ry
)
*
1deg
));
.card-cover
,
...
...
@@ -40,6 +42,38 @@ section#mat {
// background-color: #0000005e;
// filter: blur(2px);
}
// ref: https://github.com/Mr-majifu/Animated-Profile-Card02/blob/master/style.css
.card-streamer
{
position
:
absolute
;
inset
:
0
;
background
:
#000
;
overflow
:
hidden
;
}
.
card-streamer
:
:
before
{
content
:
''
;
position
:
absolute
;
top
:
50%
;
left
:
50%
;
width
:
400%
;
height
:
80%
;
background
:
linear-gradient
(
transparent
,
#45f3ff
,
#45f3ff
,
#45f3ff
,
transparent
);
animation
:
stream
2s
linear
infinite
;
}
.
card-streamer
:
:
after
{
content
:
''
;
position
:
absolute
;
/* https://developer.mozilla.org/en-US/docs/Web/CSS/inset */
inset
:
3px
;
background
:
#292929
;
}
@keyframes
stream
{
0
%
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
0deg
);
}
100
%
{
transform
:
translate
(
-50%
,
-50%
)
rotate
(
360deg
);
}
}
}
}
...
...
src/ui/Duel/PlayMat/Card/index.tsx
View file @
070bf272
...
...
@@ -116,7 +116,7 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
return
(
<
animated
.
div
className=
{
classnames
(
"
mat-card
"
,
{
highlight
})
}
className=
"mat-card"
style=
{
{
transform
:
to
(
...
...
@@ -139,7 +139,7 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
}
}
>
<
div
className=
"card-shadow"
/>
<
div
className=
"card-img-wrap"
>
<
div
className=
{
classnames
(
"
card-img-wrap
"
,
{
highlight
})
}
>
<
img
className=
"card-cover"
onError=
{
()
=>
{
...
...
@@ -149,6 +149,7 @@ export const Card: FC<{ idx: number }> = React.memo(({ idx }) => {
/>
<
img
className=
"card-back"
src=
{
getCardImgUrl
(
0
,
true
)
}
/>
</
div
>
<
div
className=
"card-streamer"
/>
</
animated
.
div
>
);
});
...
...
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