danoniplus 42.1.2 → 42.2.1

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/06/08
7
+ * Revised : 2025/06/15
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 42.1.2`;
12
- const g_revisedDate = `2025/06/08`;
11
+ const g_version = `Ver 42.2.1`;
12
+ const g_revisedDate = `2025/06/17`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -543,7 +543,7 @@ const formatObject = (_obj, _indent = 0, { colorFmt = true, rootKey = `` } = {})
543
543
  _value = escapeHtml(_value).replaceAll(`\n`, `<br>`);
544
544
  const colorCodePattern = /(#|0x)(?:[A-Fa-f0-9]{6}(?:[A-Fa-f0-9]{2})?|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{3})/g;
545
545
  if (_value === C_FLG_ON) {
546
- return `<span style="color:#66ff66">&#x2714; ON</span>`;
546
+ return `<span style="color:#66ff66">${g_emojiObj.checkMark} ON</span>`;
547
547
  } else if (colorCodePattern.test(_value)) {
548
548
  return _value.replace(colorCodePattern, (match) =>
549
549
  `<span style="color:${match.replace(`0x`, `#`)}">◆</span>${match.replace(`0x`, `#`)}`);
@@ -551,8 +551,8 @@ const formatObject = (_obj, _indent = 0, { colorFmt = true, rootKey = `` } = {})
551
551
  } else if (typeof _value === C_TYP_BOOLEAN) {
552
552
 
553
553
  // boolean値の色付け処理
554
- return (_value ? `<span style="color:#66ff66">&#x2714; true</span>` :
555
- `<span style="color:#ff9999">&#x274c; false</span>`);
554
+ return (_value ? `<span style="color:#66ff66">${g_emojiObj.checkMark} true</span>` :
555
+ `<span style="color:#ff9999">${g_emojiObj.crossMark} false</span>`);
556
556
 
557
557
  } else if (typeof _value === C_TYP_NUMBER) {
558
558
 
@@ -2573,10 +2573,21 @@ const initialControl = async () => {
2573
2573
 
2574
2574
  // 自動横幅拡張設定
2575
2575
  if (g_headerObj.autoSpread) {
2576
- const widthList = [g_sWidth, g_presetObj.autoMinWidth ?? g_keyObj.minWidth];
2577
- g_headerObj.keyLists.forEach(key => widthList.push(g_keyObj[`minWidth${key}`] ?? g_keyObj.minWidthDefault));
2576
+ g_sWidth = Math.max(g_sWidth, g_presetObj.autoMinWidth ?? g_keyObj.minWidth);
2577
+ g_headerObj.keyLists.forEach(key => {
2578
+ g_sWidth = Math.max(g_sWidth, g_keyObj[`minWidth${key}`] ?? g_keyObj.minWidthDefault);
2579
+
2580
+ // 別キーモード有効時は、別キーモード毎の横幅を拡張対象へ追加
2581
+ if (g_headerObj.transKeyUse) {
2582
+ for (let k = 1; hasVal(g_keyObj[`keyCtrl${key}_${k}`]); k++) {
2583
+ const anotherKey = g_keyObj[`transKey${key}_${k}`] ?? ``;
2584
+ if (anotherKey !== ``) {
2585
+ g_sWidth = Math.max(g_sWidth, g_keyObj[`minWidth${anotherKey}`] ?? g_keyObj.minWidthDefault);
2586
+ }
2587
+ }
2588
+ }
2589
+ });
2578
2590
 
2579
- g_sWidth = Math.max(...widthList);
2580
2591
  $id(`canvas-frame`).width = wUnit(g_sWidth);
2581
2592
  $id(`divRoot`).width = wUnit(g_sWidth);
2582
2593
  }
@@ -5080,10 +5091,10 @@ const titleInit = (_initFlg = false) => {
5080
5091
  createDivCss2Label(`lblComment`, ``, g_lblPosObj.lblComment_music),
5081
5092
 
5082
5093
  createDivCss2Label(`lblBgmVolume`, `BGM Volume`, g_lblPosObj.lblBgmVolume),
5083
- createCss2Button(`btnBgmMute`, g_stateObj.bgmMuteFlg ? `&#x1f507;` : `&#x1f50a;`, evt => {
5094
+ createCss2Button(`btnBgmMute`, g_stateObj.bgmMuteFlg ? g_emojiObj.muted : g_emojiObj.speaker, evt => {
5084
5095
  g_stateObj.bgmMuteFlg = !g_stateObj.bgmMuteFlg;
5085
5096
  g_stateObj.bgmMuteFlg ? pauseBGM() : playBGM(0);
5086
- evt.target.innerHTML = g_stateObj.bgmMuteFlg ? `&#x1f507;` : `&#x1f50a;`;
5097
+ evt.target.innerHTML = g_stateObj.bgmMuteFlg ? g_emojiObj.muted : g_emojiObj.speaker;
5087
5098
  }, g_lblPosObj.btnBgmMute, g_cssObj.button_Default),
5088
5099
  createCss2Button(`btnBgmVolume`, `${g_stateObj.bgmVolume}${g_lblNameObj.percent}`, () => setBGMVolume(),
5089
5100
  Object.assign({
@@ -5252,7 +5263,7 @@ const titleInit = (_initFlg = false) => {
5252
5263
  }), g_cssObj.button_Tweet),
5253
5264
 
5254
5265
  // セキュリティリンク
5255
- createCss2Button(`lnkComparison`, `&#x1f6e1;`, () => true,
5266
+ createCss2Button(`lnkComparison`, g_emojiObj.shield, () => true,
5256
5267
  Object.assign(g_lblPosObj.lnkComparison, {
5257
5268
  resetFunc: () => openLink(g_lblNameObj.securityUrl),
5258
5269
  }), g_cssObj.button_Tweet),
@@ -14007,7 +14018,8 @@ const resultInit = () => {
14007
14018
  { x: 280, dy: -15, hy: 0, siz: 20, color: `#999999`, align: C_ALIGN_CENTER });
14008
14019
  drawText(unEscapeHtml(mTitleForView[0]), { hy: 1 });
14009
14020
  drawText(unEscapeHtml(mTitleForView[1]), { hy: 2 });
14010
- drawText(`${getEmojiForCanvas(`&#x1f4dd;`)} ${unEscapeHtml(g_headerObj.tuning)} / ${getEmojiForCanvas(`&#x1f3b5;`)} ${unEscapeHtml(artistName)}`, { hy: mTitleForView[1] !== `` ? 3 : 2, siz: 12 });
14021
+ drawText(`${getEmojiForCanvas(g_emojiObj.memo)} ${unEscapeHtml(g_headerObj.tuning)} / ${getEmojiForCanvas(g_emojiObj.musical)} ${unEscapeHtml(artistName)}`,
14022
+ { hy: mTitleForView[1] !== `` ? 3 : 2, siz: 12 });
14011
14023
  drawText(unEscapeHtml(difDataForImage), { hy: 4 });
14012
14024
 
14013
14025
  if (playStyleData.length > 60) {
@@ -14148,7 +14160,7 @@ const resultInit = () => {
14148
14160
  // リトライ
14149
14161
  resetCommonBtn(`btnRetry`, g_lblNameObj.b_retry, g_lblPosObj.btnRsRetry, loadMusic, g_cssObj.button_Reset),
14150
14162
 
14151
- createCss2Button(`btnCopyImage`, `&#x1f4f7;`, () => true,
14163
+ createCss2Button(`btnCopyImage`, g_emojiObj.camera, () => true,
14152
14164
  Object.assign(g_lblPosObj.btnRsCopyImage, {
14153
14165
  resetFunc: () => copyResultImageData(g_msgInfoObj.I_0001),
14154
14166
  }), g_cssObj.button_Default_NoColor),
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2025/05/24 (v42.0.0)
8
+ * Revised : 2025/06/17 (v42.2.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -875,6 +875,18 @@ const g_escapeStr = {
875
875
  ]
876
876
  };
877
877
 
878
+ /** 絵文字管理用 */
879
+ const g_emojiObj = {
880
+ checkMark: `&#x2714;`, // チェックマーク (check mark)
881
+ crossMark: `&#x274c;`, // バツ (cross mark)
882
+ muted: `&#x1f507;`, // 無音のスピーカー (muted speaker)
883
+ speaker: `&#x1f50a;`, // 音量大のスピーカー (speaker high volume)
884
+ shield: `&#x1f6e1;`, // 盾 (shield)
885
+ memo: `&#x1f4dd;`, // メモ (memo)
886
+ musical: `&#x1f3b5;`, // 音符 (musical note)
887
+ camera: `&#x1f4f7;`, // カメラ (camera)
888
+ };
889
+
878
890
  /** 設定・オプション画面用共通 */
879
891
  const g_graphColorObj = {
880
892
  max: `#993333cc`,
@@ -3204,16 +3216,8 @@ const g_keyObj = {
3204
3216
 
3205
3217
  minWidth5: 500,
3206
3218
  minWidth7i: 550,
3207
- minWidth9A: 650,
3208
- minWidth9B: 650,
3209
- minWidth9i: 650,
3210
- minWidth9d: 650,
3211
- minWidth9h: 650,
3212
- minWidth11: 650,
3213
- minWidth11L: 650,
3214
3219
  minWidth11i: 650,
3215
3220
  minWidth11j: 650,
3216
- minWidth12: 675,
3217
3221
  minWidth12i: 675,
3218
3222
  minWidth13: 650,
3219
3223
  minWidth16i: 650,
@@ -3709,7 +3713,6 @@ const g_lang_msgInfoObj = {
3709
3713
  W_0012: `現在の設定では音源再生方法により小数の Adjustment が利用できません。<br>
3710
3714
  また、Fadein を使用した場合は通常よりズレが発生することがあります。<br>
3711
3715
  音源ファイルを js/txt 化するか、サーバー上動作とすれば解消します。(W-0012)`,
3712
- W_0021: `クリップボードのコピーに失敗しました。`,
3713
3716
  W_0031: `セーフモード適用中です。ローカルストレージ情報を使わない設定になっています。<br>
3714
3717
  「Data Management」から解除が可能です。(W-0031)`,
3715
3718
  W_0041: `選曲単品モードが有効になっています。<br><a href="{0}">[ 選曲画面へ戻る ]</a>`,
@@ -3727,20 +3730,12 @@ const g_lang_msgInfoObj = {
3727
3730
  &lt;input type="hidden" name="dos" id="dos" value="(譜面データ)"&gt;<br>`,
3728
3731
  E_0031: `楽曲ファイルが未指定か、フォーマットが間違っています。(E-0031)<br>
3729
3732
  |musicUrl=****.mp3|`,
3730
- E_0032: `楽曲ファイルの読み込みに失敗しました。(E-0032)`,
3731
3733
  E_0033: `楽曲ファイルの読み込み中に接続がタイムアウトしました。(E-0033)`,
3732
3734
  E_0034: `楽曲ファイルの読み込み中にエラーが発生しました。(E-0034)`,
3733
- E_0035: `お使いのOSでは指定された楽曲フォーマットに対応していません。(E-0035)`,
3734
3735
  E_0041: `ファイル:{0}の読み込みに失敗しました。(E-0041)<br>`,
3735
3736
  E_0042: `{0}は0より大きい値を指定する必要があります。(E-0042)`,
3736
3737
  E_0051: `Displayオプションのデフォルト設定(XXXXChainOFF)で、<br>指定できない組み合わせが設定されています。(E-0051)`,
3737
3738
 
3738
- E_0101: `新しいキー:{0}の[color]が未定義です。(E-0101)<br>
3739
- |color{0}=0,1,0,1,0,2|`,
3740
- E_0102: `新しいキー:{0}の[chara]が未定義です。(E-0102)<br>
3741
- |chara{0}=arrowA,arrowB,arrowC,arrowD,arrowE,arrowF|`,
3742
- E_0103: `新しいキー:{0}の[stepRtn]が未定義です。(E-0103)<br>
3743
- |stepRtn{0}=0,45,-90,135,180,onigiri|`,
3744
3739
  E_0104: `新しいキー:{0}の[keyCtrl]が未定義です。(E-0104)<br>
3745
3740
  |keyCtrl{0}=S,D,E/R,F,Space,J,M/Comma,K,L|`,
3746
3741
 
@@ -3764,7 +3759,6 @@ const g_lang_msgInfoObj = {
3764
3759
  Also, if you use "Fadein", it may be out of alignment.<br>
3765
3760
  It can be solved by converting the sound source file to encoded data (js, txt) or
3766
3761
  operating it on the server. (W-0012)`,
3767
- W_0021: `Failed to copy the clipboard.`,
3768
3762
  W_0031: `Safe Mode is being applied. <br>
3769
3763
  The setting is set to not use local storage information <br>
3770
3764
  and can be removed from Data Management. (W-0031)`,
@@ -3783,20 +3777,12 @@ const g_lang_msgInfoObj = {
3783
3777
  &lt;input type="hidden" name="dos" id="dos" value="(Chart data)"&gt;<br>`,
3784
3778
  E_0031: `The music file is not set or the format is incorrect.(E-0031)<br>
3785
3779
  |musicUrl=****.mp3|`,
3786
- E_0032: `Failed to read the music file. (E-0032)`,
3787
3780
  E_0033: `The connection timed out while loading a music file. (E-0033)`,
3788
3781
  E_0034: `An error occurred while reading the music file. (E-0034)`,
3789
- E_0035: `Your OS does not support the specified music format. (E-0035)`,
3790
3782
  E_0041: `Failed to read file: {0}. (E-0041)<br>`,
3791
3783
  E_0042: `{0} must be greater than 0. (E-0042)`,
3792
3784
  E_0051: `In the default setting (XXXXChainOFF) of the Display option, <br>a combination that cannot be specified is set. (E-0051)`,
3793
3785
 
3794
- E_0101: `New key: {0} [color] is not set. (E-0101)<br>
3795
- |color{0}=0,1,0,1,0,2|`,
3796
- E_0102: `New key: {0} [chara] is not set. (E-0102)<br>
3797
- |chara{0}=arrowA,arrowB,arrowC,arrowD,arrowE,arrowF|`,
3798
- E_0103: `New key: {0} [stepRtn] is not set. (E-0103)<br>
3799
- |stepRtn{0}=0,45,-90,135,180,onigiri|`,
3800
3786
  E_0104: `New key: {0} [keyCtrl] is not set. (E-0104)<br>
3801
3787
  |keyCtrl{0}=S,D,E/R,F,Space,J,M/Comma,K,L|`,
3802
3788
 
@@ -3897,8 +3883,6 @@ const g_lblNameObj = {
3897
3883
  s_speed: `Overall`,
3898
3884
  s_boost: `Boost`,
3899
3885
  s_avg: `Avg.`,
3900
- s_avgDspeed: `AvgO)`,
3901
- s_avgDboost: `AvgB)`,
3902
3886
 
3903
3887
  s_apm: `APM`,
3904
3888
  s_time: `Time`,
@@ -4032,9 +4016,6 @@ const g_lblNameObj = {
4032
4016
  'u_ToolDif': `DifLevel`,
4033
4017
  'u_HighScore': `HighScore`,
4034
4018
 
4035
- 'u_Main': `Main`,
4036
- 'u_Replaced': `Replaced`,
4037
-
4038
4019
  'u_Default': `Default`,
4039
4020
  'u_Type0': `Type0`,
4040
4021
  'u_Type1': `Type1`,
@@ -4042,7 +4023,6 @@ const g_lblNameObj = {
4042
4023
  'u_Type3': `Type3`,
4043
4024
  'u_Type4': `Type4`,
4044
4025
 
4045
- ConfigType: `ConfigType`,
4046
4026
  ColorType: `ColorType`,
4047
4027
  ImgType: `ImgType`,
4048
4028
  ColorGroup: `ColorGr.`,
@@ -4274,7 +4254,6 @@ const g_lang_msgObj = {
4274
4254
  opacity: `判定キャラクタ、コンボ数、Fast/Slow、Hidden+/Sudden+の\n境界線表示の透明度を設定します。`,
4275
4255
  hitPosition: `判定位置にズレを感じる場合、\n数値を変えることで判定の中央位置を1px単位(プラス:手前, マイナス:奥側)で調整することができます。\n早押し・遅押し傾向にある場合に使用します。`,
4276
4256
 
4277
- configType: `キーコンフィグ対象を切り替えます。\n[Main] メインキーのみ, [Replaced] 代替キーのみ, [ALL] 全て`,
4278
4257
  colorType: `矢印・フリーズアローの配色セットをあらかじめ定義されたリストから選択できます。\nType1~4選択時は色変化が自動でOFFになり、カラーピッカーから好きな色に変更できます。\n[Type0] グラデーション切替, [Type1~4] デフォルトパターン`,
4279
4258
  imgType: `矢印・フリーズアローなどのオブジェクトの見た目を変更します。`,
4280
4259
  colorGroup: `矢印・フリーズアロー色グループの割り当てパターンを変更します。`,
@@ -4365,7 +4344,6 @@ const g_lang_msgObj = {
4365
4344
  opacity: `Set the transparency of some objects such as judgment, combo counts, fast and slow`,
4366
4345
  hitPosition: `If you feel a discrepancy in the judgment position, \nyou can adjust the center position of the judgment in 1px increments \n (plus: in front, minus: at the back) by changing the numerical value. \nUse this function when there is a tendency to push too fast or too slow.`,
4367
4346
 
4368
- configType: `Switch the key config target.\n[Main] main keys only, [Replaced] alternate keys only, [ALL] all keys`,
4369
4347
  colorType: `Change the color scheme set for arrows and freeze-arrows from the predefined set.\nWhen Type1 to 4 is selected, color change is automatically turned off and can be changed to any color from the color picker.\n[Type0] Switch the sequences color gradations, [Type1~4] default color scheme`,
4370
4348
  imgType: `Change the appearance of sequences.`,
4371
4349
  colorGroup: `Change the sequences color group assignment pattern.`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "42.1.2",
3
+ "version": "42.2.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {