danoniplus 45.0.0 → 45.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 +36 -35
- package/js/lib/danoni_constants.js +23 -17
- package/package.json +1 -1
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/
|
|
7
|
+
* Revised : 2026/02/27
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 45.
|
|
12
|
-
const g_revisedDate = `2026/02/
|
|
11
|
+
const g_version = `Ver 45.1.1`;
|
|
12
|
+
const g_revisedDate = `2026/02/27`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -1692,7 +1692,7 @@ const createMultipleSprite = (_baseName, _num, { x = 0, priority = g_transPriori
|
|
|
1692
1692
|
for (let j = 0; j <= _num; j++) {
|
|
1693
1693
|
createEmptySprite(sprite, `${_baseName}${j}`);
|
|
1694
1694
|
}
|
|
1695
|
-
|
|
1695
|
+
addTransform(_baseName, `root`, `translateX(${x}px)`, priority);
|
|
1696
1696
|
return sprite;
|
|
1697
1697
|
};
|
|
1698
1698
|
|
|
@@ -12085,15 +12085,15 @@ const mainInit = () => {
|
|
|
12085
12085
|
}
|
|
12086
12086
|
|
|
12087
12087
|
addTransform(`mainSprite`, `root`, `scale(${g_workObj.scale})`, g_transPriority.scale);
|
|
12088
|
-
|
|
12088
|
+
addTransform(`mainSprite`, `main`, `translateX(${g_workObj.playingX}px) translateY(${g_posObj.stepY - C_STEP_Y + g_headerObj.playingY}px)`, g_transPriority.base);
|
|
12089
12089
|
|
|
12090
12090
|
// 曲情報・判定カウント用スプライトを作成(メインスプライトより上位)
|
|
12091
12091
|
const infoSprite = createEmptySprite(divRoot, `infoSprite`, mainCommonPos);
|
|
12092
|
-
|
|
12092
|
+
addTransform(`infoSprite`, `main`, `translateX(${g_workObj.playingX}px) translateY(${g_headerObj.playingY}px)`, g_transPriority.base);
|
|
12093
12093
|
|
|
12094
12094
|
// 判定系スプライトを作成(メインスプライトより上位)
|
|
12095
12095
|
const judgeSprite = createEmptySprite(divRoot, `judgeSprite`, mainCommonPos);
|
|
12096
|
-
|
|
12096
|
+
addTransform(`judgeSprite`, `main`, `translateX(${g_workObj.playingX}px) translateY(${g_headerObj.playingY}px)`, g_transPriority.base);
|
|
12097
12097
|
const tkObj = getKeyInfo();
|
|
12098
12098
|
const [keyCtrlPtn, keyNum] = [tkObj.keyCtrlPtn, tkObj.keyNum];
|
|
12099
12099
|
|
|
@@ -12208,11 +12208,6 @@ const mainInit = () => {
|
|
|
12208
12208
|
changeAppearanceBar(g_appearanceRanges.includes(g_stateObj.appearance)
|
|
12209
12209
|
? g_hidSudObj.filterPos : g_hidSudObj.filterPosDefault[g_stateObj.appearance], 0);
|
|
12210
12210
|
|
|
12211
|
-
// Shaking初期化
|
|
12212
|
-
if (g_stateObj.shaking !== C_FLG_OFF) {
|
|
12213
|
-
addXY(`mainSprite`, `shaking`, 0, 0, { priority: g_transPriority.shaking });
|
|
12214
|
-
}
|
|
12215
|
-
|
|
12216
12211
|
// 現在の矢印・フリーズアローの速度、個別加算速度の初期化 (速度変化時に直す)
|
|
12217
12212
|
g_workObj.currentSpeed = 2;
|
|
12218
12213
|
g_workObj.boostSpd = 1;
|
|
@@ -12671,6 +12666,7 @@ const mainInit = () => {
|
|
|
12671
12666
|
const judgeObjDelete = {};
|
|
12672
12667
|
g_typeLists.arrow.forEach(type =>
|
|
12673
12668
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
12669
|
+
delTransform(_deleteName, `root`);
|
|
12674
12670
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
12675
12671
|
document.getElementById(_deleteName).remove();
|
|
12676
12672
|
delete g_attrObj[_deleteName];
|
|
@@ -12889,8 +12885,8 @@ const mainInit = () => {
|
|
|
12889
12885
|
(_attrs.initY * g_workObj.boostSpd +
|
|
12890
12886
|
_attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
|
|
12891
12887
|
|
|
12892
|
-
const
|
|
12893
|
-
x: g_workObj.stepX[_j], y:
|
|
12888
|
+
const arrowRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], arrowName, {
|
|
12889
|
+
x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH,
|
|
12894
12890
|
});
|
|
12895
12891
|
/**
|
|
12896
12892
|
* 矢印毎の属性情報
|
|
@@ -12913,15 +12909,17 @@ const mainInit = () => {
|
|
|
12913
12909
|
// 現フレーム時の位置
|
|
12914
12910
|
y: firstPosY,
|
|
12915
12911
|
};
|
|
12912
|
+
addTransform(arrowName, `root`, `translateY(${wUnit(firstPosY)})`);
|
|
12916
12913
|
|
|
12917
12914
|
// 矢印色の設定
|
|
12918
12915
|
// - 枠/塗りつぶし色: g_attrObj[arrowName].Arrow / ArrowShadow
|
|
12919
12916
|
g_typeLists.arrowColor.forEach(val => g_attrObj[arrowName][`Arrow${val}`] = g_workObj[`${_name}${val}Colors`][_j]);
|
|
12920
|
-
arrowSprite[g_workObj.dividePos[_j]].appendChild(
|
|
12917
|
+
arrowSprite[g_workObj.dividePos[_j]].appendChild(arrowRoot);
|
|
12918
|
+
const arrowSubRoot = createEmptySprite(arrowRoot, `sub${arrowName}`, { x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
12921
12919
|
|
|
12922
12920
|
if (g_workObj[`${_name}CssMotions`][_j] !== ``) {
|
|
12923
|
-
|
|
12924
|
-
|
|
12921
|
+
arrowSubRoot.classList.add(g_workObj[`${_name}CssMotions`][_j]);
|
|
12922
|
+
arrowSubRoot.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
|
|
12925
12923
|
}
|
|
12926
12924
|
|
|
12927
12925
|
/**
|
|
@@ -12938,11 +12936,11 @@ const mainInit = () => {
|
|
|
12938
12936
|
if (_shadowColor === `Default`) {
|
|
12939
12937
|
arrShadow.style.opacity = 0.5;
|
|
12940
12938
|
}
|
|
12941
|
-
|
|
12939
|
+
arrowSubRoot.appendChild(arrShadow);
|
|
12942
12940
|
}
|
|
12943
12941
|
|
|
12944
12942
|
// 矢印 (枠)
|
|
12945
|
-
|
|
12943
|
+
arrowSubRoot.appendChild(createColorObject2(`${_name}Top${_j}_${_arrowCnt}`, {
|
|
12946
12944
|
background: _color, rotate: g_workObj.arrowRtn[_j],
|
|
12947
12945
|
}));
|
|
12948
12946
|
g_customJsObj.makeArrow.forEach(func => func(_attrs, arrowName, _name, _arrowCnt));
|
|
@@ -12967,7 +12965,7 @@ const mainInit = () => {
|
|
|
12967
12965
|
currentArrow.prevY = currentArrow.y;
|
|
12968
12966
|
currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd +
|
|
12969
12967
|
(g_workObj.motionOnFrames[boostCnt] || 0) * currentArrow.boostDir) * currentArrow.dir;
|
|
12970
|
-
|
|
12968
|
+
addTransform(arrowName, `root`, `translateY(${wUnit(currentArrow.y)})`);
|
|
12971
12969
|
g_motionAlphaFunc.get(g_stateObj.motion)(arrowName, currentArrow);
|
|
12972
12970
|
currentArrow.boostCnt--;
|
|
12973
12971
|
}
|
|
@@ -12997,7 +12995,7 @@ const mainInit = () => {
|
|
|
12997
12995
|
const firstBarLength = g_workObj[`mk${toCapitalize(_name)}Length`][_j][(_arrowCnt - 1) * 2] * g_workObj.boostSpd;
|
|
12998
12996
|
|
|
12999
12997
|
const frzRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], frzName, {
|
|
13000
|
-
x: g_workObj.stepX[_j], y:
|
|
12998
|
+
x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength,
|
|
13001
12999
|
});
|
|
13002
13000
|
/**
|
|
13003
13001
|
* フリーズアロー毎の属性情報
|
|
@@ -13030,6 +13028,8 @@ const mainInit = () => {
|
|
|
13030
13028
|
// フリーズアロー(対矢印)の相対位置
|
|
13031
13029
|
btmY: firstBarLength * g_workObj.scrollDir[_j],
|
|
13032
13030
|
};
|
|
13031
|
+
addTransform(frzName, `root`, `translateY(${wUnit(firstPosY)})`);
|
|
13032
|
+
|
|
13033
13033
|
// フリーズアロー色の設定
|
|
13034
13034
|
// - 通常時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Normal / NormalShadow / NormalBar
|
|
13035
13035
|
// - ヒット時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Hit / HitShadow / HitBar
|
|
@@ -13042,12 +13042,13 @@ const mainInit = () => {
|
|
|
13042
13042
|
});
|
|
13043
13043
|
arrowSprite[g_workObj.dividePos[_j]].appendChild(frzRoot);
|
|
13044
13044
|
let shadowColor = _shadowColor === `Default` ? _normalColor : _shadowColor;
|
|
13045
|
+
const frzSubRoot = createEmptySprite(frzRoot, `sub${frzName}`, { x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength });
|
|
13045
13046
|
|
|
13046
13047
|
/**
|
|
13047
13048
|
* フリーズアローオブジェクトの生成
|
|
13048
13049
|
* - 後で生成されたものが手前に表示されるため、以下の順で作成
|
|
13049
13050
|
*/
|
|
13050
|
-
multiAppend(
|
|
13051
|
+
multiAppend(frzSubRoot,
|
|
13051
13052
|
|
|
13052
13053
|
// フリーズアロー帯(frzBar)
|
|
13053
13054
|
createColorObject2(`${_name}Bar${frzNo}`, {
|
|
@@ -13055,9 +13056,9 @@ const mainInit = () => {
|
|
|
13055
13056
|
opacity: 0.75,
|
|
13056
13057
|
}),
|
|
13057
13058
|
);
|
|
13058
|
-
const frzTopRoot = createEmptySprite(
|
|
13059
|
+
const frzTopRoot = createEmptySprite(frzSubRoot, `${_name}TopRoot${frzNo}`,
|
|
13059
13060
|
{ x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
13060
|
-
const frzBtmRoot = createEmptySprite(
|
|
13061
|
+
const frzBtmRoot = createEmptySprite(frzSubRoot, `${_name}BtmRoot${frzNo}`,
|
|
13061
13062
|
{ x: 0, y: g_attrObj[frzName].btmY, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
13062
13063
|
|
|
13063
13064
|
multiAppend(frzTopRoot,
|
|
@@ -13087,8 +13088,8 @@ const mainInit = () => {
|
|
|
13087
13088
|
|
|
13088
13089
|
);
|
|
13089
13090
|
if (g_workObj[`${_name}CssMotions`][_j] !== ``) {
|
|
13090
|
-
|
|
13091
|
-
|
|
13091
|
+
frzSubRoot.classList.add(g_workObj[`${_name}CssMotions`][_j]);
|
|
13092
|
+
frzSubRoot.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
|
|
13092
13093
|
}
|
|
13093
13094
|
if (g_workObj[`${_name}ArrowCssMotions`][_j] !== ``) {
|
|
13094
13095
|
[frzTopRoot, frzBtmRoot].forEach(obj => {
|
|
@@ -13121,7 +13122,7 @@ const mainInit = () => {
|
|
|
13121
13122
|
if (g_workObj.currentSpeed !== 0) {
|
|
13122
13123
|
currentFrz.prevY = currentFrz.y;
|
|
13123
13124
|
currentFrz.y -= movY + (g_workObj.motionOnFrames[currentFrz.boostCnt] || 0) * currentFrz.dir * currentFrz.boostDir;
|
|
13124
|
-
|
|
13125
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13125
13126
|
g_motionAlphaFunc.get(g_stateObj.motion)(frzName, currentFrz);
|
|
13126
13127
|
currentFrz.boostCnt--;
|
|
13127
13128
|
}
|
|
@@ -13161,7 +13162,7 @@ const mainInit = () => {
|
|
|
13161
13162
|
currentFrz.frzBarLength -= movY * currentFrz.dir;
|
|
13162
13163
|
if (currentFrz.frzBarLength > 0) {
|
|
13163
13164
|
currentFrz.y -= movY;
|
|
13164
|
-
|
|
13165
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13165
13166
|
} else {
|
|
13166
13167
|
judgeObjDelete[_name](_j, frzName);
|
|
13167
13168
|
}
|
|
@@ -13574,20 +13575,20 @@ const changeAppearanceFilter = (_num = 10) => {
|
|
|
13574
13575
|
$id(`arrowSprite${topNum + j}`).clipPath = topShape;
|
|
13575
13576
|
$id(`arrowSprite${bottomNum + j}`).clipPath = bottomShape;
|
|
13576
13577
|
|
|
13577
|
-
|
|
13578
|
-
|
|
13578
|
+
addTransform(`filterBar${topNum + j}`, `appearance`, `translateY(${parseFloat($id(`arrowSprite${j}`).top) + topDist}px)`, g_transPriority.layer);
|
|
13579
|
+
addTransform(`filterBar${bottomNum + j}`, `appearance`, `translateY(${parseFloat($id(`arrowSprite${j + 1}`).top) + bottomDist}px)`, g_transPriority.layer);
|
|
13579
13580
|
|
|
13580
13581
|
if (![`Default`, `Halfway`].includes(g_stateObj.stepArea)) {
|
|
13581
|
-
|
|
13582
|
-
|
|
13582
|
+
addTransform(`filterBar${bottomNum + j}_HS`, `appearance`, `translateY(${parseFloat($id(`arrowSprite${j}`).top) + bottomDist}px)`, g_transPriority.layer);
|
|
13583
|
+
addTransform(`filterBar${topNum + j}_HS`, `appearance`, `translateY(${parseFloat($id(`arrowSprite${j + 1}`).top) + topDist}px)`, g_transPriority.layer);
|
|
13583
13584
|
}
|
|
13584
13585
|
}
|
|
13585
13586
|
|
|
13586
13587
|
// フィルターバーのパーセント表示(フィルターバーが複数表示されるなど複雑なため、最初の階層グループの位置に追従)
|
|
13587
13588
|
if (g_appearanceRanges.includes(g_stateObj.appearance)) {
|
|
13588
13589
|
const currentBarNum = g_hidSudObj.std[g_stateObj.appearance][g_stateObj.reverse];
|
|
13589
|
-
|
|
13590
|
-
(currentBarNum % 2 === 0 ? bottomDist : topDist)
|
|
13590
|
+
addTransform(`filterView`, `appearance`, `translateY(${parseFloat($id(`arrowSprite${currentBarNum % 2}`).top) +
|
|
13591
|
+
(currentBarNum % 2 === 0 ? bottomDist : topDist)}px)`, g_transPriority.layer);
|
|
13591
13592
|
filterView.textContent = `${_num}%`;
|
|
13592
13593
|
g_hidSudObj.filterPos = _num;
|
|
13593
13594
|
}
|
|
@@ -13830,7 +13831,6 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
13830
13831
|
|
|
13831
13832
|
// フリーズアロー位置の修正(ステップゾーン上に来るように)
|
|
13832
13833
|
const delFrzLength = parseFloat($id(`stepRoot${_j}`).top) - currentFrz.y;
|
|
13833
|
-
$id(frzName).top = $id(`stepRoot${_j}`).top;
|
|
13834
13834
|
|
|
13835
13835
|
// 早押ししたboostCnt分のフリーズアロー終端位置の修正
|
|
13836
13836
|
const delFrzMotionLength = sumData(g_workObj.motionOnFrames.slice(0, currentFrz.boostCnt + 1));
|
|
@@ -13843,6 +13843,7 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
13843
13843
|
currentFrz.btmY -= delFrzLength + delFrzMotionLength + hitPos;
|
|
13844
13844
|
currentFrz.y += delFrzLength;
|
|
13845
13845
|
currentFrz.isMoving = false;
|
|
13846
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13846
13847
|
|
|
13847
13848
|
/**
|
|
13848
13849
|
* フリーズアロー(ヒット時)の色変更
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2026/02/
|
|
8
|
+
* Revised : 2026/02/27 (v45.1.1)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -1425,6 +1425,11 @@ const addTransform = (_id, _transformId, _transform, _priority = 1000) => {
|
|
|
1425
1425
|
const delTransform = (_id, _transformId) => {
|
|
1426
1426
|
if (g_transforms[_id]) {
|
|
1427
1427
|
g_transforms[_id].delete(_transformId);
|
|
1428
|
+
if (g_transforms[_id].size === 0) {
|
|
1429
|
+
delete g_transforms[_id];
|
|
1430
|
+
$id(_id).transform = ``;
|
|
1431
|
+
return;
|
|
1432
|
+
}
|
|
1428
1433
|
$id(_id).transform = Array.from(g_transforms[_id].values())
|
|
1429
1434
|
.sort((a, b) => b.priority - a.priority)
|
|
1430
1435
|
.map(v => v.transform)
|
|
@@ -1722,7 +1727,7 @@ const g_stepAreaFunc = new Map([
|
|
|
1722
1727
|
['Halfway', () => {
|
|
1723
1728
|
g_arrowGroupSprite.forEach(sprite => {
|
|
1724
1729
|
for (let j = 0; j < g_stateObj.layerNum; j++) {
|
|
1725
|
-
|
|
1730
|
+
addTransform(`${sprite}${j}`, `stepArea`, `translateY(${halfwayOffset(j)}px)`, g_transPriority.stepArea);
|
|
1726
1731
|
}
|
|
1727
1732
|
});
|
|
1728
1733
|
}],
|
|
@@ -1733,7 +1738,7 @@ const g_stepAreaFunc = new Map([
|
|
|
1733
1738
|
if (g_workObj.orgFlatFlg) {
|
|
1734
1739
|
g_arrowGroupSprite.forEach(sprite => {
|
|
1735
1740
|
for (let j = g_stateObj.layerNumDf; j < g_stateObj.layerNum; j++) {
|
|
1736
|
-
|
|
1741
|
+
addTransform(`${sprite}${j}`, `stepArea`, `translateY(${halfwayOffset(j)}px)`, g_transPriority.stepArea);
|
|
1737
1742
|
}
|
|
1738
1743
|
});
|
|
1739
1744
|
}
|
|
@@ -1745,7 +1750,7 @@ const g_stepAreaFunc = new Map([
|
|
|
1745
1750
|
if (g_workObj.orgFlatFlg) {
|
|
1746
1751
|
g_arrowGroupSprite.forEach(sprite => {
|
|
1747
1752
|
for (let j = 0; j < g_stateObj.layerNumDf; j++) {
|
|
1748
|
-
|
|
1753
|
+
addTransform(`${sprite}${j}`, `stepArea`, `translateY(${halfwayOffset(j)}px)`, g_transPriority.stepArea);
|
|
1749
1754
|
}
|
|
1750
1755
|
});
|
|
1751
1756
|
}
|
|
@@ -1753,7 +1758,7 @@ const g_stepAreaFunc = new Map([
|
|
|
1753
1758
|
['2Step', () => {
|
|
1754
1759
|
g_arrowGroupSprite.forEach(sprite => {
|
|
1755
1760
|
for (let j = g_stateObj.layerNumDf; j < g_stateObj.layerNum; j++) {
|
|
1756
|
-
|
|
1761
|
+
addTransform(`${sprite}${j}`, `stepArea`, `translateY(${halfwayOffset(j)}px)`, g_transPriority.stepArea);
|
|
1757
1762
|
}
|
|
1758
1763
|
});
|
|
1759
1764
|
}],
|
|
@@ -1776,36 +1781,37 @@ const g_stepAreaFunc = new Map([
|
|
|
1776
1781
|
const getShakingDist = () => (Math.abs((g_scoreObj.baseFrame / 2) % 100 - 50) - 25);
|
|
1777
1782
|
const g_shakingFunc = new Map([
|
|
1778
1783
|
['OFF', () => true],
|
|
1779
|
-
['Horizontal', () =>
|
|
1780
|
-
['Vertical', () =>
|
|
1784
|
+
['Horizontal', () => addTransform(`mainSprite`, `shakingX`, `translateX(${getShakingDist()}px)`, g_transPriority.shaking)],
|
|
1785
|
+
['Vertical', () => addTransform(`mainSprite`, `shakingY`, `translateY(${getShakingDist() / 2}px)`, g_transPriority.shaking)],
|
|
1781
1786
|
['X-Horizontal', () => {
|
|
1782
1787
|
for (let j = 0; j < g_stateObj.layerNum; j++) {
|
|
1783
|
-
|
|
1788
|
+
addTransform(`mainSprite${j}`, `shakingX`, `translateX(${getDirFromLayer(j) * (4 / 3) * getShakingDist()}px)`, g_transPriority.shaking);
|
|
1784
1789
|
}
|
|
1785
1790
|
}],
|
|
1786
1791
|
['X-Vertical', () => {
|
|
1787
1792
|
for (let j = 0; j < g_stateObj.layerNum; j++) {
|
|
1788
|
-
|
|
1793
|
+
addTransform(`mainSprite${j}`, `shakingY`, `translateY(${getDirFromLayer(j) * getShakingDist()}px)`, g_transPriority.shaking);
|
|
1789
1794
|
}
|
|
1790
1795
|
}],
|
|
1791
1796
|
['Drunk', () => {
|
|
1792
|
-
|
|
1793
|
-
const
|
|
1797
|
+
// Drunkは揺れの軸が途中で変わるため、基準位置取得のためにmainSpriteのみaddX, addYを使用
|
|
1798
|
+
const shakeX = g_posXs.mainSprite?.get(`shakingX`) ?? 0;
|
|
1799
|
+
const shakeY = g_posYs.mainSprite?.get(`shakingY`) ?? 0;
|
|
1794
1800
|
if (shakeX === 0 && shakeY === 0) {
|
|
1795
1801
|
g_workObj.drunkXFlg = Math.random() < 0.5;
|
|
1796
1802
|
g_workObj.drunkYFlg = Math.random() < 0.5;
|
|
1797
1803
|
}
|
|
1798
1804
|
if (g_workObj.drunkXFlg) {
|
|
1799
1805
|
const deltaX = getShakingDist();
|
|
1800
|
-
addX(`mainSprite`, `
|
|
1801
|
-
|
|
1802
|
-
|
|
1806
|
+
addX(`mainSprite`, `shakingX`, deltaX, { priority: g_transPriority.shaking });
|
|
1807
|
+
addTransform(`infoSprite`, `shakingX`, `translateX(${deltaX}px)`, g_transPriority.shaking);
|
|
1808
|
+
addTransform(`judgeSprite`, `shakingX`, `translateX(${deltaX}px)`, g_transPriority.shaking);
|
|
1803
1809
|
}
|
|
1804
1810
|
if (g_workObj.drunkYFlg) {
|
|
1805
1811
|
const deltaY = getShakingDist() / 2;
|
|
1806
|
-
addY(`mainSprite`, `
|
|
1807
|
-
|
|
1808
|
-
|
|
1812
|
+
addY(`mainSprite`, `shakingY`, deltaY, { priority: g_transPriority.shaking });
|
|
1813
|
+
addTransform(`infoSprite`, `shakingY`, `translateY(${deltaY}px)`, g_transPriority.shaking);
|
|
1814
|
+
addTransform(`judgeSprite`, `shakingY`, `translateY(${deltaY}px)`, g_transPriority.shaking);
|
|
1809
1815
|
}
|
|
1810
1816
|
}],
|
|
1811
1817
|
['S-Drunk', () => {
|