From 1cd7a8f0128d006ee91d8b68e0ad1a6dcd2009d7 Mon Sep 17 00:00:00 2001 From: Lucas Garron Date: Sat, 5 Mar 2022 12:02:59 -0800 Subject: [PATCH] Add non-WCA events. --- src/dev/index.html | 10 ++++++++++ src/scramble-display/ScrambleDisplay.ts | 10 ++++------ test/index.html | 10 ++++++++++ 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/src/dev/index.html b/src/dev/index.html index e562629..ee0d956 100644 --- a/src/dev/index.html +++ b/src/dev/index.html @@ -55,6 +55,16 @@

<scramble-disp + + + + + + + + + + diff --git a/src/scramble-display/ScrambleDisplay.ts b/src/scramble-display/ScrambleDisplay.ts index 415c579..4e2ca18 100644 --- a/src/scramble-display/ScrambleDisplay.ts +++ b/src/scramble-display/ScrambleDisplay.ts @@ -1,8 +1,6 @@ import { Alg } from "cubing/alg"; -import { wcaEventInfo } from "cubing/puzzles"; -import { - TwistyPlayer, -} from "cubing/twisty"; +import { eventInfo } from "cubing/puzzles"; +import { TwistyPlayer } from "cubing/twisty"; import { mainStyleText } from "./css"; export type Visualization = "2D" | "3D"; @@ -68,8 +66,8 @@ export class ScrambleDisplay extends HTMLElement { } public set event(eventID: EventID | null) { - const eventInfo = wcaEventInfo(eventID ?? DEFAULT_EVENT); - this.#twistyPlayer.puzzle = eventInfo?.puzzleID ?? "3x3x3"; + const info = eventInfo(eventID ?? DEFAULT_EVENT); + this.#twistyPlayer.puzzle = info?.puzzleID ?? "3x3x3"; this.#currentAttributes.eventID = eventID; } public get event(): EventID | null { diff --git a/test/index.html b/test/index.html index cdc8116..28e0232 100644 --- a/test/index.html +++ b/test/index.html @@ -54,6 +54,16 @@

<scramble-disp + + + + + + + + + +