danoniplus 34.2.0 → 34.3.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 +137 -147
- 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 : 2023/10/
|
|
7
|
+
* Revised : 2023/10/13
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 34.
|
|
12
|
-
const g_revisedDate = `2023/10/
|
|
11
|
+
const g_version = `Ver 34.3.0`;
|
|
12
|
+
const g_revisedDate = `2023/10/13`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -300,6 +300,14 @@ const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
|
300
300
|
*/
|
|
301
301
|
const boolToSwitch = _condition => _condition ? C_FLG_ON : C_FLG_OFF;
|
|
302
302
|
|
|
303
|
+
/**
|
|
304
|
+
* 単位付きの値を返却
|
|
305
|
+
* @param {number} _val
|
|
306
|
+
* @param {string} _unitName
|
|
307
|
+
* @returns
|
|
308
|
+
*/
|
|
309
|
+
const wUnit = (_val, _unitName = `px`) => `${_val}${_unitName}`;
|
|
310
|
+
|
|
303
311
|
/**
|
|
304
312
|
* ブール値への変換
|
|
305
313
|
* @param {string} _val
|
|
@@ -500,7 +508,7 @@ const escapeHtmlForArray = _array => _array.map(str => escapeHtml(str));
|
|
|
500
508
|
* @param {number} _num
|
|
501
509
|
* @param {number} _length
|
|
502
510
|
*/
|
|
503
|
-
const nextPos = (_basePos, _num, _length) => (_basePos +
|
|
511
|
+
const nextPos = (_basePos, _num, _length) => (_basePos + _num + _length) % _length;
|
|
504
512
|
|
|
505
513
|
/*-----------------------------------------------------------*/
|
|
506
514
|
/* キーコード関連 */
|
|
@@ -810,14 +818,12 @@ const getFilePath = (_fileName, _directory = ``) => {
|
|
|
810
818
|
const preloadImgFile = (_imgPath, { directory = ``, syncBackPath = true } = {}) => {
|
|
811
819
|
|
|
812
820
|
let imgPath = _imgPath;
|
|
813
|
-
if (g_headerObj.autoPreload) {
|
|
814
|
-
if (
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
imgPath = `${dir}${file}`;
|
|
818
|
-
}
|
|
819
|
-
preloadFile(`image`, imgPath);
|
|
821
|
+
if (g_headerObj.autoPreload && checkImage(_imgPath)) {
|
|
822
|
+
if (syncBackPath) {
|
|
823
|
+
const [file, dir] = getFilePath(_imgPath, directory);
|
|
824
|
+
imgPath = `${dir}${file}`;
|
|
820
825
|
}
|
|
826
|
+
preloadFile(`image`, imgPath);
|
|
821
827
|
}
|
|
822
828
|
return imgPath;
|
|
823
829
|
};
|
|
@@ -999,7 +1005,7 @@ const getBasicFont = (_priorityFont = ``) =>
|
|
|
999
1005
|
*/
|
|
1000
1006
|
const getStrWidth = (_str, _fontsize, _font) => {
|
|
1001
1007
|
const ctx = document.createElement(`canvas`).getContext(`2d`);
|
|
1002
|
-
ctx.font = `${_fontsize}
|
|
1008
|
+
ctx.font = `${wUnit(_fontsize)} ${_font}`;
|
|
1003
1009
|
return ctx.measureText(unEscapeHtml(_str)).width;
|
|
1004
1010
|
};
|
|
1005
1011
|
|
|
@@ -1051,10 +1057,10 @@ const createDiv = (_id, _x, _y, _width, _height, _classes = []) => {
|
|
|
1051
1057
|
|
|
1052
1058
|
div.id = _id;
|
|
1053
1059
|
const style = div.style;
|
|
1054
|
-
style.left =
|
|
1055
|
-
style.top =
|
|
1056
|
-
style.width =
|
|
1057
|
-
style.height =
|
|
1060
|
+
style.left = wUnit(_x);
|
|
1061
|
+
style.top = wUnit(_y);
|
|
1062
|
+
style.width = wUnit(_width);
|
|
1063
|
+
style.height = wUnit(_height);
|
|
1058
1064
|
style.position = `absolute`;
|
|
1059
1065
|
div.classList.add(..._classes);
|
|
1060
1066
|
setUserSelect(style);
|
|
@@ -1085,7 +1091,7 @@ const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = g_limitObj.setLblWid
|
|
|
1085
1091
|
const div = createDiv(_id, x, y, w, h, [g_cssObj.title_base, ..._classes]);
|
|
1086
1092
|
|
|
1087
1093
|
const style = div.style;
|
|
1088
|
-
style.fontSize =
|
|
1094
|
+
style.fontSize = wUnit(siz);
|
|
1089
1095
|
style.fontFamily = getBasicFont();
|
|
1090
1096
|
style.textAlign = `${align}`;
|
|
1091
1097
|
div.innerHTML = _text;
|
|
@@ -1105,7 +1111,7 @@ const createDivCss2Label = (_id, _text, { x = 0, y = 0, w = g_limitObj.setLblWid
|
|
|
1105
1111
|
*/
|
|
1106
1112
|
const createImg = (_id, _imgPath, _x, _y, _width, _height) => {
|
|
1107
1113
|
const div = createDiv(_id, _x, _y, _width, _height);
|
|
1108
|
-
div.innerHTML = `<img id="${_id}img" src="${_imgPath}" style="width:${_width}
|
|
1114
|
+
div.innerHTML = `<img id="${_id}img" src="${_imgPath}" style="width:${wUnit(_width)};height:${wUnit(_height)}"${g_isFile ? `` : ` crossOrigin="anonimous"`}>`;
|
|
1109
1115
|
|
|
1110
1116
|
return div;
|
|
1111
1117
|
};
|
|
@@ -1121,8 +1127,8 @@ const createColorPicker = (_parentObj, _id, _func, { x = 0, y = 0 } = {}) => {
|
|
|
1121
1127
|
const picker = document.createElement(`input`);
|
|
1122
1128
|
picker.setAttribute(`type`, `color`);
|
|
1123
1129
|
picker.id = _id;
|
|
1124
|
-
picker.style.left =
|
|
1125
|
-
picker.style.top =
|
|
1130
|
+
picker.style.left = wUnit(x);
|
|
1131
|
+
picker.style.top = wUnit(y);
|
|
1126
1132
|
picker.style.position = `absolute`;
|
|
1127
1133
|
picker.addEventListener(`change`, _func);
|
|
1128
1134
|
_parentObj.appendChild(picker);
|
|
@@ -1275,7 +1281,7 @@ const createCss2Button = (_id, _text, _func = _ => true, { x = 0, y = g_sHeight
|
|
|
1275
1281
|
|
|
1276
1282
|
const style = div.style;
|
|
1277
1283
|
style.textAlign = align;
|
|
1278
|
-
style.fontSize =
|
|
1284
|
+
style.fontSize = wUnit(siz);
|
|
1279
1285
|
style.fontFamily = getBasicFont();
|
|
1280
1286
|
if (rest.animationName !== undefined) {
|
|
1281
1287
|
style.animationDuration = `1s`;
|
|
@@ -1347,7 +1353,7 @@ const changeStyle = (_id, { x, y, w, h, siz, align, title, ...rest } = {}) => {
|
|
|
1347
1353
|
fontSize: siz,
|
|
1348
1354
|
};
|
|
1349
1355
|
Object.keys(obj).filter(property => setVal(obj[property], ``, C_TYP_FLOAT) !== ``)
|
|
1350
|
-
.forEach(property => style[property] =
|
|
1356
|
+
.forEach(property => style[property] = wUnit(obj[property]));
|
|
1351
1357
|
|
|
1352
1358
|
if (align !== undefined) {
|
|
1353
1359
|
style.textAlign = `${align}`;
|
|
@@ -1380,6 +1386,18 @@ const resetKeyControl = _ => {
|
|
|
1380
1386
|
g_inputKeyBuffer = {};
|
|
1381
1387
|
};
|
|
1382
1388
|
|
|
1389
|
+
/**
|
|
1390
|
+
* Canvasのベース背景を作成
|
|
1391
|
+
* @param {*} _ctx
|
|
1392
|
+
*/
|
|
1393
|
+
const makeBgCanvas = (_ctx, { w = g_sWidth, h = g_sHeight } = {}) => {
|
|
1394
|
+
const grd = _ctx.createLinearGradient(0, 0, 0, h);
|
|
1395
|
+
grd.addColorStop(0, `#000000`);
|
|
1396
|
+
grd.addColorStop(1, `#222222`);
|
|
1397
|
+
_ctx.fillStyle = grd;
|
|
1398
|
+
_ctx.fillRect(0, 0, w, h);
|
|
1399
|
+
};
|
|
1400
|
+
|
|
1383
1401
|
/**
|
|
1384
1402
|
* 画面上の描画・オブジェクトを全てクリアし、背景を再描画
|
|
1385
1403
|
* - divオブジェクト(ボタンなど)はdivRoot配下で管理しているため、子要素のみを全削除している。
|
|
@@ -1430,14 +1448,10 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
|
|
|
1430
1448
|
|
|
1431
1449
|
if (_redrawFlg) {
|
|
1432
1450
|
// 画面背景を指定 (background-color)
|
|
1433
|
-
$id(`canvas-frame`).width =
|
|
1451
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
|
|
1434
1452
|
layer0.width = g_sWidth + diffX;
|
|
1435
|
-
const grd = l0ctx.createLinearGradient(0, 0, 0, g_sHeight);
|
|
1436
1453
|
if (!g_headerObj[`customBack${_customDisplayName}Use`]) {
|
|
1437
|
-
|
|
1438
|
-
grd.addColorStop(1, `#222222`);
|
|
1439
|
-
l0ctx.fillStyle = grd;
|
|
1440
|
-
l0ctx.fillRect(0, 0, g_sWidth + diffX, g_sHeight);
|
|
1454
|
+
makeBgCanvas(l0ctx, { w: g_sWidth + diffX });
|
|
1441
1455
|
}
|
|
1442
1456
|
}
|
|
1443
1457
|
}
|
|
@@ -1452,7 +1466,7 @@ const clearWindow = (_redrawFlg = false, _customDisplayName = ``) => {
|
|
|
1452
1466
|
if (document.querySelector(`#layer0`) === null ||
|
|
1453
1467
|
(!g_headerObj[`customBack${_customDisplayName}Use`] && !g_headerObj.defaultSkinFlg)) {
|
|
1454
1468
|
|
|
1455
|
-
$id(`canvas-frame`).width =
|
|
1469
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth + diffX);
|
|
1456
1470
|
createEmptySprite(divRoot, `divBack`, { w: g_sWidth + diffX });
|
|
1457
1471
|
}
|
|
1458
1472
|
|
|
@@ -1519,12 +1533,12 @@ const getCssCustomProperties = _ => {
|
|
|
1519
1533
|
* @param {object} _obj
|
|
1520
1534
|
*/
|
|
1521
1535
|
const makeSpriteImage = _obj => {
|
|
1522
|
-
let tmpInnerHTML = `<img src=${_obj.path} class="${_obj.class}" style="position:absolute;left:${_obj.left}
|
|
1536
|
+
let tmpInnerHTML = `<img src=${_obj.path} class="${_obj.class}" style="position:absolute;left:${wUnit(_obj.left)};top:${wUnit(_obj.top)}`;
|
|
1523
1537
|
if (_obj.width > 0) {
|
|
1524
|
-
tmpInnerHTML += `;width:${_obj.width}
|
|
1538
|
+
tmpInnerHTML += `;width:${wUnit(_obj.width)}`;
|
|
1525
1539
|
}
|
|
1526
1540
|
if (setIntVal(_obj.height) > 0) {
|
|
1527
|
-
tmpInnerHTML += `;height:${_obj.height}
|
|
1541
|
+
tmpInnerHTML += `;height:${wUnit(_obj.height)}`;
|
|
1528
1542
|
}
|
|
1529
1543
|
tmpInnerHTML += `;animation-name:${_obj.animationName};animation-duration:${_obj.animationDuration}s;opacity:${_obj.opacity}">`;
|
|
1530
1544
|
return tmpInnerHTML;
|
|
@@ -1535,11 +1549,11 @@ const makeSpriteImage = _obj => {
|
|
|
1535
1549
|
* @param {object} _obj
|
|
1536
1550
|
*/
|
|
1537
1551
|
const makeSpriteText = _obj => {
|
|
1538
|
-
let tmpInnerHTML = `<span class="${_obj.class}" style="display:inline-block;position:absolute;left:${_obj.left}
|
|
1552
|
+
let tmpInnerHTML = `<span class="${_obj.class}" style="display:inline-block;position:absolute;left:${wUnit(_obj.left)};top:${wUnit(_obj.top)}`;
|
|
1539
1553
|
|
|
1540
1554
|
// この場合のwidthは font-size と解釈する
|
|
1541
1555
|
if (_obj.width > 0) {
|
|
1542
|
-
tmpInnerHTML += `;font-size:${_obj.width}
|
|
1556
|
+
tmpInnerHTML += `;font-size:${wUnit(_obj.width)}`;
|
|
1543
1557
|
}
|
|
1544
1558
|
|
|
1545
1559
|
// この場合のheightは color と解釈する
|
|
@@ -1973,12 +1987,7 @@ const initialControl = async () => {
|
|
|
1973
1987
|
// 背景の表示
|
|
1974
1988
|
if (document.querySelector(`#layer0`) !== null) {
|
|
1975
1989
|
const layer0 = document.querySelector(`#layer0`);
|
|
1976
|
-
|
|
1977
|
-
const grd = l0ctx.createLinearGradient(0, 0, 0, g_sHeight);
|
|
1978
|
-
grd.addColorStop(0, `#000000`);
|
|
1979
|
-
grd.addColorStop(1, `#222222`);
|
|
1980
|
-
l0ctx.fillStyle = grd;
|
|
1981
|
-
l0ctx.fillRect(0, 0, g_sWidth, g_sHeight);
|
|
1990
|
+
makeBgCanvas(layer0.getContext(`2d`));
|
|
1982
1991
|
} else {
|
|
1983
1992
|
createEmptySprite(divRoot, `divBack`, g_windowObj.divBack);
|
|
1984
1993
|
}
|
|
@@ -2057,8 +2066,8 @@ const initialControl = async () => {
|
|
|
2057
2066
|
g_headerObj.keyLists.forEach(key => widthList.push(g_keyObj[`minWidth${key}`] ?? g_keyObj.minWidthDefault));
|
|
2058
2067
|
|
|
2059
2068
|
g_sWidth = Math.max(...widthList);
|
|
2060
|
-
$id(`canvas-frame`).width =
|
|
2061
|
-
$id(`divRoot`).width =
|
|
2069
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth);
|
|
2070
|
+
$id(`divRoot`).width = wUnit(g_sWidth);
|
|
2062
2071
|
}
|
|
2063
2072
|
if (g_headerObj.playingWidth === `default`) {
|
|
2064
2073
|
g_headerObj.playingWidth = g_sWidth;
|
|
@@ -2314,8 +2323,7 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2314
2323
|
* @param {number} _scoreId
|
|
2315
2324
|
*/
|
|
2316
2325
|
const getMusicUrl = _scoreId =>
|
|
2317
|
-
g_headerObj.musicUrls
|
|
2318
|
-
g_headerObj.musicUrls[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls[0] : `nosound.mp3`;
|
|
2326
|
+
g_headerObj.musicUrls?.[g_headerObj.musicNos[_scoreId]] ?? g_headerObj.musicUrls?.[0] ?? `nosound.mp3`;
|
|
2319
2327
|
|
|
2320
2328
|
/**
|
|
2321
2329
|
* 譜面ファイル読込後処理(譜面詳細情報取得用)
|
|
@@ -2481,7 +2489,7 @@ const calcLevel = _scoreObj => {
|
|
|
2481
2489
|
allScorebook.push(allScorebook.at(-1) + 100);
|
|
2482
2490
|
const allCnt = allScorebook.length;
|
|
2483
2491
|
|
|
2484
|
-
frzEndData.push(allScorebook
|
|
2492
|
+
frzEndData.push(allScorebook.at(-1));
|
|
2485
2493
|
|
|
2486
2494
|
//--------------------------------------------------------------
|
|
2487
2495
|
//<間隔フレーム数の調和平均計算+いろいろ補正>
|
|
@@ -2689,18 +2697,16 @@ const headerConvert = _dosObj => {
|
|
|
2689
2697
|
} else if (g_presetObj.imageSets !== undefined) {
|
|
2690
2698
|
tmpImgTypes = g_presetObj.imageSets.concat();
|
|
2691
2699
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
});
|
|
2703
|
-
}
|
|
2700
|
+
tmpImgTypes.forEach((tmpImgType, j) => {
|
|
2701
|
+
const imgTypes = tmpImgType.split(`,`);
|
|
2702
|
+
obj.imgType[j] = {
|
|
2703
|
+
name: imgTypes[0],
|
|
2704
|
+
extension: imgTypes[1] || `svg`,
|
|
2705
|
+
rotateEnabled: setBoolVal(imgTypes[2], true),
|
|
2706
|
+
flatStepHeight: setVal(imgTypes[3], C_ARW_WIDTH, C_TYP_FLOAT),
|
|
2707
|
+
};
|
|
2708
|
+
g_keycons.imgTypes[j] = (imgTypes[0] === `` ? `Original` : imgTypes[0]);
|
|
2709
|
+
});
|
|
2704
2710
|
}
|
|
2705
2711
|
|
|
2706
2712
|
// 末尾にデフォルト画像セットが入るよう追加
|
|
@@ -2727,13 +2733,13 @@ const headerConvert = _dosObj => {
|
|
|
2727
2733
|
// 横幅設定
|
|
2728
2734
|
if (hasVal(_dosObj.windowWidth)) {
|
|
2729
2735
|
g_sWidth = Math.max(setIntVal(_dosObj.windowWidth, g_sWidth), g_sWidth);
|
|
2730
|
-
$id(`canvas-frame`).width =
|
|
2736
|
+
$id(`canvas-frame`).width = wUnit(g_sWidth);
|
|
2731
2737
|
}
|
|
2732
2738
|
// 高さ設定
|
|
2733
2739
|
if (hasVal(_dosObj.windowHeight) || hasVal(g_presetObj.autoMinHeight)) {
|
|
2734
2740
|
g_sHeight = Math.max(setIntVal(_dosObj.windowHeight, g_sHeight),
|
|
2735
2741
|
setIntVal(g_presetObj.autoMinHeight, g_sHeight), g_sHeight);
|
|
2736
|
-
$id(`canvas-frame`).height =
|
|
2742
|
+
$id(`canvas-frame`).height = wUnit(g_sHeight);
|
|
2737
2743
|
}
|
|
2738
2744
|
|
|
2739
2745
|
// 曲名
|
|
@@ -3235,8 +3241,8 @@ const headerConvert = _dosObj => {
|
|
|
3235
3241
|
// クレジット表示
|
|
3236
3242
|
if (document.querySelector(`#webMusicTitle`) !== null) {
|
|
3237
3243
|
webMusicTitle.innerHTML =
|
|
3238
|
-
`<span style="font-size
|
|
3239
|
-
<span style="font-size
|
|
3244
|
+
`<span style="font-size:${wUnit(32)}">${obj.musicTitleForView.join(`<br>`)}</span><br>
|
|
3245
|
+
<span style="font-size:${wUnit(16)}">(Artist: <a href="${obj.artistUrl}" target="_blank">${obj.artistName}</a>)</span>`;
|
|
3240
3246
|
}
|
|
3241
3247
|
|
|
3242
3248
|
// コメントの外部化設定
|
|
@@ -4092,9 +4098,9 @@ const titleInit = _ => {
|
|
|
4092
4098
|
${g_headerObj.musicTitleForView[0]}
|
|
4093
4099
|
</div>
|
|
4094
4100
|
<div id="lblmusicTitle2" style="
|
|
4095
|
-
font-size:${titlefontsize2}
|
|
4096
|
-
position:relative;left:${g_headerObj.titlepos[1][0]}
|
|
4097
|
-
top:${g_headerObj.titlepos[1][1] + titlelineheight}
|
|
4101
|
+
font-size:${wUnit(titlefontsize2)};
|
|
4102
|
+
position:relative;left:${wUnit(g_headerObj.titlepos[1][0])};
|
|
4103
|
+
top:${wUnit(g_headerObj.titlepos[1][1] + titlelineheight)};
|
|
4098
4104
|
font-family:${g_headerObj.titlefonts[1]};
|
|
4099
4105
|
background: ${titlegrds[1]};
|
|
4100
4106
|
background-clip: text;
|
|
@@ -4323,7 +4329,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4323
4329
|
|
|
4324
4330
|
// ウィンドウ枠の行を取得するために一時的な枠を作成
|
|
4325
4331
|
const tmplbl = createDivCss2Label(`lblTmpWarning`, _text, {
|
|
4326
|
-
x: 0, y: 70, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz, lineHeight:
|
|
4332
|
+
x: 0, y: 70, w: g_sWidth, h: 20, siz: g_limitObj.mainSiz, lineHeight: wUnit(15), fontFamily: getBasicFont(),
|
|
4327
4333
|
whiteSpace: `normal`,
|
|
4328
4334
|
});
|
|
4329
4335
|
divRoot.appendChild(tmplbl);
|
|
@@ -4335,7 +4341,7 @@ const setWindowStyle = (_text, _bkColor, _textColor, _align = C_ALIGN_LEFT, { _x
|
|
|
4335
4341
|
_text.split(`<br>`).length + _text.split(`<p>`).length - 1) * 21);
|
|
4336
4342
|
const lbl = createDivCss2Label(`lblWarning`, _text, {
|
|
4337
4343
|
x: _x, y: 70 + _y, w: g_sWidth, h: warnHeight, siz: g_limitObj.mainSiz, backgroundColor: _bkColor,
|
|
4338
|
-
opacity: 0.9, lineHeight:
|
|
4344
|
+
opacity: 0.9, lineHeight: wUnit(15), color: _textColor, align: _align, fontFamily: getBasicFont(),
|
|
4339
4345
|
whiteSpace: `normal`,
|
|
4340
4346
|
});
|
|
4341
4347
|
if (warnHeight === 150) {
|
|
@@ -4684,7 +4690,7 @@ const drawSpeedGraph = _scoreId => {
|
|
|
4684
4690
|
context.moveTo(lineX[j], 215);
|
|
4685
4691
|
context.lineTo(lineX[j] + 25, 215);
|
|
4686
4692
|
context.stroke();
|
|
4687
|
-
context.font = `${g_limitObj.difSelectorSiz}
|
|
4693
|
+
context.font = `${wUnit(g_limitObj.difSelectorSiz)} ${getBasicFont()}`;
|
|
4688
4694
|
context.fillText(g_lblNameObj[`s_${speedType}`], lineX[j] + 30, 218);
|
|
4689
4695
|
|
|
4690
4696
|
updateScoreDetailLabel(`Speed`, `${speedType}S`, speedObj[speedType].cnt, j, g_lblNameObj[`s_${speedType}`]);
|
|
@@ -4724,7 +4730,7 @@ const drawDensityGraph = _scoreId => {
|
|
|
4724
4730
|
context.moveTo(lineX, 215);
|
|
4725
4731
|
context.lineTo(lineX + 20, 215);
|
|
4726
4732
|
context.stroke();
|
|
4727
|
-
context.font = `${g_limitObj.difSelectorSiz}
|
|
4733
|
+
context.font = `${wUnit(g_limitObj.difSelectorSiz)} ${getBasicFont()}`;
|
|
4728
4734
|
context.fillText(lineNames[j], lineX + 20, 218);
|
|
4729
4735
|
});
|
|
4730
4736
|
|
|
@@ -4792,7 +4798,7 @@ const drawLine = (_context, _y, _lineType, _fixed = 0) => {
|
|
|
4792
4798
|
const textBaseObj = document.querySelector(`#lnkDifficulty`);
|
|
4793
4799
|
const textColor = window.getComputedStyle(textBaseObj, ``).color;
|
|
4794
4800
|
_context.strokeStyle = textColor;
|
|
4795
|
-
_context.font =
|
|
4801
|
+
_context.font = `${wUnit(12)} ${getBasicFont()}`;
|
|
4796
4802
|
_context.fillStyle = textColor;
|
|
4797
4803
|
_context.fillText(_y.toFixed(_fixed), 0, lineY + 4);
|
|
4798
4804
|
} else {
|
|
@@ -4880,7 +4886,7 @@ const makeDifInfo = _scoreId => {
|
|
|
4880
4886
|
dataTate.textContent = g_detailObj.toolDif[_scoreId].tate;
|
|
4881
4887
|
lblArrowInfo2.innerHTML = g_lblNameObj.s_linecnts.split(`{0}`).join(g_detailObj.toolDif[_scoreId].push3cnt);
|
|
4882
4888
|
dataArrowInfo.innerHTML = `${arrowCnts + frzCnts * (g_headerObj.frzStartjdgUse ? 2 : 1)}
|
|
4883
|
-
<span style="font-size:${g_limitObj.difSelectorSiz}
|
|
4889
|
+
<span style="font-size:${wUnit(g_limitObj.difSelectorSiz)};">(${arrowCnts} + ${frzCnts}${g_headerObj.frzStartjdgUse ? ' <span class="common_bold">x 2</span>' : ''})</span>`;
|
|
4884
4890
|
dataArrowInfo2.innerHTML = `<br>(${g_detailObj.arrowCnt[_scoreId]})<br><br>
|
|
4885
4891
|
(${g_detailObj.frzCnt[_scoreId]})<br><br>
|
|
4886
4892
|
${push3CntStr}`.split(`,`).join(`/`);
|
|
@@ -5018,13 +5024,13 @@ const setDifficulty = (_initFlg) => {
|
|
|
5018
5024
|
// 譜面名設定 (Difficulty)
|
|
5019
5025
|
const difWidth = parseFloat(lnkDifficulty.style.width);
|
|
5020
5026
|
const difNames = [`${getKeyName(g_keyObj.currentKey)} ${getStgDetailName('key')} / ${g_headerObj.difLabels[g_stateObj.scoreId]}`];
|
|
5021
|
-
lnkDifficulty.style.fontSize =
|
|
5027
|
+
lnkDifficulty.style.fontSize = wUnit(getFontSize(difNames[0], difWidth, getBasicFont(), g_limitObj.setLblSiz));
|
|
5022
5028
|
|
|
5023
5029
|
if (g_headerObj.makerView) {
|
|
5024
5030
|
difNames.push(`(${g_headerObj.creatorNames[g_stateObj.scoreId]})`);
|
|
5025
5031
|
difNames.forEach((difName, j) => {
|
|
5026
5032
|
const tmpSize = getFontSize(difName, difWidth, getBasicFont(), 14);
|
|
5027
|
-
difNames[j] = `<span style="font-size:${tmpSize}
|
|
5033
|
+
difNames[j] = `<span style="font-size:${wUnit(tmpSize)}">${difName}</span>`;
|
|
5028
5034
|
});
|
|
5029
5035
|
}
|
|
5030
5036
|
lnkDifficulty.innerHTML = difNames.join(``);
|
|
@@ -5128,11 +5134,11 @@ const createOptionWindow = _sprite => {
|
|
|
5128
5134
|
graphObj.id = `graph${_name}`;
|
|
5129
5135
|
graphObj.width = g_limitObj.graphWidth;
|
|
5130
5136
|
graphObj.height = g_limitObj.graphHeight;
|
|
5131
|
-
graphObj.style.left =
|
|
5132
|
-
graphObj.style.top =
|
|
5137
|
+
graphObj.style.left = wUnit(125);
|
|
5138
|
+
graphObj.style.top = wUnit(0);
|
|
5133
5139
|
graphObj.style.position = `absolute`;
|
|
5134
5140
|
graphObj.style.background = bkColor;
|
|
5135
|
-
graphObj.style.border = `dotted
|
|
5141
|
+
graphObj.style.border = `dotted ${wUnit(2)}`;
|
|
5136
5142
|
|
|
5137
5143
|
detailObj.appendChild(graphObj);
|
|
5138
5144
|
}
|
|
@@ -5186,7 +5192,7 @@ const createOptionWindow = _sprite => {
|
|
|
5186
5192
|
scoreDetail.appendChild(
|
|
5187
5193
|
makeDifLblCssButton(`lnk${sd}G`, getStgDetailName(sd), j, _ => changeScoreDetail(j), { w: g_limitObj.difCoverWidth, btnStyle: (g_stateObj.scoreDetail === sd ? `Setting` : `Default`) })
|
|
5188
5194
|
);
|
|
5189
|
-
createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -
|
|
5195
|
+
createScText(document.getElementById(`lnk${sd}G`), `${sd}G`, { targetLabel: `lnk${sd}G`, x: -5 });
|
|
5190
5196
|
});
|
|
5191
5197
|
}
|
|
5192
5198
|
|
|
@@ -5231,7 +5237,7 @@ const createOptionWindow = _sprite => {
|
|
|
5231
5237
|
if (g_headerObj.scrollUse) {
|
|
5232
5238
|
createGeneralSetting(spriteList.scroll, `scroll`, { scLabel: g_lblNameObj.sc_scroll });
|
|
5233
5239
|
[$id(`lnkScroll`).left, $id(`lnkScroll`).width] = [
|
|
5234
|
-
|
|
5240
|
+
wUnit(parseFloat($id(`lnkScroll`).left) + 90), wUnit(parseFloat($id(`lnkScroll`).width) - 90)
|
|
5235
5241
|
];
|
|
5236
5242
|
|
|
5237
5243
|
spriteList.scroll.appendChild(
|
|
@@ -5557,29 +5563,30 @@ const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
|
|
|
5557
5563
|
};
|
|
5558
5564
|
|
|
5559
5565
|
// ゲージ初期化
|
|
5560
|
-
if (_gaugeInitFlg) {
|
|
5561
|
-
// カスタムゲージの設定取得
|
|
5562
|
-
const defaultCustomGauge = g_gaugeOptionObj.custom0 || g_gaugeOptionObj.customDefault;
|
|
5563
|
-
if (hasVal(defaultCustomGauge)) {
|
|
5564
|
-
g_gaugeOptionObj.custom = (g_gaugeOptionObj[`custom${g_stateObj.scoreId}`] || defaultCustomGauge).concat();
|
|
5565
|
-
g_gaugeOptionObj.varCustom = (g_gaugeOptionObj[`varCustom${g_stateObj.scoreId}`] || g_gaugeOptionObj.varCustom0 || g_gaugeOptionObj.varCustomDefault).concat();
|
|
5566
|
-
}
|
|
5567
5566
|
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
g_settings.gauges = structuredClone(g_gaugeOptionObj[g_gaugeType.toLowerCase()]);
|
|
5574
|
-
g_settings.gaugeNum = getCurrentNo(g_settings.gauges, g_stateObj.gauge);
|
|
5575
|
-
g_stateObj.gauge = g_settings.gauges[g_settings.gaugeNum];
|
|
5567
|
+
// カスタムゲージの設定取得
|
|
5568
|
+
const defaultCustomGauge = g_gaugeOptionObj.custom0 || g_gaugeOptionObj.customDefault;
|
|
5569
|
+
if (hasVal(defaultCustomGauge)) {
|
|
5570
|
+
g_gaugeOptionObj.custom = (g_gaugeOptionObj[`custom${g_stateObj.scoreId}`] || defaultCustomGauge).concat();
|
|
5571
|
+
g_gaugeOptionObj.varCustom = (g_gaugeOptionObj[`varCustom${g_stateObj.scoreId}`] || g_gaugeOptionObj.varCustom0 || g_gaugeOptionObj.varCustomDefault).concat();
|
|
5576
5572
|
}
|
|
5573
|
+
|
|
5574
|
+
// ゲージタイプの設定
|
|
5575
|
+
changeLifeMode(g_headerObj);
|
|
5576
|
+
g_gaugeType = (g_gaugeOptionObj.custom.length > 0 ? C_LFE_CUSTOM : g_stateObj.lifeMode);
|
|
5577
|
+
|
|
5578
|
+
// ゲージ配列を入れ替え
|
|
5579
|
+
g_settings.gauges = structuredClone(g_gaugeOptionObj[g_gaugeType.toLowerCase()]);
|
|
5580
|
+
g_settings.gaugeNum = getCurrentNo(g_settings.gauges, g_stateObj.gauge);
|
|
5581
|
+
g_stateObj.gauge = g_settings.gauges[g_settings.gaugeNum];
|
|
5582
|
+
|
|
5577
5583
|
setSetting(_scrollNum, `gauge`);
|
|
5578
5584
|
g_stateObj.lifeVariable = g_gaugeOptionObj[`var${g_gaugeType}`][g_settings.gaugeNum];
|
|
5579
5585
|
|
|
5580
5586
|
// デフォルトゲージの設定を適用(g_gaugeOptionObjから取得)
|
|
5581
|
-
if (
|
|
5582
|
-
g_gaugeOptionObj.
|
|
5587
|
+
if (g_settings.gaugeNum !== 0 &&
|
|
5588
|
+
(g_gaugeOptionObj.custom.length === 0 ||
|
|
5589
|
+
g_gaugeOptionObj.defaultList.includes(g_gaugeOptionObj[`defaultGauge${g_stateObj.scoreId}`]))) {
|
|
5583
5590
|
|
|
5584
5591
|
const gType = (g_gaugeType === C_LFE_CUSTOM ?
|
|
5585
5592
|
toCapitalize(g_gaugeOptionObj[`defaultGauge${g_stateObj.scoreId}`]) : g_gaugeType);
|
|
@@ -6386,8 +6393,8 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6386
6393
|
const stdPos = posj - ((posj > divideCnt ? posMax : 0) + divideCnt) / 2;
|
|
6387
6394
|
|
|
6388
6395
|
const nextLeft = (kWidth - C_ARW_WIDTH) / 2 + g_keyObj.blank * stdPos - maxLeftX - 10;
|
|
6389
|
-
cursor.style.left =
|
|
6390
|
-
cursor.style.top =
|
|
6396
|
+
cursor.style.left = wUnit(nextLeft);
|
|
6397
|
+
cursor.style.top = wUnit(C_KYC_HEIGHT * Number(posj > divideCnt) + 57 + C_KYC_REPHEIGHT * g_currentk);
|
|
6391
6398
|
g_kcType = (g_currentk === 0 ? `Main` : `Replaced`);
|
|
6392
6399
|
|
|
6393
6400
|
// 次の位置が見えなくなったらkeyconSpriteの位置を調整する
|
|
@@ -6759,7 +6766,7 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6759
6766
|
if (g_currentk < g_keyObj[`keyCtrl${keyCtrlPtn}`][g_currentj].length - 1 && g_kcType !== `Main`) {
|
|
6760
6767
|
// 後続に代替キーが存在する場合
|
|
6761
6768
|
g_currentk++;
|
|
6762
|
-
cursor.style.top =
|
|
6769
|
+
cursor.style.top = wUnit(parseInt(cursor.style.top) + C_KYC_REPHEIGHT);
|
|
6763
6770
|
|
|
6764
6771
|
} else {
|
|
6765
6772
|
changeConfigCursor();
|
|
@@ -7848,10 +7855,7 @@ const getFirstArrowFrame = (_dataObj, _keyCtrlPtn = `${g_keyObj.currentKey}_${g_
|
|
|
7848
7855
|
* @param {number} _scoreId
|
|
7849
7856
|
*/
|
|
7850
7857
|
const getStartFrame = (_lastFrame, _fadein = 0, _scoreId = g_stateObj.scoreId) => {
|
|
7851
|
-
let frameNum = 0;
|
|
7852
|
-
if (g_headerObj.startFrame !== undefined) {
|
|
7853
|
-
frameNum = parseInt(g_headerObj.startFrame[_scoreId] || g_headerObj.startFrame[0] || 0);
|
|
7854
|
-
}
|
|
7858
|
+
let frameNum = parseInt(g_headerObj.startFrame[_scoreId] ?? g_headerObj.startFrame[0] ?? 0);
|
|
7855
7859
|
if (_lastFrame >= frameNum) {
|
|
7856
7860
|
frameNum = Math.round(_fadein / 100 * (_lastFrame - frameNum)) + frameNum;
|
|
7857
7861
|
}
|
|
@@ -7952,17 +7956,6 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7952
7956
|
/** Motionの適用フレーム数 */
|
|
7953
7957
|
g_workObj.motionFrame = [];
|
|
7954
7958
|
|
|
7955
|
-
const getSpeedPos = _ => {
|
|
7956
|
-
let spdk, spdPrev;
|
|
7957
|
-
if (_dataObj.speedData !== undefined) {
|
|
7958
|
-
spdk = _dataObj.speedData.length - 2;
|
|
7959
|
-
spdPrev = _dataObj.speedData[spdk];
|
|
7960
|
-
} else {
|
|
7961
|
-
spdPrev = 0;
|
|
7962
|
-
}
|
|
7963
|
-
return [spdk, spdPrev];
|
|
7964
|
-
};
|
|
7965
|
-
|
|
7966
7959
|
const setNotes = (_j, _k, _data, _startPoint, _header, _frzFlg = false) => {
|
|
7967
7960
|
if (_startPoint >= 0) {
|
|
7968
7961
|
if (g_workObj[`mk${_header}Arrow`][_startPoint] === undefined) {
|
|
@@ -7988,7 +7981,8 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
7988
7981
|
|
|
7989
7982
|
const startPoint = [];
|
|
7990
7983
|
let spdNext = Infinity;
|
|
7991
|
-
let
|
|
7984
|
+
let spdk = (_dataObj.speedData?.length ?? 0) - 2;
|
|
7985
|
+
let spdPrev = _dataObj.speedData?.[spdk] ?? 0;
|
|
7992
7986
|
|
|
7993
7987
|
// 最後尾のデータから計算して格納
|
|
7994
7988
|
const lastk = _data.length - setcnt;
|
|
@@ -8081,7 +8075,7 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8081
8075
|
for (let k = 0; k < delIdx; k++) {
|
|
8082
8076
|
_data.shift();
|
|
8083
8077
|
}
|
|
8084
|
-
return
|
|
8078
|
+
return _data;
|
|
8085
8079
|
}
|
|
8086
8080
|
return [];
|
|
8087
8081
|
};
|
|
@@ -8793,8 +8787,8 @@ const mainInit = _ => {
|
|
|
8793
8787
|
const filterCss = g_stateObj.filterLock === C_FLG_OFF ? g_cssObj.life_Failed : g_cssObj.life_Cleared;
|
|
8794
8788
|
[`filterBar0`, `filterBar1`, `borderBar0`, `borderBar1`].forEach(obj =>
|
|
8795
8789
|
mainSprite.appendChild(createColorObject2(obj, g_lblPosObj.filterBar, filterCss)));
|
|
8796
|
-
borderBar0.style.top =
|
|
8797
|
-
borderBar1.style.top =
|
|
8790
|
+
borderBar0.style.top = wUnit(g_posObj.stepDiffY);
|
|
8791
|
+
borderBar1.style.top = wUnit(g_posObj.stepDiffY + g_posObj.arrowHeight);
|
|
8798
8792
|
|
|
8799
8793
|
if (g_appearanceRanges.includes(g_stateObj.appearance)) {
|
|
8800
8794
|
mainSprite.appendChild(createDivCss2Label(`filterView`, ``, g_lblPosObj.filterView));
|
|
@@ -9071,7 +9065,7 @@ const mainInit = _ => {
|
|
|
9071
9065
|
readyDelayFrame = g_headerObj.readyDelayFrame + g_stateObj.adjustment;
|
|
9072
9066
|
}
|
|
9073
9067
|
const readyHtml = (g_headerObj.readyHtml !== `` ? g_headerObj.readyHtml :
|
|
9074
|
-
`<span style='color:${readyColor};font-size
|
|
9068
|
+
`<span style='color:${readyColor};font-size:${wUnit(60)};'>R</span>EADY<span style='font-size:${wUnit(50)};'>?</span>`);
|
|
9075
9069
|
|
|
9076
9070
|
divRoot.appendChild(
|
|
9077
9071
|
createDivCss2Label(`lblReady`, readyHtml, {
|
|
@@ -9310,7 +9304,7 @@ const mainInit = _ => {
|
|
|
9310
9304
|
const stepDivHit = document.querySelector(`#stepHit${_j}`);
|
|
9311
9305
|
|
|
9312
9306
|
g_customJsObj.dummyArrow.forEach(func => func());
|
|
9313
|
-
stepDivHit.style.top =
|
|
9307
|
+
stepDivHit.style.top = wUnit(-15);
|
|
9314
9308
|
stepDivHit.style.opacity = 1;
|
|
9315
9309
|
stepDivHit.classList.value = ``;
|
|
9316
9310
|
stepDivHit.classList.add(g_cssObj.main_stepDummy);
|
|
@@ -9528,7 +9522,7 @@ const mainInit = _ => {
|
|
|
9528
9522
|
const boostCnt = currentArrow.boostCnt;
|
|
9529
9523
|
currentArrow.prevY = currentArrow.y;
|
|
9530
9524
|
currentArrow.y -= (g_workObj.currentSpeed * currentArrow.boostSpd + g_workObj.motionOnFrames[boostCnt] * currentArrow.boostDir) * currentArrow.dir;
|
|
9531
|
-
$id(arrowName).top =
|
|
9525
|
+
$id(arrowName).top = wUnit(currentArrow.y);
|
|
9532
9526
|
currentArrow.boostCnt--;
|
|
9533
9527
|
}
|
|
9534
9528
|
judgeMotionFunc[`${_name}${g_stateObj.autoAll}`](_j, arrowName, --currentArrow.cnt);
|
|
@@ -9632,7 +9626,7 @@ const mainInit = _ => {
|
|
|
9632
9626
|
// 移動
|
|
9633
9627
|
if (g_workObj.currentSpeed !== 0) {
|
|
9634
9628
|
currentFrz.y -= movY + g_workObj.motionOnFrames[currentFrz.boostCnt] * currentFrz.dir * currentFrz.boostDir;
|
|
9635
|
-
$id(frzName).top =
|
|
9629
|
+
$id(frzName).top = wUnit(currentFrz.y);
|
|
9636
9630
|
currentFrz.boostCnt--;
|
|
9637
9631
|
}
|
|
9638
9632
|
currentFrz.cnt--;
|
|
@@ -9652,10 +9646,10 @@ const mainInit = _ => {
|
|
|
9652
9646
|
currentFrz.barY -= movY * currentFrz.dividePos;
|
|
9653
9647
|
currentFrz.btmY -= movY;
|
|
9654
9648
|
|
|
9655
|
-
$id(`${_name}Bar${frzNo}`).height =
|
|
9656
|
-
$id(`${_name}Bar${frzNo}`).top =
|
|
9657
|
-
$id(`${_name}Btm${frzNo}`).top =
|
|
9658
|
-
$id(`${_name}BtmShadow${frzNo}`).top =
|
|
9649
|
+
$id(`${_name}Bar${frzNo}`).height = wUnit(currentFrz.frzBarLength);
|
|
9650
|
+
$id(`${_name}Bar${frzNo}`).top = wUnit(currentFrz.barY);
|
|
9651
|
+
$id(`${_name}Btm${frzNo}`).top = wUnit(currentFrz.btmY);
|
|
9652
|
+
$id(`${_name}BtmShadow${frzNo}`).top = wUnit(currentFrz.btmY);
|
|
9659
9653
|
|
|
9660
9654
|
if (!checkKeyUpFunc[`${_name}${g_stateObj.autoAll}`](_j)) {
|
|
9661
9655
|
currentFrz.keyUpFrame++;
|
|
@@ -9672,7 +9666,7 @@ const mainInit = _ => {
|
|
|
9672
9666
|
currentFrz.frzBarLength -= g_workObj.currentSpeed;
|
|
9673
9667
|
if (currentFrz.frzBarLength > 0) {
|
|
9674
9668
|
currentFrz.y -= movY;
|
|
9675
|
-
$id(frzName).top =
|
|
9669
|
+
$id(frzName).top = wUnit(currentFrz.y);
|
|
9676
9670
|
} else {
|
|
9677
9671
|
judgeObjDelete[_name](_j, frzName);
|
|
9678
9672
|
}
|
|
@@ -9849,7 +9843,7 @@ const mainInit = _ => {
|
|
|
9849
9843
|
|
|
9850
9844
|
// フォントサイズ変更
|
|
9851
9845
|
const fontSize = setIntVal(g_wordObj.wordDat.match(/\d+/)[0], g_limitObj.mainSiz);
|
|
9852
|
-
g_wordSprite.style.fontSize =
|
|
9846
|
+
g_wordSprite.style.fontSize = wUnit(fontSize);
|
|
9853
9847
|
|
|
9854
9848
|
} else {
|
|
9855
9849
|
|
|
@@ -9950,8 +9944,8 @@ const changeAppearanceFilter = (_appearance, _num = 10) => {
|
|
|
9950
9944
|
$id(`arrowSprite${topNum}`).clipPath = topShape;
|
|
9951
9945
|
$id(`arrowSprite${bottomNum}`).clipPath = bottomShape;
|
|
9952
9946
|
|
|
9953
|
-
$id(`filterBar0`).top =
|
|
9954
|
-
$id(`filterBar1`).top =
|
|
9947
|
+
$id(`filterBar0`).top = wUnit(g_posObj.arrowHeight * _num / 100);
|
|
9948
|
+
$id(`filterBar1`).top = wUnit(g_posObj.arrowHeight * (100 - _num) / 100);
|
|
9955
9949
|
|
|
9956
9950
|
if (g_appearanceRanges.includes(_appearance)) {
|
|
9957
9951
|
$id(`filterView`).top =
|
|
@@ -10058,8 +10052,8 @@ const changeStepY = (_frameNum) =>
|
|
|
10058
10052
|
g_workObj.mkScrollchStep[_frameNum]?.forEach((targetj, j) => {
|
|
10059
10053
|
const dividePos = (g_workObj.scrollDirDefault[targetj] * g_workObj.mkScrollchStepDir[_frameNum][j] === 1 ? 0 : 1);
|
|
10060
10054
|
const baseY = C_STEP_Y + g_posObj.reverseStepY * dividePos;
|
|
10061
|
-
$id(`stepRoot${targetj}`).top =
|
|
10062
|
-
$id(`frzHit${targetj}`).top =
|
|
10055
|
+
$id(`stepRoot${targetj}`).top = wUnit(baseY);
|
|
10056
|
+
$id(`frzHit${targetj}`).top = wUnit(baseY);
|
|
10063
10057
|
});
|
|
10064
10058
|
|
|
10065
10059
|
/**
|
|
@@ -10100,10 +10094,10 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
|
|
|
10100
10094
|
currentFrz.y += delFrzLength;
|
|
10101
10095
|
currentFrz.isMoving = false;
|
|
10102
10096
|
|
|
10103
|
-
styfrzBar.top =
|
|
10104
|
-
styfrzBar.height =
|
|
10097
|
+
styfrzBar.top = wUnit(currentFrz.barY);
|
|
10098
|
+
styfrzBar.height = wUnit(currentFrz.frzBarLength);
|
|
10105
10099
|
styfrzBar.background = g_workObj[`${_name}HitBarColors`][_j];
|
|
10106
|
-
styfrzBtm.top =
|
|
10100
|
+
styfrzBtm.top = wUnit(currentFrz.btmY);
|
|
10107
10101
|
styfrzBtm.background = g_workObj[`${_name}HitColors`][_j];
|
|
10108
10102
|
styfrzTopShadow.opacity = 0;
|
|
10109
10103
|
styfrzBtmShadow.top = styfrzBtm.top;
|
|
@@ -10139,8 +10133,8 @@ const changeFailedFrz = (_j, _k) => {
|
|
|
10139
10133
|
|
|
10140
10134
|
// 判定位置調整分の補正
|
|
10141
10135
|
const hitPos = g_workObj.hitPosition * g_workObj.scrollDir[_j];
|
|
10142
|
-
$id(`frzTop${frzNo}`).top =
|
|
10143
|
-
$id(`frzTopShadow${frzNo}`).top =
|
|
10136
|
+
$id(`frzTop${frzNo}`).top = wUnit(- hitPos);
|
|
10137
|
+
$id(`frzTopShadow${frzNo}`).top = wUnit(- hitPos);
|
|
10144
10138
|
|
|
10145
10139
|
const colorPos = g_keyObj[`color${g_keyObj.currentKey}_${g_keyObj.currentPtn}`][_j];
|
|
10146
10140
|
if (g_headerObj.frzShadowColor[colorPos][0] !== ``) {
|
|
@@ -10175,7 +10169,7 @@ const judgeArrow = _j => {
|
|
|
10175
10169
|
const _difCnt = Math.abs(_difFrame);
|
|
10176
10170
|
const stepHitTargetArrow = _resultJdg => {
|
|
10177
10171
|
const stepDivHit = document.querySelector(`#stepHit${_j}`);
|
|
10178
|
-
stepDivHit.style.top =
|
|
10172
|
+
stepDivHit.style.top = wUnit(currentArrow.prevY - parseFloat($id(`stepRoot${_j}`).top) - 15 + g_workObj.hitPosition * g_workObj.scrollDir[_j]);
|
|
10179
10173
|
stepDivHit.style.opacity = 0.75;
|
|
10180
10174
|
stepDivHit.classList.value = ``;
|
|
10181
10175
|
stepDivHit.classList.add(g_cssObj[`main_step${_resultJdg}`]);
|
|
@@ -10283,8 +10277,8 @@ const changeLifeColor = (_state = ``) => {
|
|
|
10283
10277
|
|
|
10284
10278
|
const intLifeVal = Math.floor(g_workObj.lifeVal);
|
|
10285
10279
|
lblLife.textContent = intLifeVal;
|
|
10286
|
-
lifeBar.style.top =
|
|
10287
|
-
lifeBar.style.height =
|
|
10280
|
+
lifeBar.style.top = wUnit(50 + (g_headerObj.playingHeight - 100) * (g_headerObj.maxLifeVal - intLifeVal) / g_headerObj.maxLifeVal);
|
|
10281
|
+
lifeBar.style.height = wUnit((g_headerObj.playingHeight - 100) * intLifeVal / g_headerObj.maxLifeVal);
|
|
10288
10282
|
};
|
|
10289
10283
|
|
|
10290
10284
|
const lifeRecovery = _ => {
|
|
@@ -10755,7 +10749,7 @@ const resultInit = _ => {
|
|
|
10755
10749
|
} else {
|
|
10756
10750
|
resultWindow.appendChild(makeCssResultSymbol(`lblAutoView`, 215, g_cssObj.result_noRecord, 4, `(No Record)`));
|
|
10757
10751
|
const lblAutoView = document.querySelector(`#lblAutoView`);
|
|
10758
|
-
lblAutoView.style.fontSize =
|
|
10752
|
+
lblAutoView.style.fontSize = wUnit(20);
|
|
10759
10753
|
}
|
|
10760
10754
|
|
|
10761
10755
|
// ユーザカスタムイベント(初期)
|
|
@@ -10848,22 +10842,18 @@ const resultInit = _ => {
|
|
|
10848
10842
|
canvas.id = `resultImage`;
|
|
10849
10843
|
canvas.width = 400;
|
|
10850
10844
|
canvas.height = g_sHeight - 90;
|
|
10851
|
-
canvas.style.left =
|
|
10852
|
-
canvas.style.top =
|
|
10845
|
+
canvas.style.left = wUnit((g_sWidth - canvas.width) / 2);
|
|
10846
|
+
canvas.style.top = wUnit(20);
|
|
10853
10847
|
canvas.style.position = `absolute`;
|
|
10854
10848
|
|
|
10855
10849
|
const context = canvas.getContext(`2d`);
|
|
10856
10850
|
const drawText = (_text, { x = 30, dy = 0, hy, siz = 15, color = `#cccccc`, align = C_ALIGN_LEFT, font } = {}) => {
|
|
10857
|
-
context.font = `${siz}
|
|
10851
|
+
context.font = `${wUnit(siz)} ${getBasicFont(font)}`;
|
|
10858
10852
|
context.fillStyle = color;
|
|
10859
10853
|
context.textAlign = align;
|
|
10860
10854
|
context.fillText(_text, x, 35 + hy * 18 + dy);
|
|
10861
10855
|
};
|
|
10862
|
-
|
|
10863
|
-
grd.addColorStop(0, `#000000`);
|
|
10864
|
-
grd.addColorStop(1, `#222222`);
|
|
10865
|
-
context.fillStyle = grd;
|
|
10866
|
-
context.fillRect(0, 0, g_sWidth, g_sHeight);
|
|
10856
|
+
makeBgCanvas(context, { h: canvas.height });
|
|
10867
10857
|
|
|
10868
10858
|
drawText(`R`, { dy: -5, hy: 0, siz: 40, color: `#9999ff` });
|
|
10869
10859
|
drawText(`ESULT`, { x: 57, dy: -5, hy: 0, siz: 25 });
|