danoniplus 43.6.4 → 44.0.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 : 2026/01/31
7
+ * Revised : 2026/02/07
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 43.6.4`;
12
- const g_revisedDate = `2026/01/31`;
11
+ const g_version = `Ver 44.0.0`;
12
+ const g_revisedDate = `2026/02/07`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -3969,6 +3969,12 @@ const headerConvert = _dosObj => {
3969
3969
  }
3970
3970
  });
3971
3971
 
3972
+ // 縦伸縮率の設定
3973
+ const stretchYRate = [];
3974
+ _dosObj.stretchYRate?.split(`$`).forEach((val, j) => {
3975
+ stretchYRate[j] = hasVal(val) ? setVal(val, 1, C_TYP_FLOAT) : 1;
3976
+ });
3977
+ obj.stretchYRate = makeBaseArray(stretchYRate, obj.difLabels.length, 1);
3972
3978
  // 最終演出表示有無(noneで無効化)
3973
3979
  obj.finishView = _dosObj.finishView ?? ``;
3974
3980
 
@@ -9776,6 +9782,28 @@ const loadingScoreInit = async () => {
9776
9782
  }
9777
9783
  g_scoreObj = scoreConvert(g_rootObj, g_stateObj.scoreId, 0, dummyIdHeader);
9778
9784
 
9785
+ // Motionオプション適用時の矢印別の速度を取得(配列形式)
9786
+ g_workObj.motionOnFrames = setMotionOnFrame();
9787
+ g_workObj.motionReverseFlg = g_workObj.motionOnFrames.filter(val => g_stateObj.speed + val < 0).length > 0;
9788
+
9789
+ // 矢印描画時間の引き伸ばし設定(個別加速がある場合かつ逆走を伴うモーションは初期倍速によりさらに引き伸ばしを行う)
9790
+ // ただし、速度による引き伸ばし(boostFactor)の上限は描画の関係で2倍までとする
9791
+ let maxBoost = 1;
9792
+ for (let j = 0; j < g_scoreObj.boostData.length; j += 2) {
9793
+ maxBoost = Math.max(maxBoost, g_scoreObj.boostData[j + 1]);
9794
+ }
9795
+ const boostFactor = 1 + (
9796
+ (g_settings.motionDistRates[g_settings.motionNum] === 1 || !g_workObj.motionReverseFlg)
9797
+ ? 0
9798
+ : (
9799
+ g_stateObj.speed * g_headerObj.baseSpeed - g_settings.motionBoostFactorMinSpd > 0 && maxBoost > 1
9800
+ ? Math.min(maxBoost / 4, 1) : 0
9801
+ )
9802
+ );
9803
+ g_scoreObj.distY = Math.max(
9804
+ g_headerObj.stretchYRate[g_stateObj.scoreId], g_settings.motionDistRates[g_settings.motionNum] * boostFactor
9805
+ ) * g_posObj.distY;
9806
+
9779
9807
  // 最終フレーム数の取得
9780
9808
  let lastFrame = getLastFrame(g_scoreObj) + g_headerObj.blankFrame;
9781
9809
 
@@ -9788,9 +9816,6 @@ const loadingScoreInit = async () => {
9788
9816
  // フレームごとの速度を取得(配列形式)
9789
9817
  let speedOnFrame = setSpeedOnFrame(g_scoreObj.speedData, lastFrame);
9790
9818
 
9791
- // Motionオプション適用時の矢印別の速度を取得(配列形式)
9792
- g_workObj.motionOnFrames = setMotionOnFrame();
9793
-
9794
9819
  // 最初のフレームで出現する矢印が、ステップゾーンに到達するまでのフレーム数を取得
9795
9820
  const firstFrame = (g_scoreObj.frameNum === 0 ? 0 : g_scoreObj.frameNum + g_headerObj.blankFrame);
9796
9821
  let arrivalFrame = getFirstArrivalFrame(firstFrame, speedOnFrame);
@@ -10838,7 +10863,7 @@ const getFountainTrace = (_frms, _spd) => {
10838
10863
  _frms[j] = Math.floor((10 - (j - C_MOTION_STD_POS - 1) * diff) * factor);
10839
10864
  }
10840
10865
  return _frms;
10841
- }
10866
+ };
10842
10867
 
10843
10868
  /**
10844
10869
  * 最初のフレームで出現する矢印が、ステップゾーンに到達するまでのフレーム数を取得
@@ -10850,7 +10875,7 @@ const getFirstArrivalFrame = (_startFrame, _speedOnFrame) => {
10850
10875
  let startY = 0;
10851
10876
  let frm = _startFrame;
10852
10877
 
10853
- while (g_posObj.distY - startY > 0) {
10878
+ while (g_scoreObj.distY - startY > 0) {
10854
10879
  startY += _speedOnFrame[frm];
10855
10880
  frm++;
10856
10881
  }
@@ -11198,7 +11223,7 @@ const getArrowStartFrame = (_frame, _speedOnFrame) => {
11198
11223
  motionFrm: C_MOTION_STD_POS
11199
11224
  };
11200
11225
 
11201
- while (g_posObj.distY - obj.startY > 0) {
11226
+ while (g_scoreObj.distY - obj.startY > 0) {
11202
11227
  obj.startY += _speedOnFrame[obj.frm - 1];
11203
11228
 
11204
11229
  if (_speedOnFrame[obj.frm - 1] !== 0) {
@@ -12790,6 +12815,7 @@ const mainInit = () => {
12790
12815
  currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd +
12791
12816
  (g_workObj.motionOnFrames[boostCnt] || 0) * currentArrow.boostDir) * currentArrow.dir;
12792
12817
  $id(arrowName).top = wUnit(currentArrow.y);
12818
+ g_motionAlphaFunc.get(g_stateObj.motion)(arrowName, currentArrow);
12793
12819
  currentArrow.boostCnt--;
12794
12820
  }
12795
12821
  judgeMotionFunc[`${_name}${g_stateObj.autoAll}`](_j, arrowName, --currentArrow.cnt);
@@ -12940,8 +12966,10 @@ const mainInit = () => {
12940
12966
 
12941
12967
  // 移動
12942
12968
  if (g_workObj.currentSpeed !== 0) {
12969
+ currentFrz.prevY = currentFrz.y;
12943
12970
  currentFrz.y -= movY + (g_workObj.motionOnFrames[currentFrz.boostCnt] || 0) * currentFrz.dir * currentFrz.boostDir;
12944
12971
  $id(frzName).top = wUnit(currentFrz.y);
12972
+ g_motionAlphaFunc.get(g_stateObj.motion)(frzName, currentFrz);
12945
12973
  currentFrz.boostCnt--;
12946
12974
  }
12947
12975
  currentFrz.cnt--;
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2026/01/23 (v43.6.0)
8
+ * Revised : 2026/02/07 (v44.0.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -1218,9 +1218,16 @@ const g_settings = {
1218
1218
  speedNum: 0,
1219
1219
  speedTerms: [20, 5, 1],
1220
1220
 
1221
- motions: [C_FLG_OFF, `Boost`, `Hi-Boost`, `Brake`, `Compress`, `Fountain`],
1221
+ motions: [C_FLG_OFF, `Boost`, `Hi-Boost`, `Brake`, `Compress`, `Fountain`, `Magnet`],
1222
1222
  motionNum: 0,
1223
1223
 
1224
+ // 移動距離倍率 (Compress, Fountain, Magnetのみ倍率を変更)
1225
+ motionDistRates: [1, 1, 1, 1, 1.25, 3, 1.5],
1226
+ // 速度が逆転するときのアルファ値 (g_motionAlphaFuncで使用)
1227
+ motionAlpha: 0.625,
1228
+ // 移動距離倍率の補正を行う最小の初期倍速
1229
+ motionBoostFactorMinSpd: 5,
1230
+
1224
1231
  reverses: [C_FLG_OFF, C_FLG_ON],
1225
1232
  reverseNum: 0,
1226
1233
 
@@ -1563,9 +1570,34 @@ const g_motionFunc = new Map([
1563
1570
  ['Hi-Boost', _frms => getBoostTrace(_frms, g_stateObj.speed * 2)],
1564
1571
  ['Brake', _frms => getBrakeTrace(_frms)],
1565
1572
  ['Compress', _frms => getBoostTrace(_frms, g_stateObj.speed * 5 / 8, -1)],
1566
- ['Fountain', _frms => getFountainTrace(_frms, g_stateObj.speed * 2)],
1573
+ ['Fountain', _frms => getFountainTrace(_frms, g_stateObj.speed)],
1574
+ ['Magnet', _frms => getFountainTrace(_frms, g_stateObj.speed * 2)],
1575
+ ]);
1576
+
1577
+ /**
1578
+ * モーション適用中のアルファ値制御関数
1579
+ * @param {object} _obj 対象オブジェクト
1580
+ * @param {object} _property 対象オブジェクトのプロパティ情報 (g_attrObj[オブジェクト名])
1581
+ */
1582
+ const g_motionAlphaFunc = new Map([
1583
+ ['OFF', () => ``],
1584
+ ['Boost', () => ``],
1585
+ ['Hi-Boost', () => ``],
1586
+ ['Brake', () => ``],
1587
+ ['Compress', () => ``],
1588
+ ['Fountain', (_obj, _property) => motionAlphaToggle(_obj, _property)],
1589
+ ['Magnet', (_obj, _property) => motionAlphaToggle(_obj, _property)],
1567
1590
  ]);
1568
1591
 
1592
+ const motionAlphaToggle = (_obj, _property) => {
1593
+ const dir = (_property.y - _property.prevY) * _property.dir;
1594
+ if (($id(_obj).opacity === ``) && dir > 0) {
1595
+ $id(_obj).opacity = g_settings.motionAlpha;
1596
+ } else if (Number($id(_obj).opacity) === g_settings.motionAlpha && dir < 0) {
1597
+ $id(_obj).opacity = ``;
1598
+ }
1599
+ };
1600
+
1569
1601
  /**
1570
1602
  * PlayWindow適用関数
1571
1603
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "43.6.4",
3
+ "version": "44.0.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {