ref: project structure, write basic type for lyrics layout
This commit is contained in:
parent
d34ac176c0
commit
c1e93e062b
@ -1,10 +1,9 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { LrcJsonData } from '$lib/lyrics/type';
|
import type { LrcJsonData } from '$lib/lyrics/type';
|
||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import LyricsLine from './lyrics/lyricLine.svelte';
|
import type { ScriptItem } from '$lib/lyrics/type';
|
||||||
import type { ScriptItem } from 'lrc-parser-ts';
|
import LyricLine from './lyricLine.svelte';
|
||||||
import LyricLine from './lyrics/lyricLine.svelte';
|
import type { LyricPos } from './type';
|
||||||
import type { LyricPos } from './lyrics/type';
|
|
||||||
|
|
||||||
// Props
|
// Props
|
||||||
export let originalLyrics: LrcJsonData;
|
export let originalLyrics: LrcJsonData;
|
6
src/lib/components/lyrics/type.d.ts
vendored
6
src/lib/components/lyrics/type.d.ts
vendored
@ -1,4 +1,10 @@
|
|||||||
export interface LyricPos {
|
export interface LyricPos {
|
||||||
x: number;
|
x: number;
|
||||||
y: number;
|
y: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface LyricLayout {
|
||||||
|
pos: LyricPos;
|
||||||
|
blur: number;
|
||||||
|
scale: number;
|
||||||
}
|
}
|
@ -4,7 +4,7 @@
|
|||||||
import Background from '$lib/components/background.svelte';
|
import Background from '$lib/components/background.svelte';
|
||||||
import Cover from '$lib/components/cover.svelte';
|
import Cover from '$lib/components/cover.svelte';
|
||||||
import InteractiveBox from '$lib/components/interactiveBox.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 extractFileName from '$lib/extractFileName';
|
||||||
import localforage from 'localforage';
|
import localforage from 'localforage';
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
@ -15,7 +15,7 @@
|
|||||||
import { onMount } from 'svelte';
|
import { onMount } from 'svelte';
|
||||||
import progressBarRaw from '$lib/state/progressBarRaw';
|
import progressBarRaw from '$lib/state/progressBarRaw';
|
||||||
import { parseTTML, type LyricLine } from '$lib/lyrics/ttml';
|
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;
|
const audioId = $page.params.id;
|
||||||
let audioPlayer: HTMLAudioElement | null = null;
|
let audioPlayer: HTMLAudioElement | null = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user