update: ロード完了の処理を実装

This commit is contained in:
yuki540 2018-02-21 16:51:03 +09:00
parent 6041d2692e
commit ed12e63264
2 changed files with 9 additions and 1 deletions

View File

@ -10,7 +10,7 @@ import preload_json from './config/preload'
setTimeout(() => {
testPreload(() => {
util.finisheLoadView()
}, (per) => {
util.updateCharPanel(per)
util.updateProgressBar(per)

View File

@ -1,3 +1,4 @@
const load_view = document.getElementById('load-view')
const char_panel = document.querySelectorAll('.blocks .block')
const progress_bar = document.getElementById('progress-bar')
@ -78,3 +79,10 @@ export const updateCharPanel = (per) => {
export const updateProgressBar = (per) => {
progress_bar.children[0].style.width = `${ per * 100 }%`
}
/**
* モーションパート
*/
export const finisheLoadView = () => {
load_view.setAttribute('data-state', 'fin')
}