danoniplus 45.0.0 → 45.1.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 +24 -18
- package/js/lib/danoni_constants.js +6 -1
- 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.
|
|
11
|
+
const g_version = `Ver 45.1.0`;
|
|
12
12
|
const g_revisedDate = `2026/02/26`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
@@ -12671,6 +12671,7 @@ const mainInit = () => {
|
|
|
12671
12671
|
const judgeObjDelete = {};
|
|
12672
12672
|
g_typeLists.arrow.forEach(type =>
|
|
12673
12673
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
12674
|
+
delTransform(_deleteName, `root`);
|
|
12674
12675
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
12675
12676
|
document.getElementById(_deleteName).remove();
|
|
12676
12677
|
delete g_attrObj[_deleteName];
|
|
@@ -12889,8 +12890,8 @@ const mainInit = () => {
|
|
|
12889
12890
|
(_attrs.initY * g_workObj.boostSpd +
|
|
12890
12891
|
_attrs.initBoostY * g_workObj.boostDir) * g_workObj.scrollDir[_j];
|
|
12891
12892
|
|
|
12892
|
-
const
|
|
12893
|
-
x: g_workObj.stepX[_j], y:
|
|
12893
|
+
const arrowRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], arrowName, {
|
|
12894
|
+
x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH,
|
|
12894
12895
|
});
|
|
12895
12896
|
/**
|
|
12896
12897
|
* 矢印毎の属性情報
|
|
@@ -12913,15 +12914,17 @@ const mainInit = () => {
|
|
|
12913
12914
|
// 現フレーム時の位置
|
|
12914
12915
|
y: firstPosY,
|
|
12915
12916
|
};
|
|
12917
|
+
addTransform(arrowName, `root`, `translateY(${wUnit(firstPosY)})`);
|
|
12916
12918
|
|
|
12917
12919
|
// 矢印色の設定
|
|
12918
12920
|
// - 枠/塗りつぶし色: g_attrObj[arrowName].Arrow / ArrowShadow
|
|
12919
12921
|
g_typeLists.arrowColor.forEach(val => g_attrObj[arrowName][`Arrow${val}`] = g_workObj[`${_name}${val}Colors`][_j]);
|
|
12920
|
-
arrowSprite[g_workObj.dividePos[_j]].appendChild(
|
|
12922
|
+
arrowSprite[g_workObj.dividePos[_j]].appendChild(arrowRoot);
|
|
12923
|
+
const arrowSubRoot = createEmptySprite(arrowRoot, `sub${arrowName}`, { x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
12921
12924
|
|
|
12922
12925
|
if (g_workObj[`${_name}CssMotions`][_j] !== ``) {
|
|
12923
|
-
|
|
12924
|
-
|
|
12926
|
+
arrowSubRoot.classList.add(g_workObj[`${_name}CssMotions`][_j]);
|
|
12927
|
+
arrowSubRoot.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
|
|
12925
12928
|
}
|
|
12926
12929
|
|
|
12927
12930
|
/**
|
|
@@ -12938,11 +12941,11 @@ const mainInit = () => {
|
|
|
12938
12941
|
if (_shadowColor === `Default`) {
|
|
12939
12942
|
arrShadow.style.opacity = 0.5;
|
|
12940
12943
|
}
|
|
12941
|
-
|
|
12944
|
+
arrowSubRoot.appendChild(arrShadow);
|
|
12942
12945
|
}
|
|
12943
12946
|
|
|
12944
12947
|
// 矢印 (枠)
|
|
12945
|
-
|
|
12948
|
+
arrowSubRoot.appendChild(createColorObject2(`${_name}Top${_j}_${_arrowCnt}`, {
|
|
12946
12949
|
background: _color, rotate: g_workObj.arrowRtn[_j],
|
|
12947
12950
|
}));
|
|
12948
12951
|
g_customJsObj.makeArrow.forEach(func => func(_attrs, arrowName, _name, _arrowCnt));
|
|
@@ -12967,7 +12970,7 @@ const mainInit = () => {
|
|
|
12967
12970
|
currentArrow.prevY = currentArrow.y;
|
|
12968
12971
|
currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd +
|
|
12969
12972
|
(g_workObj.motionOnFrames[boostCnt] || 0) * currentArrow.boostDir) * currentArrow.dir;
|
|
12970
|
-
|
|
12973
|
+
addTransform(arrowName, `root`, `translateY(${wUnit(currentArrow.y)})`);
|
|
12971
12974
|
g_motionAlphaFunc.get(g_stateObj.motion)(arrowName, currentArrow);
|
|
12972
12975
|
currentArrow.boostCnt--;
|
|
12973
12976
|
}
|
|
@@ -12997,7 +13000,7 @@ const mainInit = () => {
|
|
|
12997
13000
|
const firstBarLength = g_workObj[`mk${toCapitalize(_name)}Length`][_j][(_arrowCnt - 1) * 2] * g_workObj.boostSpd;
|
|
12998
13001
|
|
|
12999
13002
|
const frzRoot = createEmptySprite(arrowSprite[g_workObj.dividePos[_j]], frzName, {
|
|
13000
|
-
x: g_workObj.stepX[_j], y:
|
|
13003
|
+
x: g_workObj.stepX[_j], y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength,
|
|
13001
13004
|
});
|
|
13002
13005
|
/**
|
|
13003
13006
|
* フリーズアロー毎の属性情報
|
|
@@ -13030,6 +13033,8 @@ const mainInit = () => {
|
|
|
13030
13033
|
// フリーズアロー(対矢印)の相対位置
|
|
13031
13034
|
btmY: firstBarLength * g_workObj.scrollDir[_j],
|
|
13032
13035
|
};
|
|
13036
|
+
addTransform(frzName, `root`, `translateY(${wUnit(firstPosY)})`);
|
|
13037
|
+
|
|
13033
13038
|
// フリーズアロー色の設定
|
|
13034
13039
|
// - 通常時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Normal / NormalShadow / NormalBar
|
|
13035
13040
|
// - ヒット時 (矢印枠/矢印塗りつぶし/帯): g_attrObj[frzName].Hit / HitShadow / HitBar
|
|
@@ -13042,12 +13047,13 @@ const mainInit = () => {
|
|
|
13042
13047
|
});
|
|
13043
13048
|
arrowSprite[g_workObj.dividePos[_j]].appendChild(frzRoot);
|
|
13044
13049
|
let shadowColor = _shadowColor === `Default` ? _normalColor : _shadowColor;
|
|
13050
|
+
const frzSubRoot = createEmptySprite(frzRoot, `sub${frzName}`, { x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH + firstBarLength });
|
|
13045
13051
|
|
|
13046
13052
|
/**
|
|
13047
13053
|
* フリーズアローオブジェクトの生成
|
|
13048
13054
|
* - 後で生成されたものが手前に表示されるため、以下の順で作成
|
|
13049
13055
|
*/
|
|
13050
|
-
multiAppend(
|
|
13056
|
+
multiAppend(frzSubRoot,
|
|
13051
13057
|
|
|
13052
13058
|
// フリーズアロー帯(frzBar)
|
|
13053
13059
|
createColorObject2(`${_name}Bar${frzNo}`, {
|
|
@@ -13055,9 +13061,9 @@ const mainInit = () => {
|
|
|
13055
13061
|
opacity: 0.75,
|
|
13056
13062
|
}),
|
|
13057
13063
|
);
|
|
13058
|
-
const frzTopRoot = createEmptySprite(
|
|
13064
|
+
const frzTopRoot = createEmptySprite(frzSubRoot, `${_name}TopRoot${frzNo}`,
|
|
13059
13065
|
{ x: 0, y: 0, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
13060
|
-
const frzBtmRoot = createEmptySprite(
|
|
13066
|
+
const frzBtmRoot = createEmptySprite(frzSubRoot, `${_name}BtmRoot${frzNo}`,
|
|
13061
13067
|
{ x: 0, y: g_attrObj[frzName].btmY, w: C_ARW_WIDTH, h: C_ARW_WIDTH });
|
|
13062
13068
|
|
|
13063
13069
|
multiAppend(frzTopRoot,
|
|
@@ -13087,8 +13093,8 @@ const mainInit = () => {
|
|
|
13087
13093
|
|
|
13088
13094
|
);
|
|
13089
13095
|
if (g_workObj[`${_name}CssMotions`][_j] !== ``) {
|
|
13090
|
-
|
|
13091
|
-
|
|
13096
|
+
frzSubRoot.classList.add(g_workObj[`${_name}CssMotions`][_j]);
|
|
13097
|
+
frzSubRoot.style.animationDuration = `${_attrs.arrivalFrame / g_fps}s`;
|
|
13092
13098
|
}
|
|
13093
13099
|
if (g_workObj[`${_name}ArrowCssMotions`][_j] !== ``) {
|
|
13094
13100
|
[frzTopRoot, frzBtmRoot].forEach(obj => {
|
|
@@ -13121,7 +13127,7 @@ const mainInit = () => {
|
|
|
13121
13127
|
if (g_workObj.currentSpeed !== 0) {
|
|
13122
13128
|
currentFrz.prevY = currentFrz.y;
|
|
13123
13129
|
currentFrz.y -= movY + (g_workObj.motionOnFrames[currentFrz.boostCnt] || 0) * currentFrz.dir * currentFrz.boostDir;
|
|
13124
|
-
|
|
13130
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13125
13131
|
g_motionAlphaFunc.get(g_stateObj.motion)(frzName, currentFrz);
|
|
13126
13132
|
currentFrz.boostCnt--;
|
|
13127
13133
|
}
|
|
@@ -13161,7 +13167,7 @@ const mainInit = () => {
|
|
|
13161
13167
|
currentFrz.frzBarLength -= movY * currentFrz.dir;
|
|
13162
13168
|
if (currentFrz.frzBarLength > 0) {
|
|
13163
13169
|
currentFrz.y -= movY;
|
|
13164
|
-
|
|
13170
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13165
13171
|
} else {
|
|
13166
13172
|
judgeObjDelete[_name](_j, frzName);
|
|
13167
13173
|
}
|
|
@@ -13830,7 +13836,6 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
13830
13836
|
|
|
13831
13837
|
// フリーズアロー位置の修正(ステップゾーン上に来るように)
|
|
13832
13838
|
const delFrzLength = parseFloat($id(`stepRoot${_j}`).top) - currentFrz.y;
|
|
13833
|
-
$id(frzName).top = $id(`stepRoot${_j}`).top;
|
|
13834
13839
|
|
|
13835
13840
|
// 早押ししたboostCnt分のフリーズアロー終端位置の修正
|
|
13836
13841
|
const delFrzMotionLength = sumData(g_workObj.motionOnFrames.slice(0, currentFrz.boostCnt + 1));
|
|
@@ -13843,6 +13848,7 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
13843
13848
|
currentFrz.btmY -= delFrzLength + delFrzMotionLength + hitPos;
|
|
13844
13849
|
currentFrz.y += delFrzLength;
|
|
13845
13850
|
currentFrz.isMoving = false;
|
|
13851
|
+
addTransform(frzName, `root`, `translateY(${wUnit(currentFrz.y)})`);
|
|
13846
13852
|
|
|
13847
13853
|
/**
|
|
13848
13854
|
* フリーズアロー(ヒット時)の色変更
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2026/02/26 (v45.
|
|
8
|
+
* Revised : 2026/02/26 (v45.1.0)
|
|
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)
|