danoniplus 26.6.1 → 27.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/danoni/dTemplate.html +2 -7
- package/danoni/danoni0.html +2 -7
- package/danoni/danoni0_remote.html +2 -7
- package/danoni/danoni1.html +3 -16
- package/danoni/danoni2.html +2 -7
- package/danoni/danoni3.html +2 -9
- package/danoni/danoni4_skin.html +2 -6
- package/js/danoni_main.js +292 -412
- package/js/lib/danoni_constants.js +95 -20
- package/js/lib/danoni_legacy_function.js +84 -1
- package/js/template/danoni_setting.js +10 -3
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2022/
|
|
8
|
+
* Revised : 2022/03/25 (v27.1.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -28,6 +28,19 @@ const C_LBL_BASICFONT = `"Meiryo UI", sans-serif`;
|
|
|
28
28
|
|
|
29
29
|
const C_BTN_HEIGHT = 50;
|
|
30
30
|
const C_LNK_HEIGHT = 30;
|
|
31
|
+
const C_LEN_SETLBL_LEFT = 160;
|
|
32
|
+
const C_LEN_SETLBL_WIDTH = 210;
|
|
33
|
+
const C_LEN_DIFSELECTOR_WIDTH = 250;
|
|
34
|
+
const C_LEN_DIFCOVER_WIDTH = 110;
|
|
35
|
+
const C_LEN_SETLBL_HEIGHT = 23;
|
|
36
|
+
const C_SIZ_SETLBL = 17;
|
|
37
|
+
const C_LEN_SETDIFLBL_HEIGHT = 25;
|
|
38
|
+
const C_SIZ_SETDIFLBL = 17;
|
|
39
|
+
const C_LEN_SETMINI_WIDTH = 40;
|
|
40
|
+
const C_SIZ_SETMINI = 18;
|
|
41
|
+
const C_SIZ_DIFSELECTOR = 14;
|
|
42
|
+
const C_SIZ_MAIN = 14;
|
|
43
|
+
const C_SIZ_MUSIC_TITLE = 13;
|
|
31
44
|
|
|
32
45
|
// スプライト(ムービークリップ相当)のルート
|
|
33
46
|
const C_SPRITE_ROOT = `divRoot`;
|
|
@@ -58,6 +71,59 @@ const C_TYP_FUNCTION = `function`;
|
|
|
58
71
|
const C_TYP_SWITCH = `switch`;
|
|
59
72
|
const C_TYP_CALC = `calc`;
|
|
60
73
|
|
|
74
|
+
// ウィンドウサイズ
|
|
75
|
+
let [g_sWidth, g_sHeight] = [
|
|
76
|
+
setVal($id(`canvas-frame`).width, 500, C_TYP_FLOAT), setVal($id(`canvas-frame`).height, 500, C_TYP_FLOAT)
|
|
77
|
+
];
|
|
78
|
+
$id(`canvas-frame`).width = `${g_sWidth}px`;
|
|
79
|
+
$id(`canvas-frame`).margin = `auto`;
|
|
80
|
+
|
|
81
|
+
// 固定ウィンドウサイズ
|
|
82
|
+
const g_windowObj = {
|
|
83
|
+
divRoot: { margin: `auto`, letterSpacing: `normal` },
|
|
84
|
+
divBack: { background: `linear-gradient(#000000, #222222)` },
|
|
85
|
+
|
|
86
|
+
optionSprite: { w: 450, h: 325 },
|
|
87
|
+
difList: { x: 165, y: 65, w: 280, h: 255, overflow: `auto` },
|
|
88
|
+
difCover: { x: 25, y: 65, w: 140, h: 255, overflow: `auto`, opacity: 0.95 },
|
|
89
|
+
|
|
90
|
+
scoreDetail: { x: 20, y: 90, w: 420, h: 230, visibility: `hidden` },
|
|
91
|
+
detailObj: { w: 420, h: 230, visibility: `hidden` },
|
|
92
|
+
|
|
93
|
+
displaySprite: { x: 25, y: 30, h: C_LEN_SETLBL_HEIGHT * 5 },
|
|
94
|
+
keyconSprite: { overflow: `auto` },
|
|
95
|
+
|
|
96
|
+
loader: { h: 10, backgroundColor: `#333333` },
|
|
97
|
+
|
|
98
|
+
playDataWindow: { w: 450, h: 110 },
|
|
99
|
+
resultWindow: { w: 400, h: 210 },
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// 可変部分のウィンドウサイズを更新
|
|
103
|
+
const updateWindowSiz = _ => {
|
|
104
|
+
Object.assign(g_windowObj.optionSprite, { x: (g_sWidth - 450) / 2, y: 65 + (g_sHeight - 500) / 2 });
|
|
105
|
+
Object.assign(g_windowObj.displaySprite, { w: (g_sWidth - 450) / 2 });
|
|
106
|
+
Object.assign(g_windowObj.keyconSprite, { y: 88 + (g_sHeight - 500) / 2, h: g_sHeight });
|
|
107
|
+
Object.assign(g_windowObj.loader, { y: g_sHeight - 10 });
|
|
108
|
+
Object.assign(g_windowObj.playDataWindow, { x: g_sWidth / 2 - 225, y: 70 + (g_sHeight - 500) / 2 });
|
|
109
|
+
Object.assign(g_windowObj.resultWindow, { x: g_sWidth / 2 - 200, y: 185 + (g_sHeight - 500) / 2 });
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// ウィンドウ位置
|
|
113
|
+
const g_windowAlign = {
|
|
114
|
+
left: _ => {
|
|
115
|
+
$id(`canvas-frame`).marginLeft = `0px`;
|
|
116
|
+
$id(`canvas-frame`).marginRight = `auto`;
|
|
117
|
+
},
|
|
118
|
+
center: _ => {
|
|
119
|
+
$id(`canvas-frame`).margin = `auto`;
|
|
120
|
+
},
|
|
121
|
+
right: _ => {
|
|
122
|
+
$id(`canvas-frame`).marginLeft = `auto`;
|
|
123
|
+
$id(`canvas-frame`).marginRight = `0px`;
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
|
|
61
127
|
const g_imgObj = {};
|
|
62
128
|
|
|
63
129
|
// 画像ファイル
|
|
@@ -223,20 +289,6 @@ const C_BLOCK_KEYS = [
|
|
|
223
289
|
];
|
|
224
290
|
|
|
225
291
|
/** 設定・オプション画面用共通 */
|
|
226
|
-
const C_LEN_SETLBL_LEFT = 160;
|
|
227
|
-
const C_LEN_SETLBL_WIDTH = 210;
|
|
228
|
-
const C_LEN_DIFSELECTOR_WIDTH = 250;
|
|
229
|
-
const C_LEN_DIFCOVER_WIDTH = 110;
|
|
230
|
-
const C_LEN_SETLBL_HEIGHT = 23;
|
|
231
|
-
const C_SIZ_SETLBL = 17;
|
|
232
|
-
const C_LEN_SETDIFLBL_HEIGHT = 25;
|
|
233
|
-
const C_SIZ_SETDIFLBL = 17;
|
|
234
|
-
const C_LEN_SETMINI_WIDTH = 40;
|
|
235
|
-
const C_SIZ_SETMINI = 18;
|
|
236
|
-
const C_SIZ_DIFSELECTOR = 14;
|
|
237
|
-
const C_SIZ_MAIN = 14;
|
|
238
|
-
const C_SIZ_MUSIC_TITLE = 13;
|
|
239
|
-
|
|
240
292
|
const C_LEN_GRAPH_WIDTH = 286;
|
|
241
293
|
const C_LEN_GRAPH_HEIGHT = 226;
|
|
242
294
|
const C_CLR_SPEEDGRAPH_SPEED = `#cc3333`;
|
|
@@ -563,10 +615,6 @@ let g_storeSettings = [`appearance`, `opacity`, `d_stepzone`, `d_judgment`, `d_f
|
|
|
563
615
|
|
|
564
616
|
let g_canDisabledSettings = [`motion`, `scroll`, `shuffle`, `autoPlay`, `gauge`, `appearance`];
|
|
565
617
|
|
|
566
|
-
// サイズ(後で指定)
|
|
567
|
-
let g_sWidth;
|
|
568
|
-
let g_sHeight;
|
|
569
|
-
|
|
570
618
|
const g_hidSudObj = {
|
|
571
619
|
filterPos: 10,
|
|
572
620
|
|
|
@@ -2231,7 +2279,19 @@ const g_keyObj = {
|
|
|
2231
2279
|
'Right': [0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1],
|
|
2232
2280
|
},
|
|
2233
2281
|
|
|
2234
|
-
|
|
2282
|
+
// 横幅最小値
|
|
2283
|
+
minWidth: 500,
|
|
2284
|
+
minWidthDefault: 600,
|
|
2285
|
+
|
|
2286
|
+
minWidth5: 500,
|
|
2287
|
+
minWidth7i: 550,
|
|
2288
|
+
minWidth9A: 650,
|
|
2289
|
+
minWidth11i: 650,
|
|
2290
|
+
minWidth13: 650,
|
|
2291
|
+
minWidth16i: 650,
|
|
2292
|
+
minWidth17: 800,
|
|
2293
|
+
minWidth23: 900,
|
|
2294
|
+
|
|
2235
2295
|
};
|
|
2236
2296
|
|
|
2237
2297
|
// デフォルト配列のコピー (g_keyObj.aaa_X から g_keyObj.aaa_Xd を作成)
|
|
@@ -2393,6 +2453,10 @@ const g_dfColorLightObj = {
|
|
|
2393
2453
|
],
|
|
2394
2454
|
};
|
|
2395
2455
|
|
|
2456
|
+
/**
|
|
2457
|
+
* 特殊文字列の置き換えリスト
|
|
2458
|
+
* (置き換え元、置き換え先の組で二次元配列として定義。主にreplaceStr関数で使用)
|
|
2459
|
+
*/
|
|
2396
2460
|
const g_escapeStr = {
|
|
2397
2461
|
escape: [[`&`, `&`], [`<`, `<`], [`>`, `>`], [`"`, `"`]],
|
|
2398
2462
|
escapeTag: [
|
|
@@ -2407,6 +2471,17 @@ const g_escapeStr = {
|
|
|
2407
2471
|
escapeCode: [
|
|
2408
2472
|
[`<script>`, ``], [`</script>`, ``],
|
|
2409
2473
|
],
|
|
2474
|
+
musicNameSimple: [
|
|
2475
|
+
[`<br>`, ` `], [`<nbr>`, ``], [`<dbr>`, ` `],
|
|
2476
|
+
],
|
|
2477
|
+
musicNameMultiLine: [
|
|
2478
|
+
[`<nbr>`, `<br>`], [`<dbr>`, `<br>`],
|
|
2479
|
+
],
|
|
2480
|
+
frzName: [
|
|
2481
|
+
[`leftdia`, `frzLdia`], [`rightdia`, `frzRdia`],
|
|
2482
|
+
[`left`, `frzLeft`], [`down`, `frzDown`], [`up`, `frzUp`], [`right`, `frzRight`],
|
|
2483
|
+
[`space`, `frzSpace`], [`iyo`, `frzIyo`], [`gor`, `frzGor`], [`oni`, `foni`],
|
|
2484
|
+
],
|
|
2410
2485
|
};
|
|
2411
2486
|
|
|
2412
2487
|
/**
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised :
|
|
8
|
+
* Revised : 2022/03/18 (v27.0.0)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -609,3 +609,86 @@ function createDivCustomLabel(_id, _x, _y, _width, _height, _fontsize, _color, _
|
|
|
609
609
|
|
|
610
610
|
return div;
|
|
611
611
|
}
|
|
612
|
+
|
|
613
|
+
/**
|
|
614
|
+
* 外部jsファイルの読込 (callback)
|
|
615
|
+
* 読込可否を g_loadObj[ファイル名] で管理 (true: 読込成功, false: 読込失敗)
|
|
616
|
+
* @deprecated v27以降非推奨
|
|
617
|
+
* @param {string} _url
|
|
618
|
+
* @param {function} _callback
|
|
619
|
+
* @param {boolean} _requiredFlg (default : true / 読込必須)
|
|
620
|
+
* @param {string} _charset (default : UTF-8)
|
|
621
|
+
*/
|
|
622
|
+
function loadScript(_url, _callback, _requiredFlg = true, _charset = `UTF-8`) {
|
|
623
|
+
const baseUrl = _url.split(`?`)[0];
|
|
624
|
+
g_loadObj[baseUrl] = false;
|
|
625
|
+
const script = document.createElement(`script`);
|
|
626
|
+
script.type = `text/javascript`;
|
|
627
|
+
script.src = _url;
|
|
628
|
+
script.charset = _charset;
|
|
629
|
+
script.onload = _ => {
|
|
630
|
+
g_loadObj[baseUrl] = true;
|
|
631
|
+
_callback();
|
|
632
|
+
};
|
|
633
|
+
script.onerror = _ => {
|
|
634
|
+
if (_requiredFlg) {
|
|
635
|
+
makeWarningWindow(g_msgInfoObj.E_0041.split(`{0}`).join(_url.split(`?`)[0]));
|
|
636
|
+
} else {
|
|
637
|
+
_callback();
|
|
638
|
+
}
|
|
639
|
+
};
|
|
640
|
+
document.querySelector(`head`).appendChild(script);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* CSSファイルの読み込み (callback)
|
|
645
|
+
* デフォルトは danoni_skin_default.css を読み込む
|
|
646
|
+
* @deprecated v27以降非推奨
|
|
647
|
+
* @param {url} _href
|
|
648
|
+
* @param {function} _func
|
|
649
|
+
*/
|
|
650
|
+
function importCssFile(_href, _func) {
|
|
651
|
+
const baseUrl = _href.split(`?`)[0];
|
|
652
|
+
g_loadObj[baseUrl] = false;
|
|
653
|
+
const link = document.createElement(`link`);
|
|
654
|
+
link.rel = `stylesheet`;
|
|
655
|
+
link.href = _href;
|
|
656
|
+
link.onload = _ => {
|
|
657
|
+
g_loadObj[baseUrl] = true;
|
|
658
|
+
_func();
|
|
659
|
+
};
|
|
660
|
+
link.onerror = _ => {
|
|
661
|
+
makeWarningWindow(g_msgInfoObj.E_0041.split(`{0}`).join(baseUrl), { resetFlg: `title` });
|
|
662
|
+
_func();
|
|
663
|
+
};
|
|
664
|
+
document.head.appendChild(link);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
/**
|
|
668
|
+
* js, cssファイルの連続読込 (callback)
|
|
669
|
+
* @deprecated v27以降非推奨
|
|
670
|
+
* @param {number} _j
|
|
671
|
+
* @param {array} _fileData
|
|
672
|
+
* @param {string} _loadType
|
|
673
|
+
* @param {function} _afterFunc
|
|
674
|
+
*/
|
|
675
|
+
function loadMultipleFiles(_j, _fileData, _loadType, _afterFunc = _ => true) {
|
|
676
|
+
if (_j < _fileData.length) {
|
|
677
|
+
const filePath = `${_fileData[_j][1]}${_fileData[_j][0]}?${new Date().getTime()}`;
|
|
678
|
+
if (_fileData[_j][0].endsWith(`.css`)) {
|
|
679
|
+
_loadType = `css`;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
// jsファイル、cssファイルにより呼び出す関数を切替
|
|
683
|
+
if (_loadType === `js`) {
|
|
684
|
+
loadScript(filePath, _ =>
|
|
685
|
+
loadMultipleFiles(_j + 1, _fileData, _loadType, _afterFunc), false);
|
|
686
|
+
} else if (_loadType === `css`) {
|
|
687
|
+
const cssPath = filePath.split(`.js`).join(`.css`);
|
|
688
|
+
importCssFile(cssPath, _ =>
|
|
689
|
+
loadMultipleFiles(_j + 1, _fileData, _loadType, _afterFunc));
|
|
690
|
+
}
|
|
691
|
+
} else {
|
|
692
|
+
_afterFunc();
|
|
693
|
+
}
|
|
694
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
/**
|
|
3
3
|
* Dancing☆Onigiri 設定用jsファイル
|
|
4
|
-
* Template Update: 2022/
|
|
4
|
+
* Template Update: 2022/03/25 (v27.1.0)
|
|
5
5
|
*
|
|
6
6
|
* このファイルでは、作品全体に対しての初期設定を行うことができます。
|
|
7
7
|
* 譜面データ側で個別に同様の項目が設定されている場合は、譜面データ側の設定が優先されます。
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
/*
|
|
14
14
|
------------------------------------------------------------------------
|
|
15
|
-
|
|
15
|
+
制作者クレジット・基本設定
|
|
16
16
|
https://github.com/cwtickle/danoniplus/wiki/dos-s0001-makerInfo
|
|
17
17
|
------------------------------------------------------------------------
|
|
18
18
|
*/
|
|
@@ -23,6 +23,14 @@ g_presetObj.tuning = `name`;
|
|
|
23
23
|
/** 譜面製作者URL */
|
|
24
24
|
g_presetObj.tuningUrl = `https://www.google.co.jp/`;
|
|
25
25
|
|
|
26
|
+
/** 自動横幅拡張設定 (true:有効、false:無効 / デフォルトは true) */
|
|
27
|
+
//g_presetObj.autoSpread = false;
|
|
28
|
+
|
|
29
|
+
/** 個人サイト別の最小横幅設定 */
|
|
30
|
+
//g_presetObj.autoMinWidth = 600;
|
|
31
|
+
|
|
32
|
+
/** 個人サイト別のウィンドウ位置 (left:左寄せ, center:中央, right:右寄せ)*/
|
|
33
|
+
//g_presetObj.windowAlign = `center`;
|
|
26
34
|
|
|
27
35
|
/*
|
|
28
36
|
------------------------------------------------------------------------
|
|
@@ -43,7 +51,6 @@ g_presetObj.skinType = `default`;
|
|
|
43
51
|
/** 背景・マスクモーションで使用する画像パスの指定方法を他の設定に合わせる設定 (trueで有効化) */
|
|
44
52
|
//g_presetObj.syncBackPath = true;
|
|
45
53
|
|
|
46
|
-
|
|
47
54
|
/*
|
|
48
55
|
------------------------------------------------------------------------
|
|
49
56
|
ゲージ設定
|