From e48e5786ebc33c81668997761555afc75ab83f3a Mon Sep 17 00:00:00 2001 From: Thai Pangsakulyanont Date: Wed, 11 Nov 2015 00:02:16 +0700 Subject: [PATCH] feat(bmson/notechart-loader): add rudimentary support for bmson 1.0 --- package.json | 1 + src/bmson/notechart-loader.js | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 405a07549..f9a82897d 100644 --- a/package.json +++ b/package.json @@ -97,6 +97,7 @@ "bemuse-indexer": "^2.0.1", "bluebird": "^2.9.10", "bms": "^2.0.0", + "bmson": "^2.0.0", "bytes": "^2.1.0", "chance": "^0.7.3", "classnames": "^2.1.3", diff --git a/src/bmson/notechart-loader.js b/src/bmson/notechart-loader.js index f9f9903c0..a1267bb00 100644 --- a/src/bmson/notechart-loader.js +++ b/src/bmson/notechart-loader.js @@ -6,14 +6,13 @@ import BMS from 'bms' export function load (source, options) { let data = JSON.parse(source) - let songInfo = bmson.getSongInfo(data.info) - let timing = bmson.getTiming(data) - let score = bmson.getMusicalScore(data, timing) - let barLines = bmson.getBarLines(data.lines) + let songInfo = bmson.songInfoForBmson(data) + let score = bmson.musicalScoreForBmson(data) + let barLines = bmson.barLinesForBmson(data) let stuff = { notes: score.notes.all(), - timing, + timing: score.timing, keysounds: score.keysounds, songInfo, positioning: new BMS.Positioning([