danoniplus 51.1.0 → 51.1.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 : 2026/09/27
7
+ * Revised : 2026/09/29
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 51.1.0`;
12
- const g_revisedDate = `2026/09/27`;
11
+ const g_version = `Ver 51.1.1`;
12
+ const g_revisedDate = `2026/09/29`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2026/09/27 (v51.1.0)
8
+ * Revised : 2026/09/29 (v51.1.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -1386,7 +1386,6 @@ const g_gaugeOptionObj = {
1386
1386
  customFulls: {},
1387
1387
  defaultPlusList: [`survival`, `border`, `customDefault`],
1388
1388
  };
1389
- let g_gaugeType;
1390
1389
 
1391
1390
  const g_autoPlaysBase = [C_FLG_OFF, C_FLG_ALL];
1392
1391
 
@@ -5342,6 +5341,7 @@ const g_root = {
5342
5341
  get g_gaugeDefObj() { return g_gaugeDefObj },
5343
5342
  get g_gaugeHeaderObj() { return g_gaugeHeaderObj },
5344
5343
  get g_gaugeSelObj() { return g_gaugeSelObj },
5344
+ get g_gaugeResolvedObj() { return g_gaugeResolvedObj },
5345
5345
  };
5346
5346
  const getPathVal = _path => _path.split(`.`).reduce((o, k) => o?.[k], g_root);
5347
5347
  const setPathVal = (_path, _value) => {
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2026/09/13
8
- * Revised : 2026/09/27 (v51.1.0)
8
+ * Revised : 2026/09/29 (v51.1.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -1421,15 +1421,16 @@ const setDifficulty = (_chartChangeFlg) => {
1421
1421
  : g_autoPlaysBase.concat()
1422
1422
  );
1423
1423
 
1424
- // ゲージ設定及びカーソル位置調整
1425
- setGauge(0, !g_initialFlg);
1424
+ // ゲージ設定配列の入れ替え
1425
+ g_settings.gauges = structuredClone(g_gaugeResolvedObj[scoreId].__order);
1426
1426
 
1427
- // 速度、スクロール、アシスト設定のカーソル位置調整
1427
+ // 速度、スクロール、ゲージ、アシスト設定のカーソル位置調整
1428
1428
  if (_chartChangeFlg) {
1429
1429
  g_stateObj.speed = g_headerObj.initSpeeds[scoreId];
1430
1430
  g_settings.speedNum = getCurrentNo(g_settings.speeds, g_stateObj.speed);
1431
1431
  }
1432
1432
  g_settings.scrollNum = getCurrentNo(g_settings.scrolls, g_stateObj.scroll);
1433
+ g_settings.gaugeNum = (g_initialFlg ? getCurrentNo(g_settings.gauges, g_stateObj.gauge) : 0);
1433
1434
  g_settings.autoPlayNum = getCurrentNo(g_settings.autoPlays, g_stateObj.autoPlay);
1434
1435
 
1435
1436
 
@@ -1493,6 +1494,11 @@ const setDifficulty = (_chartChangeFlg) => {
1493
1494
  setSetting(0, `reverse`);
1494
1495
  }
1495
1496
 
1497
+ // ゲージ設定
1498
+ g_stateObj.gauge = g_settings.gauges[g_settings.gaugeNum];
1499
+ setSetting(0, `gauge`);
1500
+ setGauge();
1501
+
1496
1502
  // オート・アシスト設定 (AutoPlay)
1497
1503
  g_stateObj.autoPlay = g_settings.autoPlays[g_settings.autoPlayNum];
1498
1504
  lnkAutoPlay.textContent = getStgDetailName(g_stateObj.autoPlay);
@@ -1845,35 +1851,22 @@ const createOptionWindow = _sprite => {
1845
1851
  // ---------------------------------------------------
1846
1852
  // ゲージ設定 (Gauge)
1847
1853
  // 縦位置: 7.5
1848
- spriteList.gauge.appendChild(createLblSetting(`Gauge`));
1849
-
1850
- // ゲージ設定詳細 縦位置: ゲージ設定+1
1851
- spriteList.gauge.appendChild(createDivCss2Label(`lblGauge2`, ``, g_lblPosObj.lblGauge2));
1852
-
1853
- if (g_headerObj.gaugeUse) {
1854
- multiAppend(spriteList.gauge,
1855
- makeSettingLblCssButton(`lnkGauge`, ``, 0, () => setGauge(1), { cxtFunc: () => setGauge(-1) }),
1856
- makeMiniCssButton(`lnkGauge`, `R`, 0, () => setGauge(1)),
1857
- makeMiniCssButton(`lnkGauge`, `L`, 0, () => setGauge(-1)),
1858
- );
1859
- createScText(spriteList.gauge, `Gauge`);
1860
- } else {
1861
- lblGauge.classList.add(g_cssObj.settings_Disabled);
1862
- spriteList.gauge.appendChild(makeDisabledLabel(`lnkGauge`, 0, getStgDetailName(g_stateObj.gauge)));
1863
- }
1854
+ createGeneralSetting(spriteList.gauge, `gauge`, {
1855
+ addRFunc: () => setGauge(),
1856
+ });
1857
+ multiAppend(spriteList.gauge,
1858
+ // ゲージ設定詳細 縦位置: ゲージ設定+1
1859
+ createDivCss2Label(`lblGauge2`, ``, g_lblPosObj.lblGauge2),
1864
1860
 
1865
- // 空押し判定設定 (Excessive)
1866
- spriteList.gauge.appendChild(
1861
+ // 空押し判定設定 (Excessive)
1867
1862
  createDivCss2Label(`lblExcessive`, `${g_lblNameObj.Excessive}:${C_FLG_ON}`,
1868
1863
  g_lblPosObj.lblExcessive, g_cssObj[`button_Disabled${C_FLG_ON}`]
1869
- )
1870
- );
1871
- spriteList.gauge.appendChild(
1864
+ ),
1872
1865
  createCss2Button(`lnkExcessive`, g_lblNameObj.Excessive, evt => setExcessive(evt.target), {
1873
1866
  ...g_lblPosObj.btnExcessive,
1874
1867
  title: g_msgObj.excessive, cxtFunc: evt => setExcessive(evt.target),
1875
- }, g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.excessive}`])
1876
- );
1868
+ }, g_cssObj.button_Default, g_cssObj[`button_Rev${g_stateObj.excessive}`]),
1869
+ )
1877
1870
  createScText(lnkExcessive, `Excessive`, { x: -13, targetLabel: `lnkExcessive` });
1878
1871
 
1879
1872
  // ---------------------------------------------------
@@ -2164,35 +2157,25 @@ const setReverseView = _btn => {
2164
2157
  }
2165
2158
  };
2166
2159
 
2167
- // ============================================================
2168
- // ゲージ設定の適用パイプライン(wiki: ゲージ設定適用順仕様)
2169
- // 優先度は「低→高」= 基本設定(g_gaugeDefObj) → 譜面ヘッダー(初期ゲージのみ) → ゲージ個別設定。
2170
- // 下記のapply*/resolve*はsetGaugeから“この順番のまま”呼ばれ、後段が前段を上書きすることで
2171
- // 優先度を表現する。順序の変更は仕様変更を意味する。
2172
- // ============================================================
2173
-
2174
2160
  /**
2175
- * ゲージ設定メイン
2176
- * @param {number} _scrollNum
2161
+ * ゲージ設定切替後の設定処理
2177
2162
  */
2178
- const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
2179
- const resolved = g_gaugeResolvedObj[g_stateObj.scoreId];
2180
-
2181
- g_settings.gauges = structuredClone(resolved.__order);
2182
- g_settings.gaugeNum = (_gaugeInitFlg ? 0 : getCurrentNo(g_settings.gauges, g_stateObj.gauge));
2183
- g_stateObj.gauge = g_settings.gauges[g_settings.gaugeNum];
2184
- setSetting(_scrollNum, `gauge`);
2185
-
2186
- const value = resolved[g_stateObj.gauge];
2163
+ const setGauge = () => {
2164
+ const value = g_gaugeResolvedObj[g_stateObj.scoreId][g_stateObj.gauge];
2187
2165
  g_stateObj.lifeMode = (value.Border === `x` ? C_LFE_SURVIVAL : C_LFE_BORDER);
2188
2166
  g_stateObj.lifeBorder = (value.Border === `x` ? 0 : value.Border);
2189
2167
  g_stateObj.lifeInit = value.Init;
2190
2168
  g_stateObj.lifeRcv = value.Recovery;
2191
2169
  g_stateObj.lifeDmg = value.Damage;
2192
2170
  g_stateObj.lifeVariable = value.Variable;
2193
-
2194
- lblGauge2.innerHTML = gaugeFormat(g_stateObj.lifeMode,
2195
- g_stateObj.lifeBorder, g_stateObj.lifeRcv, g_stateObj.lifeDmg, g_stateObj.lifeInit, g_stateObj.lifeVariable);
2171
+ gaugeFormat(
2172
+ g_stateObj.lifeMode,
2173
+ g_stateObj.lifeBorder,
2174
+ g_stateObj.lifeRcv,
2175
+ g_stateObj.lifeDmg,
2176
+ g_stateObj.lifeInit,
2177
+ g_stateObj.lifeVariable
2178
+ );
2196
2179
  };
2197
2180
 
2198
2181
  /**
@@ -2203,7 +2186,7 @@ const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
2203
2186
  * @param {number} _dmg
2204
2187
  * @param {number} _init
2205
2188
  * @param {string} _lifeValFlg
2206
- * @returns {string}
2189
+ * @param {string} ゲージ詳細表示用のhtml(互換のため。利用なしでも作成される)
2207
2190
  */
2208
2191
  const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
2209
2192
  const initVal = g_headerObj.maxLifeVal * _init / 100;
@@ -2237,44 +2220,42 @@ const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
2237
2220
  const [rateText, allowableCntsText] = getAccuracy(borderVal, realRcv, realDmg, initVal, allCnt);
2238
2221
  g_workObj.requiredAccuracy = rateText;
2239
2222
 
2223
+ // createDiv が付与するインラインの配置・サイズ指定を解除し、CSSクラス側のレイアウトを使う
2224
+ const reset = { position: ``, left: ``, top: ``, width: ``, height: `` };
2225
+ const labelReset = { ...reset, fontSize: ``, fontFamily: ``, textAlign: `` };
2226
+
2240
2227
  // このテーブルのみpointer-eventsを有効にする(オンマウス許可)
2241
- return `<div id="gaugeDivCover" class="settings_gaugeDivCover" style="pointer-events: auto;">
2242
- <div id="lblGaugeDivTable" class="settings_gaugeDivTable">
2243
- <div id="lblGaugeStart" class="settings_gaugeDivTableCol settings_gaugeStart">
2244
- ${g_lblNameObj.g_start}
2245
- </div>
2246
- <div id="lblGaugeBorder" class="settings_gaugeDivTableCol settings_gaugeEtc">
2247
- ${g_lblNameObj.g_border}
2248
- </div>
2249
- <div id="lblGaugeRecovery" class="settings_gaugeDivTableCol settings_gaugeEtc">
2250
- ${g_lblNameObj.g_recovery}
2251
- </div>
2252
- <div id="lblGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeEtc">
2253
- ${g_lblNameObj.g_damage}
2254
- </div>
2255
- <div id="lblGaugeRate" class="settings_gaugeDivTableCol settings_gaugeEtc">
2256
- ${g_lblNameObj.g_rate}
2257
- </div>
2258
- </div>
2259
- <div id="dataGaugeDivTable" class="settings_gaugeDivTable">
2260
- <div id="dataGaugeStart" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeStart">
2261
- ${init}/${g_headerObj.maxLifeVal}
2262
- </div>
2263
- <div id="dataGaugeBorder" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
2264
- ${borderText}
2265
- </div>
2266
- <div id="dataGaugeRecovery" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
2267
- ${rcvText}
2268
- </div>
2269
- <div id="dataGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
2270
- ${dmgText}
2271
- </div>
2272
- <div id="dataGaugeRate" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc" style="line-height: 12px;">
2273
- ${rateText}<br><span style="font-size: 10px;">${allowableCntsText}</span>
2274
- </div>
2275
- </div>
2276
- </div>
2277
- `;
2228
+ deleteChildspriteAll(`lblGauge2`);
2229
+ const cover = createEmptySprite(lblGauge2, `gaugeDivCover`,
2230
+ { ...reset, pointerEvents: C_DIS_AUTO }, `settings_gaugeDivCover`);
2231
+
2232
+ const cell = (_id, _text, _classes, _style = {}) =>
2233
+ createDivCss2Label(_id, _text, { ...labelReset, ..._style }, `settings_gaugeDivTableCol`, ..._classes);
2234
+
2235
+ // ラベル行
2236
+ const lblTable = createEmptySprite(cover, `lblGaugeDivTable`, reset, `settings_gaugeDivTable`);
2237
+ const lblBaseClass = [`settings_gaugeEtc`];
2238
+ multiAppend(lblTable,
2239
+ cell(`lblGaugeStart`, g_lblNameObj.g_start, [`settings_gaugeStart`]),
2240
+ cell(`lblGaugeBorder`, g_lblNameObj.g_border, lblBaseClass),
2241
+ cell(`lblGaugeRecovery`, g_lblNameObj.g_recovery, lblBaseClass),
2242
+ cell(`lblGaugeDamage`, g_lblNameObj.g_damage, lblBaseClass),
2243
+ cell(`lblGaugeRate`, g_lblNameObj.g_rate, lblBaseClass),
2244
+ )
2245
+
2246
+ // 値行
2247
+ const dataTable = createEmptySprite(cover, `dataGaugeDivTable`, reset, `settings_gaugeDivTable`);
2248
+ const dataBaseClass = [`settings_gaugeVal`, `settings_gaugeEtc`];
2249
+ multiAppend(dataTable,
2250
+ cell(`dataGaugeStart`, `${init}/${g_headerObj.maxLifeVal}`,
2251
+ [`settings_gaugeVal`, `settings_gaugeStart`]),
2252
+ cell(`dataGaugeBorder`, `${borderText}`, dataBaseClass),
2253
+ cell(`dataGaugeRecovery`, `${rcvText}`, dataBaseClass),
2254
+ cell(`dataGaugeDamage`, `${dmgText}`, dataBaseClass),
2255
+ cell(`dataGaugeRate`, `${rateText}<br><span style="font-size: 10px;">${allowableCntsText}</span>`,
2256
+ dataBaseClass, { lineHeight: `12px` }),
2257
+ )
2258
+ return lblGauge2.innerHTML;
2278
2259
  };
2279
2260
 
2280
2261
  /**
package/js/lib/title.js CHANGED
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2026/09/13
8
- * Revised : 2026/09/23 (v51.0.0)
8
+ * Revised : 2026/09/29 (v51.1.1)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -471,46 +471,51 @@ const drawTitle = (_titleName = g_headerObj.musicTitleForView, _scoreId = ``) =>
471
471
  // 変数 titlelineheight の定義 (使用例: |titlelineheight=50|)
472
472
  const titlelineheight = (g_headerObj.titlelineheight !== `` ? g_headerObj.titlelineheight - (titlefontsize2 + 10) : 0);
473
473
 
474
- const txtAnimations = [``, ``];
474
+ const txtAnimStyles = [{}, {}];
475
475
  if (!g_headerObj.customTitleAnimationUse) {
476
- for (let j = 0; j < txtAnimations.length; j++) {
477
- txtAnimations[j] = `animation-name:${g_headerObj.titleAnimationName[j]};
478
- animation-duration:${g_headerObj.titleAnimationDuration[j]}s;
479
- animation-delay:${g_headerObj.titleAnimationDelay[j]}s;
480
- animation-timing-function:${g_headerObj.titleAnimationTimingFunction[j]};`;
476
+ for (let j = 0; j < txtAnimStyles.length; j++) {
477
+ txtAnimStyles[j] = {
478
+ animationName: g_headerObj.titleAnimationName[j],
479
+ animationDuration: `${g_headerObj.titleAnimationDuration[j]}s`,
480
+ animationDelay: `${g_headerObj.titleAnimationDelay[j]}s`,
481
+ animationTimingFunction: g_headerObj.titleAnimationTimingFunction[j],
482
+ };
481
483
  }
482
484
  }
483
- return createDivCss2Label(`lblmusicTitle`,
484
- `<div id="lblmusicTitle1" style="
485
- font-family:${g_headerObj.titlefonts[0]};
486
- background: ${titlegrds[0]};
487
- background-clip: text;
488
- -webkit-background-clip: text;
489
- color: rgba(255,255,255,0.0);
490
- ${txtAnimations[0]}
491
- " class="${g_headerObj.titleAnimationClass[0]}">
492
- ${_titleName[0]}
493
- </div>
494
- <div id="lblmusicTitle2" style="
495
- font-size:${wUnit(titlefontsize2)};
496
- position:relative;left:${wUnit(g_headerObj.titlepos[1][0])};
497
- top:${wUnit(g_headerObj.titlepos[1][1] + titlelineheight)};
498
- font-family:${g_headerObj.titlefonts[1]};
499
- background: ${titlegrds[1]};
500
- background-clip: text;
501
- -webkit-background-clip: text;
502
- color: rgba(255,255,255,0.0);
503
- ${txtAnimations[1]}
504
- " class="${g_headerObj.titleAnimationClass[1]}">
505
- ${_titleName[1] ?? ``}
506
- </div>
507
- `,
508
- {
509
- x: Number(g_headerObj.titlepos[0][0]), y: Number(g_headerObj.titlepos[0][1]),
510
- w: g_sWidth, h: g_sHeight - 40, siz: titlefontsize1,
511
- display: `flex`, flexDirection: `column`, justifyContent: `center`, alignItems: `center`,
512
- }
513
- );
485
+ const titleDiv = createDivCss2Label(`lblmusicTitle`, ``, {
486
+ x: Number(g_headerObj.titlepos[0][0]), y: Number(g_headerObj.titlepos[0][1]),
487
+ w: g_sWidth, h: g_sHeight - 40, siz: titlefontsize1,
488
+ display: `flex`, flexDirection: `column`, justifyContent: `center`, alignItems: `center`,
489
+ });
490
+
491
+ // createDivCss2Label が付与するインラインの配置・文字設定を解除する
492
+ const reset = { position: ``, left: ``, top: ``, width: ``, height: ``, fontSize: ``, textAlign: `` };
493
+ const gradStyle = {
494
+ backgroundClip: `text`, webkitBackgroundClip: `text`, color: `rgba(255,255,255,0.0)`,
495
+ };
496
+ // 空文字・スペース区切りの複数クラスに対応
497
+ const toClasses = _cls => (_cls ?? ``).split(` `).filter(Boolean);
498
+ multiAppend(titleDiv,
499
+ createDivCss2Label(`lblmusicTitle1`, `${_titleName[0]}`, {
500
+ ...reset,
501
+ fontFamily: g_headerObj.titlefonts[0],
502
+ background: titlegrds[0],
503
+ ...gradStyle,
504
+ ...txtAnimStyles[0],
505
+ }, ...toClasses(g_headerObj.titleAnimationClass[0])),
506
+ createDivCss2Label(`lblmusicTitle2`, `${_titleName[1] ?? ``}`, {
507
+ ...reset,
508
+ position: `relative`,
509
+ fontSize: wUnit(titlefontsize2),
510
+ left: wUnit(g_headerObj.titlepos[1][0]),
511
+ top: wUnit(g_headerObj.titlepos[1][1] + titlelineheight),
512
+ fontFamily: g_headerObj.titlefonts[1],
513
+ background: titlegrds[1],
514
+ ...gradStyle,
515
+ ...txtAnimStyles[1],
516
+ }, ...toClasses(g_headerObj.titleAnimationClass[1])),
517
+ )
518
+ return titleDiv;
514
519
  };
515
520
 
516
521
  /**
@@ -830,7 +835,7 @@ const changeMSelect = (_num, _initFlg = false) => {
830
835
  if (j === 0) {
831
836
  } else {
832
837
  document.getElementById(`btnMusicSelect${j}`).style.fontSize =
833
- getFontSize2(g_headerObj.musicTitles[idx].slice(0, limitedMLength), g_btnWidth(1 / 2));
838
+ wUnit(getFontSize2(g_headerObj.musicTitles[idx].slice(0, limitedMLength), g_btnWidth(1 / 2)));
834
839
  document.getElementById(`btnMusicSelect${j}`).innerHTML =
835
840
  `${g_headerObj.musicTitles[idx].slice(0, limitedMLength)}${g_headerObj.musicTitles[idx].length > limitedMLength ? '...' : ''}<br>` +
836
841
  `<span style="font-size:0.7em;line-height:9px"> / ${g_headerObj.artistNames[idx]}</span>`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "51.1.0",
3
+ "version": "51.1.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "jsdelivr": "./js/danoni_main.js",