danoniplus 36.4.1 → 36.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/README.md +2 -1
- package/js/danoni_main.js +44 -9
- package/js/lib/danoni_constants.js +10 -2
- package/package.json +1 -1
- package/skin/skin_css.zip +0 -0
package/README.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://www.codefactor.io/repository/github/cwtickle/danoniplus)
|
|
4
4
|
[](https://app.codacy.com/gh/cwtickle/danoniplus/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
|
|
5
|
-
[](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
|
|
5
|
+
[](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
|
|
6
|
+
[](https://discord.gg/YVWUdUGyMy)
|
|
6
7
|
[](https://github.com/cwtickle/danoniplus/security/policy)
|
|
7
8
|
[](https://github.com/cwtickle/danoniplus/releases)
|
|
8
9
|
[](https://github.com/cwtickle/danoniplus/blob/develop/LICENSE)
|
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/
|
|
7
|
+
* Revised : 2024/06/01
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 36.
|
|
12
|
-
const g_revisedDate = `2024/05
|
|
11
|
+
const g_version = `Ver 36.5.0`;
|
|
12
|
+
const g_revisedDate = `2024/06/05`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -242,7 +242,7 @@ const convertStrToVal = _str => {
|
|
|
242
242
|
* 半角スペース、タブを文字列から除去
|
|
243
243
|
* @param {string} _str
|
|
244
244
|
*/
|
|
245
|
-
const trimStr = _str => _str?.split(`\t`).join(``).
|
|
245
|
+
const trimStr = _str => _str?.split(`\t`).join(``).replace(/^ +| +$/g, ``);
|
|
246
246
|
|
|
247
247
|
/*-----------------------------------------------------------*/
|
|
248
248
|
/* 値や配列のチェック・変換 */
|
|
@@ -1582,7 +1582,8 @@ const makeSpriteData = (_data, _calcFrame = _frame => _frame) => {
|
|
|
1582
1582
|
const tmpSpriteData = tmpData.split(`,`).map(val => trimStr(val));
|
|
1583
1583
|
|
|
1584
1584
|
// 深度が"-"の場合はスキップ
|
|
1585
|
-
if (
|
|
1585
|
+
if (tmpSpriteData[1] === undefined || tmpSpriteData[1] === `-` ||
|
|
1586
|
+
(tmpSpriteData[1] === `` && ![`[loop]`, `[jump]`].includes(tmpSpriteData[2]))) {
|
|
1586
1587
|
return;
|
|
1587
1588
|
}
|
|
1588
1589
|
|
|
@@ -7637,6 +7638,7 @@ const applySRandom = (_keyNum, _shuffleGroup, _arrowHeader, _frzHeader) => {
|
|
|
7637
7638
|
|
|
7638
7639
|
const tmpArrowData = [...Array(_keyNum)].map(_ => []);
|
|
7639
7640
|
const tmpFrzData = [...Array(_keyNum)].map(_ => []);
|
|
7641
|
+
const scatterFrame = 10;
|
|
7640
7642
|
|
|
7641
7643
|
// シャッフルグループごとに処理
|
|
7642
7644
|
_shuffleGroup.forEach(_group => {
|
|
@@ -7653,28 +7655,61 @@ const applySRandom = (_keyNum, _shuffleGroup, _arrowHeader, _frzHeader) => {
|
|
|
7653
7655
|
// 重ならないようにフリーズを配置
|
|
7654
7656
|
allFreezeArrows.forEach(_freeze => {
|
|
7655
7657
|
// 置ける場所を検索
|
|
7658
|
+
const freeSpacesFlat = _group.filter(
|
|
7659
|
+
_key => tmpFrzData[_key].find(_other => _freeze.begin - scatterFrame <= _other.end + scatterFrame) === undefined
|
|
7660
|
+
);
|
|
7656
7661
|
const freeSpaces = _group.filter(
|
|
7657
7662
|
_key => tmpFrzData[_key].find(_other => _freeze.begin <= _other.end) === undefined
|
|
7658
7663
|
);
|
|
7664
|
+
let currentFreeSpaces = freeSpaces;
|
|
7665
|
+
if (g_stateObj.shuffle.startsWith(`Scatter`)) {
|
|
7666
|
+
currentFreeSpaces = freeSpacesFlat.length > 0 ? freeSpacesFlat : freeSpaces;
|
|
7667
|
+
}
|
|
7659
7668
|
// ランダムに配置
|
|
7660
|
-
const random = Math.floor(Math.random() *
|
|
7661
|
-
tmpFrzData[
|
|
7669
|
+
const random = Math.floor(Math.random() * currentFreeSpaces.length);
|
|
7670
|
+
tmpFrzData[currentFreeSpaces[random]].push(_freeze);
|
|
7662
7671
|
});
|
|
7663
7672
|
|
|
7664
7673
|
// 通常矢印の配置
|
|
7665
7674
|
const allArrows = _group.map(_key => g_scoreObj[`${_arrowHeader}Data`][_key]).flat();
|
|
7666
7675
|
allArrows.sort((_a, _b) => _a - _b);
|
|
7676
|
+
let prev2Num = 0, prevNum = 0;
|
|
7667
7677
|
allArrows.forEach(_arrow => {
|
|
7678
|
+
|
|
7679
|
+
// 直前の矢印のフレーム数を取得
|
|
7680
|
+
if (prev2Num !== _arrow) {
|
|
7681
|
+
if (prevNum !== _arrow) {
|
|
7682
|
+
prev2Num = prevNum;
|
|
7683
|
+
prevNum = _arrow;
|
|
7684
|
+
}
|
|
7685
|
+
}
|
|
7686
|
+
|
|
7668
7687
|
// 置ける場所を検索
|
|
7688
|
+
const freeSpacesFlat = _group.filter(_key =>
|
|
7689
|
+
// フリーズと重ならない (前後10フレーム)
|
|
7690
|
+
tmpFrzData[_key].find(_freeze => _arrow >= _freeze.begin - scatterFrame && _arrow <= _freeze.end + scatterFrame) === undefined
|
|
7691
|
+
// 通常矢印と重ならない (前後10フレーム)
|
|
7692
|
+
&& tmpArrowData[_key].find(_other => _arrow >= _other - scatterFrame && _arrow <= _other + scatterFrame) === undefined
|
|
7693
|
+
// 直前の矢印と重ならない
|
|
7694
|
+
&& tmpArrowData[_key].find(_other => prev2Num === _other) === undefined
|
|
7695
|
+
);
|
|
7669
7696
|
const freeSpaces = _group.filter(_key =>
|
|
7670
7697
|
// フリーズと重ならない
|
|
7671
7698
|
tmpFrzData[_key].find(_freeze => _arrow >= _freeze.begin && _arrow <= _freeze.end) === undefined
|
|
7672
7699
|
// 通常矢印と重ならない
|
|
7673
7700
|
&& tmpArrowData[_key].find(_other => _arrow === _other) === undefined
|
|
7674
7701
|
);
|
|
7702
|
+
const freeSpacesAlt = _group.filter(_key =>
|
|
7703
|
+
// 通常矢印と重ならない
|
|
7704
|
+
tmpArrowData[_key].find(_other => _arrow === _other) === undefined
|
|
7705
|
+
);
|
|
7675
7706
|
// ランダムに配置
|
|
7676
|
-
|
|
7677
|
-
|
|
7707
|
+
let currentFreeSpaces = freeSpaces.length > 0 ? freeSpaces : freeSpacesAlt;
|
|
7708
|
+
if (g_stateObj.shuffle.startsWith(`Scatter`)) {
|
|
7709
|
+
currentFreeSpaces = freeSpacesFlat.length > 0 ? freeSpacesFlat : currentFreeSpaces;
|
|
7710
|
+
}
|
|
7711
|
+
const random = Math.floor(Math.random() * currentFreeSpaces.length);
|
|
7712
|
+
tmpArrowData[currentFreeSpaces[random]].push(_arrow);
|
|
7678
7713
|
})
|
|
7679
7714
|
});
|
|
7680
7715
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2024/05
|
|
8
|
+
* Revised : 2024/06/05 (v36.5.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -966,7 +966,7 @@ const g_settings = {
|
|
|
966
966
|
scrolls: [],
|
|
967
967
|
scrollNum: 0,
|
|
968
968
|
|
|
969
|
-
shuffles: [C_FLG_OFF, `Mirror`, `X-Mirror`, `Turning`, `Random`, `Random+`, `S-Random`, `S-Random+`],
|
|
969
|
+
shuffles: [C_FLG_OFF, `Mirror`, `X-Mirror`, `Turning`, `Random`, `Random+`, `S-Random`, `S-Random+`, `Scatter`, `Scatter+`],
|
|
970
970
|
shuffleNum: 0,
|
|
971
971
|
swapPattern: [4, 5, 6, 7],
|
|
972
972
|
|
|
@@ -1057,6 +1057,14 @@ const g_shuffleFunc = {
|
|
|
1057
1057
|
applySRandom(keyNum, [[...Array(keyNum).keys()]], `arrow`, `frz`);
|
|
1058
1058
|
applySRandom(keyNum, [[...Array(keyNum).keys()]], `dummyArrow`, `dummyFrz`);
|
|
1059
1059
|
},
|
|
1060
|
+
'Scatter': (keyNum, shuffleGroup) => {
|
|
1061
|
+
applySRandom(keyNum, shuffleGroup, `arrow`, `frz`);
|
|
1062
|
+
applySRandom(keyNum, shuffleGroup, `dummyArrow`, `dummyFrz`);
|
|
1063
|
+
},
|
|
1064
|
+
'Scatter+': keyNum => {
|
|
1065
|
+
applySRandom(keyNum, [[...Array(keyNum).keys()]], `arrow`, `frz`);
|
|
1066
|
+
applySRandom(keyNum, [[...Array(keyNum).keys()]], `dummyArrow`, `dummyFrz`);
|
|
1067
|
+
},
|
|
1060
1068
|
};
|
|
1061
1069
|
|
|
1062
1070
|
/**
|
package/package.json
CHANGED
package/skin/skin_css.zip
DELETED
|
Binary file
|