danoniplus 34.7.1 → 35.1.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 : 2024/01/27
7
+ * Revised : 2024/02/03
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 34.7.1`;
12
- const g_revisedDate = `2024/01/27`;
11
+ const g_version = `Ver 35.1.0`;
12
+ const g_revisedDate = `2024/02/03`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -2138,9 +2138,10 @@ const initialControl = async () => {
2138
2138
  * 作品別ローカルストレージの読み込み・初期設定
2139
2139
  */
2140
2140
  const loadLocalStorage = _ => {
2141
- // URLからscoreIdを削除
2141
+ // URLからscoreId, h(高さ)を削除
2142
2142
  const url = new URL(location.href);
2143
- url.searchParams.delete('scoreId');
2143
+ url.searchParams.delete(`scoreId`);
2144
+ url.searchParams.delete(`h`);
2144
2145
  g_localStorageUrl = url.toString();
2145
2146
 
2146
2147
  /**
@@ -2730,9 +2731,10 @@ const headerConvert = _dosObj => {
2730
2731
  $id(`canvas-frame`).width = wUnit(g_sWidth);
2731
2732
  }
2732
2733
  // 高さ設定
2733
- if (hasVal(_dosObj.windowHeight) || hasVal(g_presetObj.autoMinHeight)) {
2734
- g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_sHeight),
2735
- setIntVal(g_presetObj.autoMinHeight, g_sHeight), g_sHeight);
2734
+ obj.heightVariable = getQueryParamVal(`h`) !== null && (_dosObj.heightVariable || g_presetObj.heightVariable || false);
2735
+ if (hasVal(_dosObj.windowHeight || g_presetObj.autoMinHeight) || obj.heightVariable) {
2736
+ g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_presetObj.autoMinHeight ?? g_sHeight),
2737
+ setIntVal(getQueryParamVal(`h`), g_sHeight), g_sHeight);
2736
2738
  $id(`canvas-frame`).height = wUnit(g_sHeight);
2737
2739
  }
2738
2740
 
@@ -3021,7 +3023,9 @@ const headerConvert = _dosObj => {
3021
3023
 
3022
3024
  // プレイサイズ(X方向, Y方向)
3023
3025
  obj.playingWidth = setIntVal(_dosObj.playingWidth, g_presetObj.playingWidth ?? `default`);
3024
- obj.playingHeight = setIntVal(_dosObj.playingHeight, g_presetObj.playingHeight ?? g_sHeight);
3026
+ const tmpPlayingHeight = setIntVal(_dosObj.playingHeight, g_presetObj.playingHeight ?? g_sHeight);
3027
+ obj.playingHeight = Math.max(obj.heightVariable ?
3028
+ setIntVal(getQueryParamVal(`h`) - (g_sHeight - tmpPlayingHeight), tmpPlayingHeight) : tmpPlayingHeight, 400);
3025
3029
 
3026
3030
  // プレイ左上位置(X座標, Y座標)
3027
3031
  obj.playingX = setIntVal(_dosObj.playingX, g_presetObj.playingX ?? 0);
@@ -3036,6 +3040,9 @@ const headerConvert = _dosObj => {
3036
3040
  g_posObj.arrowHeight = obj.playingHeight + g_posObj.stepYR - g_posObj.stepDiffY * 2;
3037
3041
  obj.bottomWordSetFlg = setBoolVal(_dosObj.bottomWordSet);
3038
3042
 
3043
+ // ウィンドウサイズ(高さ)とステップゾーン位置の組み合わせで基準速度を変更
3044
+ obj.baseSpeed = 1 + ((g_posObj.distY - (g_posObj.stepY - C_STEP_Y) * 2) / (500 - C_STEP_Y) - 1) * 0.85;
3045
+
3039
3046
  // 矢印・フリーズアロー判定位置補正
3040
3047
  g_diffObj.arrowJdgY = (isNaN(parseFloat(_dosObj.arrowJdgY)) ? 0 : parseFloat(_dosObj.arrowJdgY));
3041
3048
  g_diffObj.frzJdgY = (isNaN(parseFloat(_dosObj.frzJdgY)) ? 0 : parseFloat(_dosObj.frzJdgY));
@@ -3970,6 +3977,9 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
3970
3977
  // キーグループ (keyGroupX_Y)
3971
3978
  newKeyMultiParam(newKey, `keyGroup`, toSplitArrayStr);
3972
3979
 
3980
+ // キーグループの表示制御 (keyGroupOrderX_Y)
3981
+ newKeyMultiParam(newKey, `keyGroupOrder`, toString);
3982
+
3973
3983
  // スクロールパターン (scrollX_Y)
3974
3984
  // |scroll(newKey)=Cross::1,1,-1,-1,-1,1,1/Split::1,1,1,-1,-1,-1,-1$...|
3975
3985
  newKeyPairParam(newKey, `scroll`, `scrollDir`, `---`, 1);
@@ -4482,6 +4492,17 @@ const inputSlider = (_slider, _link) => {
4482
4492
  return value;
4483
4493
  };
4484
4494
 
4495
+ /**
4496
+ * スライダー共通処理
4497
+ * @param {object} _slider
4498
+ * @param {object} _link
4499
+ */
4500
+ const inputSliderAppearance = (_slider, _link) => {
4501
+ const value = parseInt(_slider.value);
4502
+ _link.textContent = `${g_hidSudObj.distH[g_stateObj.appearance](value)}`;
4503
+ return value;
4504
+ };
4505
+
4485
4506
  /**
4486
4507
  * 譜面変更セレクターの削除
4487
4508
  */
@@ -5167,6 +5188,11 @@ const createOptionWindow = _sprite => {
5167
5188
  skipTerms: g_settings.speedTerms, hiddenBtn: true, scLabel: g_lblNameObj.sc_speed, roundNum: 5,
5168
5189
  unitName: ` ${g_lblNameObj.multi}`,
5169
5190
  });
5191
+ if (g_headerObj.baseSpeed !== 1) {
5192
+ divRoot.appendChild(
5193
+ createDivCss2Label(`lblBaseSpd`, `Δv: ${Math.round(g_headerObj.baseSpeed * 100) / 100}x`, { x: g_sWidth - 100, y: 0, w: 100, h: 20, siz: 14 })
5194
+ );
5195
+ }
5170
5196
 
5171
5197
  /**
5172
5198
  * 譜面明細子画面・グラフの作成
@@ -5992,7 +6018,7 @@ const createSettingsDisplayWindow = _sprite => {
5992
6018
 
5993
6019
  // Hidden+/Sudden+初期値用スライダー、ロックボタン
5994
6020
  multiAppend(spriteList.appearance,
5995
- createDivCss2Label(`lblAppearancePos`, `${g_hidSudObj.filterPos}${g_lblNameObj.percent}`, g_lblPosObj.lblAppearancePos),
6021
+ createDivCss2Label(`lblAppearancePos`, `${g_hidSudObj.distH[g_stateObj.appearance](g_hidSudObj.filterPos)}`, g_lblPosObj.lblAppearancePos),
5996
6022
  createDivCss2Label(`lblAppearanceBar`, `<input id="appearanceSlider" type="range" value="${g_hidSudObj.filterPos}" min="0" max="100" step="1">`,
5997
6023
  g_lblPosObj.lblAppearanceBar),
5998
6024
  createCss2Button(`lnkLockBtn`, g_lblNameObj.filterLock, evt => setLockView(evt.target),
@@ -6012,11 +6038,13 @@ const createSettingsDisplayWindow = _sprite => {
6012
6038
 
6013
6039
  const appearanceSlider = document.getElementById(`appearanceSlider`);
6014
6040
  appearanceSlider.addEventListener(`input`, _ =>
6015
- g_hidSudObj.filterPos = inputSlider(appearanceSlider, lblAppearancePos), false);
6041
+ g_hidSudObj.filterPos = inputSliderAppearance(appearanceSlider, lblAppearancePos), false);
6016
6042
 
6017
- const dispAppearanceSlider = _ =>
6018
- [`lblAppearancePos`, `lblAppearanceBar`, `lnkLockBtn`, `lnkfilterLine`].forEach(obj =>
6043
+ const dispAppearanceSlider = _ => {
6044
+ [`lblAppearanceBar`, `lnkLockBtn`, `lnkfilterLine`].forEach(obj =>
6019
6045
  $id(obj).visibility = g_appearanceRanges.includes(g_stateObj.appearance) ? `Visible` : `Hidden`);
6046
+ inputSliderAppearance(appearanceSlider, lblAppearancePos);
6047
+ };
6020
6048
  dispAppearanceSlider();
6021
6049
 
6022
6050
  // ---------------------------------------------------
@@ -6123,7 +6151,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
6123
6151
  const maxLeftX = Math.min(0, (kWidth - C_ARW_WIDTH) / 2 - maxLeftPos * g_keyObj.blank);
6124
6152
 
6125
6153
  g_keycons.cursorNumList = [...Array(keyNum).keys()].map(i => i);
6126
- const configKeyGroupList = g_headerObj.keyGroupOrder[g_stateObj.scoreId] ?? tkObj.keyGroupList;
6154
+ const configKeyGroupList = g_headerObj.keyGroupOrder[g_stateObj.scoreId] ??
6155
+ g_keyObj[`keyGroupOrder${keyCtrlPtn}`] ?? tkObj.keyGroupList;
6127
6156
 
6128
6157
  /**
6129
6158
  * keyconSpriteのスクロール位置調整
@@ -6509,14 +6538,18 @@ const keyConfigInit = (_kcType = g_kcType) => {
6509
6538
  appearConfigView(j, C_DIS_INHERIT);
6510
6539
  }
6511
6540
  }
6512
- changeConfigCursor(0);
6541
+ if (g_keycons.cursorNumList.length === 0) {
6542
+ appearConfigSteps(0);
6543
+ } else {
6544
+ changeConfigCursor(0);
6513
6545
 
6514
- // keySwitchボタンを一旦非選択にして、選択中のものを再度色付け
6515
- if (configKeyGroupList.length > 1) {
6516
- for (let j = 0; j < configKeyGroupList.length; j++) {
6517
- document.getElementById(`key${j}`).classList.replace(g_cssObj.button_Next, g_cssObj.button_Mini);
6546
+ // keySwitchボタンを一旦非選択にして、選択中のものを再度色付け
6547
+ if (configKeyGroupList.length > 1) {
6548
+ for (let j = 0; j < configKeyGroupList.length; j++) {
6549
+ document.getElementById(`key${j}`).classList.replace(g_cssObj.button_Next, g_cssObj.button_Mini);
6550
+ }
6551
+ document.getElementById(`key${_num}`).classList.replace(g_cssObj.button_Mini, g_cssObj.button_Next);
6518
6552
  }
6519
- document.getElementById(`key${_num}`).classList.replace(g_cssObj.button_Mini, g_cssObj.button_Next);
6520
6553
  }
6521
6554
  };
6522
6555
 
@@ -7924,11 +7957,11 @@ const getStartFrame = (_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) =
7924
7957
  const setSpeedOnFrame = (_speedData, _lastFrame) => {
7925
7958
 
7926
7959
  const speedOnFrame = [];
7927
- let currentSpeed = g_stateObj.speed * 2;
7960
+ let currentSpeed = g_stateObj.speed * g_headerObj.baseSpeed * 2;
7928
7961
 
7929
7962
  for (let frm = 0, s = 0; frm <= _lastFrame; frm++) {
7930
7963
  while (frm >= _speedData?.[s]) {
7931
- currentSpeed = _speedData[s + 1] * g_stateObj.speed * 2;
7964
+ currentSpeed = _speedData[s + 1] * g_stateObj.speed * g_headerObj.baseSpeed * 2;
7932
7965
  s += 2;
7933
7966
  }
7934
7967
  speedOnFrame[frm] = currentSpeed;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2024/01/12 (v34.7.0)
8
+ * Revised : 2024/01/28 (v35.0.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -1032,6 +1032,13 @@ let g_storeSettingsEx = [`d_stepzone`, `d_judgment`, `d_fastslow`, `d_lifegauge`
1032
1032
 
1033
1033
  let g_canDisabledSettings = [`motion`, `scroll`, `shuffle`, `autoPlay`, `gauge`, `excessive`, `appearance`];
1034
1034
 
1035
+ const g_hidSudFunc = {
1036
+ filterPos: _filterPos => `${_filterPos}${g_lblNameObj.percent}`,
1037
+ range: _ => `${Math.round(g_posObj.arrowHeight - g_posObj.stepY)}px`,
1038
+ hidden: _filterPos => `${Math.min(Math.round(g_posObj.arrowHeight * (100 - _filterPos) / 100), g_posObj.arrowHeight - g_posObj.stepY)}`,
1039
+ sudden: _filterPos => `${Math.max(Math.round(g_posObj.arrowHeight * (100 - _filterPos) / 100) - g_posObj.stepY, 0)}`,
1040
+ };
1041
+
1035
1042
  const g_hidSudObj = {
1036
1043
  filterPos: 10,
1037
1044
 
@@ -1062,6 +1069,15 @@ const g_hidSudObj = {
1062
1069
  'Sudden+': { OFF: 1, ON: 0, },
1063
1070
  'Hid&Sud+': { OFF: 1, ON: 0, },
1064
1071
  },
1072
+ distH: {
1073
+ 'Visible': _ => ``,
1074
+ 'Hidden': _ => `${g_hidSudFunc.filterPos(50)} (${g_hidSudFunc.hidden(50)} / ${g_hidSudFunc.range()})`,
1075
+ 'Hidden+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${g_hidSudFunc.hidden(_filterPos)} / ${g_hidSudFunc.range()})`,
1076
+ 'Sudden': _ => `${g_hidSudFunc.filterPos(40)} (${g_hidSudFunc.sudden(40)} / ${g_hidSudFunc.range()})`,
1077
+ 'Sudden+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${g_hidSudFunc.sudden(_filterPos)} / ${g_hidSudFunc.range()})`,
1078
+ 'Hid&Sud+': (_filterPos) => `${g_hidSudFunc.filterPos(_filterPos)} (${Math.max(g_hidSudFunc.sudden(_filterPos)
1079
+ - (g_posObj.arrowHeight - g_posObj.stepY - g_hidSudFunc.hidden(_filterPos)), 0)} / ${g_hidSudFunc.range()})`,
1080
+ },
1065
1081
  };
1066
1082
 
1067
1083
  // ステップゾーン位置、到達距離(後で指定)
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  /**
3
3
  * Dancing☆Onigiri 設定用jsファイル
4
- * Template Update: 2023/09/08 (v33.7.0)
4
+ * Template Update: 2024/01/28 (v35.0.0)
5
5
  *
6
6
  * このファイルでは、作品全体に対しての初期設定を行うことができます。
7
7
  * 譜面データ側で個別に同様の項目が設定されている場合は、譜面データ側の設定が優先されます。
@@ -32,6 +32,9 @@ g_presetObj.tuningUrl = `https://www.google.co.jp/`;
32
32
  /** 個人サイト別の最小高さ設定 */
33
33
  //g_presetObj.autoMinHeight = 500;
34
34
 
35
+ /** 個人サイト別の高さ可変設定 (true: 有効、false: 無効 / デフォルトは false)*/
36
+ //g_presetObj.heightVariable = true;
37
+
35
38
  /** 個人サイト別のウィンドウ位置 (left:左寄せ, center:中央, right:右寄せ)*/
36
39
  //g_presetObj.windowAlign = `center`;
37
40
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "34.7.1",
3
+ "version": "35.1.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {