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
911da048
Commit
911da048
authored
Mar 20, 2019
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix code
- Fixes code
parent
f24592d4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
15 deletions
+44
-15
public/src/css/loader.css
public/src/css/loader.css
+3
-3
public/src/js/canvascache.js
public/src/js/canvascache.js
+35
-9
public/src/js/songselect.js
public/src/js/songselect.js
+6
-3
No files found.
public/src/css/loader.css
View file @
911da048
...
...
@@ -15,7 +15,7 @@ body{
margin
:
0
;
padding
:
0
;
background-color
:
#000
;
background-position
:
top
center
;
background-position
:
center
;
background-size
:
30vh
;
}
#screen
.pattern-bg
{
...
...
@@ -29,8 +29,8 @@ body{
width
:
90%
;
height
:
10%
;
border
:
1px
solid
black
;
position
:
fixed
;
top
:
50
%
;
position
:
absolute
;
top
:
45
%
;
left
:
5%
;
background
:
rgba
(
0
,
0
,
0
,
0.65
);
}
...
...
public/src/js/canvascache.js
View file @
911da048
...
...
@@ -29,14 +29,34 @@ class CanvasCache{
return
}
var
saved
=
false
var
time
=
Date
.
now
()
if
(
!
img
){
var
w
=
config
.
w
var
h
=
config
.
h
this
.
x
+=
this
.
lastW
+
1
this
.
x
+=
this
.
lastW
+
(
this
.
lastW
?
1
:
0
)
if
(
this
.
x
+
w
>
this
.
w
){
this
.
x
=
0
this
.
y
+=
this
.
lastH
+
1
}
if
(
this
.
y
+
h
>
this
.
h
){
var
clear
=
true
var
oldest
=
{
time
:
time
}
this
.
map
.
forEach
((
oldImg
,
id
)
=>
{
if
(
oldImg
.
time
<
oldest
.
time
){
oldest
.
id
=
id
oldest
.
time
=
oldImg
.
time
}
})
var
oldImg
=
this
.
map
.
get
(
oldest
.
id
)
this
.
map
.
delete
(
oldest
.
id
)
img
=
{
x
:
oldImg
.
x
,
y
:
oldImg
.
y
,
w
:
w
,
h
:
h
}
}
else
{
var
clear
=
false
this
.
lastW
=
w
this
.
lastH
=
Math
.
max
(
this
.
lastH
,
h
)
img
=
{
...
...
@@ -45,17 +65,22 @@ class CanvasCache{
w
:
w
,
h
:
h
}
this
.
map
.
set
(
config
.
id
,
img
)
}
saved
=
true
this
.
ctx
.
save
()
this
.
ctx
.
translate
(
img
.
x
|
0
,
img
.
y
|
0
)
if
(
clear
){
this
.
ctx
.
clearRect
(
0
,
0
,
(
img
.
w
|
0
)
+
1
,
(
img
.
h
|
0
)
+
1
)
}
this
.
ctx
.
beginPath
()
this
.
ctx
.
rect
(
0
,
0
,
img
.
w
|
0
,
img
.
h
|
0
)
this
.
ctx
.
clip
()
this
.
map
.
set
(
config
.
id
,
img
)
callback
(
this
.
ctx
)
}
img
.
time
=
time
if
(
setOnly
){
this
.
ctx
.
restore
()
return
...
...
@@ -81,6 +106,7 @@ class CanvasCache{
this
.
ctx
.
clearRect
(
0
,
0
,
this
.
w
,
this
.
h
)
}
clean
(){
this
.
resize
(
1
,
1
,
1
)
delete
this
.
map
delete
this
.
ctx
delete
this
.
canvas
...
...
public/src/js/songselect.js
View file @
911da048
...
...
@@ -803,9 +803,11 @@ class SongSelect{
this
.
canvas
.
style
.
height
=
(
winH
/
this
.
pixelRatio
)
+
"
px
"
var
borders
=
(
this
.
songAsset
.
border
+
this
.
songAsset
.
innerBorder
)
*
2
var
songsLength
=
Math
.
ceil
(
winW
/
ratio
/
(
this
.
songAsset
.
width
+
this
.
songAsset
.
marginLeft
))
+
1
this
.
songTitleCache
.
resize
(
(
this
.
songAsset
.
width
-
borders
+
1
)
*
Math
.
ceil
(
this
.
songs
.
length
/
3
)
,
(
this
.
songAsset
.
height
-
borders
+
1
)
*
3
,
(
this
.
songAsset
.
width
-
borders
+
1
)
*
songsLength
,
this
.
songAsset
.
height
-
borders
+
1
,
ratio
+
0.2
)
...
...
@@ -827,7 +829,7 @@ class SongSelect{
categories
++
}
})
this
.
categoryCache
.
resize
(
280
,
(
this
.
songAsset
.
marginTop
+
1
)
*
categories
,
ratio
+
0.5
)
this
.
categoryCache
.
resize
(
280
,
this
.
songAsset
.
marginTop
+
1
,
ratio
+
0.5
)
this
.
difficultyCache
.
resize
((
44
+
56
+
2
)
*
5
,
135
+
10
,
ratio
+
0.5
)
...
...
@@ -1933,6 +1935,7 @@ class SongSelect{
this
.
categoryCache
.
clean
()
this
.
difficultyCache
.
clean
()
this
.
sessionCache
.
clean
()
this
.
currentSongCache
.
clean
()
assets
.
sounds
[
"
bgm_songsel
"
].
stop
()
if
(
!
this
.
bgmEnabled
){
snd
.
musicGain
.
fadeIn
()
...
...
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