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
4b986c62
Commit
4b986c62
authored
Oct 11, 2018
by
LoveEevee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix empty measures being ignored
parent
39655fc5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
37 deletions
+45
-37
public/src/js/parsetja.js
public/src/js/parsetja.js
+45
-37
No files found.
public/src/js/parsetja.js
View file @
4b986c62
...
...
@@ -123,43 +123,6 @@
var
circleID
=
0
var
pushMeasure
=
()
=>
{
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
var
note
=
currentMeasure
[
i
]
if
(
firstNote
&&
note
.
type
){
firstNote
=
false
if
(
ms
<
0
){
this
.
soundOffset
=
ms
ms
=
0
}
}
note
.
start
=
ms
if
(
note
.
endDrumroll
){
note
.
endDrumroll
.
endTime
=
ms
}
var
msPerMeasure
=
60000
*
measure
/
bpm
ms
+=
msPerMeasure
/
currentMeasure
.
length
}
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
var
note
=
currentMeasure
[
i
]
if
(
note
.
type
){
circleID
++
var
circleObj
=
new
Circle
({
id
:
circleID
,
start
:
note
.
start
,
type
:
note
.
type
,
txt
:
note
.
txt
,
speed
:
note
.
bpm
*
note
.
scroll
/
60
,
gogoTime
:
note
.
gogo
,
endTime
:
note
.
endTime
,
requiredHits
:
note
.
requiredHits
})
if
(
lastDrumroll
===
note
){
lastDrumroll
=
circleObj
}
circles
.
push
(
circleObj
)
}
}
if
(
barLine
){
var
note
=
currentMeasure
[
0
]
if
(
note
){
...
...
@@ -182,6 +145,48 @@
}
}
}
if
(
currentMeasure
.
length
){
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
var
note
=
currentMeasure
[
i
]
if
(
firstNote
&&
note
.
type
){
firstNote
=
false
if
(
ms
<
0
){
this
.
soundOffset
=
ms
ms
=
0
}
}
note
.
start
=
ms
if
(
note
.
endDrumroll
){
note
.
endDrumroll
.
endTime
=
ms
}
var
msPerMeasure
=
60000
*
measure
/
bpm
ms
+=
msPerMeasure
/
currentMeasure
.
length
}
for
(
var
i
=
0
;
i
<
currentMeasure
.
length
;
i
++
){
var
note
=
currentMeasure
[
i
]
if
(
note
.
type
){
circleID
++
var
circleObj
=
new
Circle
({
id
:
circleID
,
start
:
note
.
start
,
type
:
note
.
type
,
txt
:
note
.
txt
,
speed
:
note
.
bpm
*
note
.
scroll
/
60
,
gogoTime
:
note
.
gogo
,
endTime
:
note
.
endTime
,
requiredHits
:
note
.
requiredHits
})
if
(
lastDrumroll
===
note
){
lastDrumroll
=
circleObj
}
circles
.
push
(
circleObj
)
}
}
}
else
{
var
msPerMeasure
=
60000
*
measure
/
bpm
ms
+=
msPerMeasure
}
}
for
(
var
lineNum
=
meta
.
start
;
lineNum
<
meta
.
end
;
lineNum
++
){
...
...
@@ -231,6 +236,9 @@
case
"
delay
"
:
ms
+=
(
parseFloat
(
value
)
||
0
)
*
1000
break
case
"
barlineon
"
:
barLine
=
true
break
case
"
barlineoff
"
:
barLine
=
false
break
...
...
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