danoniplus 45.1.1 → 45.2.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.
Files changed (2) hide show
  1. package/js/danoni_main.js +48 -13
  2. package/package.json +1 -1
package/js/danoni_main.js CHANGED
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 45.1.1`;
11
+ const g_version = `Ver 45.2.0`;
12
12
  const g_revisedDate = `2026/02/27`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -5010,6 +5010,12 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
5010
5010
  // キーの最小横幅 (minWidthX)
5011
5011
  g_keyObj[`minWidth${newKey}`] = _dosObj[`minWidth${newKey}`] ?? g_keyObj[`minWidth${newKey}`] ?? g_keyObj.minWidthDefault;
5012
5012
 
5013
+ // 移動ロック (movLockX)
5014
+ g_keyObj[`movLock${newKey}`] = setBoolVal(_dosObj[`movLock${newKey}`] ?? g_keyObj[`movLock${newKey}`], false);
5015
+
5016
+ // 位置マニュアル化 (initManualX)
5017
+ g_keyObj[`initManual${newKey}`] = setBoolVal(_dosObj[`initManual${newKey}`] ?? g_keyObj[`initManual${newKey}`], false);
5018
+
5013
5019
  // キーコンフィグ (keyCtrlX_Y)
5014
5020
  g_keyObj.minPatterns = newKeyMultiParam(newKey, `keyCtrl`, toKeyCtrlArray, {
5015
5021
  errCd: `E_0104`, baseCopyFlg: true,
@@ -11954,6 +11960,13 @@ const getArrowSettings = () => {
11954
11960
  // AppearanceFilterの可視範囲設定
11955
11961
  g_workObj.aprFilterCnt = 0;
11956
11962
 
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`;
11969
+
11957
11970
  if (g_stateObj.dataSaveFlg) {
11958
11971
  // ローカルストレージへAdjustment, HitPosition, Volume設定を保存
11959
11972
  // 変更が確定した時点で表示用のキャッシュを解放
@@ -12881,9 +12894,9 @@ const mainInit = () => {
12881
12894
  const colorPos = g_keyObj[`color${keyCtrlPtn}`][_j];
12882
12895
 
12883
12896
  const arrowName = `${_name}${_j}_${_arrowCnt}`;
12884
- const firstPosY = C_STEP_Y + g_posObj.reverseStepY * dividePos +
12885
- (_attrs.initY * g_workObj.boostSpd +
12886
- _attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
12897
+ const stepY = C_STEP_Y + g_posObj.reverseStepY * dividePos;
12898
+ const firstPosY = stepY + (_attrs.initY * g_workObj.boostSpd +
12899
+ _attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
12887
12900
 
12888
12901
  const arrowRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], arrowName, {
12889
12902
  x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH,
@@ -12909,7 +12922,7 @@ const mainInit = () => {
12909
12922
  // 現フレーム時の位置
12910
12923
  y: firstPosY,
12911
12924
  };
12912
- addTransform(arrowName, `root`, `translateY(${wUnit(firstPosY)})`);
12925
+ setArrowY.get(`${g_workObj.movLockEnabled}_${g_workObj.initManualEnabled}`)(arrowName, firstPosY, stepY);
12913
12926
 
12914
12927
  // 矢印色の設定
12915
12928
  // - 枠/塗りつぶし色: g_attrObj[arrowName].Arrow / ArrowShadow
@@ -12965,7 +12978,7 @@ const mainInit = () => {
12965
12978
  currentArrow.prevY = currentArrow.y;
12966
12979
  currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd +
12967
12980
  (g_workObj.motionOnFrames[boostCnt] || 0) * currentArrow.boostDir) * currentArrow.dir;
12968
- addTransform(arrowName, `root`, `translateY(${wUnit(currentArrow.y)})`);
12981
+ movArrowY.get(g_workObj.movLockEnabled)(arrowName, currentArrow.y);
12969
12982
  g_motionAlphaFunc.get(g_stateObj.motion)(arrowName, currentArrow);
12970
12983
  currentArrow.boostCnt--;
12971
12984
  }
@@ -12989,9 +13002,9 @@ const mainInit = () => {
12989
13002
  const dividePos = g_workObj.dividePos[_j] % 2;
12990
13003
  const frzNo = `${_j}_${_arrowCnt}`;
12991
13004
  const frzName = `${_name}${frzNo}`;
12992
- const firstPosY = C_STEP_Y + g_posObj.reverseStepY * dividePos +
12993
- (_attrs.initY * g_workObj.boostSpd +
12994
- _attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
13005
+ const stepY = C_STEP_Y + g_posObj.reverseStepY * dividePos;
13006
+ const firstPosY = stepY + (_attrs.initY * g_workObj.boostSpd +
13007
+ _attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
12995
13008
  const firstBarLength = g_workObj[`mk${toCapitalize(_name)}Length`][_j][(_arrowCnt - 1) * 2] * g_workObj.boostSpd;
12996
13009
 
12997
13010
  const frzRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], frzName, {
@@ -13028,7 +13041,7 @@ const mainInit = () => {
13028
13041
  // フリーズアロー(対矢印)の相対位置
13029
13042
  btmY: firstBarLength * g_workObj.scrollDir[_j],
13030
13043
  };
13031
- addTransform(frzName, `root`, `translateY(${wUnit(firstPosY)})`);
13044
+ setArrowY.get(`${g_workObj.movLockEnabled}_${g_workObj.initManualEnabled}`)(frzName, firstPosY, stepY);
13032
13045
 
13033
13046
  // フリーズアロー色の設定
13034
13047
  // - 通常時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Normal / NormalShadow / NormalBar
@@ -13122,7 +13135,7 @@ const mainInit = () => {
13122
13135
  if (g_workObj.currentSpeed !== 0) {
13123
13136
  currentFrz.prevY = currentFrz.y;
13124
13137
  currentFrz.y -= movY + (g_workObj.motionOnFrames[currentFrz.boostCnt] || 0) * currentFrz.dir * currentFrz.boostDir;
13125
- addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
13138
+ movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13126
13139
  g_motionAlphaFunc.get(g_stateObj.motion)(frzName, currentFrz);
13127
13140
  currentFrz.boostCnt--;
13128
13141
  }
@@ -13162,7 +13175,7 @@ const mainInit = () => {
13162
13175
  currentFrz.frzBarLength -= movY * currentFrz.dir;
13163
13176
  if (currentFrz.frzBarLength > 0) {
13164
13177
  currentFrz.y -= movY;
13165
- addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
13178
+ movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13166
13179
  } else {
13167
13180
  judgeObjDelete[_name](_j, frzName);
13168
13181
  }
@@ -13427,6 +13440,28 @@ const mainInit = () => {
13427
13440
  g_timeoutEvtId = setTimeout(flowTimeline, 1000 / g_fps);
13428
13441
  };
13429
13442
 
13443
+ /**
13444
+ * 矢印・フリーズアローの初期位置
13445
+ * - movLock_manual: スクロールなし/初期位置マニュアル
13446
+ * - movLock_auto: スクロールなし/初期位置自動
13447
+ * - default_manual: スクロールあり/初期位置マニュアル(設定上ありえないがdefault_autoと同じにしておく)
13448
+ * - default_auto: スクロールあり/初期位置自動
13449
+ */
13450
+ 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)})`)],
13455
+ ]);
13456
+
13457
+ /**
13458
+ * 矢印・フリーズアローの移動処理
13459
+ */
13460
+ const movArrowY = new Map([
13461
+ [`movLock`, (_name, _y) => { }],
13462
+ [`default`, (_name, _y) => addTransform(_name, `root`, `translateY(${wUnit(_y)})`)],
13463
+ ]);
13464
+
13430
13465
  /**
13431
13466
  * ステップゾーン、フリーズアローヒット部分の生成
13432
13467
  * @param {number} _j
@@ -13843,7 +13878,7 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
13843
13878
  currentFrz.btmY -= delFrzLength + delFrzMotionLength + hitPos;
13844
13879
  currentFrz.y += delFrzLength;
13845
13880
  currentFrz.isMoving = false;
13846
- addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
13881
+ movArrowY.get(g_workObj.movLockEnabled)(frzName, currentFrz.y);
13847
13882
 
13848
13883
  /**
13849
13884
  * フリーズアロー(ヒット時)の色変更
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "45.1.1",
3
+ "version": "45.2.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {