diff --git a/package.json b/package.json index b763e7f..5b1e9c0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "sim-phi-vite", "private": true, - "version": "1.5.4", + "version": "1.5.4.1", "type": "module", "scripts": { "dev": "vite", diff --git a/scripts/meta.json b/scripts/meta.json index cdb2a7a..a48af01 100644 --- a/scripts/meta.json +++ b/scripts/meta.json @@ -1,5 +1,5 @@ { - "version": "1.5.4", + "version": "1.5.4.1", "pubdate": 1611795955, - "lastupdate": 1696233846 + "lastupdate": 1696489055 } diff --git a/src/extends/pec/rpe2json.ts b/src/extends/pec/rpe2json.ts index a3c1645..67db26d 100644 --- a/src/extends/pec/rpe2json.ts +++ b/src/extends/pec/rpe2json.ts @@ -130,9 +130,10 @@ function toSpeedEvent(le: LineEventRPE2[]) { if (start !== end) { // 暂未考虑开始时间大于结束时间的情况 const t1 = (end - start) / (endTime - startTime); for (let j = startTime; j < endTime; j++) { - const x = j + 1 - startTime; - result.push({ time: j + 1, value: start + x * t1 }); + const x = j + 0.5 - startTime; + result.push({ time: j, value: start + x * t1 }); } + result.push({ time: endTime, value: end }); } } return result; @@ -409,7 +410,7 @@ class LineRPE1 { for (let i = 0; i < speedEvents.length; i++) { const startTime = Math.max(speedEvents[i].time, 0); const endTime = i < speedEvents.length - 1 ? speedEvents[i + 1].time : 1e9; - const value = speedEvents[i].value * 11 / 45; + const value = speedEvents[i].value * 2 / 9; const floorPosition = floorPos; floorPos += (endTime - startTime) * value / this.bpm * 1.875; floorPos = Math.fround(floorPos); diff --git a/src/index.ts b/src/index.ts index ae5ae6a..e8cdc9e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -863,14 +863,14 @@ window.addEventListener('load', (): void => { } })) return; await import('./utils/reader-'); - const raw = await loadResource(atob('aHR0cHM6Ly9sY2h6aC5uZXQvZGF0YS9wYWNrLmpzb24=')).catch(() => ({ - // const raw = await loadResource('local/ptres2.json').catch(() => ({ + const raw = await loadResource(atob('aHR0cHM6Ly9sY2h6aC5uZXQvZGF0YS9wYWNrLmpzb24=')).catch(() => null) || { + // const raw = await loadResource('local/ptres2.json').catch(() => ({ image: {} as Record, audio: {} as Record, alternative: {} as Record, format: '' - })); - if (!raw) return; // 占位符 + }; + // if (!raw) return; // 占位符 // shit start await readResource(raw); // .then(result => { diff --git a/src/plugins/phizone.js b/src/plugins/phizone.js index a37ed19..ee8e280 100644 --- a/src/plugins/phizone.js +++ b/src/plugins/phizone.js @@ -250,7 +250,6 @@ function getChartOffset(id) { if (id === '165119b8-7074-4106-bb23-27a8fb99c0c6') return 150; // 58 if (id === '846587d2-0ff2-40ca-b42b-3568cef08e48') return 250; // 59 if (id === '74585cab-6b6f-4633-9c3d-4dfa9900cafd') return -100; // 61 - if (id === '4be75ae5-af61-4e2b-a23c-7171d063c391') return 300; // 66 if (id === '108254a0-a756-4200-8391-1f47bb7707aa') return -50; // 68 if (id === '8c4d638a-a1aa-4e29-a0d2-2f3a2cb7e69c') return 300; // 69 if (id === 'e29e6b87-796f-4518-ac33-d9db79bbc103') return 200; // 70 diff --git a/tools/eslint-config-ts.cjs b/tools/eslint-config-ts.cjs index 2014dae..f5a471d 100644 --- a/tools/eslint-config-ts.cjs +++ b/tools/eslint-config-ts.cjs @@ -21,6 +21,7 @@ module.exports = { '@typescript-eslint/no-explicit-any': ['error', { fixToUnknown: true, ignoreRestArgs: true }], '@typescript-eslint/no-extra-parens': ['error', 'all', { enforceForSequenceExpressions: false }], '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-invalid-void-type': ['error', { allowAsThisParameter: true }], '@typescript-eslint/no-magic-numbers': 'off', // qwq '@typescript-eslint/no-namespace': 'off', '@typescript-eslint/no-non-null-assertion': 'off', // qwq diff --git a/vite.config.ts b/vite.config.ts index 5ad488b..11e1048 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -26,7 +26,7 @@ export default defineConfig({ getBabelOutputPlugin({ plugins: [['@babel/plugin-transform-nullish-coalescing-operator']] }), - terser() + terser({ compress: { passes: 3 } }) ] } }