danoniplus 43.6.0 → 43.6.2

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.
Files changed (2) hide show
  1. package/js/danoni_main.js +162 -117
  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 : 2026/01/23
7
+ * Revised : 2026/01/25
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 43.6.0`;
12
- const g_revisedDate = `2026/01/23`;
11
+ const g_version = `Ver 43.6.2`;
12
+ const g_revisedDate = `2026/01/25`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -223,6 +223,7 @@ const g_wordObj = {
223
223
 
224
224
  // オーディオ設定・タイマー管理
225
225
  let g_audio = new Audio();
226
+ let g_audioForMS = new Audio();
226
227
  let g_timeoutEvtId = 0;
227
228
  let g_timeoutEvtTitleId = 0;
228
229
  let g_timeoutEvtResultId = 0;
@@ -2342,6 +2343,8 @@ class AudioPlayer {
2342
2343
  this._fadeinPosition = 0;
2343
2344
  this._eventListeners = {};
2344
2345
  this.playbackRate = 1;
2346
+ this._muted = false;
2347
+ this._savedVolume = 1;
2345
2348
  }
2346
2349
 
2347
2350
  async init(_arrayBuffer) {
@@ -2404,11 +2407,17 @@ class AudioPlayer {
2404
2407
  }
2405
2408
 
2406
2409
  get volume() {
2407
- return this._gain.gain.value;
2410
+ // ミュート中でも設定されている音量を返す
2411
+ return this._muted ? this._savedVolume : this._gain.gain.value;
2408
2412
  }
2409
2413
 
2410
2414
  set volume(_volume) {
2411
- this._gain.gain.value = _volume;
2415
+ if (this._muted) {
2416
+ // ミュート中でも音量設定は保存
2417
+ this._savedVolume = _volume;
2418
+ } else {
2419
+ this._gain.gain.value = _volume;
2420
+ }
2412
2421
  }
2413
2422
 
2414
2423
  get duration() {
@@ -2423,6 +2432,26 @@ class AudioPlayer {
2423
2432
  }
2424
2433
  }
2425
2434
 
2435
+ get muted() {
2436
+ return this._muted;
2437
+ }
2438
+
2439
+ set muted(_muted) {
2440
+ if (this._muted === _muted) {
2441
+ return;
2442
+ }
2443
+ this._muted = _muted;
2444
+
2445
+ if (_muted) {
2446
+ // ミュート時:現在の音量を保存してゲインを0に
2447
+ this._savedVolume = this._gain.gain.value;
2448
+ this._gain.gain.value = 0;
2449
+ } else {
2450
+ // ミュート解除時:保存した音量を復元
2451
+ this._gain.gain.value = this._savedVolume;
2452
+ }
2453
+ }
2454
+
2426
2455
  addEventListener(_type, _listener) {
2427
2456
  this._eventListeners[_type]?.push(_listener) || (this._eventListeners[_type] = [_listener]);
2428
2457
  }
@@ -5148,7 +5177,7 @@ const titleInit = (_initFlg = false) => {
5148
5177
  const setBGMVolume = (_num = 1) => {
5149
5178
  g_settings.bgmVolumeNum = nextPos(g_settings.bgmVolumeNum, _num, g_settings.volumes.length);
5150
5179
  g_stateObj.bgmVolume = g_settings.volumes[g_settings.bgmVolumeNum];
5151
- g_audio.volume = g_stateObj.bgmVolume / 100;
5180
+ g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5152
5181
  btnBgmVolume.textContent = `${g_stateObj.bgmVolume}${g_lblNameObj.percent}`;
5153
5182
  };
5154
5183
 
@@ -5228,7 +5257,7 @@ const titleInit = (_initFlg = false) => {
5228
5257
 
5229
5258
  // 初期表示用 (2秒後に選曲画面を表示)
5230
5259
  if (_initFlg && !g_headerObj.customTitleUse) {
5231
- g_audio.muted = true;
5260
+ g_audioForMS.muted = true;
5232
5261
  const mSelectTitleSprite = createEmptySprite(divRoot, `mSelectTitleSprite`,
5233
5262
  g_windowObj.mSelectTitleSprite, g_cssObj.settings_DifSelector);
5234
5263
  multiAppend(mSelectTitleSprite,
@@ -5247,8 +5276,15 @@ const titleInit = (_initFlg = false) => {
5247
5276
  if (_opacity <= 0) {
5248
5277
  clearTimeout(fadeOpacity);
5249
5278
  mSelectTitleSprite.style.display = C_DIS_NONE;
5250
- g_audio.muted = false;
5251
- g_audio.currentTime = g_headerObj.musicStarts[g_headerObj.musicIdxList[g_settings.musicIdxNum]] ?? 0;
5279
+ if (!g_stateObj.bgmMuteFlg) {
5280
+ g_audioForMS.muted = false;
5281
+ g_audioForMS.currentTime = g_headerObj.musicStarts[g_headerObj.musicIdxList[g_settings.musicIdxNum]] ?? 0;
5282
+ if (g_audioForMS instanceof AudioPlayer) {
5283
+ // AudioPlayerはシークを適用するために再起動が必要
5284
+ g_audioForMS.pause();
5285
+ g_audioForMS.play();
5286
+ }
5287
+ }
5252
5288
  } else {
5253
5289
  mSelectTitleSprite.style.opacity = _opacity;
5254
5290
  fadeOpacity = setTimeout(() => {
@@ -5543,12 +5579,12 @@ const getCreatorInfo = (_creatorList) => {
5543
5579
  * BGMの停止
5544
5580
  */
5545
5581
  const pauseBGM = () => {
5546
- if (g_audio) {
5582
+ if (g_audioForMS) {
5547
5583
  g_handler.removeListener(g_stateObj.bgmTimeupdateEvtId);
5548
- g_audio.pause();
5549
- if (!(g_audio instanceof AudioPlayer)) {
5550
- g_audio.removeAttribute('src');
5551
- g_audio.load();
5584
+ g_audioForMS.pause();
5585
+ if (!(g_audioForMS instanceof AudioPlayer)) {
5586
+ g_audioForMS.removeAttribute('src');
5587
+ g_audioForMS.load();
5552
5588
  }
5553
5589
  }
5554
5590
  [`bgmLooped`, `bgmFadeIn`, `bgmFadeOut`].forEach(id => {
@@ -5590,13 +5626,13 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5590
5626
 
5591
5627
  // 開始時点で終了音量とイコールの場合は終了
5592
5628
  if (startVolume === endVolume || step === 0) {
5593
- g_audio.volume = endVolume;
5629
+ g_audioForMS.volume = endVolume;
5594
5630
  onEnd(true);
5595
5631
  return null;
5596
5632
  }
5597
5633
 
5598
5634
  let volume = startVolume;
5599
- g_audio.volume = startVolume;
5635
+ g_audioForMS.volume = startVolume;
5600
5636
 
5601
5637
  const stepFunc = () => {
5602
5638
  // 継続条件チェック
@@ -5611,14 +5647,14 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5611
5647
  (startVolume > endVolume && volume <= endVolume);
5612
5648
 
5613
5649
  if (reached) {
5614
- g_audio.volume = endVolume;
5650
+ g_audioForMS.volume = endVolume;
5615
5651
  onEnd(true); // 正常終了
5616
5652
  return;
5617
5653
  }
5618
5654
 
5619
5655
  // 音量更新
5620
5656
  volume += step;
5621
- g_audio.volume = Math.min(Math.max(volume, 0), 1);
5657
+ g_audioForMS.volume = Math.min(Math.max(volume, 0), 1);
5622
5658
 
5623
5659
  // 次のステップへ
5624
5660
  setTimeout(stepFunc, FADE_INTERVAL_MS);
@@ -5659,7 +5695,7 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5659
5695
  * BGMのフェードアウトとシーク
5660
5696
  */
5661
5697
  const fadeOutAndSeek = () => {
5662
- const start = g_audio.volume;
5698
+ const start = g_audioForMS.volume;
5663
5699
  const end = 0;
5664
5700
 
5665
5701
  g_stateObj.bgmFadeOut = fadeVolume(
@@ -5672,8 +5708,8 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5672
5708
 
5673
5709
  if (!finished) return; // 中断された
5674
5710
 
5675
- g_audio.pause();
5676
- g_audio.currentTime = musicStart;
5711
+ g_audioForMS.pause();
5712
+ g_audioForMS.currentTime = musicStart;
5677
5713
 
5678
5714
  if (isTitle()) {
5679
5715
  setTimeout(() => {
@@ -5695,13 +5731,13 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5695
5731
  * BGMのフェードイン
5696
5732
  */
5697
5733
  const fadeIn = () => {
5698
- if (!(g_audio instanceof AudioPlayer) && !g_audio.src) return;
5734
+ if (!(g_audioForMS instanceof AudioPlayer) && !g_audioForMS.src) return;
5699
5735
 
5700
5736
  const start = 0;
5701
5737
  const end = g_stateObj.bgmVolume / 100;
5702
5738
 
5703
- g_audio.volume = 0;
5704
- g_audio.play();
5739
+ g_audioForMS.volume = 0;
5740
+ g_audioForMS.play();
5705
5741
 
5706
5742
  g_stateObj.bgmFadeIn = fadeVolume(
5707
5743
  start,
@@ -5731,7 +5767,7 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5731
5767
  () => {
5732
5768
  try {
5733
5769
  return (
5734
- g_audio.elapsedTime >= musicEnd ||
5770
+ g_audioForMS.elapsedTime >= musicEnd ||
5735
5771
  numAtStart !== g_settings.musicIdxNum
5736
5772
  );
5737
5773
  } catch {
@@ -5754,6 +5790,9 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5754
5790
  try {
5755
5791
  // base64エンコードは読込に時間が掛かるため、曲変更時のみ読込
5756
5792
  if (!hasVal(g_musicdata) || Math.abs(_num) % g_headerObj.musicIdxList.length !== 0) {
5793
+ if (g_audioForMS instanceof AudioPlayer) {
5794
+ g_audioForMS.close();
5795
+ }
5757
5796
  await loadScript2(url);
5758
5797
  musicInit();
5759
5798
  if (!isTitle()) {
@@ -5766,12 +5805,12 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5766
5805
  tmpAudio.close();
5767
5806
  return;
5768
5807
  }
5769
- g_audio = tmpAudio;
5808
+ g_audioForMS = tmpAudio;
5770
5809
  }
5771
- g_audio.volume = g_stateObj.bgmVolume / 100;
5810
+ g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5772
5811
  if (g_currentPage === `title` && musicEnd > 0) {
5773
- g_audio.currentTime = musicStart;
5774
- g_audio.play();
5812
+ g_audioForMS.currentTime = musicStart;
5813
+ g_audioForMS.play();
5775
5814
  repeatBGM();
5776
5815
  }
5777
5816
  } catch (e) {
@@ -5780,22 +5819,30 @@ const playBGM = async (_num, _currentLoopNum = g_settings.musicLoopNum) => {
5780
5819
  }
5781
5820
 
5782
5821
  } else {
5783
- g_audio = new Audio();
5784
- g_audio.src = url;
5785
- g_audio.autoplay = false;
5786
- g_audio.volume = g_stateObj.bgmVolume / 100;
5787
- const loadedMeta = g_handler.addListener(g_audio, `loadedmetadata`, () => {
5822
+ // 既存の監視を解除し、AudioPlayer を確実にクローズ
5823
+ if (g_stateObj.bgmTimeupdateEvtId) {
5824
+ g_handler.removeListener(g_stateObj.bgmTimeupdateEvtId);
5825
+ g_stateObj.bgmTimeupdateEvtId = null;
5826
+ }
5827
+ if (g_audioForMS instanceof AudioPlayer) {
5828
+ g_audioForMS.close();
5829
+ }
5830
+ g_audioForMS = new Audio();
5831
+ g_audioForMS.src = url;
5832
+ g_audioForMS.autoplay = false;
5833
+ g_audioForMS.volume = g_stateObj.bgmVolume / 100;
5834
+ const loadedMeta = g_handler.addListener(g_audioForMS, `loadedmetadata`, () => {
5788
5835
  g_handler.removeListener(loadedMeta);
5789
5836
  if (!isTitle()) {
5790
5837
  return;
5791
5838
  }
5792
- g_audio.currentTime = musicStart;
5793
- g_audio.play();
5839
+ g_audioForMS.currentTime = musicStart;
5840
+ g_audioForMS.play();
5794
5841
  }, { once: true });
5795
5842
 
5796
5843
  if (musicEnd > 0) {
5797
- g_stateObj.bgmTimeupdateEvtId = g_handler.addListener(g_audio, "timeupdate", () => {
5798
- if (g_audio.currentTime >= musicEnd) {
5844
+ g_stateObj.bgmTimeupdateEvtId = g_handler.addListener(g_audioForMS, "timeupdate", () => {
5845
+ if (g_audioForMS.currentTime >= musicEnd) {
5799
5846
  fadeOutAndSeek();
5800
5847
  }
5801
5848
  });
@@ -6771,22 +6818,19 @@ const drawSpeedGraph = _scoreId => {
6771
6818
  };
6772
6819
 
6773
6820
  // 速度計算用ラベルの再作成
6774
- deleteDiv(detailSpeed, `lblSpdHeader`);
6775
- deleteDiv(detailSpeed, `lblSpdBase`);
6776
- deleteDiv(detailSpeed, `lblSpdOverall`);
6777
- deleteDiv(detailSpeed, `lblSpdBoost`);
6778
- deleteDiv(detailSpeed, `lblSpdTotal`);
6779
- deleteDiv(detailSpeed, `lblSpdFrame`);
6780
6821
  deleteDiv(detailSpeed, `btnSpdCursorL`);
6781
6822
  deleteDiv(detailSpeed, `btnSpdCursorR`);
6782
-
6823
+ if (document.getElementById(`lblSpdHeader`) === null) {
6824
+ multiAppend(detailSpeed,
6825
+ createDivCss2Label(`lblSpdHeader`, `TotalSpeed`, g_lblPosObj.lblSpdHeader),
6826
+ createDivCss2Label(`lblSpdBase`, ``, g_lblPosObj.lblSpdBase),
6827
+ createDivCss2Label(`lblSpdOverall`, ``, g_lblPosObj.lblSpdOverall),
6828
+ createDivCss2Label(`lblSpdBoost`, ``, g_lblPosObj.lblSpdBoost),
6829
+ createDivCss2Label(`lblSpdTotal`, ``, g_lblPosObj.lblSpdTotal),
6830
+ createDivCss2Label(`lblSpdFrame`, ``, g_lblPosObj.lblSpdFrame),
6831
+ );
6832
+ }
6783
6833
  multiAppend(detailSpeed,
6784
- createDivCss2Label(`lblSpdHeader`, `TotalSpeed`, g_lblPosObj.lblSpdHeader),
6785
- createDivCss2Label(`lblSpdBase`, ``, g_lblPosObj.lblSpdBase),
6786
- createDivCss2Label(`lblSpdOverall`, ``, g_lblPosObj.lblSpdOverall),
6787
- createDivCss2Label(`lblSpdBoost`, ``, g_lblPosObj.lblSpdBoost),
6788
- createDivCss2Label(`lblSpdTotal`, ``, g_lblPosObj.lblSpdTotal),
6789
- createDivCss2Label(`lblSpdFrame`, ``, g_lblPosObj.lblSpdFrame),
6790
6834
  createCss2Button(`btnSpdCursorL`, `<`, () => changeSpdCursor(-1),
6791
6835
  g_lblPosObj.btnSpdCursorL, g_cssObj.button_Mini),
6792
6836
  createCss2Button(`btnSpdCursorR`, `>`, () => changeSpdCursor(),
@@ -6802,7 +6846,7 @@ const drawSpeedGraph = _scoreId => {
6802
6846
  * @param {number} _frame
6803
6847
  */
6804
6848
  const calculateTotalSpeed = (_speed = null, _boost = null, _frame = 0) => {
6805
- if (document.getElementById(`lblSpdOverall`) === null) {
6849
+ if (document.getElementById(`lblSpdHeader`) === null) {
6806
6850
  return;
6807
6851
  }
6808
6852
  let speed, boost;
@@ -7164,7 +7208,7 @@ const makeHighScore = _scoreId => {
7164
7208
 
7165
7209
  let tweetFrzJdg = ``;
7166
7210
  let tweetMaxCombo = `${g_localStorage.highscores?.[scoreName]?.maxCombo}`;
7167
- if (g_allFrz > 0) {
7211
+ if (sumData(g_detailObj.frzCnt[_scoreId]) > 0) {
7168
7212
  tweetFrzJdg = `${g_localStorage.highscores?.[scoreName]?.kita}-${g_localStorage.highscores?.[scoreName]?.iknai}`;
7169
7213
  tweetMaxCombo += `-${g_localStorage.highscores?.[scoreName]?.fmaxCombo}`;
7170
7214
  }
@@ -9550,6 +9594,7 @@ const changeShuffleConfigColor = (_keyCtrlPtn, _vals, _j = -1) => {
9550
9594
  const loadMusic = () => {
9551
9595
 
9552
9596
  clearWindow(true);
9597
+ g_audioForMS.pause();
9553
9598
  g_currentPage = `loading`;
9554
9599
 
9555
9600
  const musicUrl = getMusicUrl(g_stateObj.scoreId);
@@ -14291,12 +14336,20 @@ const resultInit = () => {
14291
14336
  }
14292
14337
 
14293
14338
  // ゲージ推移グラフの描画
14294
- const gaugeTransitionCanvas = document.createElement(`canvas`);
14295
- gaugeTransitionCanvas.id = `graphGaugeTransition`;
14296
- gaugeTransitionCanvas.width = g_limitObj.gaugeTransitionWidth;
14297
- gaugeTransitionCanvas.height = g_limitObj.gaugeTransitionHeight;
14298
-
14299
- createEmptySprite(divRoot, `gaugeTransitionWindow`, g_windowObj.gaugeTransition, g_cssObj.result_PlayDataWindow).appendChild(gaugeTransitionCanvas);
14339
+ const gaugeTransitionWindow = createEmptySprite(divRoot, `gaugeTransitionWindow`, g_windowObj.gaugeTransition, g_cssObj.result_PlayDataWindow);
14340
+ for (let j = 0; j < 2; j++) {
14341
+ const canvas = document.createElement(`canvas`);
14342
+ canvas.id = `graphGaugeTransition${j > 0 ? j + 1 : ``}`;
14343
+ canvas.width = g_limitObj.gaugeTransitionWidth;
14344
+ canvas.height = g_limitObj.gaugeTransitionHeight;
14345
+ canvas.style.left = wUnit(0);
14346
+ canvas.style.top = wUnit(0);
14347
+ canvas.style.position = `absolute`;
14348
+ if (j > 0) {
14349
+ canvas.style.pointerEvents = C_DIS_NONE;
14350
+ }
14351
+ gaugeTransitionWindow.appendChild(canvas);
14352
+ }
14300
14353
 
14301
14354
  multiAppend(divRoot,
14302
14355
  createCss2Button(`btnGaugeTransition`, `i`, () => true, {
@@ -14347,64 +14400,60 @@ const resultInit = () => {
14347
14400
  frame.push(playingFrame);
14348
14401
  life.push(life.at(-1));
14349
14402
 
14350
- const context = gaugeTransitionCanvas.getContext(`2d`);
14403
+ // グラフ本体の描画
14404
+ const context = document.getElementById(`graphGaugeTransition`).getContext(`2d`);
14351
14405
  context.lineWidth = 2;
14352
14406
 
14353
- const drawGaugeGraph = () => {
14354
- context.clearRect(0, 0, gaugeTransitionCanvas.width, gaugeTransitionCanvas.height);
14407
+ let preX, preY;
14408
+ const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14355
14409
 
14356
- let preX, preY;
14357
- const borderY = g_limitObj.gaugeTransitionHeight - g_workObj.lifeBorder * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14410
+ for (let i = 0; i < frame.length; i++) {
14411
+ const x = frame[i] * g_limitObj.gaugeTransitionWidth / playingFrame;
14412
+ const y = g_limitObj.gaugeTransitionHeight - life[i] * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14358
14413
 
14359
- for (let i = 0; i < frame.length; i++) {
14360
- const x = frame[i] * g_limitObj.gaugeTransitionWidth / playingFrame;
14361
- const y = g_limitObj.gaugeTransitionHeight - life[i] * g_limitObj.gaugeTransitionHeight / g_headerObj.maxLifeVal;
14414
+ if (i === 0) {
14415
+ context.beginPath();
14416
+ context.moveTo(x, y);
14417
+ } else {
14418
+ context.moveTo(preX, preY);
14419
+ context.lineTo(x, preY);
14362
14420
 
14363
- if (i === 0) {
14364
- context.beginPath();
14365
- context.moveTo(x, y);
14366
- } else {
14367
- context.moveTo(preX, preY);
14368
- context.lineTo(x, preY);
14369
-
14370
- if (life[i - 1] === 0 && life[i] === 0) {
14371
- context.strokeStyle = g_graphColorObj.failed;
14372
-
14373
- } else if (life[i - 1] >= g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
14374
- context.lineTo(x, y);
14375
- context.strokeStyle = g_graphColorObj.clear;
14376
-
14377
- } else if (life[i - 1] < g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
14378
- context.lineTo(x, borderY);
14379
- context.strokeStyle = g_graphColorObj.failed;
14380
- context.stroke();
14381
- context.beginPath();
14382
- context.moveTo(x, borderY);
14383
- context.lineTo(x, y);
14384
- context.strokeStyle = g_graphColorObj.clear;
14385
-
14386
- } else if (life[i - 1] >= g_workObj.lifeBorder && life[i] < g_workObj.lifeBorder) {
14387
- context.lineTo(x, borderY);
14388
- context.strokeStyle = g_graphColorObj.clear;
14389
- context.stroke();
14390
- context.beginPath();
14391
- context.moveTo(x, borderY);
14392
- context.lineTo(x, y);
14393
- context.strokeStyle = g_graphColorObj.failed;
14421
+ if (life[i - 1] === 0 && life[i] === 0) {
14422
+ context.strokeStyle = g_graphColorObj.failed;
14394
14423
 
14395
- } else {
14396
- context.lineTo(x, y);
14397
- context.strokeStyle = g_graphColorObj.failed;
14398
- }
14424
+ } else if (life[i - 1] >= g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
14425
+ context.lineTo(x, y);
14426
+ context.strokeStyle = g_graphColorObj.clear;
14399
14427
 
14428
+ } else if (life[i - 1] < g_workObj.lifeBorder && life[i] >= g_workObj.lifeBorder) {
14429
+ context.lineTo(x, borderY);
14430
+ context.strokeStyle = g_graphColorObj.failed;
14400
14431
  context.stroke();
14401
14432
  context.beginPath();
14433
+ context.moveTo(x, borderY);
14434
+ context.lineTo(x, y);
14435
+ context.strokeStyle = g_graphColorObj.clear;
14436
+
14437
+ } else if (life[i - 1] >= g_workObj.lifeBorder && life[i] < g_workObj.lifeBorder) {
14438
+ context.lineTo(x, borderY);
14439
+ context.strokeStyle = g_graphColorObj.clear;
14440
+ context.stroke();
14441
+ context.beginPath();
14442
+ context.moveTo(x, borderY);
14443
+ context.lineTo(x, y);
14444
+ context.strokeStyle = g_graphColorObj.failed;
14445
+
14446
+ } else {
14447
+ context.lineTo(x, y);
14448
+ context.strokeStyle = g_graphColorObj.failed;
14402
14449
  }
14403
- preX = x;
14404
- preY = y;
14450
+
14451
+ context.stroke();
14452
+ context.beginPath();
14405
14453
  }
14454
+ preX = x;
14455
+ preY = y;
14406
14456
  }
14407
- drawGaugeGraph();
14408
14457
 
14409
14458
  let cursorFrame = 0; // 現在のカーソル位置(frame)
14410
14459
  const moveCursor = (sec = 1) => {
@@ -14412,22 +14461,18 @@ const resultInit = () => {
14412
14461
  drawOverlay();
14413
14462
  };
14414
14463
 
14415
- const frameToX = (_frame) => {
14416
- return _frame / playingFrame * gaugeTransitionCanvas.width;
14417
- };
14418
-
14419
- // 既存のグラフを再描画しつつ縦線と時間を重ねる
14464
+ // 既存のグラフの上から縦線と時間を重ねる
14420
14465
  const drawOverlay = () => {
14421
- // 既存のグラフを再描画
14422
- drawGaugeGraph();
14423
14466
 
14424
- const ctx = context;
14425
- const x = frameToX(cursorFrame);
14467
+ const canvas = document.getElementById(`graphGaugeTransition2`);
14468
+ const ctx = canvas.getContext(`2d`);
14469
+ const x = cursorFrame / playingFrame * canvas.width;
14470
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
14426
14471
 
14427
14472
  // 縦線
14428
14473
  ctx.beginPath();
14429
14474
  ctx.moveTo(x, 0);
14430
- ctx.lineTo(x, gaugeTransitionCanvas.height);
14475
+ ctx.lineTo(x, canvas.height);
14431
14476
  ctx.strokeStyle = "#009999";
14432
14477
  ctx.lineWidth = 1.5;
14433
14478
  ctx.stroke();
@@ -14436,10 +14481,10 @@ const resultInit = () => {
14436
14481
  const timer = transFrameToTimer(cursorFrame + startFrame);
14437
14482
  ctx.font = `14px ${getBasicFont()}`;
14438
14483
  ctx.fillStyle = "#009999";
14439
- ctx.textAlign = x > gaugeTransitionCanvas.width * 0.8 ? C_ALIGN_RIGHT : C_ALIGN_LEFT;
14484
+ ctx.textAlign = x > canvas.width * 0.8 ? C_ALIGN_RIGHT : C_ALIGN_LEFT;
14440
14485
  ctx.fillText(
14441
14486
  `${timer}`,
14442
- x > gaugeTransitionCanvas.width * 0.8 ? x - 5 : x + 5,
14487
+ x > canvas.width * 0.8 ? x - 5 : x + 5,
14443
14488
  g_limitObj.gaugeTransitionHeight - 35
14444
14489
  );
14445
14490
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "43.6.0",
3
+ "version": "43.6.2",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {