danoniplus 45.2.0 → 45.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/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/27
7
+ * Revised : 2026/03/01
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 45.2.0`;
12
- const g_revisedDate = `2026/02/27`;
11
+ const g_version = `Ver 45.3.0`;
12
+ const g_revisedDate = `2026/03/01`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -10491,8 +10491,10 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
10491
10491
  const arrowNum = parseFloat(tmpcssMotionData[1]);
10492
10492
  const styleUp = (tmpcssMotionData[2] === `none` ? `` : tmpcssMotionData[2]);
10493
10493
  const styleDown = (tmpcssMotionData[3] === `none` ? `` : setVal(tmpcssMotionData[3], styleUp));
10494
+ const movLock = setBoolVal(tmpcssMotionData[4] === `movLock`, false);
10495
+ const initManual = setBoolVal(tmpcssMotionData[5] === `initManual`, false);
10494
10496
 
10495
- cssMotionData.push([frame, arrowNum, styleUp, styleDown]);
10497
+ cssMotionData.push([frame, arrowNum, styleUp, styleDown, movLock, initManual]);
10496
10498
  });
10497
10499
 
10498
10500
  // 個別のモーションデータが存在する場合、Effect設定を自動リセット
@@ -11220,13 +11222,13 @@ const pushArrows = (_dataObj, _speedOnFrame, _firstArrivalFrame) => {
11220
11222
  * @param {string} _type
11221
11223
  * @param {string} _header
11222
11224
  * @param {function} _setFunc 後続実行関数
11223
- * @param {number} object._term 1セット当たりのデータ数
11225
+ * @param {number} object._term 1セット当たりのデータ数(デフォルトは後続実行関数の引数の数-1, デフォルト引数・オブジェクト引数除く)
11224
11226
  * @param {boolean} object._colorFlg 個別色変化フラグ
11225
11227
  * @param {boolean} object._calcFrameFlg 逆算を無条件で行うかどうかの可否
11226
11228
  * @param {string} object._propName 色変化種類 (Arrow, ArrowShadow, FrzNormal, FrzNormalBar, ...)
11227
11229
  */
11228
11230
  const calcDataTiming = (_type, _header, _setFunc = () => true,
11229
- { _term = 4, _colorFlg = false, _calcFrameFlg = false, _propName = `` } = {}) => {
11231
+ { _term = _setFunc.length - 1, _colorFlg = false, _calcFrameFlg = false, _propName = `` } = {}) => {
11230
11232
 
11231
11233
  const camelHeader = _header === `` ? _type : `${_header}${toCapitalize(_type)}`;
11232
11234
  const baseData = hasVal(_propName) ? _dataObj[`${camelHeader}Data`][_propName] : _dataObj[`${camelHeader}Data`];
@@ -11327,7 +11329,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _firstArrivalFrame) => {
11327
11329
 
11328
11330
  // 個別・全体色変化、モーションデータ・スクロール反転データのタイミング更新
11329
11331
  [``, `dummy`].forEach(type => {
11330
- calcDataTiming(`color`, type, pushColors, { _colorFlg: true });
11332
+ calcDataTiming(`color`, type, pushColors, { _term: 4, _colorFlg: true });
11331
11333
  if (_dataObj[`ncolor${type}Data`] !== undefined) {
11332
11334
  Object.keys(_dataObj[`ncolor${type}Data`]).forEach(pattern =>
11333
11335
  calcDataTiming(`ncolor`, type, pushColors, { _term: 5, _colorFlg: true, _propName: pattern }));
@@ -11337,7 +11339,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _firstArrivalFrame) => {
11337
11339
  g_typeLists.arrow.forEach(header =>
11338
11340
  calcDataTiming(`cssMotion`, header, pushCssMotions, { _calcFrameFlg: true }));
11339
11341
 
11340
- calcDataTiming(`scrollch`, ``, pushScrollchs, { _term: 6, _calcFrameFlg: true });
11342
+ calcDataTiming(`scrollch`, ``, pushScrollchs, { _calcFrameFlg: true });
11341
11343
 
11342
11344
  g_fadeinStockList.forEach(type =>
11343
11345
  _dataObj[`${type}Data`] = calcAnimationData(type, _dataObj[`${type}Data`]));
@@ -11567,8 +11569,10 @@ const pushColors = (_header, _frame, _val, _colorCd, _allFlg, _pattern = ``) =>
11567
11569
  * @param {number} _val
11568
11570
  * @param {string} _styleName
11569
11571
  * @param {string} _styleNameRev
11572
+ * @param {boolean|undefined} _movLock
11573
+ * @param {boolean|undefined} _initManual
11570
11574
  */
11571
- const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev) => {
11575
+ const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev, _movLock, _initManual) => {
11572
11576
 
11573
11577
  const camelHeader = toCapitalize(_header);
11574
11578
  const tkObj = getKeyInfo();
@@ -11577,11 +11581,15 @@ const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev) => {
11577
11581
  if (g_workObj[`mk${camelHeader}CssMotion`][_frame] === undefined) {
11578
11582
  g_workObj[`mk${camelHeader}CssMotion`][_frame] = [];
11579
11583
  g_workObj[`mk${camelHeader}CssMotionName`][_frame] = [];
11584
+ g_workObj[`mk${camelHeader}MovLock`][_frame] = [];
11585
+ g_workObj[`mk${camelHeader}InitManual`][_frame] = [];
11580
11586
  }
11581
11587
  if (_val < 20 || _val >= 1000) {
11582
11588
  const realVal = g_workObj.replaceNums[_val % 1000];
11583
11589
  g_workObj[`mk${camelHeader}CssMotion`][_frame].push(realVal);
11584
11590
  g_workObj[`mk${camelHeader}CssMotionName`][_frame].push(_styleName, _styleNameRev);
11591
+ g_workObj[`mk${camelHeader}MovLock`][_frame].push(_movLock);
11592
+ g_workObj[`mk${camelHeader}InitManual`][_frame].push(_initManual);
11585
11593
 
11586
11594
  } else {
11587
11595
  const colorNum = _val - 20;
@@ -11589,6 +11597,8 @@ const pushCssMotions = (_header, _frame, _val, _styleName, _styleNameRev) => {
11589
11597
  if (g_keyObj[`color${tkObj.keyCtrlPtn}`][j] === colorNum) {
11590
11598
  g_workObj[`mk${camelHeader}CssMotion`][_frame].push(j);
11591
11599
  g_workObj[`mk${camelHeader}CssMotionName`][_frame].push(_styleName, _styleNameRev);
11600
+ g_workObj[`mk${camelHeader}MovLock`][_frame].push(_movLock);
11601
+ g_workObj[`mk${camelHeader}InitManual`][_frame].push(_initManual);
11592
11602
  }
11593
11603
  }
11594
11604
  }
@@ -11723,7 +11733,11 @@ const getArrowSettings = () => {
11723
11733
  });
11724
11734
 
11725
11735
  // モーション管理
11726
- g_typeLists.arrow.forEach(type => g_workObj[`${type}CssMotions`] = fillArray(keyNum, ``));
11736
+ g_typeLists.arrow.forEach(type => {
11737
+ g_workObj[`${type}CssMotions`] = fillArray(keyNum, ``);
11738
+ g_workObj[`${type}MovLock`] = fillArray(keyNum, ``);
11739
+ g_workObj[`${type}InitManual`] = fillArray(keyNum, ``);
11740
+ });
11727
11741
  g_workObj.frzArrowCssMotions = fillArray(keyNum, ``);
11728
11742
  g_workObj.dummyFrzArrowCssMotions = fillArray(keyNum, ``);
11729
11743
 
@@ -11960,12 +11974,10 @@ const getArrowSettings = () => {
11960
11974
  // AppearanceFilterの可視範囲設定
11961
11975
  g_workObj.aprFilterCnt = 0;
11962
11976
 
11963
- // 位置をマニュアルで設定する際は矢印の初期位置をゼロにする
11964
- if (g_keyObj[`initManual${g_keyObj.currentKey}`] !== undefined && g_keyObj[`initManual${g_keyObj.currentKey}`]) {
11965
- g_workObj.stepX = fillArray(g_workObj.stepX.length, 0);
11966
- }
11967
- g_workObj.movLockEnabled = g_keyObj[`movLock${g_keyObj.currentKey}`] === true ? `movLock` : `default`;
11968
- g_workObj.initManualEnabled = g_keyObj[`initManual${g_keyObj.currentKey}`] === true ? `manual` : `auto`;
11977
+ // キー別の移動ロック制御、初期位置のマニュアル可否設定の初期値
11978
+ // 矢印・フリーズアローモーションよりも優先される
11979
+ g_workObj.movLockEnabled = g_keyObj[`movLock${g_keyObj.currentKey}`] === true;
11980
+ g_workObj.initManualEnabled = g_keyObj[`initManual${g_keyObj.currentKey}`] === true;
11969
11981
 
11970
11982
  if (g_stateObj.dataSaveFlg) {
11971
11983
  // ローカルストレージへAdjustment, HitPosition, Volume設定を保存
@@ -12899,7 +12911,7 @@ const mainInit = () => {
12899
12911
  _attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
12900
12912
 
12901
12913
  const arrowRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], arrowName, {
12902
- x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH,
12914
+ x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH,
12903
12915
  });
12904
12916
  /**
12905
12917
  * 矢印毎の属性情報
@@ -12921,8 +12933,9 @@ const mainInit = () => {
12921
12933
  prevY: firstPosY,
12922
12934
  // 現フレーム時の位置
12923
12935
  y: firstPosY,
12936
+ // 移動ロックフラグ(矢印モーション設定後に再設定)
12937
+ movLockFlg: false,
12924
12938
  };
12925
- setArrowY.get(`${g_workObj.movLockEnabled}_${g_workObj.initManualEnabled}`)(arrowName, firstPosY, stepY);
12926
12939
 
12927
12940
  // 矢印色の設定
12928
12941
  // - 枠/塗りつぶし色: g_attrObj[arrowName].Arrow / ArrowShadow
@@ -12934,6 +12947,13 @@ const mainInit = () => {
12934
12947
  arrowSubRoot.classList.add(g_workObj[`${_name}CssMotions`][_j]);
12935
12948
  arrowSubRoot.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
12936
12949
  }
12950
+ g_attrObj[arrowName].movLockFlg = g_workObj[`${_name}MovLock`][_j] || g_workObj.movLockEnabled;
12951
+ const initManualFlg = g_workObj[`${_name}InitManual`][_j] || g_workObj.initManualEnabled;
12952
+ const setArrowYCondition = `${String(g_attrObj[arrowName].movLockFlg)}_${String(initManualFlg)}`;
12953
+ setArrowY.get(setArrowYCondition)(arrowName, firstPosY, stepY);
12954
+ if (!initManualFlg) {
12955
+ addTransform(arrowName, `rootX`, `translateX(${g_workObj.stepX[_j]}px)`);
12956
+ }
12937
12957
 
12938
12958
  /**
12939
12959
  * 矢印オブジェクトの生成
@@ -12978,7 +12998,7 @@ const mainInit = () => {
12978
12998
  currentArrow.prevY = currentArrow.y;
12979
12999
  currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd +
12980
13000
  (g_workObj.motionOnFrames[boostCnt] || 0) * currentArrow.boostDir) * currentArrow.dir;
12981
- movArrowY.get(g_workObj.movLockEnabled)(arrowName, currentArrow.y);
13001
+ movArrowY.get(currentArrow.movLockFlg)(arrowName, currentArrow.y);
12982
13002
  g_motionAlphaFunc.get(g_stateObj.motion)(arrowName, currentArrow);
12983
13003
  currentArrow.boostCnt--;
12984
13004
  }
@@ -13008,7 +13028,7 @@ const mainInit = () => {
13008
13028
  const firstBarLength = g_workObj[`mk${toCapitalize(_name)}Length`][_j][(_arrowCnt - 1) * 2] * g_workObj.boostSpd;
13009
13029
 
13010
13030
  const frzRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], frzName, {
13011
- x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength,
13031
+ x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength,
13012
13032
  });
13013
13033
  /**
13014
13034
  * フリーズアロー毎の属性情報
@@ -13040,8 +13060,9 @@ const mainInit = () => {
13040
13060
  barY: C_ARW_WIDTH / 2 - firstBarLength * dividePos,
13041
13061
  // フリーズアロー(対矢印)の相対位置
13042
13062
  btmY: firstBarLength * g_workObj.scrollDir[_j],
13063
+ // 移動ロックフラグ(矢印モーション設定後に再設定)
13064
+ movLockFlg: false,
13043
13065
  };
13044
- setArrowY.get(`${g_workObj.movLockEnabled}_${g_workObj.initManualEnabled}`)(frzName, firstPosY, stepY);
13045
13066
 
13046
13067
  // フリーズアロー色の設定
13047
13068
  // - 通常時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Normal / NormalShadow / NormalBar
@@ -13110,6 +13131,14 @@ const mainInit = () => {
13110
13131
  obj.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
13111
13132
  });
13112
13133
  }
13134
+ g_attrObj[frzName].movLockFlg = g_workObj[`${_name}MovLock`][_j] || g_workObj.movLockEnabled;
13135
+ const initManualFlg = g_workObj[`${_name}InitManual`][_j] || g_workObj.initManualEnabled;
13136
+ const setArrowYCondition = `${String(g_attrObj[frzName].movLockFlg)}_${String(initManualFlg)}`;
13137
+ setArrowY.get(setArrowYCondition)(frzName, firstPosY, stepY);
13138
+ if (!initManualFlg) {
13139
+ addTransform(frzName, `rootX`, `translateX(${g_workObj.stepX[_j]}px)`);
13140
+ }
13141
+
13113
13142
  g_customJsObj.makeFrzArrow.forEach(func => func(_attrs, frzName, _name, _arrowCnt));
13114
13143
  };
13115
13144
 
@@ -13135,7 +13164,7 @@ const mainInit = () => {
13135
13164
  if (g_workObj.currentSpeed !== 0) {
13136
13165
  currentFrz.prevY = currentFrz.y;
13137
13166
  currentFrz.y -= movY + (g_workObj.motionOnFrames[currentFrz.boostCnt] || 0) * currentFrz.dir * currentFrz.boostDir;
13138
- movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13167
+ movArrowY.get(currentFrz.movLockFlg)(frzName, currentFrz.y);
13139
13168
  g_motionAlphaFunc.get(g_stateObj.motion)(frzName, currentFrz);
13140
13169
  currentFrz.boostCnt--;
13141
13170
  }
@@ -13175,7 +13204,7 @@ const mainInit = () => {
13175
13204
  currentFrz.frzBarLength -= movY * currentFrz.dir;
13176
13205
  if (currentFrz.frzBarLength > 0) {
13177
13206
  currentFrz.y -= movY;
13178
- movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13207
+ movArrowY.get(currentFrz.movLockFlg)(frzName, currentFrz.y);
13179
13208
  } else {
13180
13209
  judgeObjDelete[_name](_j, frzName);
13181
13210
  }
@@ -13442,24 +13471,24 @@ const mainInit = () => {
13442
13471
 
13443
13472
  /**
13444
13473
  * 矢印・フリーズアローの初期位置
13445
- * - movLock_manual: スクロールなし/初期位置マニュアル
13446
- * - movLock_auto: スクロールなし/初期位置自動
13447
- * - default_manual: スクロールあり/初期位置マニュアル(設定上ありえないがdefault_autoと同じにしておく)
13448
- * - default_auto: スクロールあり/初期位置自動
13474
+ * - true_true: スクロールなし/初期位置マニュアル
13475
+ * - true_false: スクロールなし/初期位置自動
13476
+ * - false_true: スクロールあり/初期位置マニュアル
13477
+ * - false_false: スクロールあり/初期位置自動
13449
13478
  */
13450
13479
  const setArrowY = new Map([
13451
- [`movLock_manual`, (_name, _startY, _stepY) => { }],
13452
- [`movLock_auto`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_stepY)})`)],
13453
- [`default_manual`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_startY)})`)],
13454
- [`default_auto`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_startY)})`)],
13480
+ [`true_true`, (_name, _startY, _stepY) => { }],
13481
+ [`true_false`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_stepY)})`)],
13482
+ [`false_true`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_startY)})`)],
13483
+ [`false_false`, (_name, _startY, _stepY) => addTransform(_name, `root`, `translateY(${wUnit(_startY)})`)],
13455
13484
  ]);
13456
13485
 
13457
13486
  /**
13458
13487
  * 矢印・フリーズアローの移動処理
13459
13488
  */
13460
13489
  const movArrowY = new Map([
13461
- [`movLock`, (_name, _y) => { }],
13462
- [`default`, (_name, _y) => addTransform(_name, `root`, `translateY(${wUnit(_y)})`)],
13490
+ [true, (_name, _y) => { }],
13491
+ [false, (_name, _y) => addTransform(_name, `root`, `translateY(${wUnit(_y)})`)],
13463
13492
  ]);
13464
13493
 
13465
13494
  /**
@@ -13777,9 +13806,12 @@ const changeColors = (_mkColor, _mkColorCd, _header, _name) => {
13777
13806
  */
13778
13807
  const changeCssMotions = (_header, _name, _frameNum) => {
13779
13808
  const camelHeader = _header === `` ? _name : `${_header}${toCapitalize(_name)}`;
13780
- g_workObj[`mk${toCapitalize(camelHeader)}CssMotion`]?.[_frameNum]?.forEach((targetj, j) =>
13809
+ g_workObj[`mk${toCapitalize(camelHeader)}CssMotion`]?.[_frameNum]?.forEach((targetj, j) => {
13781
13810
  g_workObj[`${camelHeader}CssMotions`][targetj] =
13782
- g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + (g_workObj.dividePos[targetj] % 2)]);
13811
+ g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + (g_workObj.dividePos[targetj] % 2)]
13812
+ g_workObj[`${camelHeader}MovLock`][targetj] = g_workObj[`mk${toCapitalize(camelHeader)}MovLock`][_frameNum][j];
13813
+ g_workObj[`${camelHeader}InitManual`][targetj] = g_workObj[`mk${toCapitalize(camelHeader)}InitManual`][_frameNum][j];
13814
+ });
13783
13815
  };
13784
13816
 
13785
13817
  /**
@@ -13878,7 +13910,7 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
13878
13910
  currentFrz.btmY -= delFrzLength + delFrzMotionLength + hitPos;
13879
13911
  currentFrz.y += delFrzLength;
13880
13912
  currentFrz.isMoving = false;
13881
- movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13913
+ movArrowY.get(currentFrz.movLockFlg)(frzName, currentFrz.y);
13882
13914
 
13883
13915
  /**
13884
13916
  * フリーズアロー(ヒット時)の色変更
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2026/02/27 (v45.1.1)
8
+ * Revised : 2026/03/01 (v45.3.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -27,7 +27,7 @@ const C_LBL_BASICFONT = `"Meiryo UI", sans-serif`;
27
27
  const g_limitObj = {
28
28
 
29
29
  // Adjustment, HitPositionの設定幅
30
- adjustment: 30,
30
+ adjustment: 90,
31
31
  hitPosition: 50,
32
32
 
33
33
  // playbackRate有効時のAdjustmentの設定値の文字サイズ、行幅
@@ -847,8 +847,8 @@ const g_typeLists = {
847
847
  `FColorNormalShadow`, `FColorNormalShadowCd`,
848
848
  `FColorHit`, `FColorHitCd`, `FColorHitBar`, `FColorHitBarCd`,
849
849
  `FColorHitShadow`, `FColorHitShadowCd`,
850
- `ArrowCssMotion`, `ArrowCssMotionName`,
851
- `FrzCssMotion`, `FrzCssMotionName`,
850
+ `ArrowCssMotion`, `ArrowCssMotionName`, `ArrowMovLock`, `ArrowInitManual`,
851
+ `FrzCssMotion`, `FrzCssMotionName`, `FrzMovLock`, `FrzInitManual`,
852
852
  `ArrowColorChangeAll`, `FrzColorChangeAll`,
853
853
  ],
854
854
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "45.2.0",
3
+ "version": "45.3.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {