danoniplus 36.5.0 → 37.0.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 +48 -22
- package/js/lib/danoni_constants.js +5 -44
- 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 : 2024/06/
|
|
7
|
+
* Revised : 2024/06/15
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver
|
|
12
|
-
const g_revisedDate = `2024/06/
|
|
11
|
+
const g_version = `Ver 37.0.0`;
|
|
12
|
+
const g_revisedDate = `2024/06/15`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -55,7 +55,6 @@ window.onload = async () => {
|
|
|
55
55
|
// ロード直後に定数・初期化ファイル、旧バージョン定義関数を読込
|
|
56
56
|
await loadScript2(`${g_rootPath}../js/lib/danoni_localbinary.js?${g_randTime}`, false);
|
|
57
57
|
await loadScript2(`${g_rootPath}../js/lib/danoni_constants.js?${g_randTime}`);
|
|
58
|
-
await loadScript2(`${g_rootPath}../js/lib/danoni_legacy_function.js?${g_randTime}`, false);
|
|
59
58
|
initialControl();
|
|
60
59
|
};
|
|
61
60
|
|
|
@@ -6453,7 +6452,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6453
6452
|
* @param {number} _scrollNum
|
|
6454
6453
|
*/
|
|
6455
6454
|
const changeTmpShuffleNum = (_j, _scrollNum = 1) => {
|
|
6456
|
-
const tmpShuffle = changeTmpData(`shuffle`,
|
|
6455
|
+
const tmpShuffle = changeTmpData(`shuffle`, g_keyObj[`keyCtrl${keyCtrlPtn}`].length - 1, _j, _scrollNum);
|
|
6457
6456
|
document.getElementById(`sArrow${_j}`).textContent = tmpShuffle + 1;
|
|
6458
6457
|
|
|
6459
6458
|
changeShuffleConfigColor(keyCtrlPtn, g_keyObj[`shuffle${keyCtrlPtn}_${g_keycons.shuffleGroupNum}`][_j], _j);
|
|
@@ -8218,13 +8217,24 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
8218
8217
|
// キー変化定義
|
|
8219
8218
|
obj.keychFrames = [];
|
|
8220
8219
|
obj.keychTarget = [];
|
|
8220
|
+
obj.keychTargetAlpha = [];
|
|
8221
8221
|
if (hasVal(getRefData(`keych`, `${scoreIdHeader}_data`))) {
|
|
8222
8222
|
const keychdata = splitLF2(getRefData(`keych`, `${scoreIdHeader}_data`), `,`);
|
|
8223
8223
|
obj.keychFrames.push(...(keychdata.filter((val, j) => j % 2 === 0)).map(val => val === `0` ? 0 : calcFrame(val)));
|
|
8224
|
-
|
|
8224
|
+
|
|
8225
|
+
keychdata.filter((val, j) => j % 2 === 1)?.forEach(targets => {
|
|
8226
|
+
const targetKeyList = [], targetKeyAlpha = [];
|
|
8227
|
+
targets?.split(`/`).forEach(target => {
|
|
8228
|
+
targetKeyList.push(trimStr(target?.split(`:`)[0]));
|
|
8229
|
+
targetKeyAlpha.push(trimStr(target?.split(`:`)[1]) || 1);
|
|
8230
|
+
})
|
|
8231
|
+
obj.keychTarget.push(targetKeyList);
|
|
8232
|
+
obj.keychTargetAlpha.push(targetKeyAlpha);
|
|
8233
|
+
});
|
|
8225
8234
|
}
|
|
8226
8235
|
obj.keychFrames.unshift(0);
|
|
8227
|
-
obj.keychTarget.unshift(`0`);
|
|
8236
|
+
obj.keychTarget.unshift([`0`]);
|
|
8237
|
+
obj.keychTargetAlpha.unshift([1]);
|
|
8228
8238
|
|
|
8229
8239
|
return obj;
|
|
8230
8240
|
};
|
|
@@ -9257,8 +9267,8 @@ const mainInit = _ => {
|
|
|
9257
9267
|
const filterCss = g_stateObj.filterLock === C_FLG_OFF ? g_cssObj.life_Failed : g_cssObj.life_Cleared;
|
|
9258
9268
|
[`filterBar0`, `filterBar1`, `borderBar0`, `borderBar1`].forEach(obj =>
|
|
9259
9269
|
mainSprite.appendChild(createColorObject2(obj, g_lblPosObj.filterBar, filterCss)));
|
|
9260
|
-
borderBar0.style.top = wUnit(g_posObj.stepDiffY);
|
|
9261
|
-
borderBar1.style.top = wUnit(g_posObj.stepDiffY + g_posObj.arrowHeight);
|
|
9270
|
+
borderBar0.style.top = wUnit(g_posObj.stepDiffY + g_stateObj.hitPosition);
|
|
9271
|
+
borderBar1.style.top = wUnit(g_posObj.stepDiffY + g_posObj.arrowHeight - g_stateObj.hitPosition);
|
|
9262
9272
|
|
|
9263
9273
|
if (g_appearanceRanges.includes(g_stateObj.appearance)) {
|
|
9264
9274
|
mainSprite.appendChild(createDivCss2Label(`filterView`, ``, g_lblPosObj.filterView));
|
|
@@ -9543,8 +9553,17 @@ const mainInit = _ => {
|
|
|
9543
9553
|
);
|
|
9544
9554
|
}
|
|
9545
9555
|
|
|
9556
|
+
const msg = [];
|
|
9546
9557
|
if (getMusicUrl(g_stateObj.scoreId) === `nosound.mp3`) {
|
|
9547
|
-
|
|
9558
|
+
msg.push(g_msgInfoObj.I_0004);
|
|
9559
|
+
}
|
|
9560
|
+
if (g_stateObj.shuffle.indexOf(`Mirror`) !== -1 &&
|
|
9561
|
+
g_stateObj.dataSaveFlg && g_stateObj.autoAll === C_FLG_OFF &&
|
|
9562
|
+
g_keyObj[`shuffle${keyCtrlPtn}`].filter((shuffleGr, j) => shuffleGr !== g_keyObj[`shuffle${keyCtrlPtn}_0d`][j]).length > 0) {
|
|
9563
|
+
msg.push(g_msgInfoObj.I_0005);
|
|
9564
|
+
}
|
|
9565
|
+
if (msg.length > 0) {
|
|
9566
|
+
makeInfoWindow(msg.join(`<br>`), `leftToRightFade`, { _x: g_workObj.playingX, _y: g_headerObj.playingY });
|
|
9548
9567
|
}
|
|
9549
9568
|
|
|
9550
9569
|
// ユーザカスタムイベント(初期)
|
|
@@ -10242,7 +10261,7 @@ const mainInit = _ => {
|
|
|
10242
10261
|
// キー変化
|
|
10243
10262
|
while (currentFrame >= g_scoreObj.keychFrames[keychCnts]) {
|
|
10244
10263
|
for (let j = 0; j < keyNum; j++) {
|
|
10245
|
-
appearKeyTypes(j, g_scoreObj.keychTarget[keychCnts]);
|
|
10264
|
+
appearKeyTypes(j, g_scoreObj.keychTarget[keychCnts], g_scoreObj.keychTargetAlpha[keychCnts]);
|
|
10246
10265
|
}
|
|
10247
10266
|
keychCnts++;
|
|
10248
10267
|
}
|
|
@@ -10437,8 +10456,8 @@ const changeAppearanceFilter = (_appearance, _num = 10) => {
|
|
|
10437
10456
|
$id(`arrowSprite${topNum}`).clipPath = topShape;
|
|
10438
10457
|
$id(`arrowSprite${bottomNum}`).clipPath = bottomShape;
|
|
10439
10458
|
|
|
10440
|
-
$id(`filterBar0`).top = wUnit(g_posObj.arrowHeight * _num / 100);
|
|
10441
|
-
$id(`filterBar1`).top = wUnit(g_posObj.arrowHeight * (100 - _num) / 100);
|
|
10459
|
+
$id(`filterBar0`).top = wUnit(g_posObj.arrowHeight * _num / 100 + g_stateObj.hitPosition);
|
|
10460
|
+
$id(`filterBar1`).top = wUnit(g_posObj.arrowHeight * (100 - _num) / 100 - g_stateObj.hitPosition);
|
|
10442
10461
|
|
|
10443
10462
|
if (g_appearanceRanges.includes(_appearance)) {
|
|
10444
10463
|
$id(`filterView`).top =
|
|
@@ -10473,18 +10492,23 @@ const makeCounterSymbol = (_id, _x, _class, _heightPos, _text, _display = C_DIS_
|
|
|
10473
10492
|
* @param {number} _j
|
|
10474
10493
|
* @param {string} _display
|
|
10475
10494
|
*/
|
|
10476
|
-
const appearStepZone = (_j, _display) =>
|
|
10495
|
+
const appearStepZone = (_j, _display, _alpha = 1) => {
|
|
10496
|
+
$id(`stepRoot${_j}`).display = _display;
|
|
10497
|
+
$id(`stepRoot${_j}`).opacity = _alpha;
|
|
10498
|
+
};
|
|
10477
10499
|
|
|
10478
10500
|
/**
|
|
10479
10501
|
* 部分キーのステップゾーン出現処理
|
|
10480
10502
|
* @param {number} _j
|
|
10481
|
-
* @param {
|
|
10503
|
+
* @param {array} _targets
|
|
10482
10504
|
*/
|
|
10483
|
-
const appearKeyTypes = (_j,
|
|
10505
|
+
const appearKeyTypes = (_j, _targets, _alphas = fillArray(_targets.length, 1)) => {
|
|
10484
10506
|
appearStepZone(_j, C_DIS_NONE);
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10507
|
+
_targets.forEach((target, k) => {
|
|
10508
|
+
if (g_workObj.keyGroupMaps[_j].includes(target)) {
|
|
10509
|
+
appearStepZone(_j, C_DIS_INHERIT, _alphas[k]);
|
|
10510
|
+
}
|
|
10511
|
+
});
|
|
10488
10512
|
};
|
|
10489
10513
|
|
|
10490
10514
|
/**
|
|
@@ -11082,6 +11106,8 @@ const resultInit = _ => {
|
|
|
11082
11106
|
|
|
11083
11107
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
11084
11108
|
const transKeyName = (hasVal(g_keyObj[`transKey${keyCtrlPtn}`]) ? `(${g_keyObj[`transKey${keyCtrlPtn}`]})` : ``);
|
|
11109
|
+
const orgShuffleFlg = g_keyObj[`shuffle${keyCtrlPtn}`].filter((shuffleGr, j) => shuffleGr !== g_keyObj[`shuffle${keyCtrlPtn}_0d`][j]).length === 0;
|
|
11110
|
+
const shuffleName = `${getStgDetailName(g_stateObj.shuffle)}${!orgShuffleFlg && !g_stateObj.shuffle.endsWith(`+`) ? getStgDetailName('(S)') : ''}`;
|
|
11085
11111
|
|
|
11086
11112
|
/**
|
|
11087
11113
|
* プレイスタイルのカスタム有無
|
|
@@ -11096,7 +11122,7 @@ const resultInit = _ => {
|
|
|
11096
11122
|
`${getKeyName(g_headerObj.keyLabels[g_stateObj.scoreId])}${transKeyName} ${getStgDetailName('key')} / ${g_headerObj.difLabels[g_stateObj.scoreId]}`,
|
|
11097
11123
|
`${withOptions(g_autoPlaysBase.includes(g_stateObj.autoPlay), true, `-${getStgDetailName(g_stateObj.autoPlay)}${getStgDetailName('less')}`)}`,
|
|
11098
11124
|
`${withOptions(g_headerObj.makerView, false, `(${g_headerObj.creatorNames[g_stateObj.scoreId]})`)}`,
|
|
11099
|
-
`${withOptions(g_stateObj.shuffle, C_FLG_OFF, `[${
|
|
11125
|
+
`${withOptions(g_stateObj.shuffle, C_FLG_OFF, `[${shuffleName}]`)}`
|
|
11100
11126
|
];
|
|
11101
11127
|
let difData = difDatas.filter(value => value !== ``).join(` `);
|
|
11102
11128
|
const difDataForImage = difDatas.filter((value, j) => value !== `` && j !== 2).join(` `);
|
|
@@ -11241,7 +11267,7 @@ const resultInit = _ => {
|
|
|
11241
11267
|
maxCombo: 0, fmaxCombo: 0, score: 0,
|
|
11242
11268
|
};
|
|
11243
11269
|
|
|
11244
|
-
const highscoreCondition = (g_stateObj.autoAll === C_FLG_OFF && (g_stateObj.shuffle === C_FLG_OFF || mirrorName !== ``));
|
|
11270
|
+
const highscoreCondition = (g_stateObj.autoAll === C_FLG_OFF && (g_stateObj.shuffle === C_FLG_OFF || (mirrorName !== `` && orgShuffleFlg)));
|
|
11245
11271
|
if (highscoreCondition) {
|
|
11246
11272
|
|
|
11247
11273
|
// ハイスコア差分描画
|
|
@@ -11348,7 +11374,7 @@ const resultInit = _ => {
|
|
|
11348
11374
|
const hashTag = (hasVal(g_headerObj.hashTag) ? ` ${g_headerObj.hashTag}` : ``);
|
|
11349
11375
|
let tweetDifData = `${getKeyName(g_headerObj.keyLabels[g_stateObj.scoreId])}${transKeyName}${getStgDetailName('k-')}${g_headerObj.difLabels[g_stateObj.scoreId]}${assistFlg}`;
|
|
11350
11376
|
if (g_stateObj.shuffle !== `OFF`) {
|
|
11351
|
-
tweetDifData += `:${
|
|
11377
|
+
tweetDifData += `:${shuffleName}`;
|
|
11352
11378
|
}
|
|
11353
11379
|
const twiturl = new URL(g_localStorageUrl);
|
|
11354
11380
|
twiturl.searchParams.append(`scoreId`, g_stateObj.scoreId);
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2024/06/
|
|
8
|
+
* Revised : 2024/06/15 (v37.0.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -23,45 +23,6 @@ const C_VALIGN_BOTTOM = `bottom`;
|
|
|
23
23
|
|
|
24
24
|
const C_LBL_BASICFONT = `"Meiryo UI", sans-serif`;
|
|
25
25
|
|
|
26
|
-
/** 廃止予定の定数群 */
|
|
27
|
-
const C_LBL_TITLESIZE = 32;
|
|
28
|
-
const C_LBL_BTNSIZE = 28;
|
|
29
|
-
const C_LBL_LNKSIZE = 16;
|
|
30
|
-
|
|
31
|
-
const C_BTN_HEIGHT = 50;
|
|
32
|
-
const C_LNK_HEIGHT = 30;
|
|
33
|
-
const C_LEN_SETLBL_LEFT = 160;
|
|
34
|
-
const C_LEN_SETLBL_WIDTH = 210;
|
|
35
|
-
const C_LEN_DIFSELECTOR_WIDTH = 250;
|
|
36
|
-
const C_LEN_DIFCOVER_WIDTH = 110;
|
|
37
|
-
const C_LEN_SETLBL_HEIGHT = 22;
|
|
38
|
-
const C_SIZ_SETLBL = 17;
|
|
39
|
-
const C_LEN_SETDIFLBL_HEIGHT = 25;
|
|
40
|
-
const C_SIZ_SETDIFLBL = 17;
|
|
41
|
-
const C_LEN_SETMINI_WIDTH = 40;
|
|
42
|
-
const C_SIZ_SETMINI = 18;
|
|
43
|
-
const C_SIZ_DIFSELECTOR = 14;
|
|
44
|
-
const C_SIZ_MAIN = 14;
|
|
45
|
-
const C_SIZ_MUSIC_TITLE = 13;
|
|
46
|
-
|
|
47
|
-
const C_LEN_JDGCHARA_WIDTH = 200;
|
|
48
|
-
const C_LEN_JDGCHARA_HEIGHT = 20;
|
|
49
|
-
const C_SIZ_JDGCHARA = 20;
|
|
50
|
-
|
|
51
|
-
const C_LEN_JDGCNTS_WIDTH = 100;
|
|
52
|
-
const C_LEN_JDGCNTS_HEIGHT = 20;
|
|
53
|
-
const C_SIZ_JDGCNTS = 16;
|
|
54
|
-
|
|
55
|
-
const C_LEN_GRAPH_WIDTH = 286;
|
|
56
|
-
const C_LEN_GRAPH_HEIGHT = 226;
|
|
57
|
-
const C_CLR_SPEEDGRAPH_SPEED = `#cc3333`;
|
|
58
|
-
const C_CLR_SPEEDGRAPH_BOOST = `#999900`;
|
|
59
|
-
const C_CLR_DENSITY_MAX = `#990000cc`;
|
|
60
|
-
const C_CLR_DENSITY_DEFAULT = `#999999cc`;
|
|
61
|
-
const C_LEN_DENSITY_DIVISION = 16;
|
|
62
|
-
|
|
63
|
-
const C_MAX_ADJUSTMENT = 30;
|
|
64
|
-
|
|
65
26
|
/** 設定幅、位置などを管理するプロパティ */
|
|
66
27
|
const g_limitObj = {
|
|
67
28
|
|
|
@@ -122,9 +83,6 @@ const g_limitObj = {
|
|
|
122
83
|
|
|
123
84
|
// キーコンフィグで表示するカラーピッカー数
|
|
124
85
|
kcColorPickerNum: 5,
|
|
125
|
-
|
|
126
|
-
// キーコンフィグで設定できるシャッフルグループ上限数
|
|
127
|
-
kcShuffleNums: 20,
|
|
128
86
|
};
|
|
129
87
|
|
|
130
88
|
/** 設定項目の位置 */
|
|
@@ -2856,6 +2814,7 @@ const g_lang_msgInfoObj = {
|
|
|
2856
2814
|
I_0002: `入力したキーは割り当てできません。他のキーを指定してください。`,
|
|
2857
2815
|
I_0003: `各譜面の明細情報をクリップボードにコピーしました!`,
|
|
2858
2816
|
I_0004: `musicUrlが設定されていないため、無音モードで再生します`,
|
|
2817
|
+
I_0005: `正規のミラー譜面で無いため、ハイスコアは保存されません`,
|
|
2859
2818
|
},
|
|
2860
2819
|
En: {
|
|
2861
2820
|
W_0001: `Your browser is not guaranteed to work.<br>
|
|
@@ -2905,6 +2864,7 @@ const g_lang_msgInfoObj = {
|
|
|
2905
2864
|
I_0002: `The specified key cannot be assigned. Please specify another key.`,
|
|
2906
2865
|
I_0003: `Charts information is copied to the clipboard!`,
|
|
2907
2866
|
I_0004: `Play in silence mode because "musicUrl" is not set`,
|
|
2867
|
+
I_0005: `Highscore is not saved because not a regular mirrored chart.`,
|
|
2908
2868
|
},
|
|
2909
2869
|
};
|
|
2910
2870
|
|
|
@@ -3042,6 +3002,7 @@ const g_lblNameObj = {
|
|
|
3042
3002
|
'u_Random+': `Random+`,
|
|
3043
3003
|
'u_S-Random': `S-Random`,
|
|
3044
3004
|
'u_S-Random+': `S-Random+`,
|
|
3005
|
+
'u_(S)': `(S)`,
|
|
3045
3006
|
|
|
3046
3007
|
'u_ALL': `ALL`,
|
|
3047
3008
|
'u_Onigiri': `Onigiri`,
|
|
@@ -3129,7 +3090,7 @@ const g_lblNameObj = {
|
|
|
3129
3090
|
* リンク先管理
|
|
3130
3091
|
*/
|
|
3131
3092
|
const g_linkObj = {
|
|
3132
|
-
x: `https://x.com/intent/
|
|
3093
|
+
x: `https://x.com/intent/post`,
|
|
3133
3094
|
discord: `https://discord.gg/5Hxu4wDEZR`,
|
|
3134
3095
|
};
|
|
3135
3096
|
|