danoniplus 32.6.0 → 32.6.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 +261 -382
- package/js/lib/danoni_constants.js +5 -2
- 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/
|
|
7
|
+
* Revised : 2023/07/08
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 32.6.
|
|
12
|
-
const g_revisedDate = `2023/
|
|
11
|
+
const g_version = `Ver 32.6.1`;
|
|
12
|
+
const g_revisedDate = `2023/07/08`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -170,7 +170,7 @@ const g_wordObj = {
|
|
|
170
170
|
fadeInFlg0: false,
|
|
171
171
|
fadeInFlg1: false,
|
|
172
172
|
fadeOutFlg0: false,
|
|
173
|
-
fadeOutFlg1: false
|
|
173
|
+
fadeOutFlg1: false,
|
|
174
174
|
};
|
|
175
175
|
|
|
176
176
|
// オーディオ設定・タイマー管理
|
|
@@ -253,6 +253,31 @@ const convertStrToVal = _str => {
|
|
|
253
253
|
*/
|
|
254
254
|
const hasVal = _data => _data !== undefined && _data !== ``;
|
|
255
255
|
|
|
256
|
+
/**
|
|
257
|
+
* 変数が存在するかどうかをチェック(null無しを含む)
|
|
258
|
+
* @param {string} _data
|
|
259
|
+
*/
|
|
260
|
+
const hasValN = _data => hasVal(_data) && _data !== null;
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
* 文字列から他の型へ変換する処理群
|
|
264
|
+
*/
|
|
265
|
+
const g_convFunc = {
|
|
266
|
+
float: (_checkStr, _default) => isNaN(parseFloat(_checkStr)) ? _default : parseFloat(_checkStr),
|
|
267
|
+
number: (_checkStr, _default) => isNaN(parseInt(_checkStr)) ? _default : parseInt(_checkStr),
|
|
268
|
+
boolean: (_checkStr, _default) => _checkStr.toString().toLowerCase() === `true` ? true :
|
|
269
|
+
(_checkStr.toString().toLowerCase() === `false` ? false : _default),
|
|
270
|
+
switch: (_checkStr, _default) => [C_FLG_OFF, C_FLG_ON].includes(_checkStr.toString().toUpperCase()) ? _checkStr.toString().toUpperCase() : _default,
|
|
271
|
+
calc: (_checkStr, _default) => {
|
|
272
|
+
try {
|
|
273
|
+
return new Function(`return ${_checkStr}`)();
|
|
274
|
+
} catch (err) {
|
|
275
|
+
return _default;
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
string: (_checkStr) => _checkStr,
|
|
279
|
+
};
|
|
280
|
+
|
|
256
281
|
/**
|
|
257
282
|
* 文字列を想定された型に変換
|
|
258
283
|
* - _type は `float`(小数)、`number`(整数)、`boolean`(真偽値)、
|
|
@@ -262,62 +287,22 @@ const hasVal = _data => _data !== undefined && _data !== ``;
|
|
|
262
287
|
* @param {string} _default
|
|
263
288
|
* @param {string} _type
|
|
264
289
|
*/
|
|
265
|
-
const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
266
|
-
|
|
267
|
-
let convertStr = _checkStr;
|
|
268
|
-
|
|
269
|
-
// 値がundefined相当の場合は無条件でデフォルト値を返却
|
|
270
|
-
if (_checkStr === undefined || _checkStr === null || _checkStr === ``) {
|
|
271
|
-
return _default;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
if (_type === C_TYP_FLOAT) {
|
|
275
|
-
// 数値型(小数可)の場合
|
|
276
|
-
const toFloat = parseFloat(_checkStr);
|
|
277
|
-
convertStr = (isNaN(toFloat) ? _default : toFloat);
|
|
278
|
-
|
|
279
|
-
} else if (_type === C_TYP_NUMBER) {
|
|
280
|
-
// 数値型(整数のみ)の場合
|
|
281
|
-
const toInt = parseInt(_checkStr);
|
|
282
|
-
convertStr = (isNaN(toInt) ? _default : toInt);
|
|
283
|
-
|
|
284
|
-
} else if (_type === C_TYP_BOOLEAN) {
|
|
285
|
-
// 真偽値の場合
|
|
286
|
-
const lowerCase = _checkStr.toString().toLowerCase();
|
|
287
|
-
convertStr = (lowerCase === `true` ? true : (lowerCase === `false` ? false : _default));
|
|
288
|
-
|
|
289
|
-
} else if (_type === C_TYP_SWITCH) {
|
|
290
|
-
// ON/OFFスイッチの場合
|
|
291
|
-
const toSwtich = _checkStr.toString().toUpperCase();
|
|
292
|
-
convertStr = [C_FLG_OFF, C_FLG_ON].includes(toSwtich) ? toSwtich : _default;
|
|
293
|
-
|
|
294
|
-
} else if (_type === C_TYP_CALC) {
|
|
295
|
-
try {
|
|
296
|
-
convertStr = new Function(`return ${_checkStr}`)();
|
|
297
|
-
} catch (err) {
|
|
298
|
-
convertStr = _default;
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
// 文字列型の場合 (最初でチェック済みのためそのまま値を返却)
|
|
303
|
-
return convertStr;
|
|
304
|
-
};
|
|
290
|
+
const setVal = (_checkStr, _default, _type = C_TYP_STRING) =>
|
|
291
|
+
hasValN(_checkStr) ? g_convFunc[_type](_checkStr, _default) : _default;
|
|
305
292
|
|
|
306
293
|
/**
|
|
307
294
|
* ブール値への変換
|
|
308
295
|
* @param {string} _val
|
|
309
|
-
* @param {boolean} _defaultVal
|
|
310
|
-
* @returns
|
|
296
|
+
* @param {boolean} _defaultVal
|
|
311
297
|
*/
|
|
312
|
-
const setBoolVal = (_val, _defaultVal = false) =>
|
|
298
|
+
const setBoolVal = (_val, _defaultVal = false) => hasValN(_val) ? g_convFunc.boolean(_val, _defaultVal) : _defaultVal;
|
|
313
299
|
|
|
314
300
|
/**
|
|
315
301
|
* 整数値への変換
|
|
316
302
|
* @param {string} _val
|
|
317
|
-
* @param {number} _defaultVal
|
|
318
|
-
* @returns
|
|
303
|
+
* @param {number} _defaultVal
|
|
319
304
|
*/
|
|
320
|
-
const setIntVal = (_val, _defaultVal = 0) =>
|
|
305
|
+
const setIntVal = (_val, _defaultVal = 0) => hasValN(_val) ? g_convFunc.number(_val, _defaultVal) : _defaultVal;
|
|
321
306
|
|
|
322
307
|
/**
|
|
323
308
|
* 先頭のみ大文字に変換(それ以降はそのまま)
|
|
@@ -339,8 +324,7 @@ const roundZero = (_num, _init = 0) => _num < 0 ? _init : _num;
|
|
|
339
324
|
* 配列から_targetに合致する配列位置を返す
|
|
340
325
|
* 存在しない場合は0を返却
|
|
341
326
|
* @param {array} _list
|
|
342
|
-
* @param {string} _target
|
|
343
|
-
* @returns
|
|
327
|
+
* @param {string} _target
|
|
344
328
|
*/
|
|
345
329
|
const getCurrentNo = (_list, _target) => roundZero(_list.indexOf(_target));
|
|
346
330
|
|
|
@@ -348,8 +332,7 @@ const getCurrentNo = (_list, _target) => roundZero(_list.indexOf(_target));
|
|
|
348
332
|
* 配列内に存在するかどうかをチェック
|
|
349
333
|
* @param {string} _val
|
|
350
334
|
* @param {array} _array
|
|
351
|
-
* @param {integer} _pos
|
|
352
|
-
* @returns
|
|
335
|
+
* @param {integer} _pos
|
|
353
336
|
*/
|
|
354
337
|
const hasValInArray = (_val, _array, _pos = 0) =>
|
|
355
338
|
_array.findIndex(data => data[_pos] === _val) !== -1;
|
|
@@ -357,15 +340,13 @@ const hasValInArray = (_val, _array, _pos = 0) =>
|
|
|
357
340
|
/**
|
|
358
341
|
* 配列が既定長以上かどうかをチェック
|
|
359
342
|
* @param {array} _data
|
|
360
|
-
* @param {integer} _length
|
|
361
|
-
* @returns
|
|
343
|
+
* @param {integer} _length
|
|
362
344
|
*/
|
|
363
345
|
const hasArrayList = (_data, _length = 1) => _data !== undefined && _data.length >= _length;
|
|
364
346
|
|
|
365
347
|
/**
|
|
366
348
|
* 改行コード区切りの配列展開
|
|
367
|
-
* @param {string} _str
|
|
368
|
-
* @returns
|
|
349
|
+
* @param {string} _str
|
|
369
350
|
*/
|
|
370
351
|
const splitLF = _str => _str.split(`\r`).join(`\n`).split(`\n`);
|
|
371
352
|
|
|
@@ -373,31 +354,27 @@ const splitLF = _str => _str.split(`\r`).join(`\n`).split(`\n`);
|
|
|
373
354
|
* 改行コード区切りを本来の区切り文字に変換して配列展開
|
|
374
355
|
* (改行区切りで間が空行だった場合は無効化)
|
|
375
356
|
* @param {string} _str
|
|
376
|
-
* @param {string} _delim
|
|
377
|
-
* @returns
|
|
357
|
+
* @param {string} _delim
|
|
378
358
|
*/
|
|
379
359
|
const splitLF2 = (_str, _delim = `$`) => splitLF(_str).filter(val => val !== ``).join(_delim).split(_delim);
|
|
380
360
|
|
|
381
361
|
/**
|
|
382
362
|
* 重複を排除した配列の生成
|
|
383
363
|
* @param {array} _array1
|
|
384
|
-
* @param {...any} _arrays
|
|
385
|
-
* @returns
|
|
364
|
+
* @param {...any} _arrays
|
|
386
365
|
*/
|
|
387
366
|
const makeDedupliArray = (_array1, ..._arrays) =>
|
|
388
367
|
Array.from((new Set([..._array1, ..._arrays.flat()])).values()).filter(val => val !== undefined);
|
|
389
368
|
|
|
390
369
|
/**
|
|
391
370
|
* 二次元配列のコピー
|
|
392
|
-
* @param {array2} _array2d
|
|
393
|
-
* @returns
|
|
371
|
+
* @param {array2} _array2d
|
|
394
372
|
*/
|
|
395
373
|
const copyArray2d = _array2d => structuredClone(_array2d);
|
|
396
374
|
|
|
397
375
|
/**
|
|
398
376
|
* 配列データを合計
|
|
399
|
-
* @param {array} _array
|
|
400
|
-
* @returns
|
|
377
|
+
* @param {array} _array
|
|
401
378
|
*/
|
|
402
379
|
const sumData = _array => _array.reduce((p, x) => p + x);
|
|
403
380
|
|
|
@@ -405,8 +382,7 @@ const sumData = _array => _array.reduce((p, x) => p + x);
|
|
|
405
382
|
* 最小配列長の配列を作成
|
|
406
383
|
* @param {array} _array
|
|
407
384
|
* @param {number} _minLength
|
|
408
|
-
* @param {number} _defaultVal
|
|
409
|
-
* @returns
|
|
385
|
+
* @param {number} _defaultVal
|
|
410
386
|
*/
|
|
411
387
|
const makeBaseArray = (_array = [], _minLength, _defaultVal) => padArray(_array, [...Array(_minLength)].fill(_defaultVal));
|
|
412
388
|
|
|
@@ -414,7 +390,6 @@ const makeBaseArray = (_array = [], _minLength, _defaultVal) => padArray(_array,
|
|
|
414
390
|
* ベースとする配列に対して別の配列で上書き
|
|
415
391
|
* @param {array} _array
|
|
416
392
|
* @param {array} _baseArray ベースとする配列
|
|
417
|
-
* @returns
|
|
418
393
|
*/
|
|
419
394
|
const padArray = (_array, _baseArray) => {
|
|
420
395
|
_array?.forEach((val, j) => {
|
|
@@ -432,8 +407,7 @@ const padArray = (_array, _baseArray) => {
|
|
|
432
407
|
* [1, 3, 2, 4, 6, 4, 5] -> [[4], [6], [3, 5]]
|
|
433
408
|
* [9, 6, 9, 9, 8, 7, 5] -> [[0, 2, 3]]
|
|
434
409
|
* @param {array} _array
|
|
435
|
-
* @param {number} _num
|
|
436
|
-
* @returns
|
|
410
|
+
* @param {number} _num
|
|
437
411
|
*/
|
|
438
412
|
const getMaxValIdxs = (_array, _num = 1) => {
|
|
439
413
|
const getMaxVal = (_a, _b) => Math.max(_a, _b);
|
|
@@ -478,9 +452,7 @@ const fuzzyListMatching = (_str, _headerList, _footerList) =>
|
|
|
478
452
|
*/
|
|
479
453
|
const replaceStr = (_str, _pairs) => {
|
|
480
454
|
let tmpStr = _str;
|
|
481
|
-
_pairs.forEach(pair =>
|
|
482
|
-
tmpStr = tmpStr.replaceAll(pair[0], pair[1]);
|
|
483
|
-
});
|
|
455
|
+
_pairs.forEach(pair => tmpStr = tmpStr.replaceAll(pair[0], pair[1]));
|
|
484
456
|
return tmpStr;
|
|
485
457
|
};
|
|
486
458
|
|
|
@@ -513,8 +485,7 @@ const escapeHtmlForArray = _array => _array.map(str => escapeHtml(str));
|
|
|
513
485
|
* 次のカーソルへ移動
|
|
514
486
|
* @param {number} _basePos
|
|
515
487
|
* @param {number} _num
|
|
516
|
-
* @param {number} _length
|
|
517
|
-
* @returns
|
|
488
|
+
* @param {number} _length
|
|
518
489
|
*/
|
|
519
490
|
const nextPos = (_basePos, _num, _length) => (_basePos + _length + _num) % _length;
|
|
520
491
|
|
|
@@ -616,7 +587,7 @@ const createScText = (_obj, _settingLabel, { displayName = `option`, dfLabel = `
|
|
|
616
587
|
* 各画面の汎用ショートカットキー表示
|
|
617
588
|
* @param {string} _displayName
|
|
618
589
|
*/
|
|
619
|
-
const createScTextCommon = _displayName =>
|
|
590
|
+
const createScTextCommon = _displayName =>
|
|
620
591
|
Object.keys(g_btnPatterns[_displayName]).filter(target => document.getElementById(`btn${target}`) !== null)
|
|
621
592
|
.forEach(target =>
|
|
622
593
|
createScText(document.getElementById(`btn${target}`), target, {
|
|
@@ -624,7 +595,6 @@ const createScTextCommon = _displayName => {
|
|
|
624
595
|
dfLabel: g_lblNameObj[`sc_${_displayName}${target}`] ?? ``,
|
|
625
596
|
x: g_btnPatterns[_displayName][target],
|
|
626
597
|
}));
|
|
627
|
-
};
|
|
628
598
|
|
|
629
599
|
/**
|
|
630
600
|
* ショートカットキー有効化
|
|
@@ -667,8 +637,7 @@ const openLink = _url => {
|
|
|
667
637
|
|
|
668
638
|
/**
|
|
669
639
|
* URLのフルパスを取得
|
|
670
|
-
* @param {string} _url
|
|
671
|
-
* @returns
|
|
640
|
+
* @param {string} _url
|
|
672
641
|
*/
|
|
673
642
|
const getFullPath = _url => {
|
|
674
643
|
const link = document.createElement(`a`);
|
|
@@ -832,8 +801,7 @@ const getFilePath = (_fileName, _directory = ``) => {
|
|
|
832
801
|
|
|
833
802
|
/**
|
|
834
803
|
* 対象のカラーコードが明暗どちらかを判定 (true: 明色, false: 暗色)
|
|
835
|
-
* @param {string} _colorStr
|
|
836
|
-
* @returns
|
|
804
|
+
* @param {string} _colorStr
|
|
837
805
|
*/
|
|
838
806
|
const checkLightOrDark = _colorStr => {
|
|
839
807
|
const r = parseInt(_colorStr.substring(1, 3), 16);
|
|
@@ -860,15 +828,13 @@ const byteToHex = _num => (`${_num.toString(16).padStart(2, '0')}`);
|
|
|
860
828
|
|
|
861
829
|
/**
|
|
862
830
|
* カラーコードかどうかを判定 (簡易版)
|
|
863
|
-
* @param {string} _str
|
|
864
|
-
* @returns
|
|
831
|
+
* @param {string} _str
|
|
865
832
|
*/
|
|
866
833
|
const isColorCd = _str => _str.substring(0, 1) === `#`;
|
|
867
834
|
|
|
868
835
|
/**
|
|
869
836
|
* CSSの位置表記系かどうかをチェック
|
|
870
|
-
* @param {string} _str
|
|
871
|
-
* @returns
|
|
837
|
+
* @param {string} _str
|
|
872
838
|
*/
|
|
873
839
|
const hasAnglePointInfo = _str => fuzzyListMatching(_str, g_checkStr.cssHeader, g_checkStr.cssFooter);
|
|
874
840
|
|
|
@@ -999,7 +965,6 @@ const getFontSize = (_str, _maxWidth, _font = getBasicFont(), _maxFontsize = 64,
|
|
|
999
965
|
* @param {string} _id
|
|
1000
966
|
* @param {string} _str
|
|
1001
967
|
* @param {string} _altId
|
|
1002
|
-
* @returns
|
|
1003
968
|
*/
|
|
1004
969
|
const createDescDiv = (_id, _str, _altId = _id) =>
|
|
1005
970
|
createDivCss2Label(_id, _str, Object.assign(g_lblPosObj[_altId], {
|
|
@@ -1090,8 +1055,7 @@ const createImg = (_id, _imgPath, _x, _y, _width, _height) => {
|
|
|
1090
1055
|
* @param {string} _parentObj
|
|
1091
1056
|
* @param {string} _id
|
|
1092
1057
|
* @param {function} _func
|
|
1093
|
-
* @param {object} _obj
|
|
1094
|
-
* @returns
|
|
1058
|
+
* @param {object} _obj
|
|
1095
1059
|
*/
|
|
1096
1060
|
const createColorPicker = (_parentObj, _id, _func, { x = 0, y = 0 } = {}) => {
|
|
1097
1061
|
const picker = document.createElement(`input`);
|
|
@@ -1146,8 +1110,7 @@ const createColorObject2 = (_id,
|
|
|
1146
1110
|
* @param {object} _parentObj 親スプライト
|
|
1147
1111
|
* @param {string} _newObjId 作成する子スプライト名
|
|
1148
1112
|
* @param {object} _obj (x, y, w, h, ...rest)
|
|
1149
|
-
* @param {...any} _classes
|
|
1150
|
-
* @returns
|
|
1113
|
+
* @param {...any} _classes
|
|
1151
1114
|
*/
|
|
1152
1115
|
const createEmptySprite = (_parentObj, _newObjId, { x = 0, y = 0, w = g_sWidth, h = g_sHeight, title = ``, ...rest } = {}, ..._classes) => {
|
|
1153
1116
|
if (document.getElementById(_newObjId) !== null) {
|
|
@@ -1517,83 +1480,84 @@ const makeSpriteData = (_data, _calcFrame = _frame => _frame) => {
|
|
|
1517
1480
|
const tmpSpriteData = tmpData.split(`,`);
|
|
1518
1481
|
|
|
1519
1482
|
// 深度が"-"の場合はスキップ
|
|
1520
|
-
if (tmpSpriteData.length
|
|
1483
|
+
if (tmpSpriteData.length <= 1 || tmpSpriteData[1] === `-`) {
|
|
1484
|
+
return;
|
|
1485
|
+
}
|
|
1521
1486
|
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
}
|
|
1556
|
-
preloadFile(`image`, tmpObj.path);
|
|
1487
|
+
// 値チェックとエスケープ処理
|
|
1488
|
+
let tmpFrame;
|
|
1489
|
+
if (setIntVal(tmpSpriteData[0], -1) === 0) {
|
|
1490
|
+
tmpFrame = 0;
|
|
1491
|
+
} else {
|
|
1492
|
+
tmpFrame = roundZero(_calcFrame(setVal(tmpSpriteData[0], 200, C_TYP_CALC)));
|
|
1493
|
+
}
|
|
1494
|
+
const tmpDepth = (tmpSpriteData[1] === C_FLG_ALL ? C_FLG_ALL : setVal(tmpSpriteData[1], 0, C_TYP_CALC));
|
|
1495
|
+
if (tmpDepth !== C_FLG_ALL && tmpDepth > maxDepth) {
|
|
1496
|
+
maxDepth = tmpDepth;
|
|
1497
|
+
}
|
|
1498
|
+
|
|
1499
|
+
const tmpObj = {
|
|
1500
|
+
path: escapeHtml(tmpSpriteData[2] ?? ``, g_escapeStr.escapeCode), // 画像パス or テキスト
|
|
1501
|
+
class: escapeHtml(tmpSpriteData[3] ?? ``), // CSSクラス
|
|
1502
|
+
left: setVal(tmpSpriteData[4], `0`).includes(`{`) ?
|
|
1503
|
+
`${setVal(tmpSpriteData[4], 0)}` : `{${setVal(tmpSpriteData[4], 0)}}`, // X座標
|
|
1504
|
+
top: setVal(tmpSpriteData[5], `0`).includes(`{`) ?
|
|
1505
|
+
`${setVal(tmpSpriteData[5], 0)}` : `{${setVal(tmpSpriteData[5], 0)}}`, // Y座標
|
|
1506
|
+
width: `${setIntVal(tmpSpriteData[6])}`, // spanタグの場合は font-size
|
|
1507
|
+
height: `${escapeHtml(tmpSpriteData[7] ?? ``)}`, // spanタグの場合は color(文字列可)
|
|
1508
|
+
opacity: setVal(tmpSpriteData[8], 1, C_TYP_FLOAT),
|
|
1509
|
+
animationName: escapeHtml(setVal(tmpSpriteData[9], C_DIS_NONE)),
|
|
1510
|
+
animationDuration: setIntVal(tmpSpriteData[10]) / g_fps,
|
|
1511
|
+
};
|
|
1512
|
+
if (setVal(tmpSpriteData[11], g_presetObj.animationFillMode) !== undefined) {
|
|
1513
|
+
tmpObj.animationFillMode = setVal(tmpSpriteData[11], g_presetObj.animationFillMode);
|
|
1514
|
+
}
|
|
1515
|
+
if (g_headerObj.autoPreload) {
|
|
1516
|
+
if (checkImage(tmpObj.path)) {
|
|
1517
|
+
if (g_headerObj.syncBackPath) {
|
|
1518
|
+
const [file, dir] = getFilePath(tmpObj.path, `./`);
|
|
1519
|
+
tmpObj.path = `${dir}${file}`;
|
|
1557
1520
|
}
|
|
1521
|
+
preloadFile(`image`, tmpObj.path);
|
|
1558
1522
|
}
|
|
1523
|
+
}
|
|
1559
1524
|
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
const emptyPatterns = [``, `[loop]`, `[jump]`];
|
|
1565
|
-
const colorObjFlg = tmpSpriteData[2]?.startsWith(`[c]`) || false;
|
|
1566
|
-
spriteData[tmpFrame][addFrame] = {
|
|
1567
|
-
depth: tmpDepth,
|
|
1568
|
-
};
|
|
1525
|
+
let addFrame = 0;
|
|
1526
|
+
[spriteData[tmpFrame], addFrame] =
|
|
1527
|
+
checkDuplicatedObjects(spriteData[tmpFrame]);
|
|
1569
1528
|
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
rotate: setVal(data[0], `0`), opacity: tmpObj.opacity,
|
|
1576
|
-
background: makeColorGradation(setVal(data[1], `#ffffff`), { _defaultColorgrd: false }),
|
|
1577
|
-
animationName: tmpObj.animationName,
|
|
1578
|
-
animationDuration: `${tmpObj.animationDuration}s`,
|
|
1579
|
-
};
|
|
1580
|
-
spriteData[tmpFrame][addFrame].colorObjId = `${tmpFrame}_${addFrame}`;
|
|
1581
|
-
spriteData[tmpFrame][addFrame].colorObjClass = setVal(tmpObj.class, undefined);
|
|
1582
|
-
if (tmpObj.animationFillMode !== undefined) {
|
|
1583
|
-
spriteData[tmpFrame][addFrame].colorObjInfo.animationFillMode = tmpObj.animationFillMode;
|
|
1584
|
-
}
|
|
1529
|
+
const emptyPatterns = [``, `[loop]`, `[jump]`];
|
|
1530
|
+
const colorObjFlg = tmpSpriteData[2]?.startsWith(`[c]`) || false;
|
|
1531
|
+
const spriteFrameData = spriteData[tmpFrame][addFrame] = {
|
|
1532
|
+
depth: tmpDepth,
|
|
1533
|
+
};
|
|
1585
1534
|
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
}
|
|
1535
|
+
if (colorObjFlg) {
|
|
1536
|
+
// [c]始まりの場合、カラーオブジェクト用の作成準備を行う
|
|
1537
|
+
const data = tmpObj.path.slice(`[c]`.length).split(`/`);
|
|
1538
|
+
spriteFrameData.colorObjInfo = {
|
|
1539
|
+
x: tmpObj.left, y: tmpObj.top, w: tmpObj.width, h: tmpObj.height,
|
|
1540
|
+
rotate: setVal(data[0], `0`), opacity: tmpObj.opacity,
|
|
1541
|
+
background: makeColorGradation(setVal(data[1], `#ffffff`), { _defaultColorgrd: false }),
|
|
1542
|
+
animationName: tmpObj.animationName,
|
|
1543
|
+
animationDuration: `${tmpObj.animationDuration}s`,
|
|
1544
|
+
};
|
|
1545
|
+
spriteFrameData.colorObjId = `${tmpFrame}_${addFrame}`;
|
|
1546
|
+
spriteFrameData.colorObjClass = setVal(tmpObj.class, undefined);
|
|
1547
|
+
if (tmpObj.animationFillMode !== undefined) {
|
|
1548
|
+
spriteFrameData.colorObjInfo.animationFillMode = tmpObj.animationFillMode;
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
} else if (emptyPatterns.includes(tmpObj.path)) {
|
|
1552
|
+
// ループ、フレームジャンプ、空の場合の処理
|
|
1553
|
+
spriteFrameData.command = tmpObj.path;
|
|
1554
|
+
spriteFrameData.jumpFrame = tmpObj.class;
|
|
1555
|
+
spriteFrameData.maxLoop = tmpObj.left;
|
|
1556
|
+
spriteFrameData.htmlText = ``;
|
|
1557
|
+
} else {
|
|
1558
|
+
// それ以外の画像、テキストの場合
|
|
1559
|
+
spriteFrameData.animationName = tmpObj.animationName;
|
|
1560
|
+
spriteFrameData.htmlText = (checkImage(tmpObj.path) ? makeSpriteImage(tmpObj) : makeSpriteText(tmpObj));
|
|
1597
1561
|
}
|
|
1598
1562
|
});
|
|
1599
1563
|
|
|
@@ -1723,10 +1687,7 @@ class AudioPlayer {
|
|
|
1723
1687
|
this._duration = _buffer.duration;
|
|
1724
1688
|
this._buffer = _buffer;
|
|
1725
1689
|
});
|
|
1726
|
-
|
|
1727
|
-
if (this._eventListeners[`canplaythrough`] !== undefined) {
|
|
1728
|
-
this._eventListeners[`canplaythrough`].forEach(_listener => _listener());
|
|
1729
|
-
}
|
|
1690
|
+
this._eventListeners[`canplaythrough`]?.forEach(_listener => _listener());
|
|
1730
1691
|
}
|
|
1731
1692
|
|
|
1732
1693
|
play(_adjustmentTime = 0) {
|
|
@@ -2208,8 +2169,7 @@ const resetColorAndGauge = _scoreId => {
|
|
|
2208
2169
|
/**
|
|
2209
2170
|
* 譜面番号固定かつ譜面ファイル分割時に初期色情報を他譜面へコピー
|
|
2210
2171
|
* @param {object} _baseObj
|
|
2211
|
-
* @param {number} _scoreId
|
|
2212
|
-
* @returns
|
|
2172
|
+
* @param {number} _scoreId
|
|
2213
2173
|
*/
|
|
2214
2174
|
const copySetColor = (_baseObj, _scoreId) => {
|
|
2215
2175
|
const obj = {};
|
|
@@ -2226,8 +2186,7 @@ const copySetColor = (_baseObj, _scoreId) => {
|
|
|
2226
2186
|
|
|
2227
2187
|
/**
|
|
2228
2188
|
* MusicUrlの基本情報を取得
|
|
2229
|
-
* @param {number} _scoreId
|
|
2230
|
-
* @returns
|
|
2189
|
+
* @param {number} _scoreId
|
|
2231
2190
|
*/
|
|
2232
2191
|
const getMusicUrl = _scoreId => {
|
|
2233
2192
|
return g_headerObj.musicUrls !== undefined ?
|
|
@@ -2269,7 +2228,7 @@ const storeBaseData = (_scoreId, _scoreObj, _keyCtrlPtn) => {
|
|
|
2269
2228
|
noteCnt.frz[j] = 0;
|
|
2270
2229
|
|
|
2271
2230
|
const tmpFrzData = _scoreObj.frzData[j].filter((data, k) => k % 2 === 0);
|
|
2272
|
-
[_scoreObj.arrowData[j], tmpFrzData].forEach((typeData, m) =>
|
|
2231
|
+
[_scoreObj.arrowData[j], tmpFrzData].forEach((typeData, m) =>
|
|
2273
2232
|
typeData.forEach(note => {
|
|
2274
2233
|
if (isNaN(parseFloat(note))) {
|
|
2275
2234
|
return;
|
|
@@ -2280,8 +2239,7 @@ const storeBaseData = (_scoreId, _scoreObj, _keyCtrlPtn) => {
|
|
|
2280
2239
|
noteCnt[types[m]][j]++;
|
|
2281
2240
|
allData++;
|
|
2282
2241
|
}
|
|
2283
|
-
});
|
|
2284
|
-
});
|
|
2242
|
+
}));
|
|
2285
2243
|
fullData = fullData.concat(..._scoreObj.arrowData[j], ...tmpFrzData);
|
|
2286
2244
|
}
|
|
2287
2245
|
|
|
@@ -2506,8 +2464,7 @@ const calcLevel = _scoreObj => {
|
|
|
2506
2464
|
|
|
2507
2465
|
/**
|
|
2508
2466
|
* 譜面ヘッダーの分解(スキン、jsファイルなどの設定)
|
|
2509
|
-
* @param {object} _dosObj
|
|
2510
|
-
* @returns
|
|
2467
|
+
* @param {object} _dosObj
|
|
2511
2468
|
*/
|
|
2512
2469
|
const preheaderConvert = _dosObj => {
|
|
2513
2470
|
|
|
@@ -2523,14 +2480,13 @@ const preheaderConvert = _dosObj => {
|
|
|
2523
2480
|
obj.jsData = [];
|
|
2524
2481
|
obj.stepRtnUse = true;
|
|
2525
2482
|
|
|
2526
|
-
const setJsFiles = (_files, _defaultDir, _type = `custom`) =>
|
|
2483
|
+
const setJsFiles = (_files, _defaultDir, _type = `custom`) =>
|
|
2527
2484
|
_files.forEach(file => {
|
|
2528
2485
|
if (hasVal(file)) {
|
|
2529
2486
|
const [jsFile, jsDir] = getFilePath(file, _defaultDir);
|
|
2530
2487
|
obj.jsData.push([_type === `skin` ? `danoni_skin_${jsFile}.js` : jsFile, jsDir]);
|
|
2531
2488
|
}
|
|
2532
2489
|
});
|
|
2533
|
-
};
|
|
2534
2490
|
|
|
2535
2491
|
// 外部スキンファイルの指定
|
|
2536
2492
|
const tmpSkinType = _dosObj.skinType ?? g_presetObj.skinType ?? `default`;
|
|
@@ -2571,8 +2527,7 @@ const headerConvert = _dosObj => {
|
|
|
2571
2527
|
/**
|
|
2572
2528
|
* ロケールを含んだヘッダーの取得
|
|
2573
2529
|
* @param {object} _obj
|
|
2574
|
-
* @param {string} _param
|
|
2575
|
-
* @returns
|
|
2530
|
+
* @param {string} _param
|
|
2576
2531
|
*/
|
|
2577
2532
|
const getHeader = (_obj, _param) => _obj[`${_param}${g_localeObj.val}`] ?? _obj[_param];
|
|
2578
2533
|
|
|
@@ -2682,7 +2637,7 @@ const headerConvert = _dosObj => {
|
|
|
2682
2637
|
obj.minSpeed = C_MIN_SPEED;
|
|
2683
2638
|
obj.maxSpeed = C_MAX_SPEED;
|
|
2684
2639
|
}
|
|
2685
|
-
g_settings.speeds =
|
|
2640
|
+
g_settings.speeds = makeSpeedList(obj.minSpeed, obj.maxSpeed);
|
|
2686
2641
|
|
|
2687
2642
|
// プレイ中のショートカットキー
|
|
2688
2643
|
obj.keyRetry = setIntVal(getKeyCtrlVal(_dosObj.keyRetry), C_KEY_RETRY);
|
|
@@ -3002,14 +2957,12 @@ const headerConvert = _dosObj => {
|
|
|
3002
2957
|
obj.titleAnimationDelay[j] = setVal(titleAnimation[2] / g_fps, obj.titleAnimationDelay[0], C_TYP_FLOAT);
|
|
3003
2958
|
obj.titleAnimationTimingFunction[j] = setVal(titleAnimation[3], obj.titleAnimationName[3]);
|
|
3004
2959
|
});
|
|
3005
|
-
_dosObj.titleanimationclass?.split(`$`).forEach((animationClass, j) =>
|
|
3006
|
-
obj.titleAnimationClass[j] = animationClass ??
|
|
3007
|
-
});
|
|
2960
|
+
_dosObj.titleanimationclass?.split(`$`).forEach((animationClass, j) =>
|
|
2961
|
+
obj.titleAnimationClass[j] = animationClass ?? ``);
|
|
3008
2962
|
|
|
3009
2963
|
if (obj.titleAnimationName.length === 1) {
|
|
3010
|
-
g_titleLists.animation.forEach(pattern =>
|
|
3011
|
-
obj[`titleAnimation${pattern}`][1] = obj[`titleAnimation${pattern}`][0];
|
|
3012
|
-
});
|
|
2964
|
+
g_titleLists.animation.forEach(pattern =>
|
|
2965
|
+
obj[`titleAnimation${pattern}`][1] = obj[`titleAnimation${pattern}`][0]);
|
|
3013
2966
|
}
|
|
3014
2967
|
if (obj.titleAnimationClass.length === 1) {
|
|
3015
2968
|
obj.titleAnimationClass[1] = obj.titleAnimationClass[0];
|
|
@@ -3036,9 +2989,8 @@ const headerConvert = _dosObj => {
|
|
|
3036
2989
|
}
|
|
3037
2990
|
|
|
3038
2991
|
// オプション利用可否設定
|
|
3039
|
-
g_canDisabledSettings.forEach(option =>
|
|
3040
|
-
obj[`${option}Use`] = setBoolVal(_dosObj[`${option}Use`] ?? g_presetObj.settingUse?.[option], true);
|
|
3041
|
-
});
|
|
2992
|
+
g_canDisabledSettings.forEach(option =>
|
|
2993
|
+
obj[`${option}Use`] = setBoolVal(_dosObj[`${option}Use`] ?? g_presetObj.settingUse?.[option], true));
|
|
3042
2994
|
|
|
3043
2995
|
let interlockingErrorFlg = false;
|
|
3044
2996
|
g_displays.forEach((option, j) => {
|
|
@@ -3071,12 +3023,11 @@ const headerConvert = _dosObj => {
|
|
|
3071
3023
|
});
|
|
3072
3024
|
|
|
3073
3025
|
if (!interlockingErrorFlg) {
|
|
3074
|
-
g_displays.forEach(option =>
|
|
3026
|
+
g_displays.forEach(option =>
|
|
3075
3027
|
obj[`${option}ChainOFF`].forEach(defaultOption => {
|
|
3076
3028
|
g_stateObj[`d_${defaultOption.toLowerCase()}`] = C_FLG_OFF;
|
|
3077
3029
|
interlockingButton(obj, defaultOption, C_FLG_OFF, C_FLG_ON);
|
|
3078
|
-
});
|
|
3079
|
-
});
|
|
3030
|
+
}));
|
|
3080
3031
|
}
|
|
3081
3032
|
|
|
3082
3033
|
// ローカルストレージに保存済みのColorType設定からDisplayのColor設定を反映
|
|
@@ -3187,7 +3138,6 @@ const headerConvert = _dosObj => {
|
|
|
3187
3138
|
* 譜面リスト作成有無の状態を取得
|
|
3188
3139
|
* @param {boolean} _headerFlg
|
|
3189
3140
|
* @param {array} _viewLists
|
|
3190
|
-
* @returns
|
|
3191
3141
|
*/
|
|
3192
3142
|
const getDifSelectorUse = (_headerFlg, _viewLists = g_headerObj.viewLists) => setBoolVal(_headerFlg, _viewLists.length > 5);
|
|
3193
3143
|
|
|
@@ -3206,7 +3156,6 @@ const resetColorType = ({ _from = ``, _to = ``, _fromObj = g_headerObj, _toObj =
|
|
|
3206
3156
|
* 配列にデータを先頭に追加
|
|
3207
3157
|
* @param {array} _arr
|
|
3208
3158
|
* @param {string} _target
|
|
3209
|
-
* @returns
|
|
3210
3159
|
*/
|
|
3211
3160
|
const addValtoArray = (_arr, _target) => {
|
|
3212
3161
|
if (!_arr.includes(_target)) {
|
|
@@ -3530,8 +3479,7 @@ const getGaugeSetting = (_dosObj, _name, _difLength, { scoreId = 0 } = {}) => {
|
|
|
3530
3479
|
|
|
3531
3480
|
/**
|
|
3532
3481
|
* キー名の取得
|
|
3533
|
-
* @param {string} _key
|
|
3534
|
-
* @returns
|
|
3482
|
+
* @param {string} _key
|
|
3535
3483
|
*/
|
|
3536
3484
|
const getKeyName = _key => hasVal(g_keyObj[`keyName${_key}`]) ? g_keyObj[`keyName${_key}`] : _key;
|
|
3537
3485
|
|
|
@@ -3539,8 +3487,7 @@ const getKeyName = _key => hasVal(g_keyObj[`keyName${_key}`]) ? g_keyObj[`keyNam
|
|
|
3539
3487
|
* KeyBoardEvent.code の値をCW Edition用のキーコードに変換
|
|
3540
3488
|
* 簡略指定ができるように、以下の記述を許容
|
|
3541
3489
|
* 例) KeyD -> D, ArrowDown -> Down, AltLeft -> Alt
|
|
3542
|
-
* @param {string} _kCdN
|
|
3543
|
-
* @returns
|
|
3490
|
+
* @param {string} _kCdN
|
|
3544
3491
|
*/
|
|
3545
3492
|
const getKeyCtrlVal = _kCdN => {
|
|
3546
3493
|
const convVal = Object.keys(g_kCdN).findIndex(val =>
|
|
@@ -3575,8 +3522,7 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3575
3522
|
* キーパターン(相対パターン)をキーパターン(実際のパターン番号)に変換
|
|
3576
3523
|
* 例) 12_(0) -> 12_4
|
|
3577
3524
|
* それ以外の文字列が来た場合は、そのままの値を戻す
|
|
3578
|
-
* @param {string} _str
|
|
3579
|
-
* @returns
|
|
3525
|
+
* @param {string} _str
|
|
3580
3526
|
*/
|
|
3581
3527
|
const getKeyPtnName = _str => {
|
|
3582
3528
|
const regex = /\((\d+)\)/;
|
|
@@ -3790,26 +3736,24 @@ const keysConvert = (_dosObj, { keyExtraList = _dosObj.keyExtraList?.split(`,`)
|
|
|
3790
3736
|
newKeyMultiParam(newKey, `pos`, toFloat);
|
|
3791
3737
|
|
|
3792
3738
|
// 各キーの区切り位置 (divX_Y)
|
|
3793
|
-
|
|
3794
|
-
const
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
}
|
|
3807
|
-
|
|
3808
|
-
g_keyObj[`div${ptnName}`] = setVal(tmpDivPtn[0], undefined, C_TYP_NUMBER);
|
|
3809
|
-
g_keyObj[`divMax${ptnName}`] = setVal(tmpDivPtn[1], undefined, C_TYP_FLOAT);
|
|
3810
|
-
}
|
|
3739
|
+
_dosObj[`div${newKey}`]?.split(`$`).forEach((tmpDiv, k) => {
|
|
3740
|
+
const tmpDivPtn = tmpDiv.split(`,`);
|
|
3741
|
+
const ptnName = `${newKey}_${k + dfPtnNum}`;
|
|
3742
|
+
|
|
3743
|
+
if (g_keyObj[`div${tmpDivPtn[0]}`] !== undefined) {
|
|
3744
|
+
// 既定キーパターンが指定された場合、存在すればその値を適用
|
|
3745
|
+
g_keyObj[`div${ptnName}`] = g_keyObj[`div${tmpDivPtn[0]}`];
|
|
3746
|
+
g_keyObj[`divMax${ptnName}`] = setVal(g_keyObj[`divMax${tmpDivPtn[0]}`], undefined, C_TYP_FLOAT);
|
|
3747
|
+
} else if (!hasVal(tmpDivPtn[0]) && setIntVal(g_keyObj[`div${ptnName}`], -1) !== -1) {
|
|
3748
|
+
// カスタムキー側のdivXが未定義だが、すでに初期設定で定義済みの場合はスキップ
|
|
3749
|
+
return;
|
|
3750
|
+
} else {
|
|
3751
|
+
// それ以外の場合は指定された値を適用(未指定時はその後で指定)
|
|
3752
|
+
g_keyObj[`div${ptnName}`] = setVal(tmpDivPtn[0], undefined, C_TYP_NUMBER);
|
|
3753
|
+
g_keyObj[`divMax${ptnName}`] = setVal(tmpDivPtn[1], undefined, C_TYP_FLOAT);
|
|
3811
3754
|
}
|
|
3812
|
-
}
|
|
3755
|
+
});
|
|
3756
|
+
|
|
3813
3757
|
// charaX_Y, posX_Y, keyGroupX_Y, divX_Y, divMaxX_Yが未指定の場合はkeyCtrlX_Yを元に適用
|
|
3814
3758
|
for (let k = 0; k < g_keyObj.minPatterns; k++) {
|
|
3815
3759
|
setKeyDfVal(`${newKey}_${k + dfPtnNum}`);
|
|
@@ -3959,7 +3903,7 @@ const titleInit = _ => {
|
|
|
3959
3903
|
// 変数 titlelineheight の定義 (使用例: |titlelineheight=50|)
|
|
3960
3904
|
const titlelineheight = (g_headerObj.titlelineheight !== `` ? g_headerObj.titlelineheight - (titlefontsize2 + 10) : 0);
|
|
3961
3905
|
|
|
3962
|
-
|
|
3906
|
+
const txtAnimations = [``, ``];
|
|
3963
3907
|
if (!g_headerObj.customTitleAnimationUse) {
|
|
3964
3908
|
for (let j = 0; j < txtAnimations.length; j++) {
|
|
3965
3909
|
txtAnimations[j] = `animation-name:${g_headerObj.titleAnimationName[j]};
|
|
@@ -4028,7 +3972,6 @@ const titleInit = _ => {
|
|
|
4028
3972
|
* @param {string} _id
|
|
4029
3973
|
* @param {string} _text
|
|
4030
3974
|
* @param {string} _url
|
|
4031
|
-
* @returns
|
|
4032
3975
|
*/
|
|
4033
3976
|
const createCreditBtn = (_id, _text, _url) =>
|
|
4034
3977
|
createCss2Button(_id, _text, _ => true,
|
|
@@ -4143,10 +4086,10 @@ const titleInit = _ => {
|
|
|
4143
4086
|
g_scoreObj.titleFrameNum++;
|
|
4144
4087
|
g_scoreObj.backTitleFrameNum++;
|
|
4145
4088
|
g_scoreObj.maskTitleFrameNum++;
|
|
4146
|
-
g_timeoutEvtTitleId = setTimeout(
|
|
4089
|
+
g_timeoutEvtTitleId = setTimeout(flowTitleTimeline, 1000 / g_fps - buffTime);
|
|
4147
4090
|
};
|
|
4148
4091
|
|
|
4149
|
-
g_timeoutEvtTitleId = setTimeout(
|
|
4092
|
+
g_timeoutEvtTitleId = setTimeout(flowTitleTimeline, 1000 / g_fps);
|
|
4150
4093
|
|
|
4151
4094
|
// キー操作イベント(デフォルト)
|
|
4152
4095
|
setShortcutEvent(g_currentPage, _ => true, { dfEvtFlg: true });
|
|
@@ -4341,7 +4284,6 @@ const setSpriteList = _settingList => {
|
|
|
4341
4284
|
/**
|
|
4342
4285
|
* 設定ウィンドウの作成
|
|
4343
4286
|
* @param {string} _sprite
|
|
4344
|
-
* @returns
|
|
4345
4287
|
*/
|
|
4346
4288
|
const createOptionSprite = _sprite => createEmptySprite(_sprite, `optionsprite`, g_windowObj.optionSprite);
|
|
4347
4289
|
|
|
@@ -4349,7 +4291,6 @@ const createOptionSprite = _sprite => createEmptySprite(_sprite, `optionsprite`,
|
|
|
4349
4291
|
* スライダー共通処理
|
|
4350
4292
|
* @param {object} _slider
|
|
4351
4293
|
* @param {object} _link
|
|
4352
|
-
* @returns
|
|
4353
4294
|
*/
|
|
4354
4295
|
const inputSlider = (_slider, _link) => {
|
|
4355
4296
|
const value = parseInt(_slider.value);
|
|
@@ -4373,7 +4314,6 @@ const resetDifWindow = _ => {
|
|
|
4373
4314
|
* 次の譜面番号を取得
|
|
4374
4315
|
* @param {number} _scoreId
|
|
4375
4316
|
* @param {number} _scrollNum
|
|
4376
|
-
* @returns
|
|
4377
4317
|
*/
|
|
4378
4318
|
const getNextDifficulty = (_scoreId, _scrollNum) => {
|
|
4379
4319
|
const currentPosIdx = g_headerObj.viewLists.findIndex(val => val === _scoreId);
|
|
@@ -4422,7 +4362,6 @@ const makeDifList = (_difList, _targetKey = ``) => {
|
|
|
4422
4362
|
/**
|
|
4423
4363
|
* 譜面セレクター位置の変更ボタン
|
|
4424
4364
|
* @param {number} _scrollNum
|
|
4425
|
-
* @returns
|
|
4426
4365
|
*/
|
|
4427
4366
|
const makeDifBtn = (_scrollNum = 1) => {
|
|
4428
4367
|
const dir = _scrollNum === 1 ? `D` : `U`;
|
|
@@ -4529,8 +4468,8 @@ const drawSpeedGraph = _scoreId => {
|
|
|
4529
4468
|
};
|
|
4530
4469
|
|
|
4531
4470
|
Object.keys(speedObj).forEach(speedType => {
|
|
4532
|
-
|
|
4533
|
-
|
|
4471
|
+
const frame = speedObj[speedType].frame;
|
|
4472
|
+
const speed = speedObj[speedType].speed;
|
|
4534
4473
|
const speedData = g_detailObj[`${speedType}Data`][_scoreId];
|
|
4535
4474
|
|
|
4536
4475
|
if (speedData !== undefined) {
|
|
@@ -5426,27 +5365,21 @@ const setReverseView = _btn => {
|
|
|
5426
5365
|
*/
|
|
5427
5366
|
const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
|
|
5428
5367
|
|
|
5429
|
-
/**
|
|
5430
|
-
* ゲージ詳細変更
|
|
5431
|
-
* @param {object} _baseProperty
|
|
5432
|
-
* @param {string} _setProperty
|
|
5433
|
-
* @param {number} _magnification
|
|
5434
|
-
*/
|
|
5435
|
-
const setLife = (_baseProperty, _setProperty, _magnification = 1) => {
|
|
5436
|
-
if (setVal(_baseProperty[g_stateObj.scoreId], ``, C_TYP_FLOAT) !== ``) {
|
|
5437
|
-
g_stateObj[_setProperty] = _baseProperty[g_stateObj.scoreId] * _magnification;
|
|
5438
|
-
}
|
|
5439
|
-
};
|
|
5440
|
-
|
|
5441
5368
|
/**
|
|
5442
5369
|
* ゲージ詳細一括変更
|
|
5443
5370
|
* @param {object} _baseObj
|
|
5444
5371
|
* @param {object} _obj
|
|
5445
5372
|
*/
|
|
5446
5373
|
const setLifeCategory = (_baseObj, { _magInit = 1, _magRcv = 1, _magDmg = 1 } = {}) => {
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5374
|
+
if (hasVal(_baseObj.lifeInits[g_stateObj.scoreId])) {
|
|
5375
|
+
g_stateObj.lifeInit = _baseObj.lifeInits[g_stateObj.scoreId] * _magInit;
|
|
5376
|
+
}
|
|
5377
|
+
if (hasVal(_baseObj.lifeRecoverys[g_stateObj.scoreId])) {
|
|
5378
|
+
g_stateObj.lifeRcv = _baseObj.lifeRecoverys[g_stateObj.scoreId] * _magRcv;
|
|
5379
|
+
}
|
|
5380
|
+
if (hasVal(_baseObj.lifeDamages[g_stateObj.scoreId])) {
|
|
5381
|
+
g_stateObj.lifeDmg = _baseObj.lifeDamages[g_stateObj.scoreId] * _magDmg;
|
|
5382
|
+
}
|
|
5450
5383
|
};
|
|
5451
5384
|
|
|
5452
5385
|
/**
|
|
@@ -5526,7 +5459,6 @@ const setGauge = (_scrollNum, _gaugeInitFlg = false) => {
|
|
|
5526
5459
|
* @param {number} _dmg
|
|
5527
5460
|
* @param {number} _init
|
|
5528
5461
|
* @param {string} _lifeValFlg
|
|
5529
|
-
* @returns
|
|
5530
5462
|
*/
|
|
5531
5463
|
const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
|
|
5532
5464
|
const initVal = g_headerObj.maxLifeVal * _init / 100;
|
|
@@ -5603,7 +5535,6 @@ const gaugeFormat = (_mode, _border, _rcv, _dmg, _init, _lifeValFlg) => {
|
|
|
5603
5535
|
* @param {number} _dmg
|
|
5604
5536
|
* @param {number} _init
|
|
5605
5537
|
* @param {number} _allCnt
|
|
5606
|
-
* @returns
|
|
5607
5538
|
*/
|
|
5608
5539
|
const getAccuracy = (_border, _rcv, _dmg, _init, _allCnt) => {
|
|
5609
5540
|
const justPoint = _rcv + _dmg > 0 ? Math.max(_border - _init + _dmg * _allCnt, 0) / (_rcv + _dmg) : 0;
|
|
@@ -5661,9 +5592,7 @@ const getKeyCtrl = (_localStorage, _extraKeyName = ``) => {
|
|
|
5661
5592
|
g_keyObj[`${header}${copyPtn}`] = structuredClone(g_keyObj[`${header}${basePtn}`]);
|
|
5662
5593
|
}
|
|
5663
5594
|
});
|
|
5664
|
-
g_keyCopyLists.simple.forEach(header => {
|
|
5665
|
-
g_keyObj[`${header}${copyPtn}`] = g_keyObj[`${header}${basePtn}`];
|
|
5666
|
-
});
|
|
5595
|
+
g_keyCopyLists.simple.forEach(header => g_keyObj[`${header}${copyPtn}`] = g_keyObj[`${header}${basePtn}`]);
|
|
5667
5596
|
|
|
5668
5597
|
g_keycons.groups.forEach(type => {
|
|
5669
5598
|
let maxPtn = 0;
|
|
@@ -5885,11 +5814,10 @@ const createSettingsDisplayWindow = _sprite => {
|
|
|
5885
5814
|
appearanceSlider.addEventListener(`input`, _ =>
|
|
5886
5815
|
g_hidSudObj.filterPos = inputSlider(appearanceSlider, lblAppearancePos), false);
|
|
5887
5816
|
|
|
5888
|
-
const dispAppearanceSlider = _ =>
|
|
5817
|
+
const dispAppearanceSlider = _ =>
|
|
5889
5818
|
[`lblAppearancePos`, `lblAppearanceBar`, `lnkLockBtn`, `lnkfilterLine`].forEach(obj =>
|
|
5890
5819
|
$id(obj).visibility = g_appearanceRanges.includes(g_stateObj.appearance) ? `Visible` : `Hidden`
|
|
5891
5820
|
);
|
|
5892
|
-
};
|
|
5893
5821
|
dispAppearanceSlider();
|
|
5894
5822
|
|
|
5895
5823
|
// ---------------------------------------------------
|
|
@@ -6041,7 +5969,6 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6041
5969
|
* @param {number} _len
|
|
6042
5970
|
* @param {number} _j
|
|
6043
5971
|
* @param {number} _scrollNum
|
|
6044
|
-
* @returns
|
|
6045
5972
|
*/
|
|
6046
5973
|
const changeTmpData = (_type, _len, _j, _scrollNum) => {
|
|
6047
5974
|
const tmpNo = nextPos(g_keyObj[`${_type}${keyCtrlPtn}_${g_keycons[`${_type}GroupNum`]}`][_j], _scrollNum, _len);
|
|
@@ -6234,7 +6161,6 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6234
6161
|
* @param {string} _directionFlg
|
|
6235
6162
|
* @param {function} _func
|
|
6236
6163
|
* @param {*} object (x, y, w, h, siz)
|
|
6237
|
-
* @returns
|
|
6238
6164
|
*/
|
|
6239
6165
|
const makeMiniKCButton = (_id, _directionFlg, _func, { x = g_sWidth * 5 / 6 - 30, y = 15, w = 15, h = 20, siz = g_limitObj.mainSiz } = {}) => {
|
|
6240
6166
|
return createCss2Button(`${_id}${_directionFlg}`, g_settingBtnObj.chara[_directionFlg], _func,
|
|
@@ -6512,7 +6438,6 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6512
6438
|
* @param {number} _tempPtn
|
|
6513
6439
|
* @param {number} _sign
|
|
6514
6440
|
* @param {boolean} _transKeyUse
|
|
6515
|
-
* @returns
|
|
6516
6441
|
*/
|
|
6517
6442
|
const searchPattern = (_tempPtn, _sign, _transKeyUse = false, _skipFlg = false) => {
|
|
6518
6443
|
let nextPtn = _tempPtn + _sign;
|
|
@@ -6703,14 +6628,12 @@ const keyConfigInit = (_kcType = g_kcType) => {
|
|
|
6703
6628
|
* 影矢印色の取得
|
|
6704
6629
|
* @param {number} _colorPos
|
|
6705
6630
|
* @param {string} _arrowColor
|
|
6706
|
-
* @returns
|
|
6707
6631
|
*/
|
|
6708
6632
|
const getShadowColor = (_colorPos, _arrowColor) => g_headerObj.setShadowColor[_colorPos] === `Default` ?
|
|
6709
6633
|
_arrowColor : g_headerObj.setShadowColor[_colorPos];
|
|
6710
6634
|
|
|
6711
6635
|
/**
|
|
6712
6636
|
* キー数基礎情報の取得
|
|
6713
|
-
* @returns
|
|
6714
6637
|
*/
|
|
6715
6638
|
const getKeyInfo = _ => {
|
|
6716
6639
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
@@ -7007,9 +6930,7 @@ const loadingScoreInit = async () => {
|
|
|
7007
6930
|
// キーパターン(デフォルト)に対応する矢印番号を格納
|
|
7008
6931
|
convertReplaceNums();
|
|
7009
6932
|
|
|
7010
|
-
const setData = (_data, _minLength = 1) =>
|
|
7011
|
-
return (hasArrayList(_data, _minLength) ? _data.concat() : []);
|
|
7012
|
-
};
|
|
6933
|
+
const setData = (_data, _minLength = 1) => hasArrayList(_data, _minLength) ? _data.concat() : [];
|
|
7013
6934
|
|
|
7014
6935
|
// フレーム・曲開始位置調整
|
|
7015
6936
|
let preblankFrame = 0;
|
|
@@ -7033,9 +6954,8 @@ const loadingScoreInit = async () => {
|
|
|
7033
6954
|
});
|
|
7034
6955
|
}
|
|
7035
6956
|
|
|
7036
|
-
Object.keys(g_dataMinObj).forEach(dataType =>
|
|
7037
|
-
g_scoreObj[`${dataType}Data`] = setData(tmpObj[`${dataType}Data`], g_dataMinObj[dataType]);
|
|
7038
|
-
});
|
|
6957
|
+
Object.keys(g_dataMinObj).forEach(dataType =>
|
|
6958
|
+
g_scoreObj[`${dataType}Data`] = setData(tmpObj[`${dataType}Data`], g_dataMinObj[dataType]));
|
|
7039
6959
|
|
|
7040
6960
|
lastFrame += preblankFrame;
|
|
7041
6961
|
firstArrowFrame += preblankFrame;
|
|
@@ -7385,7 +7305,6 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7385
7305
|
/**
|
|
7386
7306
|
* 個別・全体色変化データをマージして整列し、単純配列として返却
|
|
7387
7307
|
* @param {string} _header
|
|
7388
|
-
* @returns
|
|
7389
7308
|
*/
|
|
7390
7309
|
const mergeColorData = (_header = ``) => {
|
|
7391
7310
|
if (obj[`color${_header}Data`] === undefined) return [];
|
|
@@ -7485,7 +7404,6 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7485
7404
|
* 例) |backA2_data=back_data| -> back_dataで定義された値を使用
|
|
7486
7405
|
* @param {string} _header
|
|
7487
7406
|
* @param {string} _dataName
|
|
7488
|
-
* @returns
|
|
7489
7407
|
*/
|
|
7490
7408
|
const getRefData = (_header, _dataName) => {
|
|
7491
7409
|
const data = _dosObj[`${_header}${_dataName}`];
|
|
@@ -7497,7 +7415,6 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7497
7415
|
* @param {string} _header
|
|
7498
7416
|
* @param {string} _type
|
|
7499
7417
|
* @param {number} _scoreNo
|
|
7500
|
-
* @returns
|
|
7501
7418
|
*/
|
|
7502
7419
|
const getPriorityList = (_header, _type, _scoreNo) => [
|
|
7503
7420
|
getRefData(_header, `${_type}${g_localeObj.val}${_scoreNo}_data`),
|
|
@@ -7508,7 +7425,6 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7508
7425
|
|
|
7509
7426
|
/**
|
|
7510
7427
|
* 歌詞表示、背景・マスクデータの優先順取得
|
|
7511
|
-
* @returns
|
|
7512
7428
|
*/
|
|
7513
7429
|
const getPriorityHeader = _ => {
|
|
7514
7430
|
const list = [];
|
|
@@ -7704,9 +7620,8 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
|
|
|
7704
7620
|
obj.backMaxDepth = -1;
|
|
7705
7621
|
if (g_stateObj.d_background === C_FLG_OFF) {
|
|
7706
7622
|
} else {
|
|
7707
|
-
g_animationData.forEach(sprite =>
|
|
7708
|
-
[obj[`${sprite}Data`], obj[`${sprite}MaxDepth`]] = makeBackgroundData(sprite, scoreIdHeader);
|
|
7709
|
-
});
|
|
7623
|
+
g_animationData.forEach(sprite =>
|
|
7624
|
+
[obj[`${sprite}Data`], obj[`${sprite}MaxDepth`]] = makeBackgroundData(sprite, scoreIdHeader));
|
|
7710
7625
|
}
|
|
7711
7626
|
|
|
7712
7627
|
// 結果画面用・背景/マスクデータの分解 (下記すべてで1セット、改行区切り)
|
|
@@ -7867,7 +7782,6 @@ const setMotionOnFrame = _ => g_motionFunc[g_stateObj.motion]([...Array(g_sHeigh
|
|
|
7867
7782
|
* @param {array} _frms
|
|
7868
7783
|
* @param {number} _spd
|
|
7869
7784
|
* @param {number} _pnFlg 正負(1 もしくは -1)
|
|
7870
|
-
* @returns
|
|
7871
7785
|
*/
|
|
7872
7786
|
const getBoostTrace = (_frms, _spd, _pnFlg = 1) => {
|
|
7873
7787
|
for (let j = C_MOTION_STD_POS + 1; j < C_MOTION_STD_POS + 70; j++) {
|
|
@@ -7880,7 +7794,6 @@ const getBoostTrace = (_frms, _spd, _pnFlg = 1) => {
|
|
|
7880
7794
|
* Brake用の適用関数
|
|
7881
7795
|
* - 初期は+2x、ステップゾーンに近づくにつれて加速量を下げる (20 → 34)
|
|
7882
7796
|
* @param {array} _frms
|
|
7883
|
-
* @returns
|
|
7884
7797
|
*/
|
|
7885
7798
|
const getBrakeTrace = _frms => {
|
|
7886
7799
|
for (let j = C_MOTION_STD_POS + 5; j < C_MOTION_STD_POS + 19; j++) {
|
|
@@ -8076,7 +7989,6 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8076
7989
|
* @param {string} _header
|
|
8077
7990
|
* @param {function} _setFunc
|
|
8078
7991
|
* @param {object} obj _colorFlg: 個別色変化フラグ, _calcFrameFlg: 逆算を無条件で行うかどうかの可否
|
|
8079
|
-
* @returns
|
|
8080
7992
|
*/
|
|
8081
7993
|
const calcDataTiming = (_type, _header, _setFunc = _ => true,
|
|
8082
7994
|
{ _term = 4, _colorFlg = false, _calcFrameFlg = false } = {}) => {
|
|
@@ -8117,7 +8029,6 @@ const pushArrows = (_dataObj, _speedOnFrame, _motionOnFrame, _firstArrivalFrame)
|
|
|
8117
8029
|
* 歌詞表示、背景・マスク表示のフェードイン時調整処理
|
|
8118
8030
|
* @param {string} _type
|
|
8119
8031
|
* @param {object} _data
|
|
8120
|
-
* @returns
|
|
8121
8032
|
*/
|
|
8122
8033
|
const calcAnimationData = (_type, _data) => {
|
|
8123
8034
|
|
|
@@ -9020,10 +8931,9 @@ const mainInit = _ => {
|
|
|
9020
8931
|
Ii: [`ii`, 0], Shakin: [`shakin`, 1], Matari: [`matari`, 2], Shobon: [`shobon`, 3], Uwan: [`uwan`, 4],
|
|
9021
8932
|
MCombo: [`combo`, 5], Kita: [`kita`, 7], Iknai: [`iknai`, 8], FCombo: [`combo`, 9],
|
|
9022
8933
|
};
|
|
9023
|
-
Object.keys(jdgMainScoreObj).forEach(jdgScore =>
|
|
8934
|
+
Object.keys(jdgMainScoreObj).forEach(jdgScore =>
|
|
9024
8935
|
infoSprite.appendChild(makeCounterSymbol(`lbl${jdgScore}`, g_headerObj.playingWidth - 110,
|
|
9025
|
-
g_cssObj[`common_${jdgMainScoreObj[jdgScore][0]}`], jdgMainScoreObj[jdgScore][1] + 1, 0, g_workObj.scoreDisp));
|
|
9026
|
-
});
|
|
8936
|
+
g_cssObj[`common_${jdgMainScoreObj[jdgScore][0]}`], jdgMainScoreObj[jdgScore][1] + 1, 0, g_workObj.scoreDisp)));
|
|
9027
8937
|
|
|
9028
8938
|
// パーフェクト演出
|
|
9029
8939
|
judgeSprite.appendChild(createDivCss2Label(`finishView`, ``, g_lblPosObj.finishView, g_cssObj.common_kita));
|
|
@@ -9240,12 +9150,12 @@ const mainInit = _ => {
|
|
|
9240
9150
|
* @param _deleteObj 削除オブジェクト
|
|
9241
9151
|
*/
|
|
9242
9152
|
const judgeObjDelete = {};
|
|
9243
|
-
g_typeLists.arrow.forEach(type =>
|
|
9153
|
+
g_typeLists.arrow.forEach(type =>
|
|
9244
9154
|
judgeObjDelete[type] = (_j, _deleteName) => {
|
|
9245
9155
|
g_workObj[`judg${toCapitalize(type)}Cnt`][_j]++;
|
|
9246
9156
|
arrowSprite[g_attrObj[_deleteName].dividePos].removeChild(document.getElementById(_deleteName));
|
|
9247
|
-
|
|
9248
|
-
|
|
9157
|
+
delete g_attrObj[_deleteName];
|
|
9158
|
+
});
|
|
9249
9159
|
|
|
9250
9160
|
/**
|
|
9251
9161
|
* 自動判定
|
|
@@ -9747,28 +9657,20 @@ const mainInit = _ => {
|
|
|
9747
9657
|
changeStepY(currentFrame);
|
|
9748
9658
|
|
|
9749
9659
|
// ダミー矢印生成(背面に表示するため先に処理)
|
|
9750
|
-
|
|
9751
|
-
g_workObj.
|
|
9752
|
-
makeArrow(data, ++dummyArrowCnts[data], `dummyArrow`, g_workObj.dummyArrowColors[data]));
|
|
9753
|
-
}
|
|
9660
|
+
g_workObj.mkDummyArrow[currentFrame]?.forEach(data =>
|
|
9661
|
+
makeArrow(data, ++dummyArrowCnts[data], `dummyArrow`, g_workObj.dummyArrowColors[data]));
|
|
9754
9662
|
|
|
9755
9663
|
// 矢印生成
|
|
9756
|
-
|
|
9757
|
-
g_workObj.
|
|
9758
|
-
makeArrow(data, ++arrowCnts[data], `arrow`, g_workObj.arrowColors[data]));
|
|
9759
|
-
}
|
|
9664
|
+
g_workObj.mkArrow[currentFrame]?.forEach(data =>
|
|
9665
|
+
makeArrow(data, ++arrowCnts[data], `arrow`, g_workObj.arrowColors[data]));
|
|
9760
9666
|
|
|
9761
9667
|
// ダミーフリーズアロー生成
|
|
9762
|
-
|
|
9763
|
-
g_workObj.
|
|
9764
|
-
makeFrzArrow(data, ++dummyFrzCnts[data], `dummyFrz`, g_workObj.dummyFrzNormalColors[data], g_workObj.dummyFrzNormalBarColors[data]));
|
|
9765
|
-
}
|
|
9668
|
+
g_workObj.mkDummyFrzArrow[currentFrame]?.forEach(data =>
|
|
9669
|
+
makeFrzArrow(data, ++dummyFrzCnts[data], `dummyFrz`, g_workObj.dummyFrzNormalColors[data], g_workObj.dummyFrzNormalBarColors[data]));
|
|
9766
9670
|
|
|
9767
9671
|
// フリーズアロー生成
|
|
9768
|
-
|
|
9769
|
-
g_workObj.
|
|
9770
|
-
makeFrzArrow(data, ++frzCnts[data], `frz`, g_workObj.frzNormalColors[data], g_workObj.frzNormalBarColors[data]));
|
|
9771
|
-
}
|
|
9672
|
+
g_workObj.mkFrzArrow[currentFrame]?.forEach(data =>
|
|
9673
|
+
makeFrzArrow(data, ++frzCnts[data], `frz`, g_workObj.frzNormalColors[data], g_workObj.frzNormalBarColors[data]));
|
|
9772
9674
|
|
|
9773
9675
|
// 矢印・フリーズアロー移動&消去
|
|
9774
9676
|
for (let j = 0; j < keyNum; j++) {
|
|
@@ -9805,56 +9707,54 @@ const mainInit = _ => {
|
|
|
9805
9707
|
}
|
|
9806
9708
|
|
|
9807
9709
|
// 歌詞表示
|
|
9808
|
-
|
|
9809
|
-
|
|
9810
|
-
|
|
9811
|
-
|
|
9812
|
-
g_wordSprite = document.querySelector(`#lblword${g_wordObj.wordDir}`);
|
|
9710
|
+
g_scoreObj.wordData[currentFrame]?.forEach(tmpObj => {
|
|
9711
|
+
g_wordObj.wordDir = tmpObj[0];
|
|
9712
|
+
g_wordObj.wordDat = tmpObj[1];
|
|
9713
|
+
g_wordSprite = document.querySelector(`#lblword${g_wordObj.wordDir}`);
|
|
9813
9714
|
|
|
9814
|
-
|
|
9815
|
-
|
|
9715
|
+
const wordDepth = Number(g_wordObj.wordDir);
|
|
9716
|
+
if (g_wordObj.wordDat.substring(0, 5) === `[fade`) {
|
|
9816
9717
|
|
|
9817
|
-
|
|
9818
|
-
|
|
9819
|
-
|
|
9820
|
-
|
|
9821
|
-
|
|
9822
|
-
|
|
9718
|
+
// フェードイン・アウト開始
|
|
9719
|
+
const fkey = fadeFlgs[Object.keys(fadeFlgs).find(flg => g_wordObj.wordDat === `[${flg}]`)];
|
|
9720
|
+
g_wordObj[`fade${fkey[0]}Flg${wordDepth}`] = true;
|
|
9721
|
+
g_wordObj[`fade${fkey[1]}Flg${wordDepth}`] = false;
|
|
9722
|
+
g_wordSprite.style.animationName =
|
|
9723
|
+
`fade${fkey[0]}${(++g_workObj[`fade${fkey[0]}No`][wordDepth] % 2)}`;
|
|
9823
9724
|
|
|
9824
|
-
|
|
9825
|
-
|
|
9826
|
-
|
|
9725
|
+
g_workObj.lastFadeFrame[wordDepth] = currentFrame;
|
|
9726
|
+
g_workObj.wordFadeFrame[wordDepth] = (tmpObj.length > 2 ?
|
|
9727
|
+
setIntVal(tmpObj[2], C_WOD_FRAME) : C_WOD_FRAME);
|
|
9827
9728
|
|
|
9828
|
-
|
|
9829
|
-
|
|
9830
|
-
|
|
9729
|
+
g_wordSprite.style.animationDuration = `${g_workObj.wordFadeFrame[wordDepth] / g_fps}s`;
|
|
9730
|
+
g_wordSprite.style.animationTimingFunction = `linear`;
|
|
9731
|
+
g_wordSprite.style.animationFillMode = `forwards`;
|
|
9831
9732
|
|
|
9832
|
-
|
|
9733
|
+
} else if ([`[center]`, `[left]`, `[right]`].includes(g_wordObj.wordDat)) {
|
|
9833
9734
|
|
|
9834
|
-
|
|
9835
|
-
|
|
9735
|
+
// 歌詞位置変更
|
|
9736
|
+
g_wordSprite.style.textAlign = g_wordObj.wordDat.slice(1, -1);
|
|
9836
9737
|
|
|
9837
|
-
|
|
9738
|
+
} else if (/\[fontSize=\d+\]/.test(g_wordObj.wordDat)) {
|
|
9838
9739
|
|
|
9839
|
-
|
|
9840
|
-
|
|
9841
|
-
|
|
9740
|
+
// フォントサイズ変更
|
|
9741
|
+
const fontSize = setIntVal(g_wordObj.wordDat.match(/\d+/)[0], g_limitObj.mainSiz);
|
|
9742
|
+
g_wordSprite.style.fontSize = `${fontSize}px`;
|
|
9842
9743
|
|
|
9843
|
-
|
|
9744
|
+
} else {
|
|
9844
9745
|
|
|
9845
|
-
|
|
9846
|
-
|
|
9847
|
-
|
|
9848
|
-
|
|
9849
|
-
|
|
9850
|
-
|
|
9851
|
-
|
|
9852
|
-
|
|
9853
|
-
|
|
9854
|
-
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
}
|
|
9746
|
+
// フェードイン・アウト処理後、表示する歌詞を表示
|
|
9747
|
+
const fadingFlg = currentFrame - g_workObj.lastFadeFrame[wordDepth] >= g_workObj.wordFadeFrame[wordDepth];
|
|
9748
|
+
[`Out`, `In`].forEach(pattern => {
|
|
9749
|
+
if (g_wordObj[`fade${pattern}Flg${g_wordObj.wordDir}`] && fadingFlg) {
|
|
9750
|
+
g_wordSprite.style.animationName = `none`;
|
|
9751
|
+
g_wordObj[`fade${pattern}Flg${g_wordObj.wordDir}`] = false;
|
|
9752
|
+
}
|
|
9753
|
+
});
|
|
9754
|
+
g_workObj[`word${g_wordObj.wordDir}Data`] = g_wordObj.wordDat;
|
|
9755
|
+
g_wordSprite.innerHTML = g_wordObj.wordDat;
|
|
9756
|
+
}
|
|
9757
|
+
});
|
|
9858
9758
|
|
|
9859
9759
|
// 判定キャラクタ消去
|
|
9860
9760
|
jdgGroups.forEach(jdg => {
|
|
@@ -9905,7 +9805,7 @@ const mainInit = _ => {
|
|
|
9905
9805
|
}
|
|
9906
9806
|
g_scoreObj.frameNum++;
|
|
9907
9807
|
g_scoreObj.baseFrame++;
|
|
9908
|
-
g_timeoutEvtId = setTimeout(
|
|
9808
|
+
g_timeoutEvtId = setTimeout(flowTimeline, 1000 / g_fps - buffTime);
|
|
9909
9809
|
}
|
|
9910
9810
|
};
|
|
9911
9811
|
g_skinJsObj.main.forEach(func => func());
|
|
@@ -9920,7 +9820,7 @@ const mainInit = _ => {
|
|
|
9920
9820
|
g_audio.play(musicStartAdjustment);
|
|
9921
9821
|
}
|
|
9922
9822
|
|
|
9923
|
-
g_timeoutEvtId = setTimeout(
|
|
9823
|
+
g_timeoutEvtId = setTimeout(flowTimeline, 1000 / g_fps);
|
|
9924
9824
|
};
|
|
9925
9825
|
|
|
9926
9826
|
/**
|
|
@@ -10026,50 +9926,33 @@ const changeColors = (_mkColor, _mkColorCd, _header, _name) => {
|
|
|
10026
9926
|
* @param {number} _frameNum
|
|
10027
9927
|
*/
|
|
10028
9928
|
const changeCssMotions = (_header, _name, _frameNum) => {
|
|
10029
|
-
|
|
10030
9929
|
const camelHeader = _header === `` ? _name : `${_header}${toCapitalize(_name)}`;
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
for (let j = 0; j < frameData.length; j++) {
|
|
10035
|
-
const targetj = frameData[j];
|
|
10036
|
-
g_workObj[`${camelHeader}CssMotions`][targetj] =
|
|
10037
|
-
g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + g_workObj.dividePos[targetj]];
|
|
10038
|
-
}
|
|
10039
|
-
}
|
|
9930
|
+
g_workObj[`mk${toCapitalize(camelHeader)}CssMotion`][_frameNum]?.forEach((targetj, j) =>
|
|
9931
|
+
g_workObj[`${camelHeader}CssMotions`][targetj] =
|
|
9932
|
+
g_workObj[`mk${toCapitalize(camelHeader)}CssMotionName`][_frameNum][2 * j + g_workObj.dividePos[targetj]]);
|
|
10040
9933
|
};
|
|
10041
9934
|
|
|
10042
9935
|
/**
|
|
10043
9936
|
* スクロール方向の変更(矢印・フリーズアロー)
|
|
10044
9937
|
* @param {number} _frameNum
|
|
10045
9938
|
*/
|
|
10046
|
-
const changeScrollArrowDirs = (_frameNum) =>
|
|
10047
|
-
|
|
10048
|
-
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
g_workObj.scrollDir[targetj] = g_workObj.scrollDirDefault[targetj] * g_workObj.mkScrollchArrowDir[_frameNum][j];
|
|
10052
|
-
g_workObj.dividePos[targetj] = (g_workObj.scrollDir[targetj] === 1 ? 0 : 1);
|
|
10053
|
-
}
|
|
10054
|
-
}
|
|
10055
|
-
};
|
|
9939
|
+
const changeScrollArrowDirs = (_frameNum) =>
|
|
9940
|
+
g_workObj.mkScrollchArrow[_frameNum]?.forEach((targetj, j) => {
|
|
9941
|
+
g_workObj.scrollDir[targetj] = g_workObj.scrollDirDefault[targetj] * g_workObj.mkScrollchArrowDir[_frameNum][j];
|
|
9942
|
+
g_workObj.dividePos[targetj] = (g_workObj.scrollDir[targetj] === 1 ? 0 : 1);
|
|
9943
|
+
});
|
|
10056
9944
|
|
|
10057
9945
|
/**
|
|
10058
9946
|
* ステップゾーンの位置反転
|
|
10059
9947
|
* @param {number} _frameNum
|
|
10060
9948
|
*/
|
|
10061
|
-
const changeStepY = (_frameNum) =>
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
$id(`stepRoot${targetj}`).top = `${baseY}px`;
|
|
10069
|
-
$id(`frzHit${targetj}`).top = `${baseY}px`;
|
|
10070
|
-
}
|
|
10071
|
-
}
|
|
10072
|
-
};
|
|
9949
|
+
const changeStepY = (_frameNum) =>
|
|
9950
|
+
g_workObj.mkScrollchStep[_frameNum]?.forEach((targetj, j) => {
|
|
9951
|
+
const dividePos = (g_workObj.scrollDirDefault[targetj] * g_workObj.mkScrollchStepDir[_frameNum][j] === 1 ? 0 : 1);
|
|
9952
|
+
const baseY = C_STEP_Y + g_posObj.reverseStepY * dividePos;
|
|
9953
|
+
$id(`stepRoot${targetj}`).top = `${baseY}px`;
|
|
9954
|
+
$id(`frzHit${targetj}`).top = `${baseY}px`;
|
|
9955
|
+
});
|
|
10073
9956
|
|
|
10074
9957
|
/**
|
|
10075
9958
|
* フリーズアローヒット時の描画変更
|
|
@@ -10590,9 +10473,8 @@ const resultInit = _ => {
|
|
|
10590
10473
|
|
|
10591
10474
|
const mTitleForView = [g_headerObj.musicTitleForView[0], g_headerObj.musicTitleForView[1] || ``];
|
|
10592
10475
|
if (g_headerObj.musicTitlesForView[g_headerObj.musicNos[g_stateObj.scoreId]] !== undefined) {
|
|
10593
|
-
mTitleForView.forEach((mTitle, j) =>
|
|
10594
|
-
mTitleForView[j] = g_headerObj.musicTitlesForView[g_headerObj.musicNos[g_stateObj.scoreId]][j];
|
|
10595
|
-
});
|
|
10476
|
+
mTitleForView.forEach((mTitle, j) =>
|
|
10477
|
+
mTitleForView[j] = g_headerObj.musicTitlesForView[g_headerObj.musicNos[g_stateObj.scoreId]][j]);
|
|
10596
10478
|
}
|
|
10597
10479
|
|
|
10598
10480
|
const keyCtrlPtn = `${g_keyObj.currentKey}_${g_keyObj.currentPtn}`;
|
|
@@ -10678,12 +10560,11 @@ const resultInit = _ => {
|
|
|
10678
10560
|
};
|
|
10679
10561
|
|
|
10680
10562
|
// キャラクタ、スコア描画
|
|
10681
|
-
Object.keys(jdgScoreObj).forEach(score =>
|
|
10563
|
+
Object.keys(jdgScoreObj).forEach(score =>
|
|
10682
10564
|
multiAppend(resultWindow,
|
|
10683
10565
|
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}`, 0, g_cssObj[`common_${jdgScoreObj[score].color}`], jdgScoreObj[score].pos, jdgScoreObj[score].label),
|
|
10684
10566
|
makeCssResultSymbol(`lbl${jdgScoreObj[score].id}S`, 50, g_cssObj.common_score, jdgScoreObj[score].pos, g_resultObj[score], C_ALIGN_RIGHT),
|
|
10685
|
-
);
|
|
10686
|
-
});
|
|
10567
|
+
));
|
|
10687
10568
|
if (g_stateObj.autoAll === C_FLG_OFF) {
|
|
10688
10569
|
multiAppend(resultWindow,
|
|
10689
10570
|
makeCssResultSymbol(`lblFast`, 350, g_cssObj.common_matari, 0, g_lblNameObj.j_fast),
|
|
@@ -10852,9 +10733,8 @@ const resultInit = _ => {
|
|
|
10852
10733
|
[`[url]`, g_isLocal ? `` : `${twiturl.toString()}`.replace(/[\t\n]/g, ``)]
|
|
10853
10734
|
]);
|
|
10854
10735
|
if (g_presetObj.resultVals !== undefined) {
|
|
10855
|
-
Object.keys(g_presetObj.resultVals).forEach(key =>
|
|
10856
|
-
tweetResultTmp = tweetResultTmp.split(`[${key}]`).join(g_resultObj[g_presetObj.resultVals[key]]);
|
|
10857
|
-
});
|
|
10736
|
+
Object.keys(g_presetObj.resultVals).forEach(key =>
|
|
10737
|
+
tweetResultTmp = tweetResultTmp.split(`[${key}]`).join(g_resultObj[g_presetObj.resultVals[key]]));
|
|
10858
10738
|
}
|
|
10859
10739
|
const resultText = `${unEscapeHtml(tweetResultTmp)}`;
|
|
10860
10740
|
const tweetResult = `https://twitter.com/intent/tweet?text=${encodeURIComponent(resultText)}`;
|
|
@@ -10876,9 +10756,8 @@ const resultInit = _ => {
|
|
|
10876
10756
|
resetCommonBtn(`btnBack`, g_lblNameObj.b_back, g_lblPosObj.btnRsBack, titleInit, g_cssObj.button_Back),
|
|
10877
10757
|
|
|
10878
10758
|
// リザルトデータをクリップボードへコピー
|
|
10879
|
-
createCss2Button(`btnCopy`, g_lblNameObj.b_copy, _ =>
|
|
10880
|
-
|
|
10881
|
-
}, g_lblPosObj.btnRsCopy, g_cssObj.button_Setting),
|
|
10759
|
+
createCss2Button(`btnCopy`, g_lblNameObj.b_copy, _ => copyTextToClipboard(resultText, g_msgInfoObj.I_0001),
|
|
10760
|
+
g_lblPosObj.btnRsCopy, g_cssObj.button_Setting),
|
|
10882
10761
|
|
|
10883
10762
|
// リザルトデータをTwitterへ転送
|
|
10884
10763
|
createCss2Button(`btnTweet`, g_lblNameObj.b_tweet, _ => true, Object.assign(g_lblPosObj.btnRsTweet, {
|
|
@@ -10943,7 +10822,7 @@ const resultInit = _ => {
|
|
|
10943
10822
|
g_scoreObj.resultFrameNum++;
|
|
10944
10823
|
g_scoreObj.backResultFrameNum++;
|
|
10945
10824
|
g_scoreObj.maskResultFrameNum++;
|
|
10946
|
-
g_timeoutEvtResultId = setTimeout(
|
|
10825
|
+
g_timeoutEvtResultId = setTimeout(flowResultTimeline, 1000 / g_fps - buffTime);
|
|
10947
10826
|
};
|
|
10948
10827
|
flowResultTimeline();
|
|
10949
10828
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Source by tickle
|
|
7
7
|
* Created : 2019/11/19
|
|
8
|
-
* Revised : 2023/
|
|
8
|
+
* Revised : 2023/07/08 (v32.6.1)
|
|
9
9
|
*
|
|
10
10
|
* https://github.com/cwtickle/danoniplus
|
|
11
11
|
*/
|
|
@@ -871,9 +871,11 @@ const g_autoPlaysBase = [C_FLG_OFF, C_FLG_ALL];
|
|
|
871
871
|
|
|
872
872
|
let g_appearanceRanges = [`Hidden+`, `Sudden+`, `Hid&Sud+`];
|
|
873
873
|
|
|
874
|
+
const makeSpeedList = (_minSpd, _maxSpd) => [...Array((_maxSpd - _minSpd) * 20 + 1).keys()].map(i => _minSpd + i / 20);
|
|
875
|
+
|
|
874
876
|
// 設定系全般管理
|
|
875
877
|
const g_settings = {
|
|
876
|
-
speeds:
|
|
878
|
+
speeds: makeSpeedList(C_MIN_SPEED, C_MAX_SPEED),
|
|
877
879
|
speedNum: 0,
|
|
878
880
|
speedTerms: [20, 5, 1],
|
|
879
881
|
|
|
@@ -1360,6 +1362,7 @@ const g_shortcutObj = {
|
|
|
1360
1362
|
ShiftLeft_KeyG: { id: `lnkGaugeL` },
|
|
1361
1363
|
ShiftRight_KeyG: { id: `lnkGaugeL` },
|
|
1362
1364
|
KeyG: { id: `lnkGaugeR` },
|
|
1365
|
+
KeyE: { id: `lnkExcessive` },
|
|
1363
1366
|
|
|
1364
1367
|
AltLeft_ShiftLeft_Semicolon: { id: `lnkAdjustmentHR` },
|
|
1365
1368
|
AltLeft_ShiftRight_Semicolon: { id: `lnkAdjustmentHR` },
|