feat: multi-purpose site

feat: editor
feat: plugin editor
This commit is contained in:
2024-08-01 01:31:04 +02:00
parent b8b903c5e1
commit 8b2bfee099
15 changed files with 262 additions and 64 deletions

View File

@@ -3,14 +3,14 @@
import { RollingWpmReplayPlugin } from "./core/plugins/rolling-wpm";
import type { ReplayPlayer } from "./core/player";
const player: ReplayPlayer | undefined = getContext("replay");
const player: { player: ReplayPlayer | undefined } = getContext("replay");
let { wpm = $bindable(0) } = $props();
$effect(() => {
if (!player) return;
if (!player.player) return;
const tracker = new RollingWpmReplayPlugin();
tracker.register(player);
tracker.register(player.player);
const unsubscribe = tracker.subscribe((value) => {
wpm = value;
});