danoniplus 25.5.5 → 26.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -57,10 +57,15 @@ If the life of the life gauge remains by the end of the game or it is over the q
57
57
  - [ParaFla!ソース利用者向け移行方法](https://github.com/cwtickle/danoniplus/wiki/forParaFlaUser)
58
58
 
59
59
  ### How to Install / 導入方法
60
- - [Releases](https://github.com/cwtickle/danoniplus/releases)からダウンロードします。
61
- - npmからの導入も可能です。@以降はバージョン名を指定します(下記のxxは実際の番号に合わせます)
60
+ - [Releases](https://github.com/cwtickle/danoniplus/releases)からダウンロードします。(Download from [Releases](https://github.com/cwtickle/danoniplus/releases).)
61
+ - npmからの導入も可能です。(You can install from npm.)
62
62
  ```
63
- npm i danoniplus@25.5.xx
63
+ npm i danoniplus
64
+ ```
65
+ - バージョン名を直接指定するときは下記のように @以降をバージョン指定します。
66
+ (When directly specifying the version name, specify the version after @ as shown below.)
67
+ ```
68
+ npm i danoniplus@26.1.2
64
69
  ```
65
70
 
66
71
  ## System requirements / 動作環境
@@ -78,9 +83,9 @@ but the details are different from the conventional ones. See below for details.
78
83
  ## How to Contribute / 開発者の方へ
79
84
  開発にご協力いただける方は、下記をご覧ください。GitHubアカウントの無い方でも協力できます!
80
85
  If you would like to cooperate with the development, please see below. Even if you don't have a GitHub account, you can cooperate!
81
- - [貢献の仕方 / How to Contribute](https://github.com/cwtickle/danoniplus/blob/develop/.github/CONTRIBUTING.md)
86
+ - [貢献の仕方 / How to Contribute](https://github.com/cwtickle/blob/develop/.github/CONTRIBUTING.md)
82
87
  - [要望・不具合報告用Gitter](https://gitter.im/danonicw/community)
83
- - [コントリビューター / Contributors](https://github.com/cwtickle/danoniplus/blob/develop/CONTRIBUTORS.md)
88
+ - [コントリビューター / Contributors](https://github.com/cwtickle/blob/develop/CONTRIBUTORS.md)
84
89
 
85
90
  ## Community / コミュニティ
86
91
  - [Dancing☆Onigiri Discordサーバー](https://discord.gg/TegbHFY7zg)
package/js/danoni_main.js CHANGED
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 25.5.5`;
11
+ const g_version = `Ver 26.1.2`;
12
12
  const g_revisedDate = `2022/02/16`;
13
13
  const g_alphaVersion = ``;
14
14
 
@@ -125,7 +125,14 @@ const g_detailObj = {
125
125
  arrowCnt: [],
126
126
  frzCnt: [],
127
127
  maxDensity: [],
128
+ maxDensity2Push: [],
129
+ maxDensity3Push: [],
128
130
  densityData: [],
131
+ density2PushData: [],
132
+ density3PushData: [],
133
+ densityDiff: [],
134
+ density2PushDiff: [],
135
+ density3PushDiff: [],
129
136
  startFrame: [],
130
137
  playingFrame: [],
131
138
  playingFrameWithBlank: [],
@@ -1607,6 +1614,7 @@ function storeBaseData(_scoreId, _scoreObj, _keyCtrlPtn) {
1607
1614
  let allData = 0;
1608
1615
 
1609
1616
  const types = [`arrow`, `frz`];
1617
+ let fullData = [];
1610
1618
  for (let j = 0; j < keyNum; j++) {
1611
1619
  noteCnt.arrow[j] = 0;
1612
1620
  noteCnt.frz[j] = 0;
@@ -1625,17 +1633,53 @@ function storeBaseData(_scoreId, _scoreObj, _keyCtrlPtn) {
1625
1633
  }
1626
1634
  })
1627
1635
  });
1636
+ fullData = fullData.concat(..._scoreObj.arrowData[j], ...tmpFrzData);
1628
1637
  }
1629
1638
 
1639
+ fullData = fullData.filter(val => !isNaN(parseFloat(val))).sort((a, b) => a - b);
1640
+ let pushCnt = 0;
1641
+ const density2PushData = [...Array(C_LEN_DENSITY_DIVISION)].fill(0);
1642
+ const density3PushData = [...Array(C_LEN_DENSITY_DIVISION)].fill(0);
1643
+ fullData.forEach((note, j) => {
1644
+ if (fullData[j] === fullData[j + 1]) {
1645
+ pushCnt++;
1646
+ } else {
1647
+ const point = Math.floor((note - firstArrowFrame) / playingFrame * C_LEN_DENSITY_DIVISION);
1648
+ if (point >= 0) {
1649
+ if (pushCnt > 2) {
1650
+ density3PushData[point] += pushCnt;
1651
+ }
1652
+ density2PushData[point] += pushCnt;
1653
+ }
1654
+ pushCnt = 0;
1655
+ }
1656
+ });
1657
+
1630
1658
  g_detailObj.toolDif[_scoreId] = calcLevel(_scoreObj);
1631
1659
  g_detailObj.speedData[_scoreId] = _scoreObj.speedData.concat();
1632
1660
  g_detailObj.boostData[_scoreId] = _scoreObj.boostData.concat();
1633
1661
 
1634
- g_detailObj.maxDensity[_scoreId] = densityData.indexOf(Math.max.apply(null, densityData));
1635
- g_detailObj.densityData[_scoreId] = [];
1636
- for (let j = 0; j < C_LEN_DENSITY_DIVISION; j++) {
1637
- g_detailObj.densityData[_scoreId].push(Math.round(densityData[j] / allData * C_LEN_DENSITY_DIVISION * 10000) / 100);
1662
+ const storeDensity = _densityData => {
1663
+ const dataList = [];
1664
+ for (let j = 0; j < C_LEN_DENSITY_DIVISION; j++) {
1665
+ dataList.push(allData === 0 ? 0 : Math.round(_densityData[j] / allData * C_LEN_DENSITY_DIVISION * 10000) / 100);
1666
+ }
1667
+ return dataList;
1638
1668
  }
1669
+ const diffArray = (_array1, _array2) => {
1670
+ const list = [];
1671
+ _array1.forEach((val, j) => list.push(_array1[j] - _array2[j]));
1672
+ return list;
1673
+ };
1674
+ g_detailObj.densityData[_scoreId] = storeDensity(densityData);
1675
+ g_detailObj.density2PushData[_scoreId] = storeDensity(density2PushData);
1676
+ g_detailObj.density3PushData[_scoreId] = storeDensity(density3PushData);
1677
+
1678
+ g_detailObj.densityDiff[_scoreId] = diffArray(g_detailObj.densityData[_scoreId], g_detailObj.density2PushData[_scoreId]);
1679
+ g_detailObj.density2PushDiff[_scoreId] = diffArray(g_detailObj.density2PushData[_scoreId], g_detailObj.density3PushData[_scoreId]);
1680
+ g_detailObj.density3PushDiff[_scoreId] = g_detailObj.density3PushData[_scoreId].concat();
1681
+
1682
+ g_detailObj.maxDensity[_scoreId] = densityData.indexOf(Math.max.apply(null, densityData));
1639
1683
 
1640
1684
  g_detailObj.arrowCnt[_scoreId] = noteCnt.arrow.concat();
1641
1685
  g_detailObj.frzCnt[_scoreId] = noteCnt.frz.concat();
@@ -2562,15 +2606,23 @@ function titleInit() {
2562
2606
 
2563
2607
  // コメントエリア作成
2564
2608
  if (g_headerObj.commentVal !== ``) {
2609
+
2610
+ // コメント文の加工
2611
+ const comments = g_headerObj.commentVal.split(`}`).join(`{`).split(`{`);
2612
+ let convCommentVal = ``;
2613
+ for (let j = 0; j < comments.length; j += 2) {
2614
+ convCommentVal += escapeHtmlForEnabledTag(comments[j]);
2615
+ convCommentVal += setVal(comments[j + 1], ``, C_TYP_CALC);
2616
+ }
2617
+
2565
2618
  if (g_headerObj.commentExternal) {
2566
2619
  if (document.querySelector(`#commentArea`) !== null) {
2567
- commentArea.innerHTML = g_headerObj.commentVal;
2620
+ commentArea.innerHTML = convCommentVal;
2568
2621
  }
2569
2622
  } else {
2570
- let tmpComment = g_headerObj.commentVal;
2571
2623
  multiAppend(divRoot,
2572
2624
 
2573
- createDivCss2Label(`lblComment`, tmpComment, {
2625
+ createDivCss2Label(`lblComment`, convCommentVal, {
2574
2626
  x: 0, y: 70, w: g_sWidth, h: g_sHeight - 180, siz: C_SIZ_DIFSELECTOR, align: C_ALIGN_LEFT,
2575
2627
  overflow: `auto`, background: `#222222`, color: `#cccccc`, display: C_DIS_NONE,
2576
2628
  }),
@@ -2579,10 +2631,11 @@ function titleInit() {
2579
2631
  const lblCommentDef = lblComment.style.display;
2580
2632
  lblComment.style.display = (lblCommentDef === C_DIS_NONE ? C_DIS_INHERIT : C_DIS_NONE);
2581
2633
  }, {
2582
- x: g_sWidth - 180, y: (g_sHeight / 2) + 150, w: 150, h: 50, siz: 20, border: `solid 1px #999999`,
2634
+ x: g_sWidth - 160, y: (g_sHeight / 2) + 150, w: 140, h: 50, siz: 20, border: `solid 1px #999999`,
2583
2635
  }, g_cssObj.button_Default),
2584
2636
 
2585
2637
  );
2638
+ setUserSelect(lblComment.style, `text`);
2586
2639
  }
2587
2640
  }
2588
2641
 
@@ -3396,7 +3449,7 @@ function headerConvert(_dosObj) {
3396
3449
  const newlineTag = setVal(_dosObj.commentAutoBr, true, C_TYP_BOOLEAN) ? `<br>` : ``;
3397
3450
  let tmpComment = setVal(_dosObj[`commentVal${g_localeObj.val}`] || _dosObj.commentVal, ``, C_TYP_STRING);
3398
3451
  tmpComment = tmpComment.split(`\r\n`).join(`\n`);
3399
- obj.commentVal = escapeHtmlForEnabledTag(tmpComment.split(`\n`).join(newlineTag));
3452
+ obj.commentVal = tmpComment.split(`\n`).join(newlineTag);
3400
3453
 
3401
3454
  // クレジット表示
3402
3455
  if (document.querySelector(`#webMusicTitle`) !== null) {
@@ -4441,13 +4494,30 @@ function createOptionWindow(_sprite) {
4441
4494
  drawBaseLine(context);
4442
4495
  for (let j = 0; j < C_LEN_DENSITY_DIVISION; j++) {
4443
4496
  context.beginPath();
4444
- context.fillStyle = (j === g_detailObj.maxDensity[_scoreId] ? C_CLR_DENSITY_MAX : C_CLR_DENSITY_DEFAULT);
4445
- context.fillRect(16 * j * 16 / C_LEN_DENSITY_DIVISION + 30, 195 - 9 * g_detailObj.densityData[_scoreId][j] / 10,
4446
- 15.5 * 16 / C_LEN_DENSITY_DIVISION, 9 * g_detailObj.densityData[_scoreId][j] / 10
4447
- );
4497
+ [``, `2Push`, `3Push`].forEach(val => {
4498
+ context.fillStyle = (j === g_detailObj.maxDensity[_scoreId] ? g_graphColorObj[`max${val}`] : g_graphColorObj[`default${val}`]);
4499
+ context.fillRect(16 * j * 16 / C_LEN_DENSITY_DIVISION + 30, 195 - 9 * g_detailObj[`density${val}Data`][_scoreId][j] / 10,
4500
+ 15.5 * 16 / C_LEN_DENSITY_DIVISION, 9 * g_detailObj[`density${val}Diff`][_scoreId][j] / 10
4501
+ );
4502
+ });
4448
4503
  context.stroke();
4449
4504
  }
4450
4505
 
4506
+ const lineNames = [`1Push`, `2Push`, `3Push+`];
4507
+ Object.keys(g_graphColorObj).filter(val => val.indexOf(`max`) !== -1).forEach((val, j) => {
4508
+ const lineX = 70 + j * 70;
4509
+
4510
+ context.beginPath();
4511
+ context.lineWidth = 3;
4512
+ context.fillStyle = g_rankObj.rankColorAllPerfect;
4513
+ context.strokeStyle = g_graphColorObj[val];
4514
+ context.moveTo(lineX, 215);
4515
+ context.lineTo(lineX + 20, 215);
4516
+ context.stroke();
4517
+ context.font = `${C_SIZ_DIFSELECTOR}px ${getBasicFont()}`;
4518
+ context.fillText(lineNames[j], lineX + 20, 218);
4519
+ });
4520
+
4451
4521
  const obj = getScoreBaseData(_scoreId);
4452
4522
  updateScoreDetailLabel(`Density`, g_lblNameObj.s_apm, obj.apm, 0);
4453
4523
  updateScoreDetailLabel(`Density`, g_lblNameObj.s_time, obj.playingTime, 1);
@@ -6630,20 +6700,27 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
6630
6700
  obj.speedData = setSpeedData(`speed`, scoreIdHeader, speedFooter);
6631
6701
 
6632
6702
  // 色変化(個別・全体)の分解 (3つで1セット, セット毎の改行区切り可)
6633
- g_typeLists.color.forEach(sprite =>
6634
- obj[`${sprite}Data`] = setColorData(sprite, scoreIdHeader));
6703
+ g_typeLists.color.forEach(sprite => {
6704
+ obj[`${sprite}Data`] = setColorData(sprite, scoreIdHeader);
6705
+ if (g_stateObj.dummyId !== ``) {
6706
+ obj[`${sprite}DummyData`] = setColorData(sprite, _dummyNo);
6707
+ }
6708
+ });
6635
6709
 
6636
6710
  if (_scoreAnalyzeFlg) {
6637
6711
  return obj;
6638
6712
  }
6639
6713
 
6640
6714
  obj.colorData = mergeColorData();
6715
+ obj.dummyColorData = mergeColorData(`Dummy`);
6641
6716
 
6642
6717
  // 矢印モーション(個別)データの分解(3~4つで1セット, セット毎の改行区切り)
6643
6718
  obj.arrowCssMotionData = setCssMotionData(`arrow`, scoreIdHeader);
6644
6719
  obj.frzCssMotionData = setCssMotionData(`frz`, scoreIdHeader);
6645
- obj.dummyArrowCssMotionData = setCssMotionData(`arrow`, _dummyNo);
6646
- obj.dummyFrzCssMotionData = setCssMotionData(`frz`, _dummyNo);
6720
+ if (g_stateObj.dummyId !== ``) {
6721
+ obj.dummyArrowCssMotionData = setCssMotionData(`arrow`, _dummyNo);
6722
+ obj.dummyFrzCssMotionData = setCssMotionData(`frz`, _dummyNo);
6723
+ }
6647
6724
 
6648
6725
  // 歌詞データの分解 (3つで1セット, セット毎の改行区切り可)
6649
6726
  obj.wordData = [];
@@ -6719,8 +6796,9 @@ function scoreConvert(_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
6719
6796
  * @param {string} _header
6720
6797
  * @returns
6721
6798
  */
6722
- function mergeColorData(_header = `color`) {
6723
- const tmpArr = obj[`${_header}Data`].concat(obj[`a${_header}Data`]);
6799
+ function mergeColorData(_header = ``) {
6800
+ if (obj[`color${_header}Data`] === undefined) return [];
6801
+ const tmpArr = obj[`color${_header}Data`].concat(obj[`acolor${_header}Data`]);
6724
6802
  return tmpArr.sort((_a, _b) => _a[0] - _b[0]).flat();
6725
6803
  }
6726
6804
 
@@ -7312,10 +7390,11 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
7312
7390
  }
7313
7391
 
7314
7392
  // 個別・全体色変化、モーションデータのタイミング更新
7315
- calcDataTiming(`color`, ``, pushColors, { _colorFlg: true });
7393
+ [``, `dummy`].forEach(type =>
7394
+ calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));
7316
7395
 
7317
7396
  g_typeLists.arrow.forEach(header =>
7318
- calcDataTiming(`CssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
7397
+ calcDataTiming(`cssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
7319
7398
 
7320
7399
  /**
7321
7400
  * 色変化・モーションデータのタイミング更新
@@ -7327,7 +7406,9 @@ function pushArrows(_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
7327
7406
  */
7328
7407
  function calcDataTiming(_type, _header, _setFunc = _ => true,
7329
7408
  { _term = 4, _colorFlg = false, _calcFrameFlg = false } = {}) {
7330
- const baseData = _dataObj[`${_header}${_type}Data`];
7409
+
7410
+ const camelHeader = _header === `` ? _type : `${_header}${toCapitalize(_type)}`;
7411
+ const baseData = _dataObj[`${camelHeader}Data`];
7331
7412
 
7332
7413
  if (!hasArrayList(baseData, _term)) {
7333
7414
  return;
@@ -7566,7 +7647,7 @@ function pushColors(_header, _frame, _val, _colorCd, _allFlg) {
7566
7647
 
7567
7648
  // フリーズアロー色の追随設定がある場合、対象を追加
7568
7649
  g_headerObj.frzScopeFromArrowColors.forEach(type => {
7569
- baseHeaders.push(`mkF${_header}Color${type}`, `mkF${_header}Color${type}Bar`);
7650
+ baseHeaders.push(`mk${_header}FColor${type}`, `mk${_header}FColor${type}Bar`);
7570
7651
  });
7571
7652
  if (g_headerObj.frzScopeFromArrowColors.length > 0) {
7572
7653
  allUseTypes.push(`Frz`);
@@ -7589,7 +7670,7 @@ function pushColors(_header, _frame, _val, _colorCd, _allFlg) {
7589
7670
  });
7590
7671
 
7591
7672
  } else {
7592
- const baseHeader = `mkF${_header}Color`;
7673
+ const baseHeader = `mk${_header}FColor`;
7593
7674
  allUseTypes.push(`Frz`);
7594
7675
 
7595
7676
  // フリーズアローの色変化
@@ -7856,6 +7937,9 @@ function MainInit() {
7856
7937
  // マスクスプライトを作成 (最上位)
7857
7938
  createMultipleSprite(`maskSprite`, g_scoreObj.maskMaxDepth);
7858
7939
 
7940
+ // カラー・モーションを適用するオブジェクトの種類
7941
+ const objList = (g_stateObj.dummyId === `` ? [``] : [`dummy`, ``]);
7942
+
7859
7943
  // 背景・マスクモーション(0フレーム指定)
7860
7944
  if (g_scoreObj.frameNum === 0) {
7861
7945
  g_animationData.forEach(sprite => {
@@ -8348,56 +8432,70 @@ function MainInit() {
8348
8432
  }
8349
8433
 
8350
8434
  /**
8351
- * 全体色変化
8352
- *
8353
- * @param _j 矢印位置
8354
- * @param _k 矢印の表示順
8355
- * @param _state フリーズアローの色変化対象 (Normal: 通常時、Hit: ヒット時)
8435
+ * 全体色変化(矢印)
8436
+ * @param {number} _j
8437
+ * @param {number} _k
8438
+ * @param {string} _name
8356
8439
  */
8357
- const changeColorFunc = {
8440
+ const changeArrowColor = (_j, _k, _name) => {
8441
+ if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
8442
+ const colorSelf = g_workObj[`${_name}Colors`][_j];
8443
+ const colorAll = g_workObj[`${_name}ColorsAll`][_j];
8444
+ const arrowTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
8358
8445
 
8359
- // TODO: この部分を矢印塗りつぶし部分についても適用できるように対応
8360
- arrow: (_j, _k) => {
8361
- const arrowTop = document.querySelector(`#arrowTop${_j}_${_k}`);
8362
- if (g_workObj.mkArrowColorChangeAll[g_scoreObj.frameNum]) {
8363
- if (arrowTop.getAttribute(`color`) !== g_workObj.arrowColors[_j] &&
8364
- g_workObj.arrowColors[_j] === g_workObj.arrowColorsAll[_j]) {
8365
- arrowTop.style.background = g_workObj.arrowColorsAll[_j];
8366
- arrowTop.setAttribute(`color`, g_workObj.arrowColorsAll[_j]);
8367
- }
8446
+ if (arrowTop.getAttribute(`color`) !== colorSelf && colorAll === colorSelf) {
8447
+ arrowTop.style.background = colorAll;
8448
+ arrowTop.setAttribute(`color`, colorAll);
8368
8449
  }
8369
- },
8370
-
8371
- dummyArrow: (_j, _k) => { },
8372
-
8373
- // TODO: この部分を矢印塗りつぶし部分についても適用できるように対応
8374
- frz: (_j, _k, _state) => {
8375
- const frzTop = document.querySelector(`#frzTop${_j}_${_k}`);
8376
- const frzBar = document.querySelector(`#frzBar${_j}_${_k}`);
8377
- const frzBtm = document.querySelector(`#frzBtm${_j}_${_k}`);
8450
+ }
8451
+ };
8378
8452
 
8379
- if (g_workObj.mkFrzColorChangeAll[g_scoreObj.frameNum]) {
8380
- if (frzBtm.getAttribute(`color`) !== g_workObj[`frz${_state}Colors`][_j]) {
8381
- const toColorCode = g_workObj[`frz${_state}ColorsAll`][_j];
8382
- if (g_workObj[`frz${_state}Colors`][_j] === toColorCode) {
8383
- if (_state === `Normal`) {
8384
- frzTop.style.background = toColorCode;
8385
- }
8386
- frzBtm.style.background = toColorCode;
8387
- frzBtm.setAttribute(`color`, toColorCode);
8453
+ /**
8454
+ * 全体色変化(フリーズアロー)
8455
+ * @param {number} _j 矢印位置
8456
+ * @param {number} _k 矢印の表示順
8457
+ * @param {string} _name 通常, ダミー
8458
+ * @param {string} _state フリーズアローの色変化対象 (Normal: 通常時、Hit: ヒット時)
8459
+ */
8460
+ const changeFrzColor = (_j, _k, _name, _state) => {
8461
+
8462
+ if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
8463
+ const frzTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
8464
+ const frzBar = document.querySelector(`#${_name}Bar${_j}_${_k}`);
8465
+ const frzBtm = document.querySelector(`#${_name}Btm${_j}_${_k}`);
8466
+ const frzName = `${_name}${_state}`;
8467
+
8468
+ // 矢印部分の色変化
8469
+ if (frzBtm.getAttribute(`color`) !== g_workObj[`${frzName}Colors`][_j]) {
8470
+ const toColorCode = g_workObj[`${frzName}ColorsAll`][_j];
8471
+ if (g_workObj[`${frzName}Colors`][_j] === toColorCode) {
8472
+ if (_state === `Normal`) {
8473
+ frzTop.style.background = toColorCode;
8388
8474
  }
8475
+ frzBtm.style.background = toColorCode;
8476
+ frzBtm.setAttribute(`color`, toColorCode);
8389
8477
  }
8390
- if (frzBar.getAttribute(`color`) !== g_workObj[`frz${_state}BarColors`][_j]) {
8391
- const toBarColorCode = g_workObj[`frz${_state}BarColorsAll`][_j];
8392
- if (g_workObj[`frz${_state}BarColors`][_j] === toBarColorCode) {
8393
- frzBar.style.background = toBarColorCode;
8394
- frzBar.setAttribute(`color`, toBarColorCode);
8395
- }
8478
+ }
8479
+ // 帯部分の色変化
8480
+ if (frzBar.getAttribute(`color`) !== g_workObj[`${frzName}BarColors`][_j]) {
8481
+ const toBarColorCode = g_workObj[`${frzName}BarColorsAll`][_j];
8482
+ if (g_workObj[`${frzName}BarColors`][_j] === toBarColorCode) {
8483
+ frzBar.style.background = toBarColorCode;
8484
+ frzBar.setAttribute(`color`, toBarColorCode);
8396
8485
  }
8397
8486
  }
8398
- },
8487
+ }
8488
+ };
8399
8489
 
8400
- dummyFrz: (_j, _k, _state) => { },
8490
+
8491
+ /**
8492
+ * 全体色変化
8493
+ */
8494
+ const changeColorFunc = {
8495
+ arrow: (_j, _k) => changeArrowColor(_j, _k, `arrow`),
8496
+ dummyArrow: (_j, _k) => changeArrowColor(_j, _k, `dummyArrow`),
8497
+ frz: (_j, _k, _state) => changeFrzColor(_j, _k, `frz`, _state),
8498
+ dummyFrz: (_j, _k, _state) => changeFrzColor(_j, _k, `dummyFrz`, _state),
8401
8499
  };
8402
8500
 
8403
8501
  /**
@@ -8870,29 +8968,30 @@ function MainInit() {
8870
8968
  boostCnts += 2;
8871
8969
  }
8872
8970
 
8873
- // 個別・全体色変化 (矢印)
8874
- changeColors(g_workObj.mkColor[currentFrame], g_workObj.mkColorCd[currentFrame]);
8971
+ objList.forEach(header => {
8972
+ const headerU = toCapitalize(header);
8875
8973
 
8876
- // 個別・全体色変化(フリーズアロー)
8877
- g_typeLists.frzColor.forEach(ctype =>
8878
- changeColors(g_workObj[`mkFColor${ctype}`][currentFrame], g_workObj[`mkFColor${ctype}Cd`][currentFrame], `frz${ctype}`));
8974
+ // 個別・全体色変化 (矢印)
8975
+ changeColors(g_workObj[`mk${headerU}Color`][currentFrame],
8976
+ g_workObj[`mk${headerU}ColorCd`][currentFrame], header, `arrow`);
8879
8977
 
8880
- // 矢印モーション
8881
- changeCssMotions(g_workObj.mkArrowCssMotion[currentFrame], g_workObj.mkArrowCssMotionName[currentFrame], `arrow`);
8978
+ // 個別・全体色変化(フリーズアロー)
8979
+ g_typeLists.frzColor.forEach(ctype =>
8980
+ changeColors(g_workObj[`mk${headerU}FColor${ctype}`][currentFrame],
8981
+ g_workObj[`mk${headerU}FColor${ctype}Cd`][currentFrame], header, `frz${ctype}`));
8882
8982
 
8883
- // フリーズアローモーション
8884
- changeCssMotions(g_workObj.mkFrzCssMotion[currentFrame], g_workObj.mkFrzCssMotionName[currentFrame], `frz`);
8983
+ // 矢印モーション
8984
+ changeCssMotions(header, `arrow`, currentFrame);
8885
8985
 
8886
- // ダミー矢印モーション
8887
- changeCssMotions(g_workObj.mkDummyArrowCssMotion[currentFrame], g_workObj.mkDummyArrowCssMotionName[currentFrame], `dummyArrow`);
8986
+ // フリーズアローモーション
8987
+ changeCssMotions(header, `frz`, currentFrame);
8888
8988
 
8889
- // ダミーフリーズアローモーション
8890
- changeCssMotions(g_workObj.mkDummyFrzCssMotion[currentFrame], g_workObj.mkDummyFrzCssMotionName[currentFrame], `dummyFrz`);
8989
+ });
8891
8990
 
8892
8991
  // ダミー矢印生成(背面に表示するため先に処理)
8893
8992
  if (g_workObj.mkDummyArrow[currentFrame] !== undefined) {
8894
8993
  g_workObj.mkDummyArrow[currentFrame].forEach(data =>
8895
- makeArrow(data, ++dummyArrowCnts[data], `dummyArrow`, C_CLR_DUMMY));
8994
+ makeArrow(data, ++dummyArrowCnts[data], `dummyArrow`, g_workObj.dummyArrowColors[data]));
8896
8995
  }
8897
8996
 
8898
8997
  // 矢印生成
@@ -8904,7 +9003,7 @@ function MainInit() {
8904
9003
  // ダミーフリーズアロー生成
8905
9004
  if (g_workObj.mkDummyFrzArrow[currentFrame] !== undefined) {
8906
9005
  g_workObj.mkDummyFrzArrow[currentFrame].forEach(data =>
8907
- makeFrzArrow(data, ++dummyFrzCnts[data], `dummyFrz`, C_CLR_DUMMY, `#888888`));
9006
+ makeFrzArrow(data, ++dummyFrzCnts[data], `dummyFrz`, g_workObj.dummyFrzNormalColors[data], g_workObj.dummyFrzNormalBarColors[data]));
8908
9007
  }
8909
9008
 
8910
9009
  // フリーズアロー生成
@@ -9123,19 +9222,21 @@ function makeCounterSymbol(_id, _x, _class, _heightPos, _text, _display = C_DIS_
9123
9222
  * 個別・全体色変化
9124
9223
  * @param {array} _mkColor
9125
9224
  * @param {array} _mkColorCd
9126
- * @param {string} _objType
9225
+ * @param {string} _header
9226
+ * @param {string} _name
9127
9227
  */
9128
- function changeColors(_mkColor, _mkColorCd, _objType = `arrow`) {
9228
+ function changeColors(_mkColor, _mkColorCd, _header, _name) {
9129
9229
 
9130
9230
  if (_mkColor === undefined) {
9131
9231
  return;
9132
9232
  }
9233
+ const camelHeader = _header === `` ? _name : `${_header}${toCapitalize(_name)}`;
9133
9234
  _mkColor.forEach((tempj, j) => {
9134
9235
  const targetj = tempj % 1000;
9135
- g_workObj[`${_objType}Colors`][targetj] = _mkColorCd[j];
9236
+ g_workObj[`${camelHeader}Colors`][targetj] = _mkColorCd[j];
9136
9237
  if (tempj >= 1000) {
9137
- g_workObj[`${_objType}ColorsAll`][targetj] = _mkColorCd[j];
9138
- if (_objType.indexOf(`HitBar`) !== -1 && isNaN(Number(g_workObj.arrowRtn[targetj]))) {
9238
+ g_workObj[`${camelHeader}ColorsAll`][targetj] = _mkColorCd[j];
9239
+ if (camelHeader.indexOf(`frzHitBar`) !== -1 && isNaN(Number(g_workObj.arrowRtn[targetj]))) {
9139
9240
  $id(`frzHitTop${targetj}`).background = _mkColorCd[j];
9140
9241
  }
9141
9242
  }
@@ -9144,16 +9245,20 @@ function changeColors(_mkColor, _mkColorCd, _objType = `arrow`) {
9144
9245
 
9145
9246
  /**
9146
9247
  * 個別モーション
9147
- * @param {array} _mkCssMotion
9148
- * @param {array} _mkCssMotionName
9248
+ * @param {string} _header
9149
9249
  * @param {string} _name
9250
+ * @param {number} _frameNum
9150
9251
  */
9151
- function changeCssMotions(_mkCssMotion, _mkCssMotionName, _name) {
9252
+ function changeCssMotions(_header, _name, _frameNum) {
9253
+
9254
+ const camelHeader = _header === `` ? _name : `${_header}${toCapitalize(_name)}`;
9255
+ const frameData = g_workObj[`mk${toCapitalize(camelHeader)}CssMotion`][_frameNum];
9152
9256
 
9153
- if (_mkCssMotion !== undefined) {
9154
- for (let j = 0; j < _mkCssMotion.length; j++) {
9155
- const targetj = _mkCssMotion[j];
9156
- g_workObj[`${_name}CssMotions`][targetj] = _mkCssMotionName[2 * j + g_workObj.dividePos[targetj]];
9257
+ if (frameData !== undefined) {
9258
+ for (let j = 0; j < frameData.length; j++) {
9259
+ const targetj = frameData[j];
9260
+ g_workObj[`${camelHeader}CssMotions`][targetj] =
9261
+ g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + g_workObj.dividePos[targetj]];
9157
9262
  }
9158
9263
  }
9159
9264
  }
@@ -9601,8 +9706,16 @@ function resultInit() {
9601
9706
  // diffListから適正Adjを算出(20個以下の場合は算出しない)
9602
9707
  const getSign = _val => (_val > 0 ? `+` : ``);
9603
9708
  const getDiffFrame = _val => `${getSign(_val)}${_val}${g_lblNameObj.frame}`;
9604
- const estimatedAdj = (g_workObj.diffList.length <= 20 ?
9605
- `` : Math.round((g_stateObj.adjustment - g_workObj.diffList.reduce((x, y) => x + y, 0) / g_workObj.diffList.length) * 10) / 10);
9709
+ const diffLength = g_workObj.diffList.length;
9710
+ const bayesFunc = (_offset, _length) => {
9711
+ let result = 0;
9712
+ for (let j = _offset; j < _length; j++) {
9713
+ result += (_length - j) * (j + 1) * g_workObj.diffList[j];
9714
+ }
9715
+ return result;
9716
+ };
9717
+ const bayesExVal = 6 * bayesFunc(0, diffLength) / (diffLength * (diffLength + 1) * (diffLength + 2));
9718
+ const estimatedAdj = (diffLength <= 20 ? `` : Math.round((g_stateObj.adjustment - bayesExVal) * 10) / 10);
9606
9719
 
9607
9720
  // 背景スプライトを作成
9608
9721
  createMultipleSprite(`backResultSprite`, g_headerObj.backResultMaxDepth);
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2022/01/26 (v25.5.1)
8
+ * Revised : 2022/02/05 (v26.1.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -245,6 +245,15 @@ const C_CLR_DENSITY_MAX = `#990000cc`;
245
245
  const C_CLR_DENSITY_DEFAULT = `#999999cc`;
246
246
  const C_LEN_DENSITY_DIVISION = 16;
247
247
 
248
+ const g_graphColorObj = {
249
+ max: `#993333cc`,
250
+ default: `#999999cc`,
251
+ max2Push: `#9933cccc`,
252
+ default2Push: `#777777cc`,
253
+ max3Push: `#003399cc`,
254
+ default3Push: `#555555cc`,
255
+ };
256
+
248
257
  const g_settingBtnObj = {
249
258
  chara: {
250
259
  L: `<`,
@@ -2389,7 +2398,7 @@ const g_escapeStr = {
2389
2398
  escapeTag: [
2390
2399
  [`*amp*`, `&amp;`], [`*pipe*`, `|`], [`*dollar*`, `$`], [`*rsquo*`, `&rsquo;`],
2391
2400
  [`*quot*`, `&quot;`], [`*comma*`, `&sbquo;`], [`*squo*`, `&#39;`], [`*bkquo*`, `&#96;`],
2392
- [`*lt*`, `&lt;`], [`*gt*`, `&gt;`],
2401
+ [`*lt*`, `&lt;`], [`*gt*`, `&gt;`], [`*lbrace*`, `{`], [`*rbrace*`, `}`],
2393
2402
  ],
2394
2403
  unEscapeTag: [
2395
2404
  [`&amp;`, `&`], [`&rsquo;`, `’`], [`&quot;`, `"`], [`&sbquo;`, `,`],
package/package.json CHANGED
@@ -1,23 +1,23 @@
1
- {
2
- "name": "danoniplus",
3
- "version": "25.5.5",
4
- "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
- "main": "index.js",
6
- "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/cwtickle/danoniplus.git"
12
- },
13
- "keywords": [
14
- "rhythm-game",
15
- "dancing-onigiri"
16
- ],
17
- "author": "tickle <quc_tickle@cw7.sakura.ne.jp> (https://github.com/cwtickle/)",
18
- "license": "MIT",
19
- "bugs": {
20
- "url": "https://github.com/cwtickle/danoniplus/issues"
21
- },
22
- "homepage": "https://github.com/cwtickle/danoniplus#readme"
1
+ {
2
+ "name": "danoniplus",
3
+ "version": "26.1.2",
4
+ "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/cwtickle/danoniplus.git"
12
+ },
13
+ "keywords": [
14
+ "rhythm-game",
15
+ "dancing-onigiri"
16
+ ],
17
+ "author": "tickle <quc_tickle@cw7.sakura.ne.jp> (https://github.com/cwtickle/)",
18
+ "license": "MIT",
19
+ "bugs": {
20
+ "url": "https://github.com/cwtickle/danoniplus/issues"
21
+ },
22
+ "homepage": "https://github.com/cwtickle/danoniplus#readme"
23
23
  }