Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
Taiko Web
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
nanahira
Taiko Web
Commits
fc92c553
Commit
fc92c553
authored
Jan 01, 2019
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add failed animation
parent
06cdc1c7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
8 deletions
+17
-8
public/src/css/songbg.css
public/src/css/songbg.css
+11
-2
public/src/js/scoresheet.js
public/src/js/scoresheet.js
+6
-6
No files found.
public/src/css/songbg.css
View file @
fc92c553
...
@@ -247,6 +247,14 @@
...
@@ -247,6 +247,14 @@
50
%
{
transform
:
translateY
(
0
)}
50
%
{
transform
:
translateY
(
0
)}
100
%
{
transform
:
translateY
(
var
(
--low
))}
100
%
{
transform
:
translateY
(
var
(
--low
))}
}
}
@keyframes
tetsuohana-failed1
{
0
%
{
transform
:
translateY
(
calc
(
10px
*
var
(
--scale
)))}
50
%
{
transform
:
translateY
(
0
)}
}
@keyframes
tetsuohana-failed2
{
50
%
{
transform
:
translateY
(
calc
(
5px
*
var
(
--scale
)))}
100
%
{
transform
:
translateY
(
calc
(
15px
*
var
(
--scale
)))}
}
@keyframes
tetsuohana-flowers
{
@keyframes
tetsuohana-flowers
{
0
%
{
--frame
:
0
}
0
%
{
--frame
:
0
}
50
%
{
--frame
:
1
}
50
%
{
--frame
:
1
}
...
@@ -272,6 +280,7 @@
...
@@ -272,6 +280,7 @@
#tetsuohana
.failed
#tetsuo
,
#tetsuohana
.failed
#tetsuo
,
#tetsuohana
.failed
#hana
{
#tetsuohana
.failed
#hana
{
--frame
:
2
;
--frame
:
2
;
transition
:
0.5s
transform
cubic-bezier
(
0.2
,
0.6
,
0.4
,
1.2
);
top
:
calc
(
26px
*
var
(
--scale
));
transform
:
translateY
(
var
(
--low
));
transform
:
translateY
(
calc
(
46px
*
var
(
--scale
)));
animation
:
1.25s
ease-out
tetsuohana-failed1
both
infinite
,
1.25s
ease-in
tetsuohana-failed2
both
infinite
;
}
}
public/src/js/scoresheet.js
View file @
fc92c553
...
@@ -281,7 +281,7 @@ class Scoresheet{
...
@@ -281,7 +281,7 @@ class Scoresheet{
var
elapsed
=
0
var
elapsed
=
0
}
}
var
gaugePercent
=
[
Math
.
round
(
this
.
results
.
gauge
/
2
)
/
50
]
var
gaugePercent
=
Math
.
round
(
this
.
results
.
gauge
/
2
)
/
50
if
(
players
===
2
){
if
(
players
===
2
){
var
gauge2
=
Math
.
round
(
p2
.
results
.
gauge
/
2
)
/
50
var
gauge2
=
Math
.
round
(
p2
.
results
.
gauge
/
2
)
/
50
if
(
gauge2
>
gaugePercent
){
if
(
gauge2
>
gaugePercent
){
...
@@ -296,17 +296,17 @@ class Scoresheet{
...
@@ -296,17 +296,17 @@ class Scoresheet{
var
results
=
this
.
results
var
results
=
this
.
results
if
(
p
===
1
){
if
(
p
===
1
){
results
=
p2
.
results
results
=
p2
.
results
}
else
if
(
this
.
multiplayer
){
ctx
.
translate
(
0
,
-
290
)
}
}
var
resultGauge
=
Math
.
round
(
results
.
gauge
/
2
)
/
50
var
resultGauge
=
Math
.
round
(
results
.
gauge
/
2
)
/
50
var
clear
=
resultGauge
>=
gaugeClear
var
clear
=
resultGauge
>=
gaugeClear
var
p1Offset
=
this
.
multiplayer
&&
p
===
0
?
10
:
0
if
(
p
===
1
||
!
this
.
multiplayer
&&
clear
){
ctx
.
translate
(
0
,
290
)
}
if
(
clear
){
if
(
clear
){
ctx
.
globalCompositeOperation
=
"
lighter
"
ctx
.
globalCompositeOperation
=
"
lighter
"
}
}
ctx
.
globalAlpha
=
Math
.
min
(
1
,
Math
.
max
(
0
,
(
elapsed
-
(
3100
+
failedOffset
))
/
500
))
*
0.5
ctx
.
globalAlpha
=
Math
.
min
(
1
,
Math
.
max
(
0
,
(
elapsed
-
(
3100
+
failedOffset
))
/
500
))
*
0.5
var
grd
=
ctx
.
createLinearGradient
(
0
,
frameTop
+
362
,
0
,
frameTop
+
65
8
)
var
grd
=
ctx
.
createLinearGradient
(
0
,
frameTop
+
72
,
0
,
frameTop
+
36
8
)
grd
.
addColorStop
(
0
,
"
#000
"
)
grd
.
addColorStop
(
0
,
"
#000
"
)
if
(
clear
){
if
(
clear
){
grd
.
addColorStop
(
1
,
"
#ffffba
"
)
grd
.
addColorStop
(
1
,
"
#ffffba
"
)
...
@@ -314,7 +314,7 @@ class Scoresheet{
...
@@ -314,7 +314,7 @@ class Scoresheet{
grd
.
addColorStop
(
1
,
"
transparent
"
)
grd
.
addColorStop
(
1
,
"
transparent
"
)
}
}
ctx
.
fillStyle
=
grd
ctx
.
fillStyle
=
grd
ctx
.
fillRect
(
0
,
frameTop
+
36
2
,
winW
,
286
)
ctx
.
fillRect
(
0
,
frameTop
+
7
2
,
winW
,
286
)
ctx
.
restore
()
ctx
.
restore
()
}
}
}
}
...
...
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