danoniplus 34.4.1 → 34.5.0

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.
@@ -4,7 +4,7 @@
4
4
  本体cssファイル
5
5
 
6
6
  Created : 2018/10/08
7
- Revised : 2023/08/20 (v33.2.0)
7
+ Revised : 2023/11/05 (v34.5.0)
8
8
 
9
9
  https://github.com/cwtickle/danoniplus
10
10
  ------------------------------------------ */
@@ -475,6 +475,15 @@ input[type="color"] {
475
475
  color: var(--settings-lifeVal-x, #ff9966);
476
476
  }
477
477
 
478
+ /* 設定画面:レーンごとの矢印数 */
479
+ .settings_maxArrowCnts {
480
+ color: var(--settings-maxArrowCnts-x, var(--common-uwan));
481
+ }
482
+
483
+ .settings_minArrowCnts {
484
+ color: var(--settings-maxArrowCnts-x, var(--common-ii));
485
+ }
486
+
478
487
  /* キーコンフィグ */
479
488
  .keyconfig_warning {
480
489
  color: var(--keyconfig-warning-x, #ffff99);
package/js/danoni_main.js CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2023/10/31
7
+ * Revised : 2023/11/05
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 34.4.1`;
12
- const g_revisedDate = `2023/10/31`;
11
+ const g_version = `Ver 34.5.0`;
12
+ const g_revisedDate = `2023/11/05`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -209,7 +209,7 @@ let g_canLoadDifInfoFlg = false;
209
209
  * div要素のstyleを取得
210
210
  * @param {string} _id
211
211
  */
212
- const $id = _id => document.getElementById(`${_id}`).style;
212
+ const $id = _id => document.getElementById(_id).style;
213
213
 
214
214
  /**
215
215
  * 複数のdiv子要素を親要素へ接続
@@ -360,7 +360,7 @@ const hasValInArray = (_val, _array, _pos = 0) =>
360
360
  * @param {array} _data
361
361
  * @param {integer} _length
362
362
  */
363
- const hasArrayList = (_data, _length = 1) => _data !== undefined && _data.length >= _length;
363
+ const hasArrayList = (_data, _length = 1) => _data?.length >= _length;
364
364
 
365
365
  /**
366
366
  * 改行コード区切りの配列展開
@@ -431,13 +431,12 @@ const padArray = (_array, _baseArray) => {
431
431
  * @param {number} _num
432
432
  */
433
433
  const getMaxValIdxs = (_array, _num = 1) => {
434
- const getMaxVal = (_a, _b) => Math.max(_a, _b);
435
434
  let baseArray = _array.concat();
436
435
  const maxIdxs = [];
437
436
 
438
437
  for (let j = 0; j < _num; j++) {
439
438
  maxIdxs[j] = [];
440
- const maxVal = baseArray.reduce((a, b) => getMaxVal(a, b));
439
+ const maxVal = baseArray.reduce((a, b) => Math.max(a, b));
441
440
  _array.map((val, idx) => {
442
441
  if (val === maxVal) {
443
442
  maxIdxs[j].push(idx);
@@ -569,11 +568,8 @@ const commonKeyDown = (_evt, _displayName, _func = _code => { }, _dfEvtFlg) => {
569
568
  switchKeyHit(_evt, true);
570
569
 
571
570
  // 対象ボタンを検索
572
- const scLists = Object.keys(g_shortcutObj[_displayName]).filter(keys => {
573
- const keyset = keys.split(`_`);
574
- return (keyset.length > 2 ? keyIsDown(keyset[0]) && keyIsDown(keyset[1]) && keyIsDown(keyset[2]) :
575
- (keyset.length > 1 ? keyIsDown(keyset[0]) && keyIsDown(keyset[1]) : keyIsDown(keyset[0])));
576
- });
571
+ const scLists = Object.keys(g_shortcutObj[_displayName])
572
+ .filter(keys => keys.split(`_`).every(key => keyIsDown(key)));
577
573
  if (scLists.length > 0) {
578
574
  // リンク先にジャンプする場合はonkeyUpイベントが動かないため、事前にキー状態をリセット
579
575
  if (g_shortcutObj[_displayName][scLists[0]].reset) {
@@ -597,7 +593,7 @@ const commonKeyDown = (_evt, _displayName, _func = _code => { }, _dfEvtFlg) => {
597
593
  const commonKeyUp = _evt => {
598
594
  g_inputKeyBuffer[g_kCdNameObj.metaLKey] = false;
599
595
  g_inputKeyBuffer[g_kCdNameObj.metaRKey] = false;
600
- g_inputKeyBuffer[_evt.code] = false;
596
+ switchKeyHit(_evt);
601
597
  };
602
598
 
603
599
  /**
@@ -612,7 +608,7 @@ const createScText = (_obj, _settingLabel, { displayName = `option`, dfLabel = `
612
608
  if (scKey.length > 0) {
613
609
  multiAppend(_obj,
614
610
  createDivCss2Label(`sc${_settingLabel}`,
615
- g_scViewObj.format.split(`{0}`).join(dfLabel !== `` ? `${dfLabel}` : `${g_kCd[g_kCdN.findIndex(kCd => kCd === scKey[0])] ?? ''}`), {
611
+ g_scViewObj.format.split(`{0}`).join(dfLabel || (`${g_kCd[g_kCdN.findIndex(kCd => kCd === scKey[0])] ?? ''}`)), {
616
612
  x, y, w, siz, fontWeight: `bold`, opacity: 0.75, pointerEvents: C_DIS_NONE,
617
613
  })
618
614
  );
@@ -694,11 +690,7 @@ const preloadFile = (_as, _href, _type = ``, _crossOrigin = `anonymous`) => {
694
690
 
695
691
  if (preloadFlg === undefined) {
696
692
  g_preloadFiles.all.push(_href);
697
-
698
- if (g_preloadFiles[_as] === undefined) {
699
- g_preloadFiles[_as] = [];
700
- }
701
- g_preloadFiles[_as].push(_href);
693
+ g_preloadFiles[_as]?.push(_href) || (g_preloadFiles[_as] = [_href]);
702
694
 
703
695
  if (g_userAgent.indexOf(`firefox`) !== -1 && _as === `image`) {
704
696
  // Firefoxの場合のみpreloadが効かないため、画像読込形式にする
@@ -895,7 +887,7 @@ const colorNameToCode = _color => {
895
887
  * 10進 -> 16進数変換 (カラーコード形式になるよう0埋め)
896
888
  * @param {number} _num
897
889
  */
898
- const byteToHex = _num => (`${_num.toString(16).padStart(2, '0')}`);
890
+ const byteToHex = _num => _num.toString(16).padStart(2, '0');
899
891
 
900
892
  /**
901
893
  * カラーコードかどうかを判定 (簡易版)
@@ -1163,13 +1155,11 @@ const createColorObject2 = (_id,
1163
1155
  const style = div.style;
1164
1156
 
1165
1157
  // 矢印・オブジェクト判定
1166
- let charaStyle;
1158
+ let charaStyle = `arrow${styleName}`;
1167
1159
  if (isNaN(parseFloat(rotate))) {
1168
1160
  const objData = rotate.split(`:`);
1169
1161
  rotate = setVal(objData[1], 0, C_TYP_FLOAT);
1170
1162
  charaStyle = `${objData[0]}${styleName}`;
1171
- } else {
1172
- charaStyle = `arrow${styleName}`;
1173
1163
  }
1174
1164
  if (g_stateObj.rotateEnabled) {
1175
1165
  style.transform = `rotate(${rotate}deg)`;
@@ -1214,7 +1204,7 @@ const createEmptySprite = (_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth,
1214
1204
  * @param {number} _num
1215
1205
  */
1216
1206
  const createMultipleSprite = (_baseName, _num, { x = 0 } = {}) => {
1217
- const sprite = createEmptySprite(divRoot, `${_baseName}`);
1207
+ const sprite = createEmptySprite(divRoot, _baseName);
1218
1208
  for (let j = 0; j <= _num; j++) {
1219
1209
  createEmptySprite(sprite, `${_baseName}${j}`, { x });
1220
1210
  }
@@ -1258,7 +1248,7 @@ const g_handler = (_ => {
1258
1248
  */
1259
1249
  const deleteChildspriteAll = _parentObjName => {
1260
1250
 
1261
- const parentsprite = document.querySelector(`#${_parentObjName}`);
1251
+ const parentsprite = document.getElementById(_parentObjName);
1262
1252
  while (parentsprite.hasChildNodes()) {
1263
1253
  g_handler.removeListener(parentsprite.firstChild.getAttribute(`lsnrkey`));
1264
1254
  g_handler.removeListener(parentsprite.firstChild.getAttribute(`lsnrkeyTS`));
@@ -1357,7 +1347,7 @@ const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight
1357
1347
  * @param {object} _obj (x, y, w, h, siz, align, title, ...rest)
1358
1348
  */
1359
1349
  const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
1360
- const div = document.querySelector(`#${_id}`);
1350
+ const div = document.getElementById(_id);
1361
1351
  const style = div.style;
1362
1352
 
1363
1353
  const obj = {
@@ -1436,12 +1426,12 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1436
1426
  return ctx;
1437
1427
  };
1438
1428
 
1439
- if (document.querySelector(`#layer0`) !== null) {
1429
+ if (document.getElementById(`layer0`) !== null) {
1440
1430
 
1441
1431
  // レイヤー情報取得
1442
1432
  const l0ctx = getLayerWithClear(`layer0`);
1443
1433
 
1444
- if (document.querySelector(`#layer1`) !== null) {
1434
+ if (document.getElementById(`layer1`) !== null) {
1445
1435
  const l1ctx = getLayerWithClear(`layer1`);
1446
1436
 
1447
1437
  // 線画 (title-line)
@@ -1457,7 +1447,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1457
1447
  l1ctx.lineTo(layer1.width, g_sHeight);
1458
1448
  l1ctx.stroke();
1459
1449
  }
1460
- if (document.querySelector(`#layer2`) !== null) {
1450
+ if (document.getElementById(`layer2`) !== null) {
1461
1451
  getLayerWithClear(`layer2`);
1462
1452
  }
1463
1453
 
@@ -1478,7 +1468,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1478
1468
  g_cxtAddFunc = {};
1479
1469
  g_cxtDeleteFlg = {};
1480
1470
 
1481
- if (document.querySelector(`#layer0`) === null ||
1471
+ if (document.getElementById(`layer0`) === null ||
1482
1472
  (!g_headerObj[`customBack${_customDisplayName}Use`] && !g_headerObj.defaultSkinFlg)) {
1483
1473
 
1484
1474
  $id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
@@ -1501,11 +1491,9 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1501
1491
  * @param {string} _propData
1502
1492
  */
1503
1493
  const getCssCustomProperty = (_prop, _propData) =>
1504
- document.documentElement.style.getPropertyValue(_propData) !== `` ?
1505
- document.documentElement.style.getPropertyValue(_propData) :
1506
- g_cssBkProperties[_propData] !== undefined ?
1507
- g_cssBkProperties[_propData] :
1508
- _prop.endsWith(`-x`) ? _propData : reviseCssText(makeColorGradation(_propData, { _defaultColorgrd: false }));
1494
+ document.documentElement.style.getPropertyValue(_propData) || (g_cssBkProperties[_propData] ?? (
1495
+ _prop.endsWith(`-x`) ? _propData : reviseCssText(makeColorGradation(_propData, { _defaultColorgrd: false }))
1496
+ ));
1509
1497
 
1510
1498
  /**
1511
1499
  * CSSカスタムプロパティの値をオブジェクトへ退避
@@ -1738,11 +1726,11 @@ const getSpriteJumpFrame = _frames => {
1738
1726
  * @param {boolean} _condition
1739
1727
  */
1740
1728
  const drawBaseSpriteData = (_spriteData, _name, _condition = true) => {
1741
- const baseSprite = document.querySelector(`#${_name}Sprite${_spriteData.depth}`);
1729
+ const baseSprite = document.getElementById(`${_name}Sprite${_spriteData.depth}`);
1742
1730
  if (_spriteData.command === ``) {
1743
1731
  if (_spriteData.depth === C_FLG_ALL) {
1744
1732
  for (let j = 0; j <= g_scoreObj[`${_name}MaxDepth`]; j++) {
1745
- document.querySelector(`#${_name}Sprite${j}`).textContent = ``;
1733
+ document.getElementById(`${_name}Sprite${j}`).textContent = ``;
1746
1734
  }
1747
1735
  } else {
1748
1736
  baseSprite.textContent = ``;
@@ -1896,10 +1884,7 @@ class AudioPlayer {
1896
1884
  }
1897
1885
 
1898
1886
  addEventListener(_type, _listener) {
1899
- if (this._eventListeners[_type] === undefined) {
1900
- this._eventListeners[_type] = [];
1901
- }
1902
- this._eventListeners[_type].push(_listener);
1887
+ this._eventListeners[_type]?.push(_listener) || (this._eventListeners[_type] = [_listener]);
1903
1888
  }
1904
1889
 
1905
1890
  removeEventListener(_type, _listener) {
@@ -1996,12 +1981,12 @@ const transTimerToFrame = _str => {
1996
1981
 
1997
1982
  const initialControl = async () => {
1998
1983
 
1999
- const stage = document.querySelector(`#canvas-frame`);
1984
+ const stage = document.getElementById(`canvas-frame`);
2000
1985
  const divRoot = createEmptySprite(stage, `divRoot`, g_windowObj.divRoot);
2001
1986
 
2002
1987
  // 背景の表示
2003
- if (document.querySelector(`#layer0`) !== null) {
2004
- const layer0 = document.querySelector(`#layer0`);
1988
+ if (document.getElementById(`layer0`) !== null) {
1989
+ const layer0 = document.getElementById(`layer0`);
2005
1990
  makeBgCanvas(layer0.getContext(`2d`));
2006
1991
  } else {
2007
1992
  createEmptySprite(divRoot, `divBack`, g_windowObj.divBack);
@@ -2014,8 +1999,8 @@ const initialControl = async () => {
2014
1999
  g_canLoadDifInfoFlg = true;
2015
2000
 
2016
2001
  // 譜面データの読み込みオプション
2017
- g_enableAmpersandSplit = setBoolVal(document.querySelector(`#enableAmpersandSplit`)?.value, true);
2018
- g_enableDecodeURI = setBoolVal(document.querySelector(`#enableDecodeURI`)?.value);
2002
+ g_enableAmpersandSplit = setBoolVal(document.getElementById(`enableAmpersandSplit`)?.value, true);
2003
+ g_enableDecodeURI = setBoolVal(document.getElementById(`enableDecodeURI`)?.value);
2019
2004
 
2020
2005
  // 作品別ローカルストレージの読み込み
2021
2006
  loadLocalStorage();
@@ -2041,7 +2026,7 @@ const initialControl = async () => {
2041
2026
  Object.assign(g_headerObj, preheaderConvert(g_rootObj));
2042
2027
 
2043
2028
  // CSSファイル内のbackgroundを取得するために再描画
2044
- if (document.querySelector(`#layer0`) === null) {
2029
+ if (document.getElementById(`layer0`) === null) {
2045
2030
  deleteDiv(divRoot, `divBack`);
2046
2031
  createEmptySprite(divRoot, `divBack`);
2047
2032
  } else if (!g_headerObj.defaultSkinFlg && !g_headerObj.customBackUse) {
@@ -2148,8 +2133,8 @@ const initialControl = async () => {
2148
2133
  if (g_loadObj.main) {
2149
2134
 
2150
2135
  // 譜面分割、譜面番号固定かどうかをチェック
2151
- g_stateObj.dosDivideFlg = setBoolVal(document.querySelector(`#externalDosDivide`)?.value ?? getQueryParamVal(`dosDivide`));
2152
- g_stateObj.scoreLockFlg = setBoolVal(document.querySelector(`#externalDosLock`)?.value ?? getQueryParamVal(`dosLock`));
2136
+ g_stateObj.dosDivideFlg = setBoolVal(document.getElementById(`externalDosDivide`)?.value ?? getQueryParamVal(`dosDivide`));
2137
+ g_stateObj.scoreLockFlg = setBoolVal(document.getElementById(`externalDosLock`)?.value ?? getQueryParamVal(`dosLock`));
2153
2138
 
2154
2139
  for (let j = 1; j < g_headerObj.keyLabels.length; j++) {
2155
2140
 
@@ -2257,10 +2242,10 @@ const dosConvert = (_dos = ``) => {
2257
2242
  */
2258
2243
  const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
2259
2244
 
2260
- const dosInput = document.querySelector(`#dos`);
2261
- const divRoot = document.querySelector(`#divRoot`);
2245
+ const dosInput = document.getElementById(`dos`);
2246
+ const divRoot = document.getElementById(`divRoot`);
2262
2247
  const queryDos = getQueryParamVal(`dos`) !== null ?
2263
- `dos/${getQueryParamVal('dos')}.txt` : encodeURI(document.querySelector(`#externalDos`)?.value ?? ``);
2248
+ `dos/${getQueryParamVal('dos')}.txt` : encodeURI(document.getElementById(`externalDos`)?.value ?? ``);
2264
2249
 
2265
2250
  if (dosInput === null && queryDos === ``) {
2266
2251
  makeWarningWindow(g_msgInfoObj.E_0023);
@@ -2281,7 +2266,7 @@ const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
2281
2266
 
2282
2267
  // 外部dos読み込み
2283
2268
  if (queryDos !== ``) {
2284
- const charset = document.querySelector(`#externalDosCharset`)?.value ?? document.characterSet;
2269
+ const charset = document.getElementById(`externalDosCharset`)?.value ?? document.characterSet;
2285
2270
  const fileBase = queryDos.match(/.+\..*/)[0];
2286
2271
  const fileExtension = fileBase.split(`.`).pop();
2287
2272
  const fileCommon = fileBase.split(`.${fileExtension}`)[0];
@@ -2602,7 +2587,7 @@ const calcLevel = _scoreObj => {
2602
2587
  // 3つ押し数
2603
2588
  push3cnt: push3Cnt,
2604
2589
  // 3つ押しリスト
2605
- push3: push3List,
2590
+ push3: makeDedupliArray(push3List),
2606
2591
  };
2607
2592
  };
2608
2593
 
@@ -3064,8 +3049,11 @@ const headerConvert = _dosObj => {
3064
3049
 
3065
3050
  // 初期表示する部分キーの設定
3066
3051
  obj.keyGroupOrder = [];
3067
- _dosObj.keyGroupOrder?.split(`$`).filter(val => val !== ``)
3068
- .forEach((val, j) => obj.keyGroupOrder[j] = val.split(`,`));
3052
+ _dosObj.keyGroupOrder?.split(`$`).forEach((val, j) => {
3053
+ if (val !== ``) {
3054
+ obj.keyGroupOrder[j] = val.split(`,`);
3055
+ }
3056
+ });
3069
3057
 
3070
3058
  // 最終演出表示有無(noneで無効化)
3071
3059
  obj.finishView = _dosObj.finishView ?? ``;
@@ -3169,14 +3157,14 @@ const headerConvert = _dosObj => {
3169
3157
 
3170
3158
  // Display使用可否設定を分解 |displayUse=false,ON|
3171
3159
  const displayTempUse = _dosObj[`${option}Use`] ?? g_presetObj.settingUse?.[option] ?? `true`;
3172
- const displayUse = (displayTempUse !== undefined ? displayTempUse.split(`,`) : [true, C_FLG_ON]);
3160
+ const displayUse = displayTempUse?.split(`,`) ?? [true, C_FLG_ON];
3173
3161
 
3174
3162
  // displayUse -> ボタンの有効/無効, displaySet -> ボタンの初期値(ON/OFF)
3175
3163
  obj[`${option}Use`] = setBoolVal(displayUse[0], true);
3176
3164
  obj[`${option}Set`] = setVal(displayUse.length > 1 ? displayUse[1] :
3177
3165
  boolToSwitch(obj[`${option}Use`]), ``, C_TYP_SWITCH);
3178
3166
  g_stateObj[`d_${option.toLowerCase()}`] = setVal(obj[`${option}Set`], C_FLG_ON, C_TYP_SWITCH);
3179
- obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
3167
+ obj[`${option}ChainOFF`] = _dosObj[`${option}ChainOFF`]?.split(`,`) ?? [];
3180
3168
 
3181
3169
  // Displayのデフォルト設定で、双方向に設定されている場合は設定をブロック
3182
3170
  g_displays.filter((option2, k) =>
@@ -3254,7 +3242,7 @@ const headerConvert = _dosObj => {
3254
3242
  obj.commentVal = tmpComment.split(`\n`).join(newlineTag);
3255
3243
 
3256
3244
  // クレジット表示
3257
- if (document.querySelector(`#webMusicTitle`) !== null) {
3245
+ if (document.getElementById(`webMusicTitle`) !== null) {
3258
3246
  webMusicTitle.innerHTML =
3259
3247
  `<span style="font-size:${wUnit(32)}">${obj.musicTitleForView.join(`<br>`)}</span><br>
3260
3248
  <span style="font-size:${wUnit(16)}">(Artist: <a href="${obj.artistUrl}" target="_blank">${obj.artistName}</a>)</span>`;
@@ -3417,7 +3405,7 @@ const resetBaseColorList = (_baseObj, _dosObj, { scoreId = `` } = {}) => {
3417
3405
 
3418
3406
  // フリーズアロー色
3419
3407
  const tmpFrzColors = (frzColorTxt !== undefined ? splitLF2(frzColorTxt) : []);
3420
- const firstFrzColors = (tmpFrzColors[0] !== undefined ? tmpFrzColors[0].split(`,`) : []);
3408
+ const firstFrzColors = tmpFrzColors[0]?.split(`,`) ?? [];
3421
3409
 
3422
3410
  for (let j = 0; j < _baseObj.setColorInit.length; j++) {
3423
3411
 
@@ -3744,8 +3732,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3744
3732
  // |keyCtrl9j=Tab,7_0,Enter| -> |keyCtrl9j=Tab,S,D,F,Space,J,K,L,Enter| のように補完
3745
3733
  g_keyObj[`${keyheader}_${k + dfPtn}`] =
3746
3734
  tmpArray[k].split(`,`).map(n =>
3747
- g_keyObj[`${_name}${getKeyPtnName(n)}`] !== undefined ?
3748
- structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) : [_convFunc(n)]
3735
+ structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) ?? [_convFunc(n)]
3749
3736
  ).flat();
3750
3737
  if (baseCopyFlg) {
3751
3738
  g_keyObj[`${keyheader}_${k + dfPtn}d`] = structuredClone(g_keyObj[`${keyheader}_${k + dfPtn}`]);
@@ -3796,9 +3783,8 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3796
3783
  // 部分的にキーパターン指定があった場合は既存パターンを展開 (例: |shuffle9j=2,7_0_0,2|)
3797
3784
  g_keyObj[`${keyheader}_${k + dfPtn}_${ptnCnt}`] =
3798
3785
  makeBaseArray(list.split(`,`).map(n =>
3799
- g_keyObj[`${_name}${getKeyPtnName(n)}`] !== undefined ?
3800
- structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) :
3801
- [isNaN(parseInt(n)) ? n : parseInt(n, 10)]
3786
+ structuredClone(g_keyObj[`${_name}${getKeyPtnName(n)}`]) ??
3787
+ [isNaN(parseInt(n)) ? n : parseInt(n, 10)]
3802
3788
  ).flat(), g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, 0);
3803
3789
  ptnCnt++;
3804
3790
  }
@@ -3873,9 +3859,8 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3873
3859
  const tmpParamPair = pairs.split(`::`);
3874
3860
  g_keyObj[pairName][tmpParamPair[0]] =
3875
3861
  makeBaseArray(tmpParamPair[1]?.split(`,`).map(n =>
3876
- g_keyObj[`${_pairName}${getKeyPtnName(n)}`] !== undefined ?
3877
- structuredClone(g_keyObj[`${_pairName}${getKeyPtnName(n)}`][tmpParamPair[0]]) :
3878
- [n === `-` ? -1 : parseInt(n, 10)]
3862
+ structuredClone(g_keyObj[`${_pairName}${getKeyPtnName(n)}`]?.[tmpParamPair[0]]) ??
3863
+ [n === `-` ? -1 : parseInt(n, 10)]
3879
3864
  ).flat(), g_keyObj[`${g_keyObj.defaultProp}${_key}_${k + dfPtn}`].length, _defaultVal);
3880
3865
  }
3881
3866
  });
@@ -4046,7 +4031,7 @@ const titleInit = _ => {
4046
4031
  if (!g_stateObj.dataSaveFlg || hasVal(g_keyObj[`transKey${keyCtrlPtn}`])) {
4047
4032
  g_canLoadDifInfoFlg = false;
4048
4033
  }
4049
- const divRoot = document.querySelector(`#divRoot`);
4034
+ const divRoot = document.getElementById(`divRoot`);
4050
4035
 
4051
4036
  // 曲時間制御変数
4052
4037
  let thisTime;
@@ -4099,7 +4084,7 @@ const titleInit = _ => {
4099
4084
  }
4100
4085
 
4101
4086
  // 変数 titlesize の定義 (使用例: |titlesize=40$20|)
4102
- const titlefontsizes = (g_headerObj.titlesize !== `` ? g_headerObj.titlesize.split(`$`).join(`,`).split(`,`) : [titlefontsize, titlefontsize]);
4087
+ const titlefontsizes = (g_headerObj.titlesize?.split(`$`).join(`,`).split(`,`) || [titlefontsize, titlefontsize]);
4103
4088
  const titlefontsize1 = setIntVal(titlefontsizes[0], titlefontsize);
4104
4089
  const titlefontsize2 = setIntVal(titlefontsizes[1], titlefontsize1);
4105
4090
 
@@ -4251,7 +4236,7 @@ const titleInit = _ => {
4251
4236
  // コメント文の加工
4252
4237
  const convCommentVal = convertStrToVal(g_headerObj.commentVal);
4253
4238
  if (g_headerObj.commentExternal) {
4254
- if (document.querySelector(`#commentArea`) !== null) {
4239
+ if (document.getElementById(`commentArea`) !== null) {
4255
4240
  commentArea.innerHTML = convCommentVal;
4256
4241
  }
4257
4242
  } else {
@@ -4444,7 +4429,7 @@ const makePlayButton = _func => createCss2Button(`btnPlay`, g_lblNameObj.b_play,
4444
4429
  const optionInit = _ => {
4445
4430
 
4446
4431
  clearWindow(true);
4447
- const divRoot = document.querySelector(`#divRoot`);
4432
+ const divRoot = document.getElementById(`divRoot`);
4448
4433
  g_baseDisp = `Settings`;
4449
4434
  g_currentPage = `option`;
4450
4435
  g_stateObj.filterKeys = ``;
@@ -4499,7 +4484,7 @@ const inputSlider = (_slider, _link) => {
4499
4484
  * 譜面変更セレクターの削除
4500
4485
  */
4501
4486
  const resetDifWindow = _ => {
4502
- if (document.querySelector(`#difList`) !== null) {
4487
+ if (document.getElementById(`difList`) !== null) {
4503
4488
  deleteChildspriteAll(`difList`);
4504
4489
  [`difList`, `difCover`, `btnDifU`, `btnDifD`].forEach(obj => document.getElementById(obj).remove());
4505
4490
  g_currentPage = `option`;
@@ -4624,7 +4609,7 @@ const createDifWindow = (_key = ``) => {
4624
4609
  const changeDifficulty = (_num = 1) => {
4625
4610
  if (g_headerObj.difSelectorUse) {
4626
4611
  g_stateObj.filterKeys = ``;
4627
- if (document.querySelector(`#difList`) === null) {
4612
+ if (document.getElementById(`difList`) === null) {
4628
4613
  g_keyObj.prevKey = g_keyObj.currentKey;
4629
4614
  createDifWindow();
4630
4615
  } else {
@@ -4667,20 +4652,18 @@ const drawSpeedGraph = _scoreId => {
4667
4652
  const speed = speedObj[speedType].speed;
4668
4653
  const speedData = g_detailObj[`${speedType}Data`][_scoreId];
4669
4654
 
4670
- if (speedData !== undefined) {
4671
- for (let i = 0; i < speedData.length; i += 2) {
4672
- if (speedData[i] >= startFrame) {
4673
- frame.push(speedData[i] - startFrame);
4674
- speed.push(speedData[i + 1]);
4675
- }
4676
- speedObj[speedType].cnt++;
4655
+ for (let i = 0; i < speedData?.length; i += 2) {
4656
+ if (speedData[i] >= startFrame) {
4657
+ frame.push(speedData[i] - startFrame);
4658
+ speed.push(speedData[i + 1]);
4677
4659
  }
4678
- frame.push(playingFrame);
4679
- speed.push(speed.at(-1));
4660
+ speedObj[speedType].cnt++;
4680
4661
  }
4662
+ frame.push(playingFrame);
4663
+ speed.push(speed.at(-1));
4681
4664
  });
4682
4665
 
4683
- const canvas = document.querySelector(`#graphSpeed`);
4666
+ const canvas = document.getElementById(`graphSpeed`);
4684
4667
  const context = canvas.getContext(`2d`);
4685
4668
  drawBaseLine(context);
4686
4669
 
@@ -4734,7 +4717,7 @@ const drawSpeedGraph = _scoreId => {
4734
4717
  */
4735
4718
  const drawDensityGraph = _scoreId => {
4736
4719
 
4737
- const canvas = document.querySelector(`#graphDensity`);
4720
+ const canvas = document.getElementById(`graphDensity`);
4738
4721
  const context = canvas.getContext(`2d`);
4739
4722
  drawBaseLine(context);
4740
4723
  for (let j = 0; j < g_limitObj.densityDivision; j++) {
@@ -4780,16 +4763,16 @@ const drawDensityGraph = _scoreId => {
4780
4763
  */
4781
4764
  const updateScoreDetailLabel = (_name, _label, _value, _pos = 0, _labelname = _label) => {
4782
4765
  const baseLabel = (_bLabel, _bLabelname, _bAlign) =>
4783
- document.querySelector(`#detail${_name}`).appendChild(
4784
- createDivCss2Label(`${_bLabel}`, `${_bLabelname}`, {
4766
+ document.getElementById(`detail${_name}`).appendChild(
4767
+ createDivCss2Label(_bLabel, _bLabelname, {
4785
4768
  x: 10, y: 105 + _pos * 20, w: 100, h: 20, siz: g_limitObj.difSelectorSiz, align: _bAlign,
4786
4769
  })
4787
4770
  );
4788
- if (document.querySelector(`#data${_label}`) === null) {
4771
+ if (document.getElementById(`data${_label}`) === null) {
4789
4772
  baseLabel(`lbl${_label}`, `${_labelname}`, C_ALIGN_LEFT);
4790
4773
  baseLabel(`data${_label}`, `${_value}`, C_ALIGN_RIGHT);
4791
4774
  } else {
4792
- document.querySelector(`#data${_label}`).textContent = `${_value}`;
4775
+ document.getElementById(`data${_label}`).textContent = `${_value}`;
4793
4776
  }
4794
4777
  };
4795
4778
 
@@ -4824,7 +4807,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
4824
4807
  _context.lineWidth = 1;
4825
4808
 
4826
4809
  if (_lineType === `main`) {
4827
- const textBaseObj = document.querySelector(`#lnkDifficulty`);
4810
+ const textBaseObj = document.getElementById(`lnkDifficulty`);
4828
4811
  const textColor = window.getComputedStyle(textBaseObj, ``).color;
4829
4812
  _context.strokeStyle = textColor;
4830
4813
  _context.font = `${wUnit(12)} ${getBasicFont()}`;
@@ -4843,7 +4826,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
4843
4826
  const makeDifInfoLabels = _scoreId => {
4844
4827
 
4845
4828
  // ツール難易度
4846
- const detailToolDif = document.querySelector(`#detailToolDif`);
4829
+ const detailToolDif = document.getElementById(`detailToolDif`);
4847
4830
  /**
4848
4831
  * 譜面の難易度情報ラベルの作成
4849
4832
  * @param {string} _lbl
@@ -4905,20 +4888,48 @@ const makeDifInfo = _scoreId => {
4905
4888
 
4906
4889
  const arrowCnts = sumData(g_detailObj.arrowCnt[_scoreId]);
4907
4890
  const frzCnts = sumData(g_detailObj.frzCnt[_scoreId]);
4908
- const push3CntStr = (g_detailObj.toolDif[_scoreId].push3.length === 0 ? `None` : `(${g_detailObj.toolDif[_scoreId].push3})`);
4891
+ const push3CntStr = (g_detailObj.toolDif[_scoreId].push3.length === 0 ? `None` : `(${g_detailObj.toolDif[_scoreId].push3.join(', ')})`);
4909
4892
 
4910
- if (document.querySelector(`#lblTooldif`) === null) {
4893
+ if (document.getElementById(`lblTooldif`) === null) {
4911
4894
  makeDifInfoLabels(_scoreId);
4912
4895
  }
4913
4896
  dataTooldif.textContent = g_detailObj.toolDif[_scoreId].tool;
4914
4897
  dataDouji.textContent = g_detailObj.toolDif[_scoreId].douji;
4915
4898
  dataTate.textContent = g_detailObj.toolDif[_scoreId].tate;
4916
- lblArrowInfo2.innerHTML = g_lblNameObj.s_linecnts.split(`{0}`).join(g_detailObj.toolDif[_scoreId].push3cnt);
4899
+ lblArrowInfo2.innerHTML = g_lblNameObj.s_linecnts.split(`{0}`)
4900
+ .join(`${makeDedupliArray(g_detailObj.toolDif[_scoreId].push3).length} /cnt:${g_detailObj.toolDif[_scoreId].push3cnt}`);
4917
4901
  dataArrowInfo.innerHTML = `${arrowCnts + frzCnts * (g_headerObj.frzStartjdgUse ? 2 : 1)}
4918
4902
  <span style="font-size:${wUnit(g_limitObj.difSelectorSiz)};">(${arrowCnts} + ${frzCnts}${g_headerObj.frzStartjdgUse ? ' <span class="common_bold">x 2</span>' : ''})</span>`;
4919
- dataArrowInfo2.innerHTML = `<br>(${g_detailObj.arrowCnt[_scoreId]})<br><br>
4920
- (${g_detailObj.frzCnt[_scoreId]})<br><br>
4921
- ${push3CntStr}`.split(`,`).join(`/`);
4903
+
4904
+ const makeArrowCntsView = (_cntlist) => {
4905
+ const targetKey = g_headerObj.keyLabels[_scoreId];
4906
+ const cntlist = [
4907
+ _cntlist.filter((val, j) =>
4908
+ g_keyObj[`pos${targetKey}_0`][j] < g_keyObj[`div${targetKey}_0`]),
4909
+ _cntlist.filter((val, j) =>
4910
+ g_keyObj[`pos${targetKey}_0`][j] >= g_keyObj[`div${targetKey}_0`])
4911
+ ];
4912
+
4913
+ let cntlistStr = ``;
4914
+ cntlist.filter(array => array.length > 0).forEach(array => {
4915
+ const maxVal = array.reduce((a, b) => Math.max(a, b));
4916
+ const minVal = array.reduce((a, b) => Math.min(a, b));
4917
+
4918
+ cntlistStr += `[ `;
4919
+ array.forEach((val, j) => {
4920
+ if (maxVal !== minVal) {
4921
+ array[j] = (val === minVal ? `<span class="settings_minArrowCnts">${val}</span>` :
4922
+ (val === maxVal ? `<span class="settings_maxArrowCnts common_bold">${val}</span>` : val));
4923
+ }
4924
+ });
4925
+ cntlistStr += array.join(`, `) + ` ]`;
4926
+ });
4927
+
4928
+ return cntlistStr;
4929
+ }
4930
+
4931
+ dataArrowInfo2.innerHTML = `<br>${makeArrowCntsView(g_detailObj.arrowCnt[_scoreId])}<br><br>
4932
+ ${makeArrowCntsView(g_detailObj.frzCnt[_scoreId])}<br><br>${push3CntStr}`;
4922
4933
  };
4923
4934
 
4924
4935
  /**
@@ -5084,7 +5095,7 @@ const setDifficulty = (_initFlg) => {
5084
5095
  g_shortcutObj.option.KeyR.exId : g_shortcutObj.option.KeyR.dfId;
5085
5096
 
5086
5097
  if (g_settings.scrolls.length > 1) {
5087
- setReverseView(document.querySelector(`#btnReverse`));
5098
+ setReverseView(document.getElementById(`btnReverse`));
5088
5099
  }
5089
5100
  } else {
5090
5101
  g_settings.scrolls = structuredClone(g_keyObj.scrollName_def);
@@ -5157,7 +5168,7 @@ const createOptionWindow = _sprite => {
5157
5168
 
5158
5169
  if (_graphUseFlg) {
5159
5170
  const graphObj = document.createElement(`canvas`);
5160
- const textBaseObj = document.querySelector(`#lnkDifficulty`);
5171
+ const textBaseObj = document.getElementById(`lnkDifficulty`);
5161
5172
  const bkColor = window.getComputedStyle(textBaseObj, ``).backgroundColor;
5162
5173
 
5163
5174
  graphObj.id = `graph${_name}`;
@@ -5234,8 +5245,8 @@ const createOptionWindow = _sprite => {
5234
5245
  g_stateObj.scoreDetailViewFlg = false;
5235
5246
  g_shortcutObj.difSelector.KeyQ.id = g_settings.scoreDetailCursors[0];
5236
5247
  }
5237
- const scoreDetail = document.querySelector(`#scoreDetail`);
5238
- const detailObj = document.querySelector(`#detail${g_stateObj.scoreDetail}`);
5248
+ const scoreDetail = document.getElementById(`scoreDetail`);
5249
+ const detailObj = document.getElementById(`detail${g_stateObj.scoreDetail}`);
5239
5250
  const visibles = [`hidden`, `visible`];
5240
5251
 
5241
5252
  g_stateObj.scoreDetailViewFlg = !g_stateObj.scoreDetailViewFlg;
@@ -5355,7 +5366,7 @@ const createOptionWindow = _sprite => {
5355
5366
 
5356
5367
  );
5357
5368
 
5358
- const fadeinSlider = document.querySelector(`#fadeinSlider`);
5369
+ const fadeinSlider = document.getElementById(`fadeinSlider`);
5359
5370
  fadeinSlider.addEventListener(`input`, _ =>
5360
5371
  g_stateObj.fadein = inputSlider(fadeinSlider, lnkFadein), false);
5361
5372
 
@@ -5443,7 +5454,7 @@ const createGeneralSetting = (_obj, _settingName, { unitName = ``,
5443
5454
  createScText(_obj, settingUpper, { displayName: displayName, dfLabel: scLabel });
5444
5455
 
5445
5456
  } else {
5446
- document.querySelector(`#lbl${settingUpper}`).classList.add(g_cssObj.settings_Disabled);
5457
+ document.getElementById(`lbl${settingUpper}`).classList.add(g_cssObj.settings_Disabled);
5447
5458
  _obj.appendChild(makeDisabledLabel(linkId, 0, initName));
5448
5459
  }
5449
5460
  };
@@ -5497,7 +5508,7 @@ const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) =>
5497
5508
  }
5498
5509
  g_stateObj[_settingName] = settingList[settingNum];
5499
5510
  g_settings[`${_settingName}Num`] = settingNum;
5500
- document.querySelector(`#lnk${toCapitalize(_settingName)}`).textContent =
5511
+ document.getElementById(`lnk${toCapitalize(_settingName)}`).textContent =
5501
5512
  `${getStgDetailName(g_stateObj[_settingName])}${_unitName}${g_localStorage[_settingName] === g_stateObj[_settingName] ? ' *' : ''}`;
5502
5513
  };
5503
5514
 
@@ -5507,11 +5518,10 @@ const setSetting = (_scrollNum, _settingName, _unitName = ``, _roundNum = 0) =>
5507
5518
  * @param {number} _heightPos
5508
5519
  * @param {string} _defaultStr
5509
5520
  */
5510
- const makeDisabledLabel = (_id, _heightPos, _defaultStr) => {
5511
- return createDivCss2Label(_id, _defaultStr, {
5521
+ const makeDisabledLabel = (_id, _heightPos, _defaultStr) =>
5522
+ createDivCss2Label(_id, _defaultStr, {
5512
5523
  x: g_limitObj.setLblLeft, y: g_limitObj.setLblHeight * _heightPos,
5513
5524
  }, g_cssObj.settings_Disabled);
5514
- };
5515
5525
 
5516
5526
  /**
5517
5527
  * 保存済みリバース取得処理
@@ -5769,7 +5779,7 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
5769
5779
  const basePtn = `${g_keyObj.currentKey}_${g_keyObj.storagePtn}`;
5770
5780
  const baseKeyNum = g_keyObj[`${g_keyObj.defaultProp}${basePtn}`].length;
5771
5781
 
5772
- if (_localStorage[`keyCtrl${_extraKeyName}`] !== undefined && _localStorage[`keyCtrl${_extraKeyName}`][0].length > 0) {
5782
+ if (_localStorage[`keyCtrl${_extraKeyName}`]?.[0].length > 0) {
5773
5783
  const prevPtn = g_keyObj.currentPtn;
5774
5784
  g_keyObj.currentPtn = -1;
5775
5785
  const copyPtn = `${g_keyObj.currentKey}_-1`;
@@ -5811,12 +5821,12 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
5811
5821
  */
5812
5822
  const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, siz, cxtFunc = _ => true, ...rest } = {}, ..._classes) => {
5813
5823
  const tmpObj = {
5814
- x: x !== undefined ? x : g_limitObj.setLblLeft,
5815
- y: y !== undefined ? y : g_limitObj.setLblHeight * _heightPos,
5816
- w: w !== undefined ? w : g_limitObj.setLblWidth,
5817
- h: h !== undefined ? h : g_limitObj.setLblHeight,
5818
- siz: siz !== undefined ? siz : g_limitObj.setLblSiz,
5819
- cxtFunc: cxtFunc !== undefined ? cxtFunc : _ => true,
5824
+ x: x ?? g_limitObj.setLblLeft,
5825
+ y: y ?? g_limitObj.setLblHeight * _heightPos,
5826
+ w: w ?? g_limitObj.setLblWidth,
5827
+ h: h ?? g_limitObj.setLblHeight,
5828
+ siz: siz ?? g_limitObj.setLblSiz,
5829
+ cxtFunc: cxtFunc ?? (_ => true),
5820
5830
  };
5821
5831
  return createCss2Button(_id, _name, _func, { ...tmpObj, ...rest }, g_cssObj.button_Default, ..._classes);
5822
5832
  };
@@ -5828,14 +5838,13 @@ const makeSettingLblCssButton = (_id, _name, _heightPos, _func, { x, y, w, h, si
5828
5838
  * @param {number} _heightPos 上からの配置順
5829
5839
  * @param {function} _func
5830
5840
  */
5831
- const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, btnStyle = `Default` } = {}) => {
5832
- return createCss2Button(_id, _name, _func, {
5833
- x: x, y: g_limitObj.setLblHeight * _heightPos,
5834
- w: w, h: g_limitObj.setLblHeight,
5841
+ const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limitObj.difSelectorWidth, btnStyle = `Default` } = {}) =>
5842
+ createCss2Button(_id, _name, _func, {
5843
+ x, y: g_limitObj.setLblHeight * _heightPos,
5844
+ w, h: g_limitObj.setLblHeight,
5835
5845
  siz: g_limitObj.difSelectorSiz,
5836
5846
  borderStyle: `solid`,
5837
5847
  }, g_cssObj[`button_${btnStyle}`], g_cssObj.button_ON);
5838
- };
5839
5848
 
5840
5849
  /**
5841
5850
  * 設定・オプション用の設定変更ミニボタン
@@ -5844,14 +5853,13 @@ const makeDifLblCssButton = (_id, _name, _heightPos, _func, { x = 0, w = g_limit
5844
5853
  * @param {number} _heightPos 上からの配置順
5845
5854
  * @param {function} _func
5846
5855
  */
5847
- const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) => {
5848
- return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
5856
+ const makeMiniCssButton = (_id, _directionFlg, _heightPos, _func, { dx = 0, dy = 0, dw = 0, dh = 0, dsiz = 0, visibility = `visible` } = {}) =>
5857
+ createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func, {
5849
5858
  x: g_settingBtnObj.pos[_directionFlg] + dx,
5850
5859
  y: g_limitObj.setLblHeight * _heightPos + dy,
5851
5860
  w: g_limitObj.setMiniWidth + dw, h: g_limitObj.setLblHeight + dh, siz: g_limitObj.setLblSiz + dsiz,
5852
5861
  visibility: visibility
5853
5862
  }, g_cssObj.button_Mini);
5854
- };
5855
5863
 
5856
5864
  /**
5857
5865
  * カラーグループ、シャッフルグループの再設定
@@ -5864,7 +5872,7 @@ const resetGroupList = (_type, _keyCtrlPtn) => {
5864
5872
  if (g_keyObj.currentPtn === -1) {
5865
5873
  g_keycons[`${_type}Groups`] = addValtoArray(g_keycons[`${_type}Groups`], -1);
5866
5874
  }
5867
- g_keycons[`${_type}GroupNum`] = (g_keyObj.currentPtn === -1 ? -1 : 0);
5875
+ g_keycons[`${_type}GroupNum`] = Math.min(g_keyObj.currentPtn, 0);
5868
5876
  while (g_keyObj[`${_type}${_keyCtrlPtn}_${k}`] !== undefined) {
5869
5877
  g_keycons[`${_type}Groups`].push(k);
5870
5878
  k++;
@@ -5878,7 +5886,7 @@ const resetGroupList = (_type, _keyCtrlPtn) => {
5878
5886
  const settingsDisplayInit = _ => {
5879
5887
 
5880
5888
  clearWindow(true);
5881
- const divRoot = document.querySelector(`#divRoot`);
5889
+ const divRoot = document.getElementById(`divRoot`);
5882
5890
  g_baseDisp = `Display`;
5883
5891
  g_currentPage = `settingsDisplay`;
5884
5892
 
@@ -5925,21 +5933,6 @@ const createSettingsDisplayWindow = _sprite => {
5925
5933
  const list = [C_FLG_OFF, C_FLG_ON];
5926
5934
  const linkId = `lnk${_name}`;
5927
5935
 
5928
- /**
5929
- * 無効化用ラベル作成
5930
- * @param {string} _id
5931
- * @param {number} _heightPos
5932
- * @param {number} _widthPos
5933
- * @param {string} _defaultStr
5934
- * @param {string} _flg
5935
- */
5936
- const makeDisabledDisplayLabel = (_id, _heightPos, _widthPos, _defaultStr, _flg) => {
5937
- return createDivCss2Label(_id, _defaultStr, {
5938
- x: 30 + 180 * _widthPos, y: 3 + g_limitObj.setLblHeight * _heightPos,
5939
- w: 170, siz: g_limitObj.difSelectorSiz,
5940
- }, g_cssObj[`button_Disabled${flg}`]);
5941
- };
5942
-
5943
5936
  if (g_headerObj[`${_name}Use`]) {
5944
5937
  const switchDisplay = evt => {
5945
5938
  const displayFlg = g_stateObj[`d_${_name.toLowerCase()}`];
@@ -5960,8 +5953,12 @@ const createSettingsDisplayWindow = _sprite => {
5960
5953
  createScText(document.getElementById(linkId), `${toCapitalize(_name)}`,
5961
5954
  { displayName: g_currentPage, targetLabel: linkId, x: -5 });
5962
5955
  } else {
5963
- displaySprite.appendChild(makeDisabledDisplayLabel(linkId, _heightPos, _widthPos,
5964
- g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, g_headerObj[`${_name}Set`]));
5956
+ displaySprite.appendChild(
5957
+ createDivCss2Label(linkId, g_lblNameObj[`d_${toCapitalize(_name)}`] + `:${g_headerObj[`${_name}Set`]}`, {
5958
+ x: 30 + 180 * _widthPos, y: 3 + g_limitObj.setLblHeight * _heightPos,
5959
+ w: 170, siz: g_limitObj.difSelectorSiz,
5960
+ }, g_cssObj[`button_Disabled${flg}`])
5961
+ );
5965
5962
  }
5966
5963
  };
5967
5964
 
@@ -6003,7 +6000,7 @@ const createSettingsDisplayWindow = _sprite => {
6003
6000
  g_cssObj[`button_Rev${g_stateObj.filterLock}`]);
6004
6001
  };
6005
6002
 
6006
- const appearanceSlider = document.querySelector(`#appearanceSlider`);
6003
+ const appearanceSlider = document.getElementById(`appearanceSlider`);
6007
6004
  appearanceSlider.addEventListener(`input`, _ =>
6008
6005
  g_hidSudObj.filterPos = inputSlider(appearanceSlider, lblAppearancePos), false);
6009
6006
 
@@ -6061,9 +6058,9 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
6061
6058
  let txtDisabled = ``;
6062
6059
  if (!g_headerObj[`${defaultOption}Use`]) {
6063
6060
  txtDisabled = `Disabled`;
6064
- document.querySelector(`#lnk${defaultOption}`).textContent = `${toCapitalize(defaultOption)}:${_next}`;
6061
+ document.getElementById(`lnk${defaultOption}`).textContent = `${toCapitalize(defaultOption)}:${_next}`;
6065
6062
  }
6066
- document.querySelector(`#lnk${defaultOption}`).classList.replace(g_cssObj[`button_${txtDisabled}${_current}`], g_cssObj[`button_Disabled${_next}`]);
6063
+ document.getElementById(`lnk${defaultOption}`).classList.replace(g_cssObj[`button_${txtDisabled}${_current}`], g_cssObj[`button_Disabled${_next}`]);
6067
6064
  }
6068
6065
  // さらに連動する場合は設定を反転
6069
6066
  interlockingButton(_headerObj, defaultOption, _next, _current, _buttonFlg);
@@ -6081,7 +6078,7 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
6081
6078
  const keyConfigInit = (_kcType = g_kcType) => {
6082
6079
 
6083
6080
  clearWindow(true);
6084
- const divRoot = document.querySelector(`#divRoot`);
6081
+ const divRoot = document.getElementById(`divRoot`);
6085
6082
  g_kcType = _kcType;
6086
6083
  g_currentPage = `keyConfig`;
6087
6084
 
@@ -6150,7 +6147,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6150
6147
  * @param {string} _cssName
6151
6148
  */
6152
6149
  const changeKeyConfigColor = (_j, _k, _cssName) =>
6153
- changeConfigColor(document.querySelector(`#keycon${_j}_${_k}`), _cssName);
6150
+ changeConfigColor(document.getElementById(`keycon${_j}_${_k}`), _cssName);
6154
6151
 
6155
6152
  /**
6156
6153
  * 一時的に矢印色・シャッフルグループを変更(共通処理)
@@ -6741,7 +6738,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6741
6738
  const j = g_keycons.cursorNumList[m];
6742
6739
  for (let k = 0; k < g_keyObj[`keyCtrl${keyCtrlPtn}`][j].length; k++) {
6743
6740
  g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k] = setIntVal(g_keyObj[`keyCtrl${keyCtrlPtn}d`][j][k]);
6744
- document.querySelector(`#keycon${j}_${k}`).textContent = g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]];
6741
+ document.getElementById(`keycon${j}_${k}`).textContent = g_kCd[g_keyObj[`keyCtrl${keyCtrlPtn}`][j][k]];
6745
6742
  changeKeyConfigColor(j, k, g_keyObj.currentPtn === -1 ? g_cssObj.keyconfig_Defaultkey : g_cssObj.title_base);
6746
6743
  }
6747
6744
  }
@@ -6756,7 +6753,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6756
6753
 
6757
6754
  // キーボード押下時処理
6758
6755
  setShortcutEvent(g_currentPage, (kbCode, kbKey) => {
6759
- const keyCdObj = document.querySelector(`#keycon${g_currentj}_${g_currentk}`);
6756
+ const keyCdObj = document.getElementById(`keycon${g_currentj}_${g_currentk}`);
6760
6757
  let setKey = g_kCdN.findIndex(kCd => kCd === kbCode);
6761
6758
 
6762
6759
  // 右シフトキー対応
@@ -6779,7 +6776,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
6779
6776
  return;
6780
6777
  }
6781
6778
 
6782
- if (setKey === C_KEY_RETRY && (!g_isMac || (g_isMac && g_currentk === 0))) {
6779
+ if (setKey === C_KEY_RETRY && (!g_isMac || g_currentk === 0)) {
6783
6780
  // スキップ
6784
6781
  } else {
6785
6782
  // キー割り当て処理
@@ -6826,8 +6823,7 @@ const getShadowColor = (_colorPos, _arrowColor) => g_headerObj.setShadowColor[_c
6826
6823
  const getKeyInfo = _ => {
6827
6824
  const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
6828
6825
  const keyNum = g_keyObj[`${g_keyObj.defaultProp}${keyCtrlPtn}`].length;
6829
- const posMax = (g_keyObj[`divMax${keyCtrlPtn}`] !== undefined ?
6830
- g_keyObj[`divMax${keyCtrlPtn}`] : Math.max(...g_keyObj[`pos${keyCtrlPtn}`]) + 1);
6826
+ const posMax = g_keyObj[`divMax${keyCtrlPtn}`] ?? Math.max(...g_keyObj[`pos${keyCtrlPtn}`]) + 1;
6831
6827
  const divideCnt = g_keyObj[`div${keyCtrlPtn}`] - 1;
6832
6828
  const keyGroupMaps = setVal(g_keyObj[`keyGroup${keyCtrlPtn}`], [...Array(keyNum)].fill([`0`]), C_TYP_STRING);
6833
6829
  const keyGroupList = makeDedupliArray(keyGroupMaps.flat()).sort((a, b) => parseInt(a) - parseInt(b));
@@ -6953,7 +6949,7 @@ const loadMusic = _ => {
6953
6949
 
6954
6950
  // 進捗時
6955
6951
  request.addEventListener(`progress`, _event => {
6956
- const lblLoading = document.querySelector(`#lblLoading`);
6952
+ const lblLoading = document.getElementById(`lblLoading`);
6957
6953
 
6958
6954
  if (_event.lengthComputable) {
6959
6955
  const rate = _event.loaded / _event.total;
@@ -6967,8 +6963,8 @@ const loadMusic = _ => {
6967
6963
  });
6968
6964
 
6969
6965
  // エラー処理
6970
- request.addEventListener(`timeout`, _ => makeWarningWindow(`${g_msgInfoObj.E_0033}`, { backBtnUse: true }));
6971
- request.addEventListener(`error`, _ => makeWarningWindow(`${g_msgInfoObj.E_0034}`, { backBtnUse: true }));
6966
+ request.addEventListener(`timeout`, _ => makeWarningWindow(g_msgInfoObj.E_0033, { backBtnUse: true }));
6967
+ request.addEventListener(`error`, _ => makeWarningWindow(g_msgInfoObj.E_0034, { backBtnUse: true }));
6972
6968
 
6973
6969
  request.send();
6974
6970
  };
@@ -7147,12 +7143,8 @@ const loadingScoreInit = async () => {
7147
7143
  // シャッフルグループを扱いやすくする
7148
7144
  // [0, 0, 0, 1, 0, 0, 0] -> [[0, 1, 2, 4, 5, 6], [3]]
7149
7145
  const shuffleGroupMap = {};
7150
- g_keyObj[`shuffle${keyCtrlPtn}`].forEach((_val, _i) => {
7151
- if (shuffleGroupMap[_val] === undefined) {
7152
- shuffleGroupMap[_val] = [];
7153
- }
7154
- shuffleGroupMap[_val].push(_i);
7155
- });
7146
+ g_keyObj[`shuffle${keyCtrlPtn}`].forEach((_val, _i) =>
7147
+ shuffleGroupMap[_val]?.push(_i) || (shuffleGroupMap[_val] = [_i]));
7156
7148
 
7157
7149
  // Mirror,Random,S-Randomの適用
7158
7150
  g_shuffleFunc[g_stateObj.shuffle](keyNum, Object.values(shuffleGroupMap));
@@ -7907,7 +7899,7 @@ const setSpeedOnFrame = (_speedData, _lastFrame) => {
7907
7899
  let currentSpeed = g_stateObj.speed * 2;
7908
7900
 
7909
7901
  for (let frm = 0, s = 0; frm <= _lastFrame; frm++) {
7910
- while (_speedData !== undefined && frm >= _speedData[s]) {
7902
+ while (frm >= _speedData?.[s]) {
7911
7903
  currentSpeed = _speedData[s + 1] * g_stateObj.speed * 2;
7912
7904
  s += 2;
7913
7905
  }
@@ -7992,11 +7984,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
7992
7984
 
7993
7985
  const setNotes = (_j, _k, _data, _startPoint, _header, _frzFlg = false) => {
7994
7986
  if (_startPoint >= 0) {
7995
- if (g_workObj[`mk${_header}Arrow`][_startPoint] === undefined) {
7996
- g_workObj[`mk${_header}Arrow`][_startPoint] = [];
7997
- }
7998
- g_workObj[`mk${_header}Arrow`][_startPoint].push(_j);
7999
-
7987
+ g_workObj[`mk${_header}Arrow`][_startPoint]?.push(_j) || (g_workObj[`mk${_header}Arrow`][_startPoint] = [_j]);
8000
7988
  if (_frzFlg) {
8001
7989
  g_workObj[`mk${_header}Length`][_j][_k] = getFrzLength(_speedOnFrame, _data[_k], _data[_k + 1]);
8002
7990
  }
@@ -8239,12 +8227,10 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
8239
8227
  g_workObj.speedData.push(g_scoreObj.frameNum);
8240
8228
  g_workObj.speedData.push(_speedOnFrame[g_scoreObj.frameNum]);
8241
8229
 
8242
- if (_dataObj.speedData !== undefined) {
8243
- for (let k = 0; k < _dataObj.speedData.length; k += 2) {
8244
- if (_dataObj.speedData[k] >= g_scoreObj.frameNum) {
8245
- g_workObj.speedData.push(_dataObj.speedData[k]);
8246
- g_workObj.speedData.push(_speedOnFrame[_dataObj.speedData[k]]);
8247
- }
8230
+ for (let k = 0; k < _dataObj?.speedData.length; k += 2) {
8231
+ if (_dataObj.speedData[k] >= g_scoreObj.frameNum) {
8232
+ g_workObj.speedData.push(_dataObj.speedData[k]);
8233
+ g_workObj.speedData.push(_speedOnFrame[_dataObj.speedData[k]]);
8248
8234
  }
8249
8235
  }
8250
8236
  };
@@ -8334,17 +8320,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8334
8320
  const addAll = Number(_allFlg) * 1000;
8335
8321
  const allUseTypes = [];
8336
8322
 
8337
- /**
8338
- * 色変化用配列(フレーム別)の初期化
8339
- * @param {string} _baseStr
8340
- */
8341
- const initialize = (_baseStr) => {
8342
- if (g_workObj[_baseStr][_frame] === undefined) {
8343
- g_workObj[_baseStr][_frame] = [];
8344
- g_workObj[`${_baseStr}Cd`][_frame] = [];
8345
- }
8346
- };
8347
-
8348
8323
  /**
8349
8324
  * 全体色変化の有効化(フレーム別)
8350
8325
  * @param {...any} _types
@@ -8361,8 +8336,8 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8361
8336
  * @param {number} _cVal
8362
8337
  */
8363
8338
  const pushColor = (_baseStr, _cVal) => {
8364
- g_workObj[_baseStr][_frame].push(_cVal);
8365
- g_workObj[`${_baseStr}Cd`][_frame].push(colorCd);
8339
+ g_workObj[_baseStr][_frame]?.push(_cVal) || (g_workObj[_baseStr][_frame] = [_cVal]);
8340
+ g_workObj[`${_baseStr}Cd`][_frame]?.push(colorCd) || (g_workObj[`${_baseStr}Cd`][_frame] = [colorCd]);
8366
8341
  };
8367
8342
 
8368
8343
  if (_val < 30 || _val >= 1000) {
@@ -8378,8 +8353,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8378
8353
 
8379
8354
  // 矢印の色変化 (追随指定時はフリーズアローも色変化)
8380
8355
  baseHeaders.forEach(baseHeader => {
8381
- initialize(baseHeader);
8382
-
8383
8356
  if (_val < 20 || _val >= 1000) {
8384
8357
  pushColor(baseHeader, g_workObj.replaceNums[_val % 1000] + addAll);
8385
8358
  } else if (_val >= 20) {
@@ -8417,7 +8390,6 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
8417
8390
 
8418
8391
  g_keyObj[`color${tkObj.keyCtrlPtn}`].forEach((cpattern, k) => {
8419
8392
  if (colorPos === cpattern) {
8420
- initialize(baseHeader + ctype);
8421
8393
  pushColor(baseHeader + ctype, k + addAll);
8422
8394
  }
8423
8395
  });
@@ -8474,30 +8446,24 @@ const pushScrollchs = (_header, _frameArrow, _val, _frameStep, _scrollDir) => {
8474
8446
 
8475
8447
  const frameArrow = Math.max(_frameArrow, g_scoreObj.frameNum);
8476
8448
  const frameStep = Math.max(_frameStep, g_scoreObj.frameNum);
8449
+ const pushData = (_pattern, _frame, _val) =>
8450
+ g_workObj[`mkScrollch${_pattern}`][_frame]?.push(_val) || (g_workObj[`mkScrollch${_pattern}`][_frame] = [_val]);
8477
8451
 
8478
- if (g_workObj.mkScrollchArrow[frameArrow] === undefined) {
8479
- g_workObj.mkScrollchArrow[frameArrow] = [];
8480
- g_workObj.mkScrollchArrowDir[frameArrow] = [];
8481
- }
8482
- if (g_workObj.mkScrollchStep[frameStep] === undefined) {
8483
- g_workObj.mkScrollchStep[frameStep] = [];
8484
- g_workObj.mkScrollchStepDir[frameStep] = [];
8485
- }
8486
8452
  if (_val < 20 || _val >= 1000) {
8487
8453
  const realVal = g_workObj.replaceNums[_val % 1000];
8488
- g_workObj.mkScrollchArrow[frameArrow].push(realVal);
8489
- g_workObj.mkScrollchArrowDir[frameArrow].push(_scrollDir);
8490
- g_workObj.mkScrollchStep[frameStep].push(realVal);
8491
- g_workObj.mkScrollchStepDir[frameStep].push(_scrollDir);
8454
+ pushData(`Arrow`, frameArrow, realVal);
8455
+ pushData(`ArrowDir`, frameArrow, _scrollDir);
8456
+ pushData(`Step`, frameStep, realVal);
8457
+ pushData(`StepDir`, frameStep, _scrollDir);
8492
8458
 
8493
8459
  } else {
8494
8460
  const colorNum = _val - 20;
8495
8461
  for (let j = 0; j < tkObj.keyNum; j++) {
8496
8462
  if (g_keyObj[`color${tkObj.keyCtrlPtn}`][j] === colorNum) {
8497
- g_workObj.mkScrollchArrow[frameArrow].push(j);
8498
- g_workObj.mkScrollchArrowDir[frameArrow].push(_scrollDir);
8499
- g_workObj.mkScrollchStep[frameStep].push(j);
8500
- g_workObj.mkScrollchStepDir[frameStep].push(_scrollDir);
8463
+ pushData(`Arrow`, frameArrow, j);
8464
+ pushData(`ArrowDir`, frameArrow, _scrollDir);
8465
+ pushData(`Step`, frameStep, j);
8466
+ pushData(`StepDir`, frameStep, _scrollDir);
8501
8467
  }
8502
8468
  }
8503
8469
  }
@@ -8566,8 +8532,7 @@ const getArrowSettings = _ => {
8566
8532
  // モーション管理
8567
8533
  g_typeLists.arrow.forEach(type => g_workObj[`${type}CssMotions`] = [...Array(keyNum)].fill(``));
8568
8534
 
8569
- const scrollDirOptions = (g_keyObj[`scrollDir${keyCtrlPtn}`] !== undefined ?
8570
- g_keyObj[`scrollDir${keyCtrlPtn}`][g_stateObj.scroll] : [...Array(keyNum)].fill(1));
8535
+ const scrollDirOptions = g_keyObj[`scrollDir${keyCtrlPtn}`]?.[g_stateObj.scroll] ?? [...Array(keyNum)].fill(1);
8571
8536
 
8572
8537
  g_stateObj.autoAll = boolToSwitch(g_stateObj.autoPlay === C_FLG_ALL);
8573
8538
  g_workObj.hitPosition = (g_stateObj.autoAll === C_FLG_ON ? 0 : g_stateObj.hitPosition);
@@ -8713,7 +8678,7 @@ const setKeyCtrl = (_localStorage, _keyNum, _keyCtrlPtn) => {
8713
8678
  */
8714
8679
  const mainInit = _ => {
8715
8680
  clearWindow(true, `Main`);
8716
- const divRoot = document.querySelector(`#divRoot`);
8681
+ const divRoot = document.getElementById(`divRoot`);
8717
8682
  document.oncontextmenu = _ => false;
8718
8683
  g_currentPage = `main`;
8719
8684
 
@@ -8899,31 +8864,27 @@ const mainInit = _ => {
8899
8864
  g_scoreObj.fadeOutTerm = C_FRM_AFTERFADE;
8900
8865
 
8901
8866
  // フェードアウト時間指定の場合、その7秒(=420フレーム)後に終了する
8902
- if (g_headerObj.fadeFrame !== undefined) {
8903
- let fadeNo = -1;
8904
- if (g_headerObj.fadeFrame.length >= g_stateObj.scoreId + 1) {
8905
- fadeNo = (isNaN(parseInt(g_headerObj.fadeFrame[g_stateObj.scoreId][0])) ? -1 : g_stateObj.scoreId);
8906
- }
8907
- if (fadeNo !== -1) {
8908
- // フェードアウト指定の場合、曲長(フェードアウト開始まで) FadeFrame - (本来のblankFrame)
8909
- duration = parseInt(g_headerObj.fadeFrame[fadeNo][0]) - g_headerObj.blankFrameDef;
8910
- g_scoreObj.fadeOutFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
8867
+ let fadeNo = -1;
8868
+ if (g_headerObj.fadeFrame?.length >= g_stateObj.scoreId + 1) {
8869
+ fadeNo = (isNaN(parseInt(g_headerObj.fadeFrame[g_stateObj.scoreId][0])) ? -1 : g_stateObj.scoreId);
8870
+ }
8871
+ if (fadeNo !== -1) {
8872
+ // フェードアウト指定の場合、曲長(フェードアウト開始まで)は FadeFrame - (本来のblankFrame)
8873
+ duration = parseInt(g_headerObj.fadeFrame[fadeNo][0]) - g_headerObj.blankFrameDef;
8874
+ g_scoreObj.fadeOutFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
8911
8875
 
8912
- if (g_headerObj.fadeFrame[fadeNo].length > 1) {
8913
- g_scoreObj.fadeOutTerm = Number(g_headerObj.fadeFrame[fadeNo][1]);
8914
- }
8876
+ if (g_headerObj.fadeFrame[fadeNo].length > 1) {
8877
+ g_scoreObj.fadeOutTerm = Number(g_headerObj.fadeFrame[fadeNo][1]);
8915
8878
  }
8916
8879
  }
8917
8880
 
8918
8881
  // 終了時間指定の場合、その値を適用する
8919
8882
  let endFrameUseFlg = false;
8920
- if (g_headerObj.endFrame !== undefined) {
8921
- const tmpEndFrame = g_headerObj.endFrame[g_stateObj.scoreId] || g_headerObj.endFrame[0];
8922
- if (!isNaN(parseInt(tmpEndFrame))) {
8923
- // 終了時間指定の場合、曲長は EndFrame - (本来のblankFrame)
8924
- duration = parseInt(tmpEndFrame) - g_headerObj.blankFrameDef;
8925
- endFrameUseFlg = true;
8926
- }
8883
+ const tmpEndFrame = g_headerObj.endFrame?.[g_stateObj.scoreId] || g_headerObj.endFrame?.[0];
8884
+ if (!isNaN(parseInt(tmpEndFrame))) {
8885
+ // 終了時間指定の場合、曲長は EndFrame - (本来のblankFrame)
8886
+ duration = parseInt(tmpEndFrame) - g_headerObj.blankFrameDef;
8887
+ endFrameUseFlg = true;
8927
8888
  }
8928
8889
 
8929
8890
  let fullFrame = Math.ceil(duration / g_headerObj.playbackRate + g_headerObj.blankFrame + g_stateObj.adjustment);
@@ -9100,14 +9061,14 @@ const mainInit = _ => {
9100
9061
 
9101
9062
  // Ready?表示
9102
9063
  if (!g_headerObj.customReadyUse) {
9103
- const readyColor = (g_headerObj.readyColor !== `` ? g_headerObj.readyColor : g_headerObj.setColorOrg[0]);
9064
+ const readyColor = g_headerObj.readyColor || g_headerObj.setColorOrg[0];
9104
9065
  let readyDelayFrame = 0;
9105
9066
  if (g_stateObj.fadein === 0 && g_headerObj.readyDelayFrame > 0 &&
9106
9067
  g_headerObj.readyDelayFrame + g_stateObj.adjustment > 0) {
9107
9068
  readyDelayFrame = g_headerObj.readyDelayFrame + g_stateObj.adjustment;
9108
9069
  }
9109
- const readyHtml = (g_headerObj.readyHtml !== `` ? g_headerObj.readyHtml :
9110
- `<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`);
9070
+ const readyHtml = g_headerObj.readyHtml ||
9071
+ `<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`;
9111
9072
 
9112
9073
  divRoot.appendChild(
9113
9074
  createDivCss2Label(`lblReady`, readyHtml, {
@@ -9134,7 +9095,7 @@ const mainInit = _ => {
9134
9095
  const mainKeyDownActFunc = {
9135
9096
 
9136
9097
  OFF: (_code, _key) => {
9137
- const convCode = (_code === `` ? (_key === `Shift` ? g_kCdNameObj.shiftRKey : g_kCdNameObj.unknownKey) : _code);
9098
+ const convCode = _code || (_key === `Shift` ? g_kCdNameObj.shiftRKey : g_kCdNameObj.unknownKey);
9138
9099
  const matchKeys = g_workObj.keyCtrlN;
9139
9100
 
9140
9101
  for (let j = 0; j < keyNum; j++) {
@@ -9234,7 +9195,7 @@ const mainInit = _ => {
9234
9195
  if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
9235
9196
  const colorSelf = g_workObj[`${_name}Colors`][_j];
9236
9197
  const colorAll = g_workObj[`${_name}ColorsAll`][_j];
9237
- const arrowTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
9198
+ const arrowTop = document.getElementById(`${_name}Top${_j}_${_k}`);
9238
9199
 
9239
9200
  if (arrowTop.getAttribute(`color`) !== colorSelf && colorAll === colorSelf) {
9240
9201
  arrowTop.style.background = colorAll;
@@ -9253,9 +9214,9 @@ const mainInit = _ => {
9253
9214
  const changeFrzColor = (_j, _k, _name, _state) => {
9254
9215
 
9255
9216
  if (g_workObj[`mk${toCapitalize(_name)}ColorChangeAll`][g_scoreObj.frameNum]) {
9256
- const frzTop = document.querySelector(`#${_name}Top${_j}_${_k}`);
9257
- const frzBar = document.querySelector(`#${_name}Bar${_j}_${_k}`);
9258
- const frzBtm = document.querySelector(`#${_name}Btm${_j}_${_k}`);
9217
+ const frzTop = document.getElementById(`${_name}Top${_j}_${_k}`);
9218
+ const frzBar = document.getElementById(`${_name}Bar${_j}_${_k}`);
9219
+ const frzBtm = document.getElementById(`${_name}Btm${_j}_${_k}`);
9259
9220
  const frzName = `${_name}${_state}`;
9260
9221
 
9261
9222
  // 矢印部分の色変化
@@ -9330,7 +9291,7 @@ const mainInit = _ => {
9330
9291
  // 矢印(オート、AutoPlay: ON)
9331
9292
  arrowON: (_j, _arrowName, _cnt) => {
9332
9293
  if (_cnt === 0) {
9333
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
9294
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
9334
9295
 
9335
9296
  judgeIi(_cnt);
9336
9297
  stepDivHit.style.opacity = 1;
@@ -9342,7 +9303,7 @@ const mainInit = _ => {
9342
9303
  // ダミー矢印(オート、AutoPlay: OFF)
9343
9304
  dummyArrowOFF: (_j, _arrowName, _cnt) => {
9344
9305
  if (_cnt === 0) {
9345
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
9306
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
9346
9307
 
9347
9308
  g_customJsObj.dummyArrow.forEach(func => func());
9348
9309
  stepDivHit.style.top = wUnit(-15);
@@ -9759,11 +9720,11 @@ const mainInit = _ => {
9759
9720
  g_customJsObj.mainEnterFrame.forEach(func => func());
9760
9721
 
9761
9722
  // 速度変化 (途中変速, 個別加速)
9762
- while (g_workObj.speedData !== undefined && currentFrame >= g_workObj.speedData[speedCnts]) {
9723
+ while (currentFrame >= g_workObj.speedData?.[speedCnts]) {
9763
9724
  g_workObj.currentSpeed = g_workObj.speedData[speedCnts + 1];
9764
9725
  speedCnts += 2;
9765
9726
  }
9766
- while (g_workObj.boostData !== undefined && currentFrame >= g_workObj.boostData[boostCnts]) {
9727
+ while (currentFrame >= g_workObj.boostData?.[boostCnts]) {
9767
9728
  g_workObj.boostSpd = g_workObj.boostData[boostCnts + 1];
9768
9729
  g_workObj.boostDir = (g_workObj.boostSpd > 0 ? 1 : -1);
9769
9730
  boostCnts += 2;
@@ -9819,7 +9780,7 @@ const mainInit = _ => {
9819
9780
 
9820
9781
  // 矢印・フリーズアロー移動&消去
9821
9782
  for (let j = 0; j < keyNum; j++) {
9822
- const stepDivHit = document.querySelector(`#stepHit${j}`);
9783
+ const stepDivHit = document.getElementById(`stepHit${j}`);
9823
9784
 
9824
9785
  // ダミー矢印
9825
9786
  for (let k = g_workObj.judgDummyArrowCnt[j]; k <= dummyArrowCnts[j]; k++) {
@@ -9855,7 +9816,7 @@ const mainInit = _ => {
9855
9816
  g_scoreObj.wordData[currentFrame]?.forEach(tmpObj => {
9856
9817
  g_wordObj.wordDir = tmpObj[0];
9857
9818
  g_wordObj.wordDat = tmpObj[1];
9858
- g_wordSprite = document.querySelector(`#lblword${g_wordObj.wordDir}`);
9819
+ g_wordSprite = document.getElementById(`lblword${g_wordObj.wordDir}`);
9859
9820
 
9860
9821
  const wordDepth = Number(g_wordObj.wordDir);
9861
9822
  if (g_wordObj.wordDat.substring(0, 5) === `[fade`) {
@@ -9901,13 +9862,13 @@ const mainInit = _ => {
9901
9862
 
9902
9863
  // 判定キャラクタ消去
9903
9864
  jdgGroups.forEach(jdg => {
9904
- let charaJCnt = document.querySelector(`#chara${jdg}`).getAttribute(`cnt`);
9865
+ let charaJCnt = document.getElementById(`chara${jdg}`).getAttribute(`cnt`);
9905
9866
  if (charaJCnt > 0) {
9906
- document.querySelector(`#chara${jdg}`).setAttribute(`cnt`, --charaJCnt);
9867
+ document.getElementById(`chara${jdg}`).setAttribute(`cnt`, --charaJCnt);
9907
9868
  if (charaJCnt === 0) {
9908
- document.querySelector(`#chara${jdg}`).textContent = ``;
9909
- document.querySelector(`#combo${jdg}`).textContent = ``;
9910
- document.querySelector(`#diff${jdg}`).textContent = ``;
9869
+ document.getElementById(`chara${jdg}`).textContent = ``;
9870
+ document.getElementById(`combo${jdg}`).textContent = ``;
9871
+ document.getElementById(`diff${jdg}`).textContent = ``;
9911
9872
  }
9912
9873
  }
9913
9874
  });
@@ -10209,7 +10170,7 @@ const judgeArrow = _j => {
10209
10170
  const judgeTargetArrow = _difFrame => {
10210
10171
  const _difCnt = Math.abs(_difFrame);
10211
10172
  const stepHitTargetArrow = _resultJdg => {
10212
- const stepDivHit = document.querySelector(`#stepHit${_j}`);
10173
+ const stepDivHit = document.getElementById(`stepHit${_j}`);
10213
10174
  stepDivHit.style.top = wUnit(currentArrow.prevY - parseFloat($id(`stepRoot${_j}`).top) - 15 + g_workObj.hitPosition * g_workObj.scrollDir[_j]);
10214
10175
  stepDivHit.style.opacity = 0.75;
10215
10176
  stepDivHit.classList.value = ``;
@@ -10306,8 +10267,8 @@ const displayDiff = (_difFrame, _fjdg = ``, _justFrames = g_headerObj.justFrames
10306
10267
  * @param {string} _state
10307
10268
  */
10308
10269
  const changeLifeColor = (_state = ``) => {
10309
- const lblLife = document.querySelector(`#lblLife`);
10310
- const lifeBar = document.querySelector(`#lifeBar`);
10270
+ const lblLife = document.getElementById(`lblLife`);
10271
+ const lifeBar = document.getElementById(`lifeBar`);
10311
10272
  if (_state !== ``) {
10312
10273
  const lifeCss = g_cssObj[`life_${_state}`];
10313
10274
  lblLife.classList.remove(g_cssObj.life_Max, g_cssObj.life_Cleared, g_cssObj.life_Failed);
@@ -10357,9 +10318,9 @@ const lifeDamage = (_excessive = false) => {
10357
10318
  const changeJudgeCharacter = (_name, _character, _fjdg = ``) => {
10358
10319
  g_resultObj[_name]++;
10359
10320
  g_currentArrows++;
10360
- document.querySelector(`#chara${_fjdg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
10361
- document.querySelector(`#chara${_fjdg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
10362
- document.querySelector(`#lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
10321
+ document.getElementById(`chara${_fjdg}J`).innerHTML = `<span class="common_${_name}">${_character}</span>`;
10322
+ document.getElementById(`chara${_fjdg}J`).setAttribute(`cnt`, C_FRM_JDGMOTION);
10323
+ document.getElementById(`lbl${toCapitalize(_name)}`).textContent = g_resultObj[_name];
10363
10324
  };
10364
10325
 
10365
10326
  /**
@@ -10489,7 +10450,7 @@ const makeFinishView = _text => {
10489
10450
  finishView.innerHTML = _text;
10490
10451
  finishView.style.opacity = 1;
10491
10452
  [`charaJ`, `comboJ`, `diffJ`, `charaFJ`, `comboFJ`, `diffFJ`].forEach(label =>
10492
- document.querySelector(`#${label}`).textContent = ``);
10453
+ document.getElementById(label).textContent = ``);
10493
10454
  };
10494
10455
 
10495
10456
  const finishViewing = _ => {
@@ -10528,7 +10489,7 @@ const resultInit = _ => {
10528
10489
  g_scoreObj[`${sprite}ResultLoopCount`] = 0;
10529
10490
  });
10530
10491
 
10531
- const divRoot = document.querySelector(`#divRoot`);
10492
+ const divRoot = document.getElementById(`divRoot`);
10532
10493
 
10533
10494
  // 曲時間制御変数
10534
10495
  let thisTime;
@@ -10789,7 +10750,7 @@ const resultInit = _ => {
10789
10750
 
10790
10751
  } else {
10791
10752
  resultWindow.appendChild(makeCssResultSymbol(`lblAutoView`, 215, g_cssObj.result_noRecord, 4, `(No Record)`));
10792
- const lblAutoView = document.querySelector(`#lblAutoView`);
10753
+ const lblAutoView = document.getElementById(`lblAutoView`);
10793
10754
  lblAutoView.style.fontSize = wUnit(20);
10794
10755
  }
10795
10756
 
@@ -10822,8 +10783,8 @@ const resultInit = _ => {
10822
10783
  jdgScore.pos, `)`),
10823
10784
  );
10824
10785
  } else {
10825
- document.querySelector(`#lbl${jdgScore.id}L1`).textContent = `(${highscoreDfObj[score] >= 0 ? "+" : "-"}`;
10826
- document.querySelector(`#lbl${jdgScore.id}LS`).textContent = Math.abs(highscoreDfObj[score]);
10786
+ document.getElementById(`lbl${jdgScore.id}L1`).textContent = `(${highscoreDfObj[score] >= 0 ? "+" : "-"}`;
10787
+ document.getElementById(`lbl${jdgScore.id}LS`).textContent = Math.abs(highscoreDfObj[score]);
10827
10788
  }
10828
10789
  });
10829
10790
 
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2023/10/31 (v34.4.1)
8
+ * Revised : 2023/11/05 (v34.5.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -176,9 +176,6 @@ const g_windowObj = {
176
176
  divRoot: { margin: `auto`, letterSpacing: `normal` },
177
177
  divBack: { background: `linear-gradient(#000000, #222222)` },
178
178
 
179
- scoreDetail: { x: 20, y: 85, w: 420, h: 236, visibility: `hidden` },
180
- detailObj: { w: 420, h: 230, visibility: `hidden` },
181
-
182
179
  colorPickSprite: { x: 0, y: 90, w: 50, h: 280 },
183
180
  };
184
181
 
@@ -191,6 +188,8 @@ const updateWindowSiz = _ => {
191
188
  difList: { x: 165, y: 60, w: 280, h: 261 + g_sHeight - 500, overflow: `auto` },
192
189
  difCover: { x: 25, y: 60, w: 140, h: 261 + g_sHeight - 500, overflow: `auto`, opacity: 0.95 },
193
190
  displaySprite: { x: 25, y: 30, w: (g_sWidth - 450) / 2, h: g_limitObj.setLblHeight * 5 },
191
+ scoreDetail: { x: 20, y: 85, w: (g_sWidth - 500) / 2 + 420, h: 236, visibility: `hidden` },
192
+ detailObj: { w: (g_sWidth - 500) / 2 + 420, h: 230, visibility: `hidden` },
194
193
  keyconSprite: { y: 88, h: g_sHeight, overflow: `auto` },
195
194
  loader: { y: g_sHeight - 10, h: 10, backgroundColor: `#333333` },
196
195
  playDataWindow: { x: g_sWidth / 2 - 225, y: 70, w: 450, h: 110 },
@@ -293,7 +292,7 @@ const updateWindowSiz = _ => {
293
292
  x: 130, y: 70, w: 200, h: 90,
294
293
  },
295
294
  dataArrowInfo2: {
296
- x: 140, y: 70, w: 275, h: 150, overflow: `auto`,
295
+ x: 140, y: 70, w: (g_sWidth - 500) / 2 + 275, h: 150, overflow: `auto`,
297
296
  },
298
297
  lnkDifInfo: {
299
298
  w: g_limitObj.difCoverWidth, borderStyle: `solid`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "34.4.1",
3
+ "version": "34.5.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {