danoniplus 44.3.0 → 44.4.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/README.md CHANGED
@@ -121,9 +121,13 @@ If you would like to cooperate with the development, please see below. Even if y
121
121
  - [Dancing☆Onigiri エディター(CW Edition 対応)](https://github.com/superkuppabros/danoni-editor) @superkuppabros
122
122
  - [ダンおに曲データjs化ツール](https://github.com/suzme/danoni-base64) @suzme
123
123
  - [ダンおに矢印色ツール](https://github.com/suzme/danoni-colorpicker) @suzme
124
+ - [ダンおにゲージ計算機 (Gauge Calculator)](http://www.omission0.com/other/gauge_calculator/) @goe0
125
+ - [ダンおに波形解析ツール](https://github.com/suzme/danoni-waveform) @suzme
126
+
127
+ #### Conversion Tool from Legacy Flash Environments / 旧Flashからの変換ツール
128
+
124
129
  - [Dancing☆Onigiri Chart Reverser](https://github.com/cwtickle/danoniplus-reverser) @cwtickle
125
130
  - [Dancing☆Onigiri Chart Converter](https://github.com/cwtickle/danoniplus-converter) @cwtickle
126
- - [ダンおにゲージ計算機 (Gauge Calculator)](http://www.omission0.com/other/gauge_calculator/) @goe0
127
131
 
128
132
  ### Kirizma / キリズマ
129
133
 
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/20
7
+ * Revised : 2026/02/21
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 44.3.0`;
12
- const g_revisedDate = `2026/02/20`;
11
+ const g_version = `Ver 44.4.1`;
12
+ const g_revisedDate = `2026/02/21`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -65,10 +65,26 @@ const g_referenceDomains = [
65
65
  ];
66
66
  Object.freeze(g_referenceDomains);
67
67
 
68
+ // ドメイン管理リスト
69
+ const g_domainList = [
70
+ { label: `jsdelivr`, hosts: [`cdn.jsdelivr.net`] },
71
+ { label: `unpkg`, hosts: [`unpkg.com`, `www.unpkg.com`] },
72
+ ];
73
+ Object.freeze(g_domainList);
74
+
68
75
  const g_rootPath = current().match(/(^.*\/)/)[0];
69
76
  let g_workPath;
70
77
  const hasRemoteDomain = _path => g_referenceDomains.some(domain => _path.match(`^https://${domain}/`) !== null);
78
+ const detectDomain = _url => {
79
+ try {
80
+ const host = new URL(_url).hostname; // 例: "cdn.jsdelivr.net"
81
+ return g_domainList.find(({ hosts }) => hosts.some(h => host === h || host.endsWith(`.${h}`)))?.label ?? null;
82
+ } catch {
83
+ return null;
84
+ }
85
+ }
71
86
  const g_remoteFlg = hasRemoteDomain(g_rootPath);
87
+ const g_remoteDomain = detectDomain(g_rootPath);
72
88
 
73
89
  const g_randTime = Date.now();
74
90
  const g_versionForUrl = g_version.slice(4); // URL用に先頭の"Ver "を削除
@@ -5333,7 +5349,8 @@ const titleInit = (_initFlg = false) => {
5333
5349
  customVersion += ` / ${g_localVersion2}`;
5334
5350
  }
5335
5351
  const releaseDate = (g_headerObj.releaseDate !== `` ? ` @${g_headerObj.releaseDate}` : ``);
5336
- const versionName = `© 2018-${g_revisedDate.slice(0, 4)} ティックル, CW ${g_version}${customVersion}${releaseDate}`;
5352
+ const remoteDomainInfo = g_remoteDomain !== null ? ` (${g_remoteDomain})` : ``;
5353
+ const versionName = `© 2018-${g_revisedDate.slice(0, 4)} ティックル, CW ${g_version}${remoteDomainInfo}${customVersion}${releaseDate}`;
5337
5354
  const getLinkSiz = _name => getFontSize2(_name, g_sWidth / 2 - 20, { maxSiz: g_limitObj.lnkSiz, minSiz: 12 });
5338
5355
 
5339
5356
  /**
@@ -12087,8 +12104,8 @@ const mainInit = () => {
12087
12104
  g_effectFunc.get(g_stateObj.effect)();
12088
12105
 
12089
12106
  // Appearanceのオプション適用時は一部描画を隠す
12090
- changeAppearanceFilter(g_appearanceRanges.includes(g_stateObj.appearance) ?
12091
- g_hidSudObj.filterPos : g_hidSudObj.filterPosDefault[g_stateObj.appearance], true);
12107
+ changeAppearanceBar(g_appearanceRanges.includes(g_stateObj.appearance)
12108
+ ? g_hidSudObj.filterPos : g_hidSudObj.filterPosDefault[g_stateObj.appearance], 0);
12092
12109
 
12093
12110
  // Shaking初期化
12094
12111
  if (g_stateObj.shaking !== C_FLG_OFF) {
@@ -12416,10 +12433,15 @@ const mainInit = () => {
12416
12433
  } else if (g_appearanceRanges.includes(g_stateObj.appearance) && g_stateObj.filterLock === C_FLG_OFF) {
12417
12434
  const MAX_FILTER_POS = 100;
12418
12435
  const MIN_FILTER_POS = 0;
12436
+
12419
12437
  if (setCode === g_hidSudObj.pgDown[g_stateObj.appearance][g_stateObj.reverse]) {
12420
- changeAppearanceFilter(Math.min(g_hidSudObj.filterPos + 1, MAX_FILTER_POS));
12438
+ keyIsShift()
12439
+ ? changeAppearanceBar(g_hidSudObj.filterPos, 2)
12440
+ : changeAppearanceFilter(Math.min(g_hidSudObj.filterPos + 1, MAX_FILTER_POS));
12421
12441
  } else if (setCode === g_hidSudObj.pgUp[g_stateObj.appearance][g_stateObj.reverse]) {
12422
- changeAppearanceFilter(Math.max(g_hidSudObj.filterPos - 1, MIN_FILTER_POS));
12442
+ keyIsShift()
12443
+ ? changeAppearanceBar(g_hidSudObj.filterPos, -2)
12444
+ : changeAppearanceFilter(Math.max(g_hidSudObj.filterPos - 1, MIN_FILTER_POS));
12423
12445
  }
12424
12446
  }
12425
12447
  return blockCode(setCode);
@@ -13374,12 +13396,61 @@ const makeStepZone = (_j, _keyCtrlPtn) => {
13374
13396
  }
13375
13397
  };
13376
13398
 
13399
+ /**
13400
+ * フィルターバーの対象表示変更
13401
+ * @param {number} _num
13402
+ * @param {number} _dirPlus
13403
+ */
13404
+ const changeAppearanceBar = (_num = 10, _dirPlus = 2) => {
13405
+ if (_dirPlus !== 0) {
13406
+ const step = Math.trunc(_dirPlus / 2) * 2;
13407
+ g_workObj.aprFilterCnt = nextPos(g_workObj.aprFilterCnt, step, g_stateObj.layerNum);
13408
+ }
13409
+ changeAppearanceFilter(_num);
13410
+
13411
+ // フィルターバーを使用するオプションのみ以下を適用
13412
+ if (g_appearanceRanges.includes(g_stateObj.appearance) && g_stateObj.d_filterline === C_FLG_ON) {
13413
+
13414
+ // 階層が多い場合はShift+pgUp/pgDownで表示する階層グループを切り替え
13415
+ const topNum = g_hidSudObj[g_stateObj.appearance];
13416
+ const bottomNum = (g_hidSudObj[g_stateObj.appearance] + 1) % 2;
13417
+
13418
+ for (let j = 0; j < g_stateObj.layerNum; j += 2) {
13419
+ [`${topNum + j}`, `${bottomNum + j}`].forEach(type => {
13420
+ const displayState = (j === g_workObj.aprFilterCnt ? C_DIS_INHERIT : C_DIS_NONE);
13421
+ $id(`filterBar${type}`).display = displayState;
13422
+
13423
+ if (![`Default`, `Halfway`].includes(g_stateObj.stepArea)) {
13424
+ $id(`filterBar${type}_HS`).display = displayState;
13425
+ }
13426
+ });
13427
+ }
13428
+
13429
+ // スクロールが1種類でHidden+/Sudden+の場合、対面のフィルターバーは不要なため非表示にする
13430
+ const baseLayer = g_workObj.aprFilterCnt;
13431
+ const dividePosPart = g_workObj.dividePos.filter(v => Math.floor(v / 2) === g_workObj.aprFilterCnt / 2);
13432
+ const currentBarNum = g_hidSudObj.std[g_stateObj.appearance][
13433
+ dividePosPart.length > 0
13434
+ ? dividePosPart[0] % 2 === 0 ? C_FLG_OFF : C_FLG_ON
13435
+ : g_stateObj.reverse
13436
+ ];
13437
+
13438
+ if (g_stateObj.appearance !== `Hid&Sud+`
13439
+ && dividePosPart.length > 0
13440
+ && dividePosPart.every(v => v % 2 === dividePosPart[0] % 2)) {
13441
+ $id(`filterBar${(currentBarNum + 1) % 2 + baseLayer}`).display = C_DIS_NONE;
13442
+ if (![`Default`, `Halfway`].includes(g_stateObj.stepArea)) {
13443
+ $id(`filterBar${(currentBarNum + 1) % 2 + baseLayer}_HS`).display = C_DIS_NONE;
13444
+ }
13445
+ }
13446
+ }
13447
+ }
13448
+
13377
13449
  /**
13378
13450
  * アルファマスクの再描画 (Appearance: Hidden+, Sudden+ 用)
13379
13451
  * @param {number} _num
13380
- * @param {boolean} _shiftFlg シフトキーを押したかどうかのフラグ
13381
13452
  */
13382
- const changeAppearanceFilter = (_num = 10, _shiftFlg = keyIsShift()) => {
13453
+ const changeAppearanceFilter = (_num = 10) => {
13383
13454
  const MAX_FILTER_POS = 100;
13384
13455
  const topNum = g_hidSudObj[g_stateObj.appearance];
13385
13456
  const bottomNum = (g_hidSudObj[g_stateObj.appearance] + 1) % 2;
@@ -13401,42 +13472,25 @@ const changeAppearanceFilter = (_num = 10, _shiftFlg = keyIsShift()) => {
13401
13472
  $id(`arrowSprite${topNum + j}`).clipPath = topShape;
13402
13473
  $id(`arrowSprite${bottomNum + j}`).clipPath = bottomShape;
13403
13474
 
13404
- $id(`filterBar${topNum + j}`).top = wUnit(parseFloat($id(`arrowSprite${j}`).top) + topDist);
13405
- $id(`filterBar${bottomNum + j}`).top = wUnit(parseFloat($id(`arrowSprite${j + 1}`).top) + bottomDist);
13475
+ addY(`filterBar${topNum + j}`, `appearance`, parseFloat($id(`arrowSprite${j}`).top) + topDist);
13476
+ addY(`filterBar${bottomNum + j}`, `appearance`, parseFloat($id(`arrowSprite${j + 1}`).top) + bottomDist);
13406
13477
 
13407
13478
  if (![`Default`, `Halfway`].includes(g_stateObj.stepArea)) {
13408
- $id(`filterBar${bottomNum + j}_HS`).top = wUnit(parseFloat($id(`arrowSprite${j}`).top) + bottomDist);
13409
- $id(`filterBar${topNum + j}_HS`).top = wUnit(parseFloat($id(`arrowSprite${j + 1}`).top) + topDist);
13410
- }
13411
-
13412
- // 階層が多い場合はShift+pgUp/pgDownで表示する階層グループを切り替え
13413
- if (_shiftFlg && g_stateObj.d_filterline === C_FLG_ON) {
13414
- [`${topNum + j}`, `${bottomNum + j}`].forEach(type => {
13415
- const displayState = (j === g_workObj.aprFilterCnt ? C_DIS_INHERIT : C_DIS_NONE);
13416
- $id(`filterBar${type}`).display = displayState;
13417
-
13418
- if (![`Default`, `Halfway`].includes(g_stateObj.stepArea)) {
13419
- $id(`filterBar${type}_HS`).display = displayState;
13420
- }
13421
- });
13479
+ addY(`filterBar${bottomNum + j}_HS`, `appearance`, parseFloat($id(`arrowSprite${j}`).top) + topDist);
13480
+ addY(`filterBar${topNum + j}_HS`, `appearance`, parseFloat($id(`arrowSprite${j + 1}`).top) + bottomDist);
13422
13481
  }
13423
13482
  }
13424
13483
 
13425
- if (_shiftFlg) {
13426
- g_workObj.aprFilterCnt = nextPos(g_workObj.aprFilterCnt, 2, g_stateObj.layerNum);
13427
- }
13428
-
13484
+ // フィルターバーのパーセント表示(フィルターバーが複数表示されるなど複雑なため、最初の階層グループの位置に追従)
13429
13485
  if (g_appearanceRanges.includes(g_stateObj.appearance)) {
13430
- $id(`filterView`).top =
13431
- $id(`filterBar${(g_hidSudObj.std[g_stateObj.appearance][g_stateObj.reverse]) % 2}`).top;
13486
+ const currentBarNum = g_hidSudObj.std[g_stateObj.appearance][g_stateObj.reverse];
13487
+ $id(`filterView`).top = $id(`filterBar${currentBarNum % 2}`).top;
13432
13488
  filterView.textContent = `${_num}%`;
13433
-
13434
- // スクロールが1種類でHidden+/Sudden+の場合、対面のフィルターバーは不要なため非表示にする
13435
- if (g_stateObj.appearance !== `Hid&Sud+` && g_workObj.dividePos.every(v => v === g_workObj.dividePos[0])) {
13436
- $id(`filterBar${(g_hidSudObj.std[g_stateObj.appearance][g_stateObj.reverse] + 1) % 2}`).display = C_DIS_NONE;
13437
- }
13438
13489
  g_hidSudObj.filterPos = _num;
13439
13490
  }
13491
+
13492
+ // ユーザカスタムイベント(アルファマスクの再描画)
13493
+ g_customJsObj.appearanceFilter.forEach(func => func(topNum, bottomNum));
13440
13494
  };
13441
13495
 
13442
13496
  /**
@@ -5,7 +5,7 @@
5
5
  *
6
6
  * Source by tickle
7
7
  * Created : 2019/11/19
8
- * Revised : 2026/02/18 (v44.2.0)
8
+ * Revised : 2026/02/21 (v44.4.0)
9
9
  *
10
10
  * https://github.com/cwtickle/danoniplus
11
11
  */
@@ -4577,6 +4577,8 @@ const g_customJsObj = {
4577
4577
  dummyArrow: [],
4578
4578
  dummyFrz: [],
4579
4579
 
4580
+ appearanceFilter: [],
4581
+
4580
4582
  judg_ii: [],
4581
4583
  judg_shakin: [],
4582
4584
  judg_matari: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "44.3.0",
3
+ "version": "44.4.1",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {