Skip to content

Commit

Permalink
chores
Browse files Browse the repository at this point in the history
  • Loading branch information
lchzh3473 committed Oct 5, 2023
1 parent 29aa28c commit 5349c17
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sim-phi-vite",
"private": true,
"version": "1.5.4",
"version": "1.5.4.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
4 changes: 2 additions & 2 deletions scripts/meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.5.4",
"version": "1.5.4.1",
"pubdate": 1611795955,
"lastupdate": 1696233846
"lastupdate": 1696489055
}
7 changes: 4 additions & 3 deletions src/extends/pec/rpe2json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>,
audio: {} as Record<string, string>,
alternative: {} as Record<string, string>,
format: ''
}));
if (!raw) return; // 占位符
};
// if (!raw) return; // 占位符
// shit start
await readResource(raw);
// .then(result => {
Expand Down
1 change: 0 additions & 1 deletion src/plugins/phizone.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tools/eslint-config-ts.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineConfig({
getBabelOutputPlugin({
plugins: [['@babel/plugin-transform-nullish-coalescing-operator']]
}),
terser()
terser({ compress: { passes: 3 } })
]
}
}
Expand Down

0 comments on commit 5349c17

Please sign in to comment.