ref: project structure, write basic type for lyrics layout

This commit is contained in:
alikia2x (寒寒) 2024-10-22 00:22:17 +08:00
parent d34ac176c0
commit 0c315972c1
Signed by: alikia2x
GPG Key ID: 56209E0CCD8420C6
4 changed files with 11 additions and 6 deletions

View File

@ -1,10 +1,9 @@
<script lang="ts">
import type { LrcJsonData } from '$lib/lyrics/type';
import { onMount } from 'svelte';
import LyricsLine from './lyrics/lyricLine.svelte';
import type { ScriptItem } from 'lrc-parser-ts';
import LyricLine from './lyrics/lyricLine.svelte';
import type { LyricPos } from './lyrics/type';
import type { ScriptItem } from '$lib/lyrics/type';
import LyricLine from './lyricLine.svelte';
import type { LyricPos } from './type';
// Props
export let originalLyrics: LrcJsonData;

View File

@ -1,4 +1,10 @@
export interface LyricPos {
x: number;
y: number;
}
export interface LyricLayout {
pos: LyricPos;
blur: number;
scale: number;
}

View File

@ -4,7 +4,7 @@
import Background from '$lib/components/background.svelte';
import Cover from '$lib/components/cover.svelte';
import InteractiveBox from '$lib/components/interactiveBox.svelte';
import Lyrics from '$lib/components/lyrics.svelte';
import Lyrics from '$lib/components/lyrics/lyrics.svelte';
import extractFileName from '$lib/extractFileName';
import localforage from 'localforage';
import { writable } from 'svelte/store';
@ -15,7 +15,7 @@
import { onMount } from 'svelte';
import progressBarRaw from '$lib/state/progressBarRaw';
import { parseTTML, type LyricLine } from '$lib/lyrics/ttml';
import NewLyrics from '$lib/components/newLyrics.svelte';
import NewLyrics from '$lib/components/lyrics/newLyrics.svelte';
const audioId = $page.params.id;
let audioPlayer: HTMLAudioElement | null = null;