danoniplus 44.1.1 → 44.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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # Dancing☆Onigiri (CW Edition)
2
2
 
3
3
  [![CodeQL](https://github.com/cwtickle/danoniplus/workflows/CodeQL/badge.svg)](https://github.com/cwtickle/danoniplus/actions?query=workflow%3ACodeQL)
4
+ ![CodeRabbit Pull Request Reviews](https://img.shields.io/coderabbit/prs/github/cwtickle/danoniplus?utm_source=oss&utm_medium=github&utm_campaign=cwtickle%2Fdanoniplus&labelColor=171717&color=FF570A&link=https%3A%2F%2Fcoderabbit.ai&label=CodeRabbit+Reviews)
4
5
  [![Discord](https://img.shields.io/discord/698460971231870977?style=flat&logo=discord&logoColor=%23ffffff&label=Discord&labelColor=%236666ff&color=%23000066)](https://discord.gg/YVWUdUGyMy)
5
6
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/cwtickle/danoniplus?sort=semver)](https://github.com/cwtickle/danoniplus/security/policy)
6
7
  [![GitHub All Releases](https://img.shields.io/github/downloads/cwtickle/danoniplus/total?color=%23ff3399&label=downloads%20%28recently%29)](https://github.com/cwtickle/danoniplus/releases)
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/02/15
7
+ * Revised : 2026/02/20
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 44.1.1`;
12
- const g_revisedDate = `2026/02/15`;
11
+ const g_version = `Ver 44.3.0`;
12
+ const g_revisedDate = `2026/02/20`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -1895,6 +1895,8 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
1895
1895
 
1896
1896
  // ボタン、オブジェクトをクリア (divRoot配下のもの)
1897
1897
  deleteChildspriteAll(`divRoot`);
1898
+ divRoot.style.perspective = ``;
1899
+ divRoot.style.perspectiveOrigin = ``;
1898
1900
 
1899
1901
  // 拡張範囲を取得
1900
1902
  const diffX = (_customDisplayName === `Main` && g_workObj.nonDefaultSc ?
@@ -6730,7 +6732,7 @@ const drawSpeedGraph = _scoreId => {
6730
6732
  for (let i = 0; i < speedData?.length; i += 2) {
6731
6733
  if (speedData[i] >= startFrame) {
6732
6734
  frame.push(speedData[i] - startFrame);
6733
- speed.push(speedData[i + 1]);
6735
+ speed.push(getSpeedFactor(speedData[i + 1]));
6734
6736
  tmpSpeedPoint.push(speedData[i] - startFrame);
6735
6737
  }
6736
6738
  speedObj[speedType].cnt++;
@@ -8111,8 +8113,8 @@ const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
8111
8113
  const [rateText, allowableCntsText] = getAccuracy(borderVal, realRcv, realDmg, initVal, allCnt);
8112
8114
  g_workObj.requiredAccuracy = rateText;
8113
8115
 
8114
- // 許容ミス数のみ、オンマウスで表示するためpointer-eventsを有効にする
8115
- return `<div id="gaugeDivCover" class="settings_gaugeDivCover">
8116
+ // このテーブルのみpointer-eventsを有効にする(オンマウス許可)
8117
+ return `<div id="gaugeDivCover" class="settings_gaugeDivCover" style="pointer-events: auto;">
8116
8118
  <div id="lblGaugeDivTable" class="settings_gaugeDivTable">
8117
8119
  <div id="lblGaugeStart" class="settings_gaugeDivTableCol settings_gaugeStart">
8118
8120
  ${g_lblNameObj.g_start}
@@ -8143,9 +8145,8 @@ const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
8143
8145
  <div id="dataGaugeDamage" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc">
8144
8146
  ${dmgText}
8145
8147
  </div>
8146
- <div id="dataGaugeRate" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc"
8147
- title="${allowableCntsText}" style="pointer-events: auto;">
8148
- ${rateText}
8148
+ <div id="dataGaugeRate" class="settings_gaugeDivTableCol settings_gaugeVal settings_gaugeEtc" style="line-height: 12px;">
8149
+ ${rateText}<br><span style="font-size: 10px;">${allowableCntsText}</span>
8149
8150
  </div>
8150
8151
  </div>
8151
8152
  </div>
@@ -8169,7 +8170,7 @@ const getAccuracy = (_border, _rcv, _dmg, _init, _allCnt) => {
8169
8170
 
8170
8171
  // 許容ミス数の計算
8171
8172
  const allowableCnts = Math.min(_allCnt - minRecovery, _allCnt);
8172
- let allowableCntsText = _allCnt > 0 ? (allowableCnts >= 0 ? `${allowableCnts}miss↓` : `Impossible (${allowableCnts}miss)`) : ``;
8173
+ let allowableCntsText = _allCnt > 0 && allowableCnts !== 0 ? (allowableCnts > 0 ? `${allowableCnts}miss↓` : `(${allowableCnts}miss)`) : ``;
8173
8174
 
8174
8175
  if ((_rcv === 0 && _dmg === 0) || _rcv < 0 || _dmg < 0) {
8175
8176
  rateText = `----`;
@@ -8393,7 +8394,7 @@ const createSettingsDisplayWindow = _sprite => {
8393
8394
  const prevDisp = g_settings.displayNum[_name];
8394
8395
  const [prevBarColor, prevBgColor] = [cssBarList[prevDisp], cssBgList[prevDisp]];
8395
8396
 
8396
- g_settings.displayNum[_name] = (prevDisp + _scrollNum) % (_filterFlg ? 2 : list.length);
8397
+ g_settings.displayNum[_name] = nextPos(prevDisp, _scrollNum, _filterFlg ? 2 : list.length);
8397
8398
  const nextDisp = g_settings.displayNum[_name];
8398
8399
  const [nextBarColor, nextBgColor] = [cssBarList[nextDisp], cssBgList[nextDisp]];
8399
8400
 
@@ -8421,7 +8422,7 @@ const createSettingsDisplayWindow = _sprite => {
8421
8422
  if (g_settings[`d_${_name}s`] !== undefined) {
8422
8423
  displaySprite.appendChild(
8423
8424
  makeSettingLblCssButton(`${linkId}R`, `>`, _heightPos, () => switchDisplay(1, false), {
8424
- x: 175 + 180 * _widthPos, w: 25,
8425
+ x: 175 + 180 * _widthPos, w: 25, cxtFunc: () => switchDisplay(-1, false),
8425
8426
  }, g_cssObj.button_Mini)
8426
8427
  );
8427
8428
  }
@@ -10215,7 +10216,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
10215
10216
  const dosSpeedData = getRefData(_header, `${_scoreNo}${_footer}`);
10216
10217
  const speedData = [];
10217
10218
 
10218
- if (hasVal(dosSpeedData) && g_stateObj.d_speed === C_FLG_ON) {
10219
+ if (hasVal(dosSpeedData) && g_stateObj.d_speed !== C_FLG_OFF) {
10219
10220
  const tmpArrayData = splitLF(dosSpeedData);
10220
10221
 
10221
10222
  tmpArrayData.filter(data => hasVal(data)).forEach(tmpData => {
@@ -10787,6 +10788,27 @@ const getStartFrame = (_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) =
10787
10788
  return frameNum;
10788
10789
  };
10789
10790
 
10791
+ /**
10792
+ * 速度補正値の算出
10793
+ * @param {number} _speed
10794
+ * @returns {number}
10795
+ */
10796
+ const getSpeedFactor = _speed => {
10797
+ if (Math.abs(_speed) === 1) {
10798
+ // ±1 はそのまま返して符号を保持
10799
+ return _speed;
10800
+ }
10801
+ if (g_stateObj.d_speed === `Extreme`) {
10802
+ // |speed|>1 を強めに、<1 を弱めに
10803
+ return _speed * (Math.abs(_speed) > 1 ? 1.5 : 0.75);
10804
+ }
10805
+ if (g_stateObj.d_speed === `Soft`) {
10806
+ // 変化幅を緩和(符号は維持)
10807
+ return (1 + Math.abs(_speed)) / 2 * Math.sign(_speed);
10808
+ }
10809
+ return _speed;
10810
+ }
10811
+
10790
10812
  /**
10791
10813
  * 各フレームごとの速度を格納
10792
10814
  * @param {object} _speedData
@@ -10800,7 +10822,7 @@ const setSpeedOnFrame = (_speedData, _lastFrame) => {
10800
10822
 
10801
10823
  for (let frm = 0, s = 0; frm <= _lastFrame; frm++) {
10802
10824
  while (frm >= _speedData?.[s]) {
10803
- currentSpeed = _speedData[s + 1] * g_stateObj.speed * g_headerObj.baseSpeed * 2;
10825
+ currentSpeed = getSpeedFactor(_speedData[s + 1]) * g_stateObj.speed * g_headerObj.baseSpeed * 2;
10804
10826
  s += 2;
10805
10827
  }
10806
10828
  speedOnFrame[frm] = currentSpeed;
@@ -11056,6 +11078,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _firstArrivalFrame) => {
11056
11078
  } else {
11057
11079
  _data[k] = tmpObj.frm;
11058
11080
  }
11081
+ _data[k + 1] = getSpeedFactor(_data[k + 1]);
11059
11082
  }
11060
11083
  for (let k = 0; k < delIdx; k++) {
11061
11084
  _data.shift();
@@ -11936,6 +11959,12 @@ const mainInit = () => {
11936
11959
 
11937
11960
  // ステップゾーン、矢印のメインスプライトを作成
11938
11961
  const mainSprite = createEmptySprite(divRoot, `mainSprite`, mainCommonPos);
11962
+ if (g_stateObj.frzReturn !== C_FLG_OFF) {
11963
+ divRoot.style.perspective = `1400px`;
11964
+ divRoot.style.perspectiveOrigin = `center 60%`;
11965
+ mainSprite.style.transformOrigin = `center 55%`;
11966
+ }
11967
+
11939
11968
  addTransform(`mainSprite`, `root`, `scale(${g_workObj.scale})`);
11940
11969
  addXY(`mainSprite`, `root`, g_workObj.playingX, g_posObj.stepY - C_STEP_Y + g_headerObj.playingY);
11941
11970
 
@@ -13465,7 +13494,32 @@ const changeReturn = (_rad, _axis) => {
13465
13494
  if (_axis[1] !== undefined) {
13466
13495
  _transform += ` rotate${_axis[1]}(${_rad}deg)`;
13467
13496
  }
13468
- if (document.getElementById(`mainSprite`) !== null) {
13497
+ const sprite = document.getElementById(`mainSprite`);
13498
+ if (sprite !== null) {
13499
+ sprite.style.transformStyle = `preserve-3d`;
13500
+ const rad360 = _rad % 360;
13501
+
13502
+ let isBack = false;
13503
+
13504
+ // 単軸回転
13505
+ if (_axis.length === 1) {
13506
+ const axis = _axis[0];
13507
+ if (axis === 'Y' || axis === 'X') {
13508
+ isBack = rad360 > 90 && rad360 < 270;
13509
+ }
13510
+ // Z軸は平面回転なので「裏側」は存在しない
13511
+ }
13512
+
13513
+ // 2軸回転(XZ / XY / YZ)
13514
+ if (_axis.length === 2) {
13515
+ // 2軸回転は「どちらかの軸が裏側なら裏側」とみなす
13516
+ const [a1, a2] = _axis;
13517
+ const back1 = (a1 === 'Y' || a1 === 'X') && (rad360 > 90 && rad360 < 270);
13518
+ const back2 = (a2 === 'Y' || a2 === 'X') && (rad360 > 90 && rad360 < 270);
13519
+ isBack = back1 || back2;
13520
+ }
13521
+ sprite.style.opacity = isBack ? 0.7 : 1;
13522
+
13469
13523
  addTransform(`mainSprite`, `frzReturn`, _transform);
13470
13524
 
13471
13525
  if (_rad < 360 && g_workObj.frzReturnFlg) {
@@ -14176,6 +14230,10 @@ const resultInit = () => {
14176
14230
  const withOptions = (_flg, _defaultSet, _displayText = _flg) =>
14177
14231
  (_flg !== _defaultSet ? getStgDetailName(_displayText) : ``);
14178
14232
 
14233
+ const withDisplays = (_flg, _defaultSet, _displayText = _flg) =>
14234
+ (_flg !== _defaultSet
14235
+ ? getStgDetailName(_displayText) + (_flg === C_FLG_OFF ? `` : ` : ${getStgDetailName(_flg)}`) : ``);
14236
+
14179
14237
  // 譜面名の組み立て処理 (Ex: 9Akey / Normal-Leftless (maker) [X-Mirror])
14180
14238
  const keyUnitName = getStgDetailName(getKeyUnitName(g_keyObj.currentKey));
14181
14239
  const difDatas = [
@@ -14207,34 +14265,40 @@ const resultInit = () => {
14207
14265
 
14208
14266
  // Display設定の組み立て処理 (Ex: Step : FlatBar, Judge, Life : OFF)
14209
14267
  let displayData = [
14210
- withOptions(g_stateObj.d_stepzone, C_FLG_ON, g_lblNameObj.rd_StepZone +
14211
- `${g_stateObj.d_stepzone === C_FLG_OFF ? `` : ` : ${g_stateObj.d_stepzone}`}`),
14212
- withOptions(g_stateObj.d_judgment, C_FLG_ON, g_lblNameObj.rd_Judgment),
14213
- withOptions(g_stateObj.d_fastslow, C_FLG_ON, g_lblNameObj.rd_FastSlow),
14214
- withOptions(g_stateObj.d_lifegauge, C_FLG_ON, g_lblNameObj.rd_LifeGauge),
14215
- withOptions(g_stateObj.d_score, C_FLG_ON, g_lblNameObj.rd_Score),
14216
- withOptions(g_stateObj.d_musicinfo, C_FLG_ON, g_lblNameObj.rd_MusicInfo),
14217
- withOptions(g_stateObj.d_filterline, C_FLG_ON, g_lblNameObj.rd_FilterLine),
14268
+ withDisplays(g_stateObj.d_stepzone, C_FLG_ON, g_lblNameObj.rd_StepZone),
14269
+ withDisplays(g_stateObj.d_judgment, C_FLG_ON, g_lblNameObj.rd_Judgment),
14270
+ withDisplays(g_stateObj.d_fastslow, C_FLG_ON, g_lblNameObj.rd_FastSlow),
14271
+ withDisplays(g_stateObj.d_lifegauge, C_FLG_ON, g_lblNameObj.rd_LifeGauge),
14272
+ withDisplays(g_stateObj.d_score, C_FLG_ON, g_lblNameObj.rd_Score),
14273
+ withDisplays(g_stateObj.d_musicinfo, C_FLG_ON, g_lblNameObj.rd_MusicInfo),
14274
+ withDisplays(g_stateObj.d_filterline, C_FLG_ON, g_lblNameObj.rd_FilterLine),
14218
14275
  ].filter(value => value !== ``).join(`, `);
14219
14276
  if (displayData === ``) {
14220
14277
  displayData = `All Visible`;
14221
14278
  } else {
14222
- if (!displayData.includes(`,`) && g_stateObj.d_stepzone !== C_FLG_OFF) {
14223
- } else {
14224
- displayData += ` : OFF`;
14279
+ // 表示設定のOFF項目を末尾にまとめる
14280
+ const displayList = displayData.split(`, `).sort((a, b) => b.includes(`:`) - a.includes(`:`));
14281
+ displayData = displayList.join(`, `);
14282
+ if (!displayList.at(-1).includes(`:`)) {
14283
+ displayData += ` : ${getStgDetailName(C_FLG_OFF)}`;
14225
14284
  }
14226
14285
  }
14227
14286
 
14228
14287
  let display2Data = [
14229
- withOptions(g_stateObj.d_speed, C_FLG_ON, g_lblNameObj.rd_Speed),
14230
- withOptions(g_stateObj.d_color, C_FLG_ON, g_lblNameObj.rd_Color),
14231
- withOptions(g_stateObj.d_lyrics, C_FLG_ON, g_lblNameObj.rd_Lyrics),
14232
- withOptions(g_stateObj.d_background, C_FLG_ON, g_lblNameObj.rd_Background),
14233
- withOptions(g_stateObj.d_arroweffect, C_FLG_ON, g_lblNameObj.rd_ArrowEffect),
14234
- withOptions(g_stateObj.d_special, C_FLG_ON, g_lblNameObj.rd_Special),
14288
+ withDisplays(g_stateObj.d_speed, C_FLG_ON, g_lblNameObj.rd_Speed),
14289
+ withDisplays(g_stateObj.d_color, C_FLG_ON, g_lblNameObj.rd_Color),
14290
+ withDisplays(g_stateObj.d_lyrics, C_FLG_ON, g_lblNameObj.rd_Lyrics),
14291
+ withDisplays(g_stateObj.d_background, C_FLG_ON, g_lblNameObj.rd_Background),
14292
+ withDisplays(g_stateObj.d_arroweffect, C_FLG_ON, g_lblNameObj.rd_ArrowEffect),
14293
+ withDisplays(g_stateObj.d_special, C_FLG_ON, g_lblNameObj.rd_Special),
14235
14294
  ].filter(value => value !== ``).join(`, `);
14236
14295
  if (display2Data !== ``) {
14237
- display2Data += ` : OFF`;
14296
+ // 表示設定のOFF項目を末尾にまとめる
14297
+ const display2List = display2Data.split(`, `).sort((a, b) => b.includes(`:`) - a.includes(`:`));
14298
+ display2Data = display2List.join(`, `);
14299
+ if (!display2List.at(-1).includes(`:`)) {
14300
+ display2Data += ` : ${getStgDetailName(C_FLG_OFF)}`;
14301
+ }
14238
14302
  }
14239
14303
 
14240
14304
  const [lblRX, dataRX] = [20, 60];
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2026/02/15 (v44.1.1)
8
+ * Revised : 2026/02/18 (v44.2.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -1281,6 +1281,7 @@ const g_settings = {
1281
1281
 
1282
1282
  // Display設定の拡張リスト
1283
1283
  d_stepZones: [`FlatBar`],
1284
+ d_speeds: [`Extreme`, `Soft`],
1284
1285
 
1285
1286
  displayNum: {
1286
1287
  stepZone: 0,
@@ -4120,6 +4121,8 @@ const g_lblNameObj = {
4120
4121
  'u_Easy': `Easy`,
4121
4122
 
4122
4123
  'u_FlatBar': `FlatBar`,
4124
+ 'u_Extreme': `Extreme`,
4125
+ 'u_Soft': `Soft`,
4123
4126
 
4124
4127
  'u_Visible': `Visible`,
4125
4128
  'u_Hidden': `Hidden`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "44.1.1",
3
+ "version": "44.3.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {