danoniplus 43.2.2 → 43.4.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 +162 -3
- package/js/lib/danoni_constants.js +15 -2
- 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 :
|
|
7
|
+
* Revised : 2026/01/04
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 43.
|
|
12
|
-
const g_revisedDate = `
|
|
11
|
+
const g_version = `Ver 43.4.0`;
|
|
12
|
+
const g_revisedDate = `2026/01/04`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -11489,6 +11489,7 @@ const getArrowSettings = () => {
|
|
|
11489
11489
|
// 初期位置、ライフ設定の初期化
|
|
11490
11490
|
Object.keys(g_resultObj).forEach(judgeCnt => g_resultObj[judgeCnt] = 0);
|
|
11491
11491
|
g_resultObj.spState = ``;
|
|
11492
|
+
g_resultObj.gaugeTransition = [];
|
|
11492
11493
|
|
|
11493
11494
|
g_displays.forEach(_disp => {
|
|
11494
11495
|
const lowerDisp = _disp.toLowerCase();
|
|
@@ -12173,6 +12174,7 @@ const mainInit = () => {
|
|
|
12173
12174
|
if (g_currentArrows !== g_fullArrows || g_stateObj.lifeMode === C_LFE_BORDER && g_workObj.lifeVal < g_workObj.lifeBorder) {
|
|
12174
12175
|
g_gameOverFlg = true;
|
|
12175
12176
|
g_finishFlg = false;
|
|
12177
|
+
g_resultObj.gaugeTransition.push([g_scoreObj.baseFrame, 0]);
|
|
12176
12178
|
}
|
|
12177
12179
|
resultInit();
|
|
12178
12180
|
} else {
|
|
@@ -13646,6 +13648,7 @@ const lifeRecovery = () => {
|
|
|
13646
13648
|
} else {
|
|
13647
13649
|
changeLifeColor(g_workObj.lifeVal >= g_workObj.lifeBorder ? `Cleared` : ``);
|
|
13648
13650
|
}
|
|
13651
|
+
g_resultObj.gaugeTransition.push([g_scoreObj.baseFrame, g_workObj.lifeVal]);
|
|
13649
13652
|
};
|
|
13650
13653
|
|
|
13651
13654
|
/**
|
|
@@ -13662,6 +13665,7 @@ const lifeDamage = (_excessive = false) => {
|
|
|
13662
13665
|
} else {
|
|
13663
13666
|
changeLifeColor(g_workObj.lifeVal < g_workObj.lifeBorder ? `Failed` : `Cleared`);
|
|
13664
13667
|
}
|
|
13668
|
+
g_resultObj.gaugeTransition.push([g_scoreObj.baseFrame, g_workObj.lifeVal]);
|
|
13665
13669
|
};
|
|
13666
13670
|
|
|
13667
13671
|
/**
|
|
@@ -14167,6 +14171,161 @@ const resultInit = () => {
|
|
|
14167
14171
|
lblAutoView.style.fontSize = wUnit(20);
|
|
14168
14172
|
}
|
|
14169
14173
|
|
|
14174
|
+
// ゲージ推移グラフの描画
|
|
14175
|
+
const gaugeTransitionCanvas = document.createElement(`canvas`);
|
|
14176
|
+
gaugeTransitionCanvas.id = `graphGaugeTransition`;
|
|
14177
|
+
gaugeTransitionCanvas.width = g_limitObj.gaugeTransitionWidth;
|
|
14178
|
+
gaugeTransitionCanvas.height = g_limitObj.gaugeTransitionHeight;
|
|
14179
|
+
|
|
14180
|
+
createEmptySprite(divRoot, `gaugeTransitionWindow`, g_windowObj.gaugeTransition, g_cssObj.result_PlayDataWindow).appendChild(gaugeTransitionCanvas);
|
|
14181
|
+
|
|
14182
|
+
multiAppend(divRoot,
|
|
14183
|
+
createCss2Button(`btnGaugeTransition`, `i`, () => true, {
|
|
14184
|
+
x: g_sWidth / 2 - 250, y: 185, w: 30, h: 30, siz: g_limitObj.jdgCharaSiz,
|
|
14185
|
+
resetFunc: () => changeGaugeTransition(), cxtFunc: () => changeGaugeTransition(),
|
|
14186
|
+
}, g_cssObj.button_Mini),
|
|
14187
|
+
);
|
|
14188
|
+
multiAppend(gaugeTransitionWindow,
|
|
14189
|
+
createCss2Button(`btnGaugeTrL`, `<`, () => true, {
|
|
14190
|
+
x: -45, y: 35, w: 20, h: 30, siz: g_limitObj.jdgCharaSiz,
|
|
14191
|
+
resetFunc: () => moveCursor(keyIsShift() ? -10 : -1),
|
|
14192
|
+
}, g_cssObj.button_Setting),
|
|
14193
|
+
createCss2Button(`btnGaugeTrR`, `>`, () => true, {
|
|
14194
|
+
x: -25, y: 35, w: 20, h: 30, siz: g_limitObj.jdgCharaSiz,
|
|
14195
|
+
resetFunc: () => moveCursor(keyIsShift() ? 10 : 1),
|
|
14196
|
+
}, g_cssObj.button_Setting),
|
|
14197
|
+
);
|
|
14198
|
+
g_stateObj.gaugeTransitionViewFlg = false;
|
|
14199
|
+
|
|
14200
|
+
const changeGaugeTransition = () => {
|
|
14201
|
+
if (g_stateObj.gaugeTransitionViewFlg) {
|
|
14202
|
+
resultWindow.style.opacity = `1`;
|
|
14203
|
+
gaugeTransitionWindow.style.visibility = `hidden`;
|
|
14204
|
+
g_stateObj.gaugeTransitionViewFlg = false;
|
|
14205
|
+
} else {
|
|
14206
|
+
resultWindow.style.opacity = `0.3`;
|
|
14207
|
+
gaugeTransitionWindow.style.visibility = `visible`;
|
|
14208
|
+
g_stateObj.gaugeTransitionViewFlg = true;
|
|
14209
|
+
}
|
|
14210
|
+
};
|
|
14211
|
+
|
|
14212
|
+
const startFrame = g_detailObj.startFrame[g_stateObj.scoreId];
|
|
14213
|
+
let playingFrame = g_detailObj.playingFrameWithBlank[g_stateObj.scoreId];
|
|
14214
|
+
if (playingFrame <= 0) {
|
|
14215
|
+
playingFrame = 1;
|
|
14216
|
+
}
|
|
14217
|
+
const transitionObj = { frame: [0], life: [g_workObj.lifeInit] };
|
|
14218
|
+
|
|
14219
|
+
const frame = transitionObj.frame;
|
|
14220
|
+
const life = transitionObj.life;
|
|
14221
|
+
const transitionData = g_resultObj.gaugeTransition;
|
|
14222
|
+
|
|
14223
|
+
for (let i = 0; i < transitionData?.length; i++) {
|
|
14224
|
+
frame.push(transitionData[i][0] - startFrame);
|
|
14225
|
+
life.push(transitionData[i][1]);
|
|
14226
|
+
}
|
|
14227
|
+
|
|
14228
|
+
frame.push(playingFrame);
|
|
14229
|
+
life.push(life.at(-1));
|
|
14230
|
+
|
|
14231
|
+
const context = gaugeTransitionCanvas.getContext(`2d`);
|
|
14232
|
+
context.lineWidth = 2;
|
|
14233
|
+
|
|
14234
|
+
const drawGaugeGraph = () => {
|
|
14235
|
+
context.clearRect(0, 0, gaugeTransitionCanvas.width, gaugeTransitionCanvas.height);
|
|
14236
|
+
|
|
14237
|
+
let preX, preY;
|
|
14238
|
+
const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
|
|
14239
|
+
|
|
14240
|
+
for (let i = 0; i < frame.length; i++) {
|
|
14241
|
+
const x = frame[i] * g_limitObj.gaugeTransitionWidth / playingFrame;
|
|
14242
|
+
const y = g_limitObj.gaugeTransitionHeight - life[i] * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
|
|
14243
|
+
|
|
14244
|
+
if (i === 0) {
|
|
14245
|
+
context.beginPath();
|
|
14246
|
+
context.moveTo(x, y);
|
|
14247
|
+
} else {
|
|
14248
|
+
context.moveTo(preX, preY);
|
|
14249
|
+
context.lineTo(x, preY);
|
|
14250
|
+
|
|
14251
|
+
if (life[i - 1] === 0 && life[i] === 0) {
|
|
14252
|
+
context.strokeStyle = g_graphColorObj.failed;
|
|
14253
|
+
|
|
14254
|
+
} else if (life[i - 1] >= g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
|
|
14255
|
+
context.lineTo(x, y);
|
|
14256
|
+
context.strokeStyle = g_graphColorObj.clear;
|
|
14257
|
+
|
|
14258
|
+
} else if (life[i - 1] < g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
|
|
14259
|
+
context.lineTo(x, borderY);
|
|
14260
|
+
context.strokeStyle = g_graphColorObj.failed;
|
|
14261
|
+
context.stroke();
|
|
14262
|
+
context.beginPath();
|
|
14263
|
+
context.moveTo(x, borderY);
|
|
14264
|
+
context.lineTo(x, y);
|
|
14265
|
+
context.strokeStyle = g_graphColorObj.clear;
|
|
14266
|
+
|
|
14267
|
+
} else if (life[i - 1] >= g_workObj.lifeBorder && life[i] < g_workObj.lifeBorder) {
|
|
14268
|
+
context.lineTo(x, borderY);
|
|
14269
|
+
context.strokeStyle = g_graphColorObj.clear;
|
|
14270
|
+
context.stroke();
|
|
14271
|
+
context.beginPath();
|
|
14272
|
+
context.moveTo(x, borderY);
|
|
14273
|
+
context.lineTo(x, y);
|
|
14274
|
+
context.strokeStyle = g_graphColorObj.failed;
|
|
14275
|
+
|
|
14276
|
+
} else {
|
|
14277
|
+
context.lineTo(x, y);
|
|
14278
|
+
context.strokeStyle = g_graphColorObj.failed;
|
|
14279
|
+
}
|
|
14280
|
+
|
|
14281
|
+
context.stroke();
|
|
14282
|
+
context.beginPath();
|
|
14283
|
+
}
|
|
14284
|
+
preX = x;
|
|
14285
|
+
preY = y;
|
|
14286
|
+
}
|
|
14287
|
+
}
|
|
14288
|
+
drawGaugeGraph();
|
|
14289
|
+
|
|
14290
|
+
let cursorFrame = 0; // 現在のカーソル位置(frame)
|
|
14291
|
+
const moveCursor = (sec = 1) => {
|
|
14292
|
+
cursorFrame = Math.max(0, Math.min(playingFrame, cursorFrame + sec * g_fps));
|
|
14293
|
+
drawOverlay();
|
|
14294
|
+
};
|
|
14295
|
+
|
|
14296
|
+
const frameToX = (_frame) => {
|
|
14297
|
+
return _frame / playingFrame * gaugeTransitionCanvas.width;
|
|
14298
|
+
};
|
|
14299
|
+
|
|
14300
|
+
// 既存のグラフを再描画しつつ縦線と時間を重ねる
|
|
14301
|
+
const drawOverlay = () => {
|
|
14302
|
+
// 既存のグラフを再描画
|
|
14303
|
+
drawGaugeGraph();
|
|
14304
|
+
|
|
14305
|
+
const ctx = context;
|
|
14306
|
+
const x = frameToX(cursorFrame);
|
|
14307
|
+
|
|
14308
|
+
// 縦線
|
|
14309
|
+
ctx.beginPath();
|
|
14310
|
+
ctx.moveTo(x, 0);
|
|
14311
|
+
ctx.lineTo(x, gaugeTransitionCanvas.height);
|
|
14312
|
+
ctx.strokeStyle = "#009999";
|
|
14313
|
+
ctx.lineWidth = 1.5;
|
|
14314
|
+
ctx.stroke();
|
|
14315
|
+
|
|
14316
|
+
// 時間表示
|
|
14317
|
+
const timer = transFrameToTimer(cursorFrame + startFrame);
|
|
14318
|
+
ctx.font = `14px ${getBasicFont()}`;
|
|
14319
|
+
ctx.fillStyle = "#009999";
|
|
14320
|
+
ctx.textAlign = x > gaugeTransitionCanvas.width * 0.8 ? C_ALIGN_RIGHT : C_ALIGN_LEFT;
|
|
14321
|
+
ctx.fillText(
|
|
14322
|
+
`${timer}`,
|
|
14323
|
+
x > gaugeTransitionCanvas.width * 0.8 ? x - 5 : x + 5,
|
|
14324
|
+
g_limitObj.gaugeTransitionHeight - 35
|
|
14325
|
+
);
|
|
14326
|
+
};
|
|
14327
|
+
drawOverlay();
|
|
14328
|
+
|
|
14170
14329
|
// ユーザカスタムイベント(初期)
|
|
14171
14330
|
const currentDateTime = new Date().toLocaleString();
|
|
14172
14331
|
g_customJsObj.result.forEach(func => func());
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised :
|
|
8
|
+
* Revised : 2026/01/04 (v43.4.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -75,6 +75,10 @@ const g_limitObj = {
|
|
|
75
75
|
graphHeight: 240,
|
|
76
76
|
graphMiniSiz: 12,
|
|
77
77
|
|
|
78
|
+
// ゲージ推移グラフ表示部分の幅、高さ
|
|
79
|
+
gaugeTransitionWidth: 430,
|
|
80
|
+
gaugeTransitionHeight: 210,
|
|
81
|
+
|
|
78
82
|
// その他のフォントサイズ
|
|
79
83
|
titleSiz: 32,
|
|
80
84
|
mainSiz: 14,
|
|
@@ -206,6 +210,7 @@ const updateWindowSiz = () => {
|
|
|
206
210
|
loader: { y: g_sHeight - 10, h: 10, backgroundColor: `#333333` },
|
|
207
211
|
playDataWindow: { x: g_sWidth / 2 - 225, y: 70, w: 450, h: 110 },
|
|
208
212
|
resultWindow: { x: g_sWidth / 2 - 200, y: 185, w: 400, h: 210 },
|
|
213
|
+
gaugeTransition: { x: g_sWidth / 2 - g_limitObj.gaugeTransitionWidth / 2, y: 185, w: g_limitObj.gaugeTransitionWidth, h: g_limitObj.gaugeTransitionHeight, visibility: `hidden` },
|
|
209
214
|
});
|
|
210
215
|
|
|
211
216
|
Object.assign(g_lblPosObj, {
|
|
@@ -902,6 +907,9 @@ const g_graphColorObj = {
|
|
|
902
907
|
|
|
903
908
|
speed: `#cc3333`,
|
|
904
909
|
boost: `#999900`,
|
|
910
|
+
|
|
911
|
+
clear: `#33cc33`,
|
|
912
|
+
failed: `#cc3333`,
|
|
905
913
|
};
|
|
906
914
|
|
|
907
915
|
const g_settingBtnObj = {
|
|
@@ -984,6 +992,8 @@ const g_resultObj = {
|
|
|
984
992
|
excessive: 0,
|
|
985
993
|
|
|
986
994
|
spState: ``,
|
|
995
|
+
|
|
996
|
+
gaugeTransition: [],
|
|
987
997
|
};
|
|
988
998
|
|
|
989
999
|
const C_RLT_BRACKET_L = 210;
|
|
@@ -2471,10 +2481,13 @@ const g_shortcutObj = {
|
|
|
2471
2481
|
ShiftRight_Tab: { id: `btnBack` },
|
|
2472
2482
|
ControlLeft_KeyC: { id: `` },
|
|
2473
2483
|
ControlRight_KeyC: { id: `` },
|
|
2484
|
+
KeyI: { id: `btnGaugeTransition` },
|
|
2474
2485
|
KeyC: { id: `btnCopy`, reset: true },
|
|
2475
2486
|
KeyX: { id: `btnTweet`, reset: true }, // x
|
|
2476
2487
|
KeyD: { id: `btnGitter`, reset: true }, // Discord
|
|
2477
2488
|
KeyP: { id: `btnCopyImage` },
|
|
2489
|
+
ArrowLeft: { id: `btnGaugeTrL` },
|
|
2490
|
+
ArrowRight: { id: `btnGaugeTrR` },
|
|
2478
2491
|
Backspace: { id: `btnRetry` },
|
|
2479
2492
|
},
|
|
2480
2493
|
};
|
|
@@ -2519,7 +2532,7 @@ const g_btnPatterns = {
|
|
|
2519
2532
|
exSetting: { Back: 0, KeyConfig: 0, Play: 0, exSetting: -5, Save: -10 },
|
|
2520
2533
|
loadingIos: { Play: 0 },
|
|
2521
2534
|
keyConfig: { Back: -3, Play: 0 },
|
|
2522
|
-
result: { Back: -5, Copy: -5, Tweet: -5, Gitter: -5, Retry: 0 },
|
|
2535
|
+
result: { Back: -5, Copy: -5, Tweet: -5, Gitter: -5, Retry: 0, GaugeTransition: -15 },
|
|
2523
2536
|
};
|
|
2524
2537
|
|
|
2525
2538
|
// メイン画面以外でキーリピートを許可しないキーを設定
|