danoniplus 36.0.0 → 36.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@
4
4
  本体cssファイル
5
5
 
6
6
  Created : 2018/10/08
7
- Revised : 2023/11/05 (v34.5.0)
7
+ Revised : 2024/04/18 (v36.1.0)
8
8
 
9
9
  https://github.com/cwtickle/danoniplus
10
10
  ------------------------------------------ */
@@ -837,6 +837,5 @@ input[type="color"] {
837
837
  .result_Cleared,
838
838
  .result_Failed {
839
839
  background-clip: text;
840
- -webkit-background-clip: text;
841
840
  color: rgba(255, 255, 255, 0.0);
842
841
  }
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 : 2024/04/15
7
+ * Revised : 2024/04/18
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 36.0.0`;
12
- const g_revisedDate = `2024/04/15`;
11
+ const g_version = `Ver 36.1.0`;
12
+ const g_revisedDate = `2024/04/18`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
15
15
  let g_localVersion = ``;
@@ -684,27 +684,17 @@ const preloadFile = (_as, _href, _type = ``, _crossOrigin = `anonymous`) => {
684
684
  g_preloadFiles.all.push(_href);
685
685
  g_preloadFiles[_as]?.push(_href) || (g_preloadFiles[_as] = [_href]);
686
686
 
687
- if (g_userAgent.indexOf(`firefox`) !== -1 && _as === `image`) {
688
- // Firefoxの場合のみpreloadが効かないため、画像読込形式にする
689
- g_loadObj[_href] = false;
690
- const img = new Image();
691
- img.src = _href;
692
- img.onload = _ => g_loadObj[_href] = true;
693
-
694
- } else {
695
- // それ以外のブラウザの場合はrel=preloadを利用
696
- const link = document.createElement(`link`);
697
- link.rel = `preload`;
698
- link.as = _as;
699
- link.href = _href;
700
- if (_type !== ``) {
701
- link.type = _type;
702
- }
703
- if (!g_isFile) {
704
- link.crossOrigin = _crossOrigin;
705
- }
706
- document.head.appendChild(link);
687
+ const link = document.createElement(`link`);
688
+ link.rel = `preload`;
689
+ link.as = _as;
690
+ link.href = _href;
691
+ if (_type !== ``) {
692
+ link.type = _type;
707
693
  }
694
+ if (!g_isFile) {
695
+ link.crossOrigin = _crossOrigin;
696
+ }
697
+ document.head.appendChild(link);
708
698
  }
709
699
  };
710
700
 
@@ -1159,8 +1149,6 @@ const createColorObject2 = (_id,
1159
1149
 
1160
1150
  style.maskImage = `url("${g_imgObj[charaStyle]}")`;
1161
1151
  style.maskSize = `contain`;
1162
- style.webkitMaskImage = `url("${g_imgObj[charaStyle]}")`;
1163
- style.webkitMaskSize = `contain`;
1164
1152
  Object.keys(rest).forEach(property => style[property] = rest[property]);
1165
1153
  setAttrs(div, { color: rest.background ?? ``, type: charaStyle, cnt: 0, });
1166
1154
 
@@ -3243,9 +3231,6 @@ const headerConvert = _dosObj => {
3243
3231
  // 結果画面用のマスク透過設定
3244
3232
  obj.maskresultButton = setBoolVal(_dosObj.maskresultButton);
3245
3233
 
3246
- // color_dataの過去バージョン互換設定
3247
- obj.colorDataType = _dosObj.colorDataType ?? ``;
3248
-
3249
3234
  // リザルトモーションをDisplay:BackgroundのON/OFFと連動させるかどうかの設定
3250
3235
  obj.resultMotionSet = setBoolVal(_dosObj.resultMotionSet, true);
3251
3236
 
@@ -4179,7 +4164,6 @@ const titleInit = _ => {
4179
4164
  font-family:${g_headerObj.titlefonts[0]};
4180
4165
  background: ${titlegrds[0]};
4181
4166
  background-clip: text;
4182
- -webkit-background-clip: text;
4183
4167
  color: rgba(255,255,255,0.0);
4184
4168
  ${txtAnimations[0]}
4185
4169
  " class="${g_headerObj.titleAnimationClass[0]}">
@@ -4192,7 +4176,6 @@ const titleInit = _ => {
4192
4176
  font-family:${g_headerObj.titlefonts[1]};
4193
4177
  background: ${titlegrds[1]};
4194
4178
  background-clip: text;
4195
- -webkit-background-clip: text;
4196
4179
  color: rgba(255,255,255,0.0);
4197
4180
  ${txtAnimations[1]}
4198
4181
  " class="${g_headerObj.titleAnimationClass[1]}">
@@ -7324,21 +7307,7 @@ const loadingScoreInit = async () => {
7324
7307
  // ユーザカスタムイベント
7325
7308
  g_customJsObj.loading.forEach(func => func());
7326
7309
 
7327
- const tempId = setInterval(() => {
7328
- const executeMain = _ => {
7329
- clearInterval(tempId);
7330
- mainInit();
7331
- }
7332
- if (g_audio.duration !== undefined) {
7333
- if (g_userAgent.indexOf(`firefox`) !== -1) {
7334
- if (g_preloadFiles.image.every(v => g_loadObj[v] === true)) {
7335
- executeMain();
7336
- }
7337
- } else {
7338
- executeMain();
7339
- }
7340
- }
7341
- }, 100);
7310
+ mainInit();
7342
7311
  };
7343
7312
 
7344
7313
  /**
@@ -7647,8 +7616,7 @@ const scoreConvert = (_dosObj, _scoreId, _preblankFrame, _dummyNo = ``,
7647
7616
  const colorCd = tmpColorData[k + 2];
7648
7617
 
7649
7618
  // フレーム数、色番号、カラーコード、全体色変化フラグをセットとして配列化
7650
- // フリーズアローヒット時の個別色変化は互換のため全体色変化として扱う
7651
- colorData.push([frame, colorNum, colorCd, isFrzHitColor(colorNum) && !allFlg ? true : allFlg]);
7619
+ colorData.push([frame, colorNum, colorCd, allFlg]);
7652
7620
  }
7653
7621
  });
7654
7622
  return colorData.sort((_a, _b) => _a[0] - _b[0]);
@@ -8500,12 +8468,6 @@ const getArrowStartFrame = (_frame, _speedOnFrame, _motionOnFrame) => {
8500
8468
  return obj;
8501
8469
  };
8502
8470
 
8503
- /**
8504
- * 個別色変化におけるフリーズアロー(ヒット時)判定
8505
- * @param {number} _val
8506
- */
8507
- const isFrzHitColor = _val => (g_headerObj.colorDataType === `` && ((_val >= 40 && _val < 50) || (_val >= 55 && _val < 60) || _val === 61));
8508
-
8509
8471
  /**
8510
8472
  * 速度を加味したフリーズアローの長さを取得
8511
8473
  * @param {object} _speedOnFrame
@@ -9858,7 +9820,6 @@ const mainInit = _ => {
9858
9820
  y: firstPosY, barY: C_ARW_WIDTH / 2 - firstBarLength * dividePos, btmY: firstBarLength * g_workObj.scrollDir[_j],
9859
9821
  };
9860
9822
  g_typeLists.frzColor.forEach(val => g_attrObj[frzName][val] = g_workObj[`${_name}${val}Colors`][_j]);
9861
-
9862
9823
  arrowSprite[dividePos].appendChild(frzRoot);
9863
9824
 
9864
9825
  if (g_workObj[`${_name}CssMotions`][_j] !== ``) {
@@ -10391,20 +10352,32 @@ const changeHitFrz = (_j, _k, _name, _difFrame = 0) => {
10391
10352
  currentFrz.y += delFrzLength;
10392
10353
  currentFrz.isMoving = false;
10393
10354
 
10355
+ /**
10356
+ * フリーズアロー(ヒット時)の色変更
10357
+ * - 生成時以降で全体色変化がある場合はその値へ置き換える
10358
+ * @param {string} _type
10359
+ */
10360
+ const getColor = (_type) => {
10361
+ const cColor = g_workObj[`${_name}${_type}Colors`][_j];
10362
+ const cColorAll = g_workObj[`${_name}${_type}ColorsAll`][_j];
10363
+ return currentFrz[_type] !== cColor && cColorAll === cColor ? cColorAll : currentFrz[_type];
10364
+ };
10365
+
10366
+ const tmpHitColor = getColor(`Hit`);
10394
10367
  styfrzBar.top = wUnit(currentFrz.barY);
10395
10368
  styfrzBar.height = wUnit(currentFrz.frzBarLength);
10396
- styfrzBar.background = g_workObj[`${_name}HitBarColors`][_j];
10369
+ styfrzBar.background = getColor(`HitBar`);
10397
10370
  styfrzBtm.top = wUnit(currentFrz.btmY);
10398
- styfrzBtm.background = g_workObj[`${_name}HitColors`][_j];
10371
+ styfrzBtm.background = tmpHitColor;
10399
10372
  styfrzTopShadow.opacity = 0;
10400
10373
  styfrzBtmShadow.top = styfrzBtm.top;
10401
10374
  if (_name === `frz`) {
10402
- styfrzBtmShadow.background = g_workObj[`${_name}HitShadowColors`][_j] === `Default` ?
10403
- g_workObj[`${_name}HitColors`][_j] : g_workObj[`${_name}HitShadowColors`][_j];
10375
+ const tmpShadowColor = getColor(`HitShadow`);
10376
+ styfrzBtmShadow.background = tmpShadowColor === `Default` ? tmpHitColor : tmpShadowColor;
10404
10377
  $id(`frzHit${_j}`).opacity = 0.9;
10405
10378
  $id(`frzTop${frzNo}`).display = C_DIS_NONE;
10406
10379
  if (isNaN(parseFloat(g_workObj.arrowRtn[_j]))) {
10407
- $id(`frzHitTop${_j}`).background = g_workObj.frzHitColors[_j];
10380
+ $id(`frzHitTop${_j}`).background = tmpHitColor;
10408
10381
  }
10409
10382
  }
10410
10383
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "36.0.0",
3
+ "version": "36.1.0",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "index.js",
6
6
  "scripts": {