danoniplus 41.4.1 → 41.4.3
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 +21 -11
- 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 : 2025/
|
|
7
|
+
* Revised : 2025/06/18
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 41.4.
|
|
12
|
-
const g_revisedDate = `2025/
|
|
11
|
+
const g_version = `Ver 41.4.3`;
|
|
12
|
+
const g_revisedDate = `2025/06/18`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -5405,11 +5405,13 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
|
|
|
5405
5405
|
const FADE_INTERVAL_MS = 100;
|
|
5406
5406
|
const FADE_DELAY_MS = 500;
|
|
5407
5407
|
|
|
5408
|
+
const currentIdx = g_headerObj.musicIdxList[g_settings.musicIdxNum];
|
|
5408
5409
|
const musicUrl = getMusicUrl(g_headerObj.viewLists[0]);
|
|
5409
5410
|
const url = getFullMusicUrl(musicUrl);
|
|
5410
5411
|
const encodeFlg = listMatching(musicUrl, [`.js`, `.txt`], { suffix: `$` });
|
|
5411
|
-
const musicStart = g_headerObj.musicStarts?.[
|
|
5412
|
-
const musicEnd = g_headerObj.musicEnds?.[
|
|
5412
|
+
const musicStart = g_headerObj.musicStarts?.[currentIdx] ?? 0;
|
|
5413
|
+
const musicEnd = g_headerObj.musicEnds?.[currentIdx] ?? 0;
|
|
5414
|
+
const isTitle = () => g_currentPage === `title`;
|
|
5413
5415
|
|
|
5414
5416
|
/**
|
|
5415
5417
|
* BGMのフェードアウトとシーク
|
|
@@ -5417,7 +5419,7 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
|
|
|
5417
5419
|
const fadeOutAndSeek = () => {
|
|
5418
5420
|
let volume = g_audio.volume;
|
|
5419
5421
|
const fadeInterval = setInterval(() => {
|
|
5420
|
-
if (volume > FADE_STEP &&
|
|
5422
|
+
if (volume > FADE_STEP && isTitle()) {
|
|
5421
5423
|
volume -= FADE_STEP;
|
|
5422
5424
|
g_audio.volume = Math.max(volume, 0);
|
|
5423
5425
|
} else {
|
|
@@ -5427,7 +5429,7 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
|
|
|
5427
5429
|
g_audio.currentTime = musicStart;
|
|
5428
5430
|
|
|
5429
5431
|
// フェードイン開始
|
|
5430
|
-
if (
|
|
5432
|
+
if (isTitle()) {
|
|
5431
5433
|
setTimeout(() => {
|
|
5432
5434
|
fadeIn();
|
|
5433
5435
|
if (encodeFlg) {
|
|
@@ -5454,13 +5456,20 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
|
|
|
5454
5456
|
let volume = 0;
|
|
5455
5457
|
g_audio.play();
|
|
5456
5458
|
const fadeInterval = setInterval(() => {
|
|
5457
|
-
if (volume < g_stateObj.bgmVolume / 100 &&
|
|
5459
|
+
if (volume < g_stateObj.bgmVolume / 100 && isTitle()) {
|
|
5458
5460
|
volume += FADE_STEP;
|
|
5459
5461
|
g_audio.volume = Math.min(volume, 1);
|
|
5460
5462
|
} else {
|
|
5461
5463
|
clearInterval(fadeInterval);
|
|
5462
5464
|
g_stateObj.bgmFadeIn = null;
|
|
5463
5465
|
}
|
|
5466
|
+
|
|
5467
|
+
// フェードイン中に楽曲が変更された場合は停止
|
|
5468
|
+
if (currentIdx !== g_headerObj.musicIdxList[g_settings.musicIdxNum]) {
|
|
5469
|
+
pauseBGM();
|
|
5470
|
+
clearInterval(fadeInterval);
|
|
5471
|
+
g_stateObj.bgmFadeIn = null;
|
|
5472
|
+
}
|
|
5464
5473
|
}, FADE_INTERVAL_MS);
|
|
5465
5474
|
g_stateObj.bgmFadeIn = fadeInterval;
|
|
5466
5475
|
};
|
|
@@ -6169,7 +6178,7 @@ const optionInit = () => {
|
|
|
6169
6178
|
* @returns {string}
|
|
6170
6179
|
*/
|
|
6171
6180
|
const getMusicInfoView = () => {
|
|
6172
|
-
const idx = g_headerObj.musicNos[g_stateObj.scoreId];
|
|
6181
|
+
const idx = g_headerObj.musicNos[g_stateObj.scoreId] || 0;
|
|
6173
6182
|
let text = `♪` + (g_headerObj.musicSelectUse ? `${unEscapeHtml(g_headerObj.musicTitles[idx])} / ` : ``) +
|
|
6174
6183
|
`BPM: ${g_headerObj.bpms[idx]}`;
|
|
6175
6184
|
if (!g_headerObj.musicSelectUse && g_headerObj.bpms[idx] === `----`) {
|
|
@@ -11115,7 +11124,7 @@ const getArrowSettings = () => {
|
|
|
11115
11124
|
g_stateObj.layerNum = Math.max(g_stateObj.layerNum, Math.ceil((Math.max(...g_workObj.dividePos) + 1) / 2) * 2);
|
|
11116
11125
|
|
|
11117
11126
|
// g_workObjの不要なプロパティを削除
|
|
11118
|
-
if (g_stateObj.dummyId === ``) {
|
|
11127
|
+
if (g_stateObj.dummyId === `` && g_autoPlaysBase.includes(g_stateObj.autoPlay)) {
|
|
11119
11128
|
Object.keys(g_workObj).filter(key => key.startsWith(`dummy`) || key.startsWith(`mkDummy`))
|
|
11120
11129
|
.forEach(key => delete g_workObj[key]);
|
|
11121
11130
|
}
|
|
@@ -11411,7 +11420,8 @@ const mainInit = () => {
|
|
|
11411
11420
|
createMultipleSprite(`maskSprite`, g_scoreObj.maskMaxDepth, { x: g_workObj.backX });
|
|
11412
11421
|
|
|
11413
11422
|
// カラー・モーションを適用するオブジェクトの種類
|
|
11414
|
-
const objList = (g_stateObj.dummyId === ``
|
|
11423
|
+
const objList = (g_stateObj.dummyId === `` && g_autoPlaysBase.includes(g_stateObj.autoPlay)
|
|
11424
|
+
? [``] : [`dummy`, ``]);
|
|
11415
11425
|
|
|
11416
11426
|
// 背景・マスクモーション、スキン変更(0フレーム指定)
|
|
11417
11427
|
if (g_scoreObj.frameNum === 0) {
|