danoniplus 43.3.0 → 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 +115 -56
- package/js/lib/danoni_constants.js +3 -1
- 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 : 2026/01/
|
|
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 = `2026/01/
|
|
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 = ``;
|
|
@@ -14171,10 +14171,30 @@ const resultInit = () => {
|
|
|
14171
14171
|
lblAutoView.style.fontSize = wUnit(20);
|
|
14172
14172
|
}
|
|
14173
14173
|
|
|
14174
|
-
|
|
14175
|
-
|
|
14176
|
-
|
|
14177
|
-
|
|
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
|
+
);
|
|
14178
14198
|
g_stateObj.gaugeTransitionViewFlg = false;
|
|
14179
14199
|
|
|
14180
14200
|
const changeGaugeTransition = () => {
|
|
@@ -14189,16 +14209,11 @@ const resultInit = () => {
|
|
|
14189
14209
|
}
|
|
14190
14210
|
};
|
|
14191
14211
|
|
|
14192
|
-
// ゲージ推移グラフの描画
|
|
14193
|
-
const gaugeTransitionCanvas = document.createElement(`canvas`);
|
|
14194
|
-
gaugeTransitionCanvas.id = `graphGaugeTransition`;
|
|
14195
|
-
gaugeTransitionCanvas.width = g_limitObj.gaugeTransitionWidth;
|
|
14196
|
-
gaugeTransitionCanvas.height = g_limitObj.gaugeTransitionHeight;
|
|
14197
|
-
|
|
14198
|
-
createEmptySprite(divRoot, `gaugeTransitionWindow`, g_windowObj.gaugeTransition, g_cssObj.result_PlayDataWindow).appendChild(gaugeTransitionCanvas);
|
|
14199
|
-
|
|
14200
14212
|
const startFrame = g_detailObj.startFrame[g_stateObj.scoreId];
|
|
14201
|
-
|
|
14213
|
+
let playingFrame = g_detailObj.playingFrameWithBlank[g_stateObj.scoreId];
|
|
14214
|
+
if (playingFrame <= 0) {
|
|
14215
|
+
playingFrame = 1;
|
|
14216
|
+
}
|
|
14202
14217
|
const transitionObj = { frame: [0], life: [g_workObj.lifeInit] };
|
|
14203
14218
|
|
|
14204
14219
|
const frame = transitionObj.frame;
|
|
@@ -14215,57 +14230,101 @@ const resultInit = () => {
|
|
|
14215
14230
|
|
|
14216
14231
|
const context = gaugeTransitionCanvas.getContext(`2d`);
|
|
14217
14232
|
context.lineWidth = 2;
|
|
14218
|
-
let preY, preX;
|
|
14219
|
-
const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
|
|
14220
14233
|
|
|
14221
|
-
|
|
14222
|
-
|
|
14223
|
-
const y = g_limitObj.gaugeTransitionHeight - life[i] * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
|
|
14234
|
+
const drawGaugeGraph = () => {
|
|
14235
|
+
context.clearRect(0, 0, gaugeTransitionCanvas.width, gaugeTransitionCanvas.height);
|
|
14224
14236
|
|
|
14225
|
-
|
|
14226
|
-
|
|
14227
|
-
context.moveTo(x, y);
|
|
14237
|
+
let preX, preY;
|
|
14238
|
+
const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
|
|
14228
14239
|
|
|
14229
|
-
|
|
14230
|
-
|
|
14231
|
-
|
|
14232
|
-
|
|
14233
|
-
if (life[i - 1] === 0 && life[i] === 0) {
|
|
14234
|
-
context.strokeStyle = g_graphColorObj.failed;
|
|
14235
|
-
|
|
14236
|
-
} else if (life[i - 1] >= g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
|
|
14237
|
-
context.lineTo(x, y);
|
|
14238
|
-
context.strokeStyle = g_graphColorObj.clear;
|
|
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;
|
|
14239
14243
|
|
|
14240
|
-
|
|
14241
|
-
context.lineTo(x, borderY);
|
|
14242
|
-
context.strokeStyle = g_graphColorObj.failed;
|
|
14243
|
-
context.stroke();
|
|
14244
|
+
if (i === 0) {
|
|
14244
14245
|
context.beginPath();
|
|
14245
|
-
context.moveTo(x,
|
|
14246
|
-
|
|
14247
|
-
context.
|
|
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
|
+
}
|
|
14248
14280
|
|
|
14249
|
-
} else if (life[i - 1] >= g_workObj.lifeBorder && life[i] < g_workObj.lifeBorder) {
|
|
14250
|
-
context.lineTo(x, borderY);
|
|
14251
|
-
context.strokeStyle = g_graphColorObj.clear;
|
|
14252
14281
|
context.stroke();
|
|
14253
14282
|
context.beginPath();
|
|
14254
|
-
context.moveTo(x, borderY);
|
|
14255
|
-
context.lineTo(x, y);
|
|
14256
|
-
context.strokeStyle = g_graphColorObj.failed;
|
|
14257
|
-
|
|
14258
|
-
} else {
|
|
14259
|
-
context.lineTo(x, y);
|
|
14260
|
-
context.strokeStyle = g_graphColorObj.failed;
|
|
14261
14283
|
}
|
|
14262
|
-
|
|
14263
|
-
|
|
14264
|
-
context.beginPath();
|
|
14284
|
+
preX = x;
|
|
14285
|
+
preY = y;
|
|
14265
14286
|
}
|
|
14266
|
-
preX = x;
|
|
14267
|
-
preY = y;
|
|
14268
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();
|
|
14269
14328
|
|
|
14270
14329
|
// ユーザカスタムイベント(初期)
|
|
14271
14330
|
const currentDateTime = new Date().toLocaleString();
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2026/01/
|
|
8
|
+
* Revised : 2026/01/04 (v43.4.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -2486,6 +2486,8 @@ const g_shortcutObj = {
|
|
|
2486
2486
|
KeyX: { id: `btnTweet`, reset: true }, // x
|
|
2487
2487
|
KeyD: { id: `btnGitter`, reset: true }, // Discord
|
|
2488
2488
|
KeyP: { id: `btnCopyImage` },
|
|
2489
|
+
ArrowLeft: { id: `btnGaugeTrL` },
|
|
2490
|
+
ArrowRight: { id: `btnGaugeTrR` },
|
|
2489
2491
|
Backspace: { id: `btnRetry` },
|
|
2490
2492
|
},
|
|
2491
2493
|
};
|