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
c900f133
Commit
c900f133
authored
Feb 22, 2020
by
Bui
Committed by
GitHub
Feb 22, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #171 from purerosefallen/note_word
update the words below the notes
parents
7a50dec5
4c80505d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
129 additions
and
4 deletions
+129
-4
public/src/js/parsetja.js
public/src/js/parsetja.js
+49
-4
public/src/js/strings.js
public/src/js/strings.js
+80
-0
No files found.
public/src/js/parsetja.js
View file @
c900f133
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
"
A
"
:
{
name
:
"
daiDon
"
,
txt
:
strings
.
note
.
daiDon
},
"
A
"
:
{
name
:
"
daiDon
"
,
txt
:
strings
.
note
.
daiDon
},
"
B
"
:
{
name
:
"
daiKa
"
,
txt
:
strings
.
note
.
daiKa
}
"
B
"
:
{
name
:
"
daiKa
"
,
txt
:
strings
.
note
.
daiKa
}
}
}
this
.
noteTypes_ex
=
strings
.
ex_note
;
this
.
courseTypes
=
{
this
.
courseTypes
=
{
"
0
"
:
"
easy
"
,
"
0
"
:
"
easy
"
,
"
1
"
:
"
normal
"
,
"
1
"
:
"
normal
"
,
...
@@ -148,7 +149,32 @@
...
@@ -148,7 +149,32 @@
var
circles
=
[]
var
circles
=
[]
var
circleID
=
0
var
circleID
=
0
var
regexAZ
=
/
[
A-Z
]
/
var
regexAZ
=
/
[
A-Z
]
/
var
isAllDon
=
(
note_chain
,
start_pos
)
=>
{
for
(
var
i
=
start_pos
;
i
<
note_chain
.
length
;
++
i
)
{
var
note
=
note_chain
[
i
];
if
(
note
&&
note
.
type
!==
"
don
"
&&
note
.
type
!==
"
daiDon
"
)
{
return
false
;
}
}
return
true
;
}
var
checkChain
=
(
note_chain
,
measure_length
,
is_last
)
=>
{
//console.log(note_chain, measure_length, is_last);
/*if (measure_length >= 24) {
for (var note of note_chain) {
note.text = this.noteTypes_ex[note.type][0];
}
} else { */
var
alldon_pos
=
null
;
for
(
var
i
=
0
;
i
<
note_chain
.
length
-
(
is_last
?
1
:
0
);
++
i
)
{
var
note
=
note_chain
[
i
];
if
(
alldon_pos
===
null
&&
is_last
&&
isAllDon
(
note_chain
,
i
))
{
alldon_pos
=
i
;
}
note
.
text
=
this
.
noteTypes_ex
[
note
.
type
][
alldon_pos
!=
null
?
(
i
-
alldon_pos
)
%
2
:
0
];
}
//}
}
var
pushMeasure
=
()
=>
{
var
pushMeasure
=
()
=>
{
var
note
=
currentMeasure
[
0
]
var
note
=
currentMeasure
[
0
]
if
(
note
){
if
(
note
){
...
@@ -183,9 +209,11 @@
...
@@ -183,9 +209,11 @@
var
msPerMeasure
=
60000
*
measure
/
note
.
bpm
var
msPerMeasure
=
60000
*
measure
/
note
.
bpm
ms
+=
msPerMeasure
/
currentMeasure
.
length
ms
+=
msPerMeasure
/
currentMeasure
.
length
}
}
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
var
note_chain
=
[];
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
//console.log(note_chain.length);
var
note
=
currentMeasure
[
i
]
var
note
=
currentMeasure
[
i
]
if
(
note
.
type
)
{
if
(
note
.
type
)
{
circleID
++
circleID
++
var
circleObj
=
new
Circle
({
var
circleObj
=
new
Circle
({
id
:
circleID
,
id
:
circleID
,
...
@@ -200,13 +228,30 @@
...
@@ -200,13 +228,30 @@
branch
:
currentBranch
,
branch
:
currentBranch
,
section
:
note
.
section
section
:
note
.
section
})
})
if
(
lastDrumroll
===
note
){
if
(
note
.
type
===
"
don
"
||
note
.
type
===
"
ka
"
||
note
.
type
===
"
daiDon
"
||
note
.
type
===
"
daiKa
"
)
{
note_chain
.
push
(
circleObj
);
}
else
{
if
(
note_chain
.
length
>
1
&&
currentMeasure
.
length
>=
8
)
{
checkChain
(
note_chain
,
currentMeasure
.
length
,
false
);
}
note_chain
=
[];
}
if
(
lastDrumroll
===
note
)
{
lastDrumroll
=
circleObj
lastDrumroll
=
circleObj
}
}
circles
.
push
(
circleObj
)
circles
.
push
(
circleObj
)
}
else
if
(
!
(
currentMeasure
.
length
>=
24
&&
(
!
currentMeasure
[
i
+
1
]
||
currentMeasure
[
i
+
1
].
type
))
&&
!
(
currentMeasure
.
length
>=
48
&&
(
!
currentMeasure
[
i
+
2
]
||
currentMeasure
[
i
+
2
].
type
||
!
currentMeasure
[
i
+
3
]
||
currentMeasure
[
i
+
3
].
type
)))
{
if
(
note_chain
.
length
>
1
&&
currentMeasure
.
length
>=
8
)
{
checkChain
(
note_chain
,
currentMeasure
.
length
,
true
);
}
note_chain
=
[];
}
}
}
}
if
(
note_chain
.
length
>
1
&&
currentMeasure
.
length
>=
8
)
{
checkChain
(
note_chain
,
currentMeasure
.
length
,
false
);
}
}
else
{
}
else
{
var
msPerMeasure
=
60000
*
measure
/
bpm
var
msPerMeasure
=
60000
*
measure
/
bpm
ms
+=
msPerMeasure
ms
+=
msPerMeasure
...
...
public/src/js/strings.js
View file @
c900f133
...
@@ -50,6 +50,22 @@
...
@@ -50,6 +50,22 @@
daiDrumroll
:
"
連打(大)ーっ!!
"
,
daiDrumroll
:
"
連打(大)ーっ!!
"
,
balloon
:
"
ふうせん
"
balloon
:
"
ふうせん
"
}
}
this
.
ex_note
=
{
don
:
[
"
ド
"
,
"
コ
"
],
ka
:
[
"
カ
"
],
daiDon
:
[
"
ドン(大)
"
,
"
ドン(大)
"
],
daiKa
:
[
"
カッ(大)
"
]
}
this
.
combo
=
"
コンボ
"
this
.
combo
=
"
コンボ
"
this
.
clear
=
"
クリア
"
this
.
clear
=
"
クリア
"
this
.
good
=
"
良
"
this
.
good
=
"
良
"
...
@@ -194,6 +210,22 @@ function StringsEn(){
...
@@ -194,6 +210,22 @@ function StringsEn(){
daiDrumroll
:
"
DRUM ROLLー!!
"
,
daiDrumroll
:
"
DRUM ROLLー!!
"
,
balloon
:
"
Balloon
"
balloon
:
"
Balloon
"
}
}
this
.
ex_note
=
{
don
:
[
"
Do
"
,
"
Do
"
],
ka
:
[
"
Ka
"
],
daiDon
:
[
"
DON
"
,
"
DON
"
],
daiKa
:
[
"
KA
"
]
}
this
.
combo
=
"
Combo
"
this
.
combo
=
"
Combo
"
this
.
clear
=
"
Clear
"
this
.
clear
=
"
Clear
"
this
.
good
=
"
GOOD
"
this
.
good
=
"
GOOD
"
...
@@ -338,6 +370,22 @@ function StringsCn(){
...
@@ -338,6 +370,22 @@ function StringsCn(){
daiDrumroll
:
"
连打(大)ー!!
"
,
daiDrumroll
:
"
连打(大)ー!!
"
,
balloon
:
"
气球
"
balloon
:
"
气球
"
}
}
this
.
ex_note
=
{
don
:
[
"
咚
"
,
"
咚
"
],
ka
:
[
"
咔
"
],
daiDon
:
[
"
咚(大)
"
,
"
咚(大)
"
],
daiKa
:
[
"
咔(大)
"
]
}
this
.
combo
=
"
连段
"
this
.
combo
=
"
连段
"
this
.
clear
=
"
通关
"
this
.
clear
=
"
通关
"
this
.
good
=
"
良
"
this
.
good
=
"
良
"
...
@@ -482,6 +530,22 @@ function StringsTw(){
...
@@ -482,6 +530,22 @@ function StringsTw(){
daiDrumroll
:
"
連打(大)ー!!
"
,
daiDrumroll
:
"
連打(大)ー!!
"
,
balloon
:
"
氣球
"
balloon
:
"
氣球
"
}
}
this
.
ex_note
=
{
don
:
[
"
咚
"
,
"
咚
"
],
ka
:
[
"
咔
"
],
daiDon
:
[
"
咚(大)
"
,
"
咚(大)
"
],
daiKa
:
[
"
咔(大)
"
]
}
this
.
combo
=
"
連段
"
this
.
combo
=
"
連段
"
this
.
clear
=
"
通關
"
this
.
clear
=
"
通關
"
this
.
good
=
"
良
"
this
.
good
=
"
良
"
...
@@ -626,6 +690,22 @@ function StringsKo(){
...
@@ -626,6 +690,22 @@ function StringsKo(){
daiDrumroll
:
"
연타(대)ー!!
"
,
daiDrumroll
:
"
연타(대)ー!!
"
,
balloon
:
"
풍선
"
balloon
:
"
풍선
"
}
}
this
.
ex_note
=
{
don
:
[
"
쿠
"
,
"
쿠
"
],
ka
:
[
"
딱
"
],
daiDon
:
[
"
쿵(대)
"
,
"
쿵(대)
"
],
daiKa
:
[
"
딱(대)
"
]
}
this
.
combo
=
"
콤보
"
this
.
combo
=
"
콤보
"
this
.
clear
=
"
클리어
"
this
.
clear
=
"
클리어
"
this
.
good
=
"
얼쑤
"
this
.
good
=
"
얼쑤
"
...
...
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