danoniplus 33.4.1 → 33.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.
- package/js/danoni_main.js +143 -224
- package/package.json +1 -1
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/
|
|
7
|
+
* Revised : 2023/09/02
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 33.
|
|
12
|
-
const g_revisedDate = `2023/
|
|
11
|
+
const g_version = `Ver 33.5.0`;
|
|
12
|
+
const g_revisedDate = `2023/09/02`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -396,11 +396,7 @@ const makeBaseArray = (_array = [], _minLength, _defaultVal) => padArray(_array,
|
|
|
396
396
|
* @param {array} _baseArray ベースとする配列
|
|
397
397
|
*/
|
|
398
398
|
const padArray = (_array, _baseArray) => {
|
|
399
|
-
_array?.forEach((val, j) =>
|
|
400
|
-
if (hasVal(val)) {
|
|
401
|
-
_baseArray[j] = val;
|
|
402
|
-
}
|
|
403
|
-
});
|
|
399
|
+
_array?.filter(val => hasVal(val)).forEach((val, j) => _baseArray[j] = val);
|
|
404
400
|
return _baseArray;
|
|
405
401
|
};
|
|
406
402
|
|
|
@@ -943,12 +939,12 @@ const makeColorGradation = (_colorStr, { _defaultColorgrd = g_headerObj.defaultC
|
|
|
943
939
|
// 色情報からグラデーションを作成
|
|
944
940
|
const tmpColorStr = tmpBackgroundStr[0].split(`@`);
|
|
945
941
|
const colorArray = tmpColorStr[0].split(`:`);
|
|
946
|
-
|
|
947
|
-
colorArray[j] = colorCdPadding(_colorCdPaddingUse, colorToHex(
|
|
948
|
-
if (isColorCd(
|
|
942
|
+
colorArray.forEach((colorCd, j) => {
|
|
943
|
+
colorArray[j] = colorCdPadding(_colorCdPaddingUse, colorToHex(colorCd.replaceAll(`0x`, `#`)));
|
|
944
|
+
if (isColorCd(colorCd) && colorCd.length === 7) {
|
|
949
945
|
colorArray[j] += alphaVal;
|
|
950
946
|
}
|
|
951
|
-
}
|
|
947
|
+
});
|
|
952
948
|
|
|
953
949
|
const gradationType = (tmpColorStr.length > 1 ? tmpColorStr[1] : `linear-gradient`);
|
|
954
950
|
const defaultDir = `to ${(_objType === 'titleArrow' ? 'left' : 'right')}, `;
|
|
@@ -1785,14 +1781,13 @@ const drawMainStyleData = (_frame) =>
|
|
|
1785
1781
|
* タイトル・リザルトモーションの描画
|
|
1786
1782
|
* @param {string} _displayName
|
|
1787
1783
|
*/
|
|
1788
|
-
const drawTitleResultMotion = _displayName =>
|
|
1784
|
+
const drawTitleResultMotion = _displayName =>
|
|
1789
1785
|
g_animationData.forEach(sprite => {
|
|
1790
1786
|
const spriteName = `${sprite}${toCapitalize(_displayName)}`;
|
|
1791
1787
|
if (g_headerObj[`${spriteName}Data`][g_scoreObj[`${spriteName}FrameNum`]] !== undefined) {
|
|
1792
1788
|
g_scoreObj[`${spriteName}FrameNum`] = g_animationFunc.draw[sprite](g_scoreObj[`${spriteName}FrameNum`], _displayName, sprite);
|
|
1793
1789
|
}
|
|
1794
1790
|
});
|
|
1795
|
-
};
|
|
1796
1791
|
|
|
1797
1792
|
/*-----------------------------------------------------------*/
|
|
1798
1793
|
/* その他の共通設定 */
|
|
@@ -2039,10 +2034,9 @@ const initialControl = async () => {
|
|
|
2039
2034
|
});
|
|
2040
2035
|
|
|
2041
2036
|
// デフォルトのカラー・シャッフルグループ設定を退避
|
|
2042
|
-
g_keycons.groups.forEach(type =>
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
});
|
|
2037
|
+
g_keycons.groups.forEach(type =>
|
|
2038
|
+
Object.keys(g_keyObj).filter(val => val.startsWith(type))
|
|
2039
|
+
.forEach(property => g_keyObj[`${property}d`] = structuredClone(g_keyObj[property])));
|
|
2046
2040
|
|
|
2047
2041
|
// 自動横幅拡張設定
|
|
2048
2042
|
if (g_headerObj.autoSpread) {
|
|
@@ -2186,11 +2180,8 @@ const loadLocalStorage = _ => {
|
|
|
2186
2180
|
}
|
|
2187
2181
|
|
|
2188
2182
|
// 廃棄済みリストからデータを消去
|
|
2189
|
-
g_storeSettingsEx.
|
|
2190
|
-
|
|
2191
|
-
delete g_localStorage[val];
|
|
2192
|
-
}
|
|
2193
|
-
});
|
|
2183
|
+
g_storeSettingsEx.filter(val => g_localStorage[val] !== undefined)
|
|
2184
|
+
.forEach(val => delete g_localStorage[val]);
|
|
2194
2185
|
|
|
2195
2186
|
} else {
|
|
2196
2187
|
g_localStorage = {
|
|
@@ -2210,18 +2201,15 @@ const dosConvert = (_dos = ``) => {
|
|
|
2210
2201
|
|
|
2211
2202
|
const obj = {};
|
|
2212
2203
|
const paramsTmp = g_enableAmpersandSplit ? _dos.split(`&`).join(`|`) : _dos;
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
const
|
|
2216
|
-
|
|
2217
|
-
const pKey = params[j].substring(0, pos);
|
|
2218
|
-
const pValue = params[j].substring(pos + 1);
|
|
2204
|
+
paramsTmp.split(`|`).filter(param => param.indexOf(`=`) > 0).forEach(param => {
|
|
2205
|
+
const pos = param.indexOf(`=`);
|
|
2206
|
+
const pKey = param.substring(0, pos);
|
|
2207
|
+
const pValue = param.substring(pos + 1);
|
|
2219
2208
|
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
}
|
|
2209
|
+
if (pKey !== undefined) {
|
|
2210
|
+
obj[pKey] = g_enableDecodeURI ? decodeURIComponent(pValue) : pValue;
|
|
2223
2211
|
}
|
|
2224
|
-
}
|
|
2212
|
+
});
|
|
2225
2213
|
return obj;
|
|
2226
2214
|
};
|
|
2227
2215
|
|
|
@@ -2244,10 +2232,8 @@ const loadChartFile = async (_scoreId = g_stateObj.scoreId) => {
|
|
|
2244
2232
|
|
|
2245
2233
|
// 譜面分割あり、譜面番号固定時のみ譜面データを一時クリア
|
|
2246
2234
|
if (queryDos !== `` && g_stateObj.dosDivideFlg && g_stateObj.scoreLockFlg) {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
});
|
|
2250
|
-
scoreList.forEach(scoredata => g_rootObj[scoredata] = ``);
|
|
2235
|
+
Object.keys(g_rootObj).filter(data => fuzzyListMatching(data, g_checkStr.resetDosHeader, g_checkStr.resetDosFooter))
|
|
2236
|
+
.forEach(scoredata => g_rootObj[scoredata] = ``);
|
|
2251
2237
|
}
|
|
2252
2238
|
|
|
2253
2239
|
// HTML埋め込みdos
|
|
@@ -2303,13 +2289,9 @@ const resetColorAndGauge = _scoreId => {
|
|
|
2303
2289
|
const copySetColor = (_baseObj, _scoreId) => {
|
|
2304
2290
|
const obj = {};
|
|
2305
2291
|
const scoreIdHeader = setScoreIdHeader(_scoreId);
|
|
2306
|
-
[``, `Shadow`].forEach(pattern =>
|
|
2307
|
-
[`set`, `frz`].
|
|
2308
|
-
|
|
2309
|
-
obj[`${arrow}${pattern}Color${scoreIdHeader}`] = _baseObj[`${arrow}${pattern}Color`].concat();
|
|
2310
|
-
}
|
|
2311
|
-
});
|
|
2312
|
-
});
|
|
2292
|
+
[``, `Shadow`].forEach(pattern =>
|
|
2293
|
+
[`set`, `frz`].filter(arrow => hasVal(_baseObj[`${arrow}${pattern}Color`]))
|
|
2294
|
+
.forEach(arrow => obj[`${arrow}${pattern}Color${scoreIdHeader}`] = _baseObj[`${arrow}${pattern}Color`].concat()));
|
|
2313
2295
|
return obj;
|
|
2314
2296
|
};
|
|
2315
2297
|
|
|
@@ -2446,17 +2428,17 @@ const calcLevel = _scoreObj => {
|
|
|
2446
2428
|
const frzStartData = [];
|
|
2447
2429
|
const frzEndData = [];
|
|
2448
2430
|
|
|
2449
|
-
|
|
2450
|
-
if (
|
|
2451
|
-
for (let k = 0; k <
|
|
2452
|
-
_scoreObj.arrowData[j].push(
|
|
2453
|
-
frzStartData.push(
|
|
2454
|
-
frzEndData.push(
|
|
2431
|
+
_scoreObj.frzData.forEach((frzs, j) => {
|
|
2432
|
+
if (frzs.length > 1) {
|
|
2433
|
+
for (let k = 0; k < frzs.length; k += 2) {
|
|
2434
|
+
_scoreObj.arrowData[j].push(frzs[k]);
|
|
2435
|
+
frzStartData.push(frzs[k]);
|
|
2436
|
+
frzEndData.push(frzs[k + 1]);
|
|
2455
2437
|
}
|
|
2456
2438
|
}
|
|
2457
2439
|
_scoreObj.arrowData[j] = _scoreObj.arrowData[j].sort((a, b) => a - b)
|
|
2458
2440
|
.filter((x, i, self) => self.indexOf(x) === i && !isNaN(parseFloat(x)));
|
|
2459
|
-
}
|
|
2441
|
+
})
|
|
2460
2442
|
|
|
2461
2443
|
frzStartData.sort((a, b) => a - b);
|
|
2462
2444
|
frzEndData.sort((a, b) => a - b);
|
|
@@ -2484,7 +2466,7 @@ const calcLevel = _scoreObj => {
|
|
|
2484
2466
|
|
|
2485
2467
|
allScorebook.sort((a, b) => a - b);
|
|
2486
2468
|
allScorebook.unshift(allScorebook[0] - 100);
|
|
2487
|
-
allScorebook.push(allScorebook
|
|
2469
|
+
allScorebook.push(allScorebook.at(-1) + 100);
|
|
2488
2470
|
const allCnt = allScorebook.length;
|
|
2489
2471
|
|
|
2490
2472
|
frzEndData.push(allScorebook[allCnt - 1]);
|
|
@@ -2553,14 +2535,12 @@ const calcLevel = _scoreObj => {
|
|
|
2553
2535
|
//<同方向連打補正>
|
|
2554
2536
|
// 同方向矢印(フリーズアロー)の隣接間隔が10フレーム未満の場合に加算する。
|
|
2555
2537
|
//--------------------------------------------------------------
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
levelcount += 10 / Math.pow(adjacantFrame, 2) - 1 / 10;
|
|
2538
|
+
_scoreObj.arrowData.forEach(arrows =>
|
|
2539
|
+
arrows.forEach((val, k) => {
|
|
2540
|
+
if (arrows[k + 1] - arrows[k] < 10) {
|
|
2541
|
+
levelcount += 10 / Math.pow(arrows[k + 1] - arrows[k], 2) - 1 / 10;
|
|
2561
2542
|
}
|
|
2562
|
-
}
|
|
2563
|
-
}
|
|
2543
|
+
}));
|
|
2564
2544
|
|
|
2565
2545
|
//--------------------------------------------------------------
|
|
2566
2546
|
//<表示>
|
|
@@ -2630,11 +2610,9 @@ const preheaderConvert = _dosObj => {
|
|
|
2630
2610
|
obj.stepRtnUse = true;
|
|
2631
2611
|
|
|
2632
2612
|
const setJsFiles = (_files, _defaultDir, _type = `custom`) =>
|
|
2633
|
-
_files.forEach(file => {
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
obj.jsData.push([_type === `skin` ? `danoni_skin_${jsFile}.js` : jsFile, jsDir]);
|
|
2637
|
-
}
|
|
2613
|
+
_files.filter(file => hasVal(file)).forEach(file => {
|
|
2614
|
+
const [jsFile, jsDir] = getFilePath(file, _defaultDir);
|
|
2615
|
+
obj.jsData.push([_type === `skin` ? `danoni_skin_${jsFile}.js` : jsFile, jsDir]);
|
|
2638
2616
|
});
|
|
2639
2617
|
|
|
2640
2618
|
// 外部スキンファイルの指定
|
|
@@ -2982,9 +2960,8 @@ const headerConvert = _dosObj => {
|
|
|
2982
2960
|
obj.blankFrameDef = obj.blankFrameDefs[0];
|
|
2983
2961
|
|
|
2984
2962
|
// 開始フレーム数(0以外の場合はフェードインスタート)、終了フレーム数
|
|
2985
|
-
[`startFrame`, `endFrame`].filter(tmpParam => hasVal(_dosObj[tmpParam]))
|
|
2986
|
-
obj[param] = _dosObj[param].split(`$`).map(frame => transTimerToFrame(frame));
|
|
2987
|
-
});
|
|
2963
|
+
[`startFrame`, `endFrame`].filter(tmpParam => hasVal(_dosObj[tmpParam]))
|
|
2964
|
+
.forEach(param => obj[param] = _dosObj[param].split(`$`).map(frame => transTimerToFrame(frame)));
|
|
2988
2965
|
|
|
2989
2966
|
// フェードアウトフレーム数(譜面別)
|
|
2990
2967
|
if (hasVal(_dosObj.fadeFrame)) {
|
|
@@ -3040,11 +3017,8 @@ const headerConvert = _dosObj => {
|
|
|
3040
3017
|
|
|
3041
3018
|
// 初期表示する部分キーの設定
|
|
3042
3019
|
obj.keyGroupOrder = [];
|
|
3043
|
-
_dosObj.keyGroupOrder?.split(`$`).
|
|
3044
|
-
|
|
3045
|
-
obj.keyGroupOrder[j] = val.split(`,`);
|
|
3046
|
-
}
|
|
3047
|
-
});
|
|
3020
|
+
_dosObj.keyGroupOrder?.split(`$`).filter(val => val !== ``)
|
|
3021
|
+
.forEach((val, j) => obj.keyGroupOrder[j] = val.split(`,`));
|
|
3048
3022
|
|
|
3049
3023
|
// 最終演出表示有無(noneで無効化)
|
|
3050
3024
|
obj.finishView = _dosObj.finishView ?? ``;
|
|
@@ -3053,9 +3027,8 @@ const headerConvert = _dosObj => {
|
|
|
3053
3027
|
obj.releaseDate = _dosObj.releaseDate ?? ``;
|
|
3054
3028
|
|
|
3055
3029
|
// デフォルトReady/リザルト表示の遅延時間設定
|
|
3056
|
-
[`ready`, `result`].forEach(objName =>
|
|
3057
|
-
obj[`${objName}DelayFrame`] = setIntVal(_dosObj[`${objName}DelayFrame`]);
|
|
3058
|
-
});
|
|
3030
|
+
[`ready`, `result`].forEach(objName =>
|
|
3031
|
+
obj[`${objName}DelayFrame`] = setIntVal(_dosObj[`${objName}DelayFrame`]));
|
|
3059
3032
|
|
|
3060
3033
|
// デフォルトReady表示のアニメーション時間設定
|
|
3061
3034
|
obj.readyAnimationFrame = setIntVal(_dosObj.readyAnimationFrame, 150);
|
|
@@ -3159,15 +3132,12 @@ const headerConvert = _dosObj => {
|
|
|
3159
3132
|
obj[`${option}ChainOFF`] = (_dosObj[`${option}ChainOFF`] !== undefined ? _dosObj[`${option}ChainOFF`].split(`,`) : []);
|
|
3160
3133
|
|
|
3161
3134
|
// Displayのデフォルト設定で、双方向に設定されている場合は設定をブロック
|
|
3162
|
-
g_displays.
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
}
|
|
3169
|
-
}
|
|
3170
|
-
});
|
|
3135
|
+
g_displays.filter((option2, k) =>
|
|
3136
|
+
j > k && (obj[`${option}ChainOFF`].includes(option2) && obj[`${option2}ChainOFF`].includes(option)))
|
|
3137
|
+
.forEach(() => {
|
|
3138
|
+
interlockingErrorFlg = true;
|
|
3139
|
+
makeWarningWindow(g_msgInfoObj.E_0051);
|
|
3140
|
+
});
|
|
3171
3141
|
if (!interlockingErrorFlg && obj[`${option}ChainOFF`].includes(option)) {
|
|
3172
3142
|
interlockingErrorFlg = true;
|
|
3173
3143
|
makeWarningWindow(g_msgInfoObj.E_0051);
|
|
@@ -3289,11 +3259,8 @@ const headerConvert = _dosObj => {
|
|
|
3289
3259
|
if (g_presetObj.stockForceDelList !== undefined) {
|
|
3290
3260
|
Object.assign(g_stockForceDelList, g_presetObj.stockForceDelList);
|
|
3291
3261
|
}
|
|
3292
|
-
g_fadeinStockList.
|
|
3293
|
-
|
|
3294
|
-
g_stockForceDelList[type] = makeDedupliArray(g_stockForceDelList[type], _dosObj[`${type}StockForceDel`].split(`,`));
|
|
3295
|
-
}
|
|
3296
|
-
});
|
|
3262
|
+
g_fadeinStockList.filter(type => hasVal(_dosObj[`${type}StockForceDel`]))
|
|
3263
|
+
.forEach(type => g_stockForceDelList[type] = makeDedupliArray(g_stockForceDelList[type], _dosObj[`${type}StockForceDel`].split(`,`)));
|
|
3297
3264
|
|
|
3298
3265
|
return obj;
|
|
3299
3266
|
};
|
|
@@ -3930,9 +3897,8 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3930
3897
|
// ステップゾーン位置 (posX_Y)
|
|
3931
3898
|
newKeyMultiParam(newKey, `pos`, toFloat, {
|
|
3932
3899
|
loopFunc: (k, keyheader) => {
|
|
3933
|
-
g_keyObj[`${keyheader}_${k + dfPtnNum}`].forEach((val, j) =>
|
|
3934
|
-
g_keyObj[`${keyheader}_${k + dfPtnNum}`][j] = getKeyPosNum(String(val), g_keyObj[`div${newKey}_${k + dfPtnNum}`]);
|
|
3935
|
-
});
|
|
3900
|
+
g_keyObj[`${keyheader}_${k + dfPtnNum}`].forEach((val, j) =>
|
|
3901
|
+
g_keyObj[`${keyheader}_${k + dfPtnNum}`][j] = getKeyPosNum(String(val), g_keyObj[`div${newKey}_${k + dfPtnNum}`]));
|
|
3936
3902
|
},
|
|
3937
3903
|
});
|
|
3938
3904
|
|
|
@@ -4519,8 +4485,7 @@ const nextDifficulty = (_scrollNum = 1) => {
|
|
|
4519
4485
|
* @param {string} _targetKey
|
|
4520
4486
|
*/
|
|
4521
4487
|
const makeDifList = (_difList, _targetKey = ``) => {
|
|
4522
|
-
let k = 0;
|
|
4523
|
-
let pos = 0;
|
|
4488
|
+
let k = 0, pos = 0;
|
|
4524
4489
|
g_headerObj.viewLists.forEach(j => {
|
|
4525
4490
|
const keyLabel = g_headerObj.keyLabels[j];
|
|
4526
4491
|
if (_targetKey === `` || keyLabel === _targetKey) {
|
|
@@ -4528,9 +4493,8 @@ const makeDifList = (_difList, _targetKey = ``) => {
|
|
|
4528
4493
|
if (g_headerObj.makerView) {
|
|
4529
4494
|
text += ` (${g_headerObj.creatorNames[j]})`;
|
|
4530
4495
|
}
|
|
4531
|
-
_difList.appendChild(makeDifLblCssButton(`dif${k}`, text, k, _ =>
|
|
4532
|
-
|
|
4533
|
-
}, { btnStyle: (j === g_stateObj.scoreId ? `Setting` : `Default`) }));
|
|
4496
|
+
_difList.appendChild(makeDifLblCssButton(`dif${k}`, text, k, _ => nextDifficulty(j - g_stateObj.scoreId),
|
|
4497
|
+
{ btnStyle: (j === g_stateObj.scoreId ? `Setting` : `Default`) }));
|
|
4534
4498
|
if (j === g_stateObj.scoreId) {
|
|
4535
4499
|
pos = k + 6;
|
|
4536
4500
|
}
|
|
@@ -4662,7 +4626,7 @@ const drawSpeedGraph = _scoreId => {
|
|
|
4662
4626
|
speedObj[speedType].cnt++;
|
|
4663
4627
|
}
|
|
4664
4628
|
frame.push(playingFrame);
|
|
4665
|
-
speed.push(speed
|
|
4629
|
+
speed.push(speed.at(-1));
|
|
4666
4630
|
}
|
|
4667
4631
|
});
|
|
4668
4632
|
|
|
@@ -5768,11 +5732,8 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
|
5768
5732
|
}
|
|
5769
5733
|
|
|
5770
5734
|
const isUpdate = prevPtn !== -1 && g_keyObj.prevKey !== g_keyObj.currentKey;
|
|
5771
|
-
g_keyCopyLists.multiple.
|
|
5772
|
-
|
|
5773
|
-
g_keyObj[`${header}${copyPtn}`] = structuredClone(g_keyObj[`${header}${basePtn}`]);
|
|
5774
|
-
}
|
|
5775
|
-
});
|
|
5735
|
+
g_keyCopyLists.multiple.filter(header => g_keyObj[`${header}${basePtn}`] !== undefined && isUpdate)
|
|
5736
|
+
.forEach(header => g_keyObj[`${header}${copyPtn}`] = structuredClone(g_keyObj[`${header}${basePtn}`]));
|
|
5776
5737
|
g_keyCopyLists.simple.forEach(header => g_keyObj[`${header}${copyPtn}`] = g_keyObj[`${header}${basePtn}`]);
|
|
5777
5738
|
|
|
5778
5739
|
g_keycons.groups.forEach(type => {
|
|
@@ -5997,8 +5958,7 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5997
5958
|
|
|
5998
5959
|
const dispAppearanceSlider = _ =>
|
|
5999
5960
|
[`lblAppearancePos`, `lblAppearanceBar`, `lnkLockBtn`, `lnkfilterLine`].forEach(obj =>
|
|
6000
|
-
$id(obj).visibility = g_appearanceRanges.includes(g_stateObj.appearance) ? `Visible` : `Hidden`
|
|
6001
|
-
);
|
|
5961
|
+
$id(obj).visibility = g_appearanceRanges.includes(g_stateObj.appearance) ? `Visible` : `Hidden`);
|
|
6002
5962
|
dispAppearanceSlider();
|
|
6003
5963
|
|
|
6004
5964
|
// ---------------------------------------------------
|
|
@@ -6043,10 +6003,10 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
|
|
|
6043
6003
|
}
|
|
6044
6004
|
|
|
6045
6005
|
if (_headerObj[`${_name}ChainOFF`].length !== 0) {
|
|
6046
|
-
_headerObj[`${_name}ChainOFF`].forEach(defaultOption => {
|
|
6047
6006
|
|
|
6048
|
-
|
|
6049
|
-
|
|
6007
|
+
// 連動してOFFにするボタンの設定
|
|
6008
|
+
_headerObj[`${_name}ChainOFF`].filter(defaultOption => !includeDefaults.includes(defaultOption))
|
|
6009
|
+
.forEach(defaultOption => {
|
|
6050
6010
|
g_stateObj[`d_${defaultOption.toLowerCase()}`] = _next;
|
|
6051
6011
|
if (_buttonFlg) {
|
|
6052
6012
|
let txtDisabled = ``;
|
|
@@ -6058,8 +6018,7 @@ const interlockingButton = (_headerObj, _name, _current, _next, _buttonFlg = fal
|
|
|
6058
6018
|
}
|
|
6059
6019
|
// さらに連動する場合は設定を反転
|
|
6060
6020
|
interlockingButton(_headerObj, defaultOption, _next, _current, _buttonFlg);
|
|
6061
|
-
}
|
|
6062
|
-
});
|
|
6021
|
+
});
|
|
6063
6022
|
}
|
|
6064
6023
|
};
|
|
6065
6024
|
|
|
@@ -6686,13 +6645,12 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6686
6645
|
if (configKeyGroupList.length > 1) {
|
|
6687
6646
|
multiAppend(divRoot,
|
|
6688
6647
|
createDivCss2Label(`lblkey`, `KeySwitch`, { x: g_sWidth - 80, y: 90, w: 60, h: 20, siz: 14 }));
|
|
6689
|
-
configKeyGroupList.forEach((val, j) =>
|
|
6648
|
+
configKeyGroupList.forEach((val, j) =>
|
|
6690
6649
|
divRoot.appendChild(
|
|
6691
6650
|
createCss2Button(`key${j}`, `${j + 1}`, _ => {
|
|
6692
6651
|
appearConfigSteps(j);
|
|
6693
6652
|
}, { x: g_sWidth - 60, y: 110 + j * 20, w: 50, h: 20, siz: 14 }, g_cssObj.button_Mini),
|
|
6694
|
-
);
|
|
6695
|
-
});
|
|
6653
|
+
));
|
|
6696
6654
|
}
|
|
6697
6655
|
|
|
6698
6656
|
// カーソル位置の初期化
|
|
@@ -7128,11 +7086,8 @@ const loadingScoreInit = async () => {
|
|
|
7128
7086
|
};
|
|
7129
7087
|
const tmpObj = scoreConvert(g_rootObj, g_stateObj.scoreId, preblankFrame, dummyIdHeader);
|
|
7130
7088
|
for (let j = 0; j < keyNum; j++) {
|
|
7131
|
-
Object.keys(noteExistObj).
|
|
7132
|
-
|
|
7133
|
-
g_scoreObj[`${name}Data`][j] = structuredClone(tmpObj[`${name}Data`][j]);
|
|
7134
|
-
}
|
|
7135
|
-
});
|
|
7089
|
+
Object.keys(noteExistObj).filter(name => tmpObj[`${name}Data`][j] !== undefined && noteExistObj[name])
|
|
7090
|
+
.forEach(name => g_scoreObj[`${name}Data`][j] = structuredClone(tmpObj[`${name}Data`][j]));
|
|
7136
7091
|
}
|
|
7137
7092
|
|
|
7138
7093
|
Object.keys(g_dataMinObj).forEach(dataType =>
|
|
@@ -7660,11 +7615,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7660
7615
|
const tmpArrayData = splitLF(_data);
|
|
7661
7616
|
|
|
7662
7617
|
if (g_headerObj.wordAutoReverse === `auto`) {
|
|
7663
|
-
tmpArrayData.filter(data => hasVal(data)).forEach(
|
|
7664
|
-
if (tmpData.indexOf(`<br>`) !== -1) {
|
|
7665
|
-
wordReverseFlg = false;
|
|
7666
|
-
}
|
|
7667
|
-
});
|
|
7618
|
+
tmpArrayData.filter(data => hasVal(data) && data?.indexOf(`<br>`) !== -1).forEach(() => wordReverseFlg = false);
|
|
7668
7619
|
}
|
|
7669
7620
|
|
|
7670
7621
|
tmpArrayData.filter(data => hasVal(data)).forEach(tmpData => {
|
|
@@ -7848,8 +7799,8 @@ const getLastFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj
|
|
|
7848
7799
|
];
|
|
7849
7800
|
|
|
7850
7801
|
data.filter(data => hasVal(data)).forEach(_objData => {
|
|
7851
|
-
if (_objData
|
|
7852
|
-
tmpLastNum = _objData
|
|
7802
|
+
if (_objData.at(-1) > tmpLastNum) {
|
|
7803
|
+
tmpLastNum = _objData.at(-1);
|
|
7853
7804
|
}
|
|
7854
7805
|
});
|
|
7855
7806
|
}
|
|
@@ -7875,10 +7826,8 @@ const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7875
7826
|
];
|
|
7876
7827
|
|
|
7877
7828
|
data.filter(data => hasVal(data)).forEach(_objData => {
|
|
7878
|
-
if (
|
|
7879
|
-
|
|
7880
|
-
tmpFirstNum = _objData[0];
|
|
7881
|
-
}
|
|
7829
|
+
if (data[0] !== `` && data[0] < tmpFirstNum && data[0] + g_limitObj.adjustment > 0) {
|
|
7830
|
+
tmpFirstNum = _objData[0];
|
|
7882
7831
|
}
|
|
7883
7832
|
});
|
|
7884
7833
|
}
|
|
@@ -7984,11 +7933,8 @@ const getFirstArrivalFrame = (_startFrame, _speedOnFrame, _motionOnFrame) => {
|
|
|
7984
7933
|
const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame) => {
|
|
7985
7934
|
|
|
7986
7935
|
// 矢印・フリーズアロー・速度/色変化用 フレーム別処理配列
|
|
7987
|
-
[``, `Dummy`].forEach(header =>
|
|
7988
|
-
g_typeLists.dataList.forEach(name => {
|
|
7989
|
-
g_workObj[`mk${header}${name}`] = [];
|
|
7990
|
-
});
|
|
7991
|
-
});
|
|
7936
|
+
[``, `Dummy`].forEach(header =>
|
|
7937
|
+
g_typeLists.dataList.forEach(name => g_workObj[`mk${header}${name}`] = []));
|
|
7992
7938
|
|
|
7993
7939
|
/** 矢印の移動距離 */
|
|
7994
7940
|
g_workObj.initY = [];
|
|
@@ -8242,8 +8188,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8242
8188
|
};
|
|
8243
8189
|
|
|
8244
8190
|
// 個別・全体色変化、モーションデータ・スクロール反転データのタイミング更新
|
|
8245
|
-
[``, `dummy`].forEach(type =>
|
|
8246
|
-
calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));
|
|
8191
|
+
[``, `dummy`].forEach(type => calcDataTiming(`color`, type, pushColors, { _colorFlg: true }));
|
|
8247
8192
|
|
|
8248
8193
|
g_typeLists.arrow.forEach(header =>
|
|
8249
8194
|
calcDataTiming(`cssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
|
|
@@ -8390,9 +8335,8 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
|
|
|
8390
8335
|
allUseTypes.push(`Arrow`);
|
|
8391
8336
|
|
|
8392
8337
|
// フリーズアロー色の追随設定がある場合、対象を追加
|
|
8393
|
-
g_headerObj.frzScopeFromArrowColors.forEach(type =>
|
|
8394
|
-
baseHeaders.push(`mk${_header}FColor${type}`, `mk${_header}FColor${type}Bar`);
|
|
8395
|
-
});
|
|
8338
|
+
g_headerObj.frzScopeFromArrowColors.forEach(type =>
|
|
8339
|
+
baseHeaders.push(`mk${_header}FColor${type}`, `mk${_header}FColor${type}Bar`));
|
|
8396
8340
|
if (g_headerObj.frzScopeFromArrowColors.length > 0) {
|
|
8397
8341
|
allUseTypes.push(`Frz`);
|
|
8398
8342
|
}
|
|
@@ -8436,12 +8380,11 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg) => {
|
|
|
8436
8380
|
const ctype = (targetj >= 10 ? `Hit` : `Normal`) + (targetj % 2 === 0 ? `` : `Bar`);
|
|
8437
8381
|
const colorPos = Math.ceil((targetj % 10 - 1) / 2);
|
|
8438
8382
|
|
|
8439
|
-
g_keyObj[`color${tkObj.keyCtrlPtn}`].
|
|
8440
|
-
|
|
8383
|
+
g_keyObj[`color${tkObj.keyCtrlPtn}`].filter(cpattern => colorPos === cpattern)
|
|
8384
|
+
.forEach((cpattern, k) => {
|
|
8441
8385
|
initialize(baseHeader + ctype);
|
|
8442
8386
|
pushColor(baseHeader + ctype, k + addAll);
|
|
8443
|
-
}
|
|
8444
|
-
});
|
|
8387
|
+
});
|
|
8445
8388
|
});
|
|
8446
8389
|
}
|
|
8447
8390
|
|
|
@@ -8573,11 +8516,8 @@ const getArrowSettings = _ => {
|
|
|
8573
8516
|
g_workObj[`arrowColors${type}`] = [];
|
|
8574
8517
|
g_workObj[`dummyArrowColors${type}`] = [];
|
|
8575
8518
|
|
|
8576
|
-
[`frz`, `dummyFrz`].forEach(arrowType =>
|
|
8577
|
-
g_typeLists.frzColor.forEach(frzType => {
|
|
8578
|
-
g_workObj[`${arrowType}${frzType}Colors${type}`] = [];
|
|
8579
|
-
});
|
|
8580
|
-
});
|
|
8519
|
+
[`frz`, `dummyFrz`].forEach(arrowType =>
|
|
8520
|
+
g_typeLists.frzColor.forEach(frzType => g_workObj[`${arrowType}${frzType}Colors${type}`] = []));
|
|
8581
8521
|
});
|
|
8582
8522
|
|
|
8583
8523
|
// モーション管理
|
|
@@ -8766,11 +8706,9 @@ const mainInit = _ => {
|
|
|
8766
8706
|
|
|
8767
8707
|
// 背景・マスクモーション、スキン変更(0フレーム指定)
|
|
8768
8708
|
if (g_scoreObj.frameNum === 0) {
|
|
8769
|
-
g_animationData.forEach(sprite => {
|
|
8770
|
-
|
|
8771
|
-
|
|
8772
|
-
g_scoreObj[`${sprite}Data`][0] = undefined;
|
|
8773
|
-
}
|
|
8709
|
+
g_animationData.filter(sprite => g_scoreObj[`${sprite}Data`][0] !== undefined).forEach(sprite => {
|
|
8710
|
+
g_animationFunc.drawMain[sprite](0, sprite);
|
|
8711
|
+
g_scoreObj[`${sprite}Data`][0] = undefined;
|
|
8774
8712
|
});
|
|
8775
8713
|
}
|
|
8776
8714
|
|
|
@@ -8853,9 +8791,7 @@ const mainInit = _ => {
|
|
|
8853
8791
|
if (g_appearanceRanges.includes(g_stateObj.appearance)) {
|
|
8854
8792
|
mainSprite.appendChild(createDivCss2Label(`filterView`, ``, g_lblPosObj.filterView));
|
|
8855
8793
|
if (g_stateObj.d_filterline === C_FLG_ON) {
|
|
8856
|
-
[`filterBar0`, `filterBar1`, `filterView`].forEach(obj =>
|
|
8857
|
-
$id(obj).opacity = g_stateObj.opacity / 100;
|
|
8858
|
-
});
|
|
8794
|
+
[`filterBar0`, `filterBar1`, `filterView`].forEach(obj => $id(obj).opacity = g_stateObj.opacity / 100);
|
|
8859
8795
|
}
|
|
8860
8796
|
}
|
|
8861
8797
|
|
|
@@ -9157,13 +9093,12 @@ const mainInit = _ => {
|
|
|
9157
9093
|
const matchKeys = g_workObj.keyCtrlN;
|
|
9158
9094
|
|
|
9159
9095
|
for (let j = 0; j < keyNum; j++) {
|
|
9160
|
-
matchKeys[j].
|
|
9161
|
-
|
|
9096
|
+
matchKeys[j].filter((key, k) => _keyCode === key && !g_workObj.keyHitFlg[j][k] && !g_judgObj.lockFlgs[j])
|
|
9097
|
+
.forEach(() => {
|
|
9162
9098
|
g_judgObj.lockFlgs[j] = true;
|
|
9163
9099
|
judgeArrow(j);
|
|
9164
9100
|
g_judgObj.lockFlgs[j] = false;
|
|
9165
|
-
}
|
|
9166
|
-
});
|
|
9101
|
+
});
|
|
9167
9102
|
}
|
|
9168
9103
|
},
|
|
9169
9104
|
|
|
@@ -9763,11 +9698,8 @@ const mainInit = _ => {
|
|
|
9763
9698
|
}
|
|
9764
9699
|
|
|
9765
9700
|
// 背景・マスクモーション、スキン変更
|
|
9766
|
-
g_animationData.
|
|
9767
|
-
|
|
9768
|
-
g_animationFunc.drawMain[sprite](currentFrame, sprite);
|
|
9769
|
-
}
|
|
9770
|
-
});
|
|
9701
|
+
g_animationData.filter(sprite => g_scoreObj[`${sprite}Data`][currentFrame] !== undefined)
|
|
9702
|
+
.forEach(sprite => g_animationFunc.drawMain[sprite](currentFrame, sprite));
|
|
9771
9703
|
|
|
9772
9704
|
// フェードイン・アウト
|
|
9773
9705
|
const isFadeOutArea = currentFrame >= g_scoreObj.fadeOutFrame && currentFrame < g_scoreObj.fadeOutFrame + g_scoreObj.fadeOutTerm;
|
|
@@ -9915,11 +9847,9 @@ const mainInit = _ => {
|
|
|
9915
9847
|
|
|
9916
9848
|
// フェードイン・アウト処理後、表示する歌詞を表示
|
|
9917
9849
|
const fadingFlg = currentFrame - g_workObj.lastFadeFrame[wordDepth] >= g_workObj.wordFadeFrame[wordDepth];
|
|
9918
|
-
[`Out`, `In`].forEach(pattern => {
|
|
9919
|
-
|
|
9920
|
-
|
|
9921
|
-
g_wordObj[`fade${pattern}Flg${g_wordObj.wordDir}`] = false;
|
|
9922
|
-
}
|
|
9850
|
+
[`Out`, `In`].filter(pattern => g_wordObj[`fade${pattern}Flg${g_wordObj.wordDir}`] && fadingFlg).forEach(pattern => {
|
|
9851
|
+
g_wordSprite.style.animationName = `none`;
|
|
9852
|
+
g_wordObj[`fade${pattern}Flg${g_wordObj.wordDir}`] = false;
|
|
9923
9853
|
});
|
|
9924
9854
|
g_workObj[`word${g_wordObj.wordDir}Data`] = g_wordObj.wordDat;
|
|
9925
9855
|
g_wordSprite.innerHTML = g_wordObj.wordDat;
|
|
@@ -10807,16 +10737,12 @@ const resultInit = _ => {
|
|
|
10807
10737
|
if (highscoreCondition) {
|
|
10808
10738
|
|
|
10809
10739
|
// ハイスコア差分描画
|
|
10810
|
-
Object.keys(jdgScoreObj).forEach(score =>
|
|
10811
|
-
|
|
10812
|
-
|
|
10813
|
-
|
|
10814
|
-
|
|
10815
|
-
|
|
10816
|
-
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}L2`, C_RLT_BRACKET_R, g_cssObj.result_scoreHiBlanket, jdgScoreObj[score].pos, `)`),
|
|
10817
|
-
);
|
|
10818
|
-
}
|
|
10819
|
-
});
|
|
10740
|
+
Object.keys(jdgScoreObj).filter(score => score !== `score`).forEach(score =>
|
|
10741
|
+
multiAppend(resultWindow,
|
|
10742
|
+
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}L1`, C_RLT_BRACKET_L, g_cssObj.result_scoreHiBlanket, jdgScoreObj[score].pos, `(+`),
|
|
10743
|
+
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}LS`, C_RLT_HIDIF_X, g_cssObj.result_scoreHi, jdgScoreObj[score].pos, 0, C_ALIGN_RIGHT),
|
|
10744
|
+
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}L2`, C_RLT_BRACKET_R, g_cssObj.result_scoreHiBlanket, jdgScoreObj[score].pos, `)`),
|
|
10745
|
+
));
|
|
10820
10746
|
|
|
10821
10747
|
} else {
|
|
10822
10748
|
resultWindow.appendChild(makeCssResultSymbol(`lblAutoView`, 215, g_cssObj.result_noRecord, 4, `(No Record)`));
|
|
@@ -10829,26 +10755,14 @@ const resultInit = _ => {
|
|
|
10829
10755
|
|
|
10830
10756
|
if (highscoreCondition) {
|
|
10831
10757
|
|
|
10832
|
-
|
|
10833
|
-
|
|
10834
|
-
|
|
10835
|
-
|
|
10836
|
-
}
|
|
10837
|
-
});
|
|
10838
|
-
} else {
|
|
10839
|
-
Object.keys(jdgScoreObj).forEach(judge => {
|
|
10840
|
-
if (judge !== ``) {
|
|
10841
|
-
highscoreDfObj[judge] = g_resultObj[judge];
|
|
10842
|
-
}
|
|
10843
|
-
});
|
|
10844
|
-
}
|
|
10758
|
+
Object.keys(jdgScoreObj).filter(judge => judge !== ``)
|
|
10759
|
+
.forEach(judge => highscoreDfObj[judge] = g_resultObj[judge] -
|
|
10760
|
+
(scoreName in g_localStorage.highscores ? g_localStorage.highscores[scoreName][judge] : 0));
|
|
10761
|
+
|
|
10845
10762
|
if (highscoreDfObj.score > 0 && g_stateObj.dataSaveFlg) {
|
|
10846
10763
|
g_localStorage.highscores[scoreName] = {};
|
|
10847
|
-
Object.keys(jdgScoreObj).
|
|
10848
|
-
|
|
10849
|
-
g_localStorage.highscores[scoreName][judge] = g_resultObj[judge];
|
|
10850
|
-
}
|
|
10851
|
-
});
|
|
10764
|
+
Object.keys(jdgScoreObj).filter(judge => judge !== ``)
|
|
10765
|
+
.forEach(judge => g_localStorage.highscores[scoreName][judge] = g_resultObj[judge]);
|
|
10852
10766
|
localStorage.setItem(g_localStorageUrl, JSON.stringify(g_localStorage));
|
|
10853
10767
|
}
|
|
10854
10768
|
|
|
@@ -10989,24 +10903,7 @@ const resultInit = _ => {
|
|
|
10989
10903
|
|
|
10990
10904
|
tmpDiv.appendChild(canvas);
|
|
10991
10905
|
|
|
10992
|
-
|
|
10993
|
-
if (ClipboardItem === undefined) {
|
|
10994
|
-
throw new Error(`error`);
|
|
10995
|
-
}
|
|
10996
|
-
// Canvas の内容を PNG 画像として取得
|
|
10997
|
-
canvas.toBlob(async blob => {
|
|
10998
|
-
await navigator.clipboard.write([
|
|
10999
|
-
new ClipboardItem({
|
|
11000
|
-
'image/png': blob
|
|
11001
|
-
})
|
|
11002
|
-
]);
|
|
11003
|
-
});
|
|
11004
|
-
tmpDiv.removeChild(canvas);
|
|
11005
|
-
divRoot.removeChild(tmpDiv);
|
|
11006
|
-
makeInfoWindow(_msg, `leftToRightFade`);
|
|
11007
|
-
|
|
11008
|
-
} catch (err) {
|
|
11009
|
-
// 画像をクリップボードへコピーできないときは代替で画像保存可能な画面を表示
|
|
10906
|
+
const viewResultImage = _ => {
|
|
11010
10907
|
if (document.getElementById(`tmpClose`) === null) {
|
|
11011
10908
|
divRoot.oncontextmenu = _ => true;
|
|
11012
10909
|
makeLinkButton(tmpDiv, `Tmp`);
|
|
@@ -11020,6 +10917,31 @@ const resultInit = _ => {
|
|
|
11020
10917
|
}), g_cssObj.button_Back));
|
|
11021
10918
|
tmpDiv.appendChild(createDescDiv(`resultImageDesc`, g_lblNameObj.resultImageDesc));
|
|
11022
10919
|
}
|
|
10920
|
+
};
|
|
10921
|
+
|
|
10922
|
+
try {
|
|
10923
|
+
if (ClipboardItem === undefined) {
|
|
10924
|
+
throw new Error(`error`);
|
|
10925
|
+
}
|
|
10926
|
+
if (keyIsDown(g_kCdNameObj.shiftLKey) || keyIsDown(g_kCdNameObj.shiftRKey)) {
|
|
10927
|
+
viewResultImage();
|
|
10928
|
+
} else {
|
|
10929
|
+
// Canvas の内容を PNG 画像として取得
|
|
10930
|
+
canvas.toBlob(async blob => {
|
|
10931
|
+
await navigator.clipboard.write([
|
|
10932
|
+
new ClipboardItem({
|
|
10933
|
+
'image/png': blob
|
|
10934
|
+
})
|
|
10935
|
+
]);
|
|
10936
|
+
});
|
|
10937
|
+
tmpDiv.removeChild(canvas);
|
|
10938
|
+
divRoot.removeChild(tmpDiv);
|
|
10939
|
+
makeInfoWindow(_msg, `leftToRightFade`);
|
|
10940
|
+
}
|
|
10941
|
+
|
|
10942
|
+
} catch (err) {
|
|
10943
|
+
// 画像をクリップボードへコピーできないときは代替で画像保存可能な画面を表示
|
|
10944
|
+
viewResultImage();
|
|
11023
10945
|
}
|
|
11024
10946
|
};
|
|
11025
10947
|
|
|
@@ -11080,14 +11002,11 @@ const resultInit = _ => {
|
|
|
11080
11002
|
}
|
|
11081
11003
|
|
|
11082
11004
|
// リザルトモーションの0フレーム対応
|
|
11083
|
-
g_animationData.
|
|
11084
|
-
|
|
11085
|
-
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
}
|
|
11089
|
-
}
|
|
11090
|
-
});
|
|
11005
|
+
g_animationData.filter(sprite => g_scoreObj[`${sprite}ResultFrameNum`] === 0 && g_headerObj[`${sprite}ResultData`][0] !== undefined)
|
|
11006
|
+
.forEach(sprite => {
|
|
11007
|
+
g_scoreObj[`${sprite}ResultFrameNum`] = g_animationFunc.draw[sprite](0, `result`, sprite);
|
|
11008
|
+
g_headerObj[`${sprite}ResultData`][0] = undefined;
|
|
11009
|
+
});
|
|
11091
11010
|
|
|
11092
11011
|
/**
|
|
11093
11012
|
* タイトルのモーション設定
|