danoniplus 36.6.1 → 37.0.1
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 +29 -26
- package/js/lib/danoni_constants.js +1 -40
- package/package.json +1 -1
package/js/danoni_main.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver
|
|
11
|
+
const g_version = `Ver 37.0.1`;
|
|
12
12
|
const g_revisedDate = `2024/06/20`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -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
|
|
|
@@ -7992,24 +7991,10 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7992
7991
|
return dataStr;
|
|
7993
7992
|
}
|
|
7994
7993
|
|
|
7995
|
-
/**
|
|
7996
|
-
* 譜面データの優先順配列の取得
|
|
7997
|
-
* @param {string} _header
|
|
7998
|
-
* @param {string} _type
|
|
7999
|
-
* @param {number} _scoreNo
|
|
8000
|
-
*/
|
|
8001
|
-
const getPriorityList = (_header, _type, _scoreNo) => [
|
|
8002
|
-
getRefData(_header, `${_type}${g_localeObj.val}${_scoreNo}_data`),
|
|
8003
|
-
getRefData(_header, `${_type}${g_localeObj.val}_data`),
|
|
8004
|
-
getRefData(_header, `${_type}${_scoreNo}_data`),
|
|
8005
|
-
getRefData(_header, `${_type}_data`)
|
|
8006
|
-
];
|
|
8007
|
-
|
|
8008
7994
|
/**
|
|
8009
7995
|
* 譜面データの優先順配列パターンの取得
|
|
8010
7996
|
* @param {string} _type
|
|
8011
7997
|
* @param {number} _scoreNo
|
|
8012
|
-
* @returns
|
|
8013
7998
|
*/
|
|
8014
7999
|
const getPriorityVal = (_type, _scoreNo) => [
|
|
8015
8000
|
`${_type}${g_localeObj.val}${_scoreNo}_data`,
|
|
@@ -8152,9 +8137,11 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
8152
8137
|
*/
|
|
8153
8138
|
const makeBackgroundData = (_header, _scoreNo, { resultTypes = [] } = {}) => {
|
|
8154
8139
|
const dataList = [];
|
|
8140
|
+
const animationTargets = [];
|
|
8155
8141
|
const calcFrameFunc = resultTypes.length > 0 ? undefined : calcFrame;
|
|
8156
|
-
const addDataList = (_type = ``) =>
|
|
8142
|
+
const addDataList = (_type = ``) => animationTargets.push(...getPriorityVal(_type, _scoreNo));
|
|
8157
8143
|
getPriorityHeader(resultTypes).forEach(val => addDataList(val));
|
|
8144
|
+
makeDedupliArray(animationTargets).forEach(val => dataList.push(getRefData(_header, val)));
|
|
8158
8145
|
|
|
8159
8146
|
const data = dataList.find((v) => v !== undefined);
|
|
8160
8147
|
return (data !== undefined ? g_animationFunc.make[_header](data, calcFrameFunc) : [[], -1]);
|
|
@@ -8240,13 +8227,24 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
8240
8227
|
// キー変化定義
|
|
8241
8228
|
obj.keychFrames = [];
|
|
8242
8229
|
obj.keychTarget = [];
|
|
8230
|
+
obj.keychTargetAlpha = [];
|
|
8243
8231
|
if (hasVal(getRefData(`keych`, `${scoreIdHeader}_data`))) {
|
|
8244
8232
|
const keychdata = splitLF2(getRefData(`keych`, `${scoreIdHeader}_data`), `,`);
|
|
8245
8233
|
obj.keychFrames.push(...(keychdata.filter((val, j) => j % 2 === 0)).map(val => val === `0` ? 0 : calcFrame(val)));
|
|
8246
|
-
|
|
8234
|
+
|
|
8235
|
+
keychdata.filter((val, j) => j % 2 === 1)?.forEach(targets => {
|
|
8236
|
+
const targetKeyList = [], targetKeyAlpha = [];
|
|
8237
|
+
targets?.split(`/`).forEach(target => {
|
|
8238
|
+
targetKeyList.push(trimStr(target?.split(`:`)[0]));
|
|
8239
|
+
targetKeyAlpha.push(trimStr(target?.split(`:`)[1]) || 1);
|
|
8240
|
+
})
|
|
8241
|
+
obj.keychTarget.push(targetKeyList);
|
|
8242
|
+
obj.keychTargetAlpha.push(targetKeyAlpha);
|
|
8243
|
+
});
|
|
8247
8244
|
}
|
|
8248
8245
|
obj.keychFrames.unshift(0);
|
|
8249
|
-
obj.keychTarget.unshift(`0`);
|
|
8246
|
+
obj.keychTarget.unshift([`0`]);
|
|
8247
|
+
obj.keychTargetAlpha.unshift([1]);
|
|
8250
8248
|
|
|
8251
8249
|
return obj;
|
|
8252
8250
|
};
|
|
@@ -10274,7 +10272,7 @@ const mainInit = _ => {
|
|
|
10274
10272
|
// キー変化
|
|
10275
10273
|
while (currentFrame >= g_scoreObj.keychFrames[keychCnts]) {
|
|
10276
10274
|
for (let j = 0; j < keyNum; j++) {
|
|
10277
|
-
appearKeyTypes(j, g_scoreObj.keychTarget[keychCnts]);
|
|
10275
|
+
appearKeyTypes(j, g_scoreObj.keychTarget[keychCnts], g_scoreObj.keychTargetAlpha[keychCnts]);
|
|
10278
10276
|
}
|
|
10279
10277
|
keychCnts++;
|
|
10280
10278
|
}
|
|
@@ -10505,18 +10503,23 @@ const makeCounterSymbol = (_id, _x, _class, _heightPos, _text, _display = C_DIS_
|
|
|
10505
10503
|
* @param {number} _j
|
|
10506
10504
|
* @param {string} _display
|
|
10507
10505
|
*/
|
|
10508
|
-
const appearStepZone = (_j, _display) =>
|
|
10506
|
+
const appearStepZone = (_j, _display, _alpha = 1) => {
|
|
10507
|
+
$id(`stepRoot${_j}`).display = _display;
|
|
10508
|
+
$id(`stepRoot${_j}`).opacity = _alpha;
|
|
10509
|
+
};
|
|
10509
10510
|
|
|
10510
10511
|
/**
|
|
10511
10512
|
* 部分キーのステップゾーン出現処理
|
|
10512
10513
|
* @param {number} _j
|
|
10513
|
-
* @param {
|
|
10514
|
+
* @param {array} _targets
|
|
10514
10515
|
*/
|
|
10515
|
-
const appearKeyTypes = (_j,
|
|
10516
|
+
const appearKeyTypes = (_j, _targets, _alphas = fillArray(_targets.length, 1)) => {
|
|
10516
10517
|
appearStepZone(_j, C_DIS_NONE);
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10518
|
+
_targets.forEach((target, k) => {
|
|
10519
|
+
if (g_workObj.keyGroupMaps[_j].includes(target)) {
|
|
10520
|
+
appearStepZone(_j, C_DIS_INHERIT, _alphas[k]);
|
|
10521
|
+
}
|
|
10522
|
+
});
|
|
10520
10523
|
};
|
|
10521
10524
|
|
|
10522
10525
|
/**
|
|
@@ -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
|
|