danoniplus 43.2.2 → 43.3.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 CHANGED
@@ -4,12 +4,12 @@
4
4
  *
5
5
  * Source by tickle
6
6
  * Created : 2018/10/08
7
- * Revised : 2025/12/30
7
+ * Revised : 2026/01/02
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 43.2.2`;
12
- const g_revisedDate = `2025/12/30`;
11
+ const g_version = `Ver 43.3.0`;
12
+ const g_revisedDate = `2026/01/02`;
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,102 @@ const resultInit = () => {
14167
14171
  lblAutoView.style.fontSize = wUnit(20);
14168
14172
  }
14169
14173
 
14174
+ divRoot.appendChild(createCss2Button(`btnGaugeTransition`, `i`, () => true, {
14175
+ x: g_sWidth / 2 - 250, y: 185, w: 30, h: 30, siz: g_limitObj.jdgCharaSiz,
14176
+ resetFunc: () => changeGaugeTransition(), cxtFunc: () => changeGaugeTransition(),
14177
+ }, g_cssObj.button_Mini));
14178
+ g_stateObj.gaugeTransitionViewFlg = false;
14179
+
14180
+ const changeGaugeTransition = () => {
14181
+ if (g_stateObj.gaugeTransitionViewFlg) {
14182
+ resultWindow.style.opacity = `1`;
14183
+ gaugeTransitionWindow.style.visibility = `hidden`;
14184
+ g_stateObj.gaugeTransitionViewFlg = false;
14185
+ } else {
14186
+ resultWindow.style.opacity = `0.3`;
14187
+ gaugeTransitionWindow.style.visibility = `visible`;
14188
+ g_stateObj.gaugeTransitionViewFlg = true;
14189
+ }
14190
+ };
14191
+
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
+ const startFrame = g_detailObj.startFrame[g_stateObj.scoreId];
14201
+ const playingFrame = g_detailObj.playingFrameWithBlank[g_stateObj.scoreId];
14202
+ const transitionObj = { frame: [0], life: [g_workObj.lifeInit] };
14203
+
14204
+ const frame = transitionObj.frame;
14205
+ const life = transitionObj.life;
14206
+ const transitionData = g_resultObj.gaugeTransition;
14207
+
14208
+ for (let i = 0; i < transitionData?.length; i++) {
14209
+ frame.push(transitionData[i][0] - startFrame);
14210
+ life.push(transitionData[i][1]);
14211
+ }
14212
+
14213
+ frame.push(playingFrame);
14214
+ life.push(life.at(-1));
14215
+
14216
+ const context = gaugeTransitionCanvas.getContext(`2d`);
14217
+ context.lineWidth = 2;
14218
+ let preY, preX;
14219
+ const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14220
+
14221
+ for (let i = 0; i < frame.length; i++) {
14222
+ const x = frame[i] * g_limitObj.gaugeTransitionWidth / playingFrame;
14223
+ const y = g_limitObj.gaugeTransitionHeight - life[i] * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14224
+
14225
+ if (i === 0) {
14226
+ context.beginPath();
14227
+ context.moveTo(x, y);
14228
+
14229
+ } else {
14230
+ context.moveTo(preX, preY);
14231
+ context.lineTo(x, preY);
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;
14239
+
14240
+ } else if (life[i - 1] < g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
14241
+ context.lineTo(x, borderY);
14242
+ context.strokeStyle = g_graphColorObj.failed;
14243
+ context.stroke();
14244
+ context.beginPath();
14245
+ context.moveTo(x, borderY);
14246
+ context.lineTo(x, y);
14247
+ context.strokeStyle = g_graphColorObj.clear;
14248
+
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
+ context.stroke();
14253
+ 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
+ }
14262
+
14263
+ context.stroke();
14264
+ context.beginPath();
14265
+ }
14266
+ preX = x;
14267
+ preY = y;
14268
+ }
14269
+
14170
14270
  // ユーザカスタムイベント(初期)
14171
14271
  const currentDateTime = new Date().toLocaleString();
14172
14272
  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 : 2025/09/21 (v43.1.1)
8
+ * Revised : 2026/01/02 (v43.3.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,6 +2481,7 @@ 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
@@ -2519,7 +2530,7 @@ const g_btnPatterns = {
2519
2530
  exSetting: { Back: 0, KeyConfig: 0, Play: 0, exSetting: -5, Save: -10 },
2520
2531
  loadingIos: { Play: 0 },
2521
2532
  keyConfig: { Back: -3, Play: 0 },
2522
- result: { Back: -5, Copy: -5, Tweet: -5, Gitter: -5, Retry: 0 },
2533
+ result: { Back: -5, Copy: -5, Tweet: -5, Gitter: -5, Retry: 0, GaugeTransition: -15 },
2523
2534
  };
2524
2535
 
2525
2536
  // メイン画面以外でキーリピートを許可しないキーを設定
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "43.2.2",
3
+ "version": "43.3.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {