diff --git a/client/src/hooks/usePlaybackState.tsx b/client/src/hooks/usePlaybackState.tsx index 402d0bc..6f60e01 100644 --- a/client/src/hooks/usePlaybackState.tsx +++ b/client/src/hooks/usePlaybackState.tsx @@ -51,8 +51,6 @@ export function usePlaybackState(key?: string) { canStepBackward: ready && !playing && step > 0, }; - console.log(layer); - const pause = (n = 0) => { // notify("Playback paused"); setPlaybackState({ playback: "paused", step: stepBy(n) }); diff --git a/client/src/layers/trace/index.tsx b/client/src/layers/trace/index.tsx index af21c5b..31f6f96 100644 --- a/client/src/layers/trace/index.tsx +++ b/client/src/layers/trace/index.tsx @@ -259,7 +259,6 @@ export const controller = { }); useEffect(() => { produce((l) => { - console.log(trace?.content?.events?.length); return set(l, "source.playbackTo", trace?.content?.events?.length ?? 0); }); }, [trace?.key, trace?.lastModified]); diff --git a/internal-renderers/src/d2-renderer/D2RendererWorker.ts b/internal-renderers/src/d2-renderer/D2RendererWorker.ts index 2bd24a2..c886c7e 100644 --- a/internal-renderers/src/d2-renderer/D2RendererWorker.ts +++ b/internal-renderers/src/d2-renderer/D2RendererWorker.ts @@ -219,7 +219,19 @@ export class D2RendererWorker extends EventEmitter< this.#getRenderQueue()(); } + loadFont = once(async () => { + const fontFace = new FontFace( + "Inter", + "local('Inter'), local('Inter UI'), url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2) format('woff2')" + ); + // add it to the list of fonts our worker supports + self.fonts.add(fontFace); + // load the font + await fontFace.load(); + }); + async render() { + await this.loadFont(); for (const { tile, bounds } of getTiles( this.#frustum, this.#options.tileSubdivision