UNPKG

@vscubing/cubing

Version:

A collection of JavaScript cubing libraries.

79 lines (71 loc) 4.04 kB
import { y as AlgIndexer, u as KPuzzle, r as Alg, M as Move, z as MillisecondTimestamp, B as LeafIndex, K as KPattern, C as KTransformation, D as MillisecondDuration, L as LeafCount, s as PuzzleLoader, v as StickeringMask, F as ManagedCustomElement, T as TwistyPlayerModel, G as TwistyPlayerController, H as DetailedTimelineInfo, I as ColorScheme } from '../PuzzleLoader-_z--T5BU.js'; export { J as AnimationTimelineLeaf, N as BackViewLayout, O as BoundaryType, R as EXPERIMENTAL_PROP_NO_VALUE, E as ExperimentalStickering, t as PuzzleID, U as TwistyAlgEditor, V as TwistyAlgViewer, W as TwistyPlayer, X as TwistyPlayerConfig, Y as TwizzleLink, Z as VisualizationFormat, _ as backViewLayouts } from '../PuzzleLoader-_z--T5BU.js'; import 'type-fest'; import 'three/src/Three.js'; declare class SimpleAlgIndexer implements AlgIndexer { private kpuzzle; private moves; private durationFn; constructor(kpuzzle: KPuzzle, alg: Alg); getAnimLeaf(index: number): Move; indexToMoveStartTimestamp(index: number): MillisecondTimestamp; timestampToIndex(timestamp: MillisecondTimestamp): LeafIndex; patternAtIndex(index: number): KPattern; transformationAtIndex(index: number): KTransformation; algDuration(): MillisecondDuration; numAnimatedLeaves(): LeafCount; moveDuration(index: LeafIndex): MillisecondDuration; } declare class TreeAlgIndexer implements AlgIndexer { private kpuzzle; private decoration; private walker; constructor(kpuzzle: KPuzzle, alg: Alg); getAnimLeaf(index: LeafIndex): Move | null; indexToMoveStartTimestamp(index: LeafIndex): MillisecondTimestamp; indexToMovesInProgress(index: LeafIndex): MillisecondTimestamp; patternAtIndex(index: LeafIndex, startPattern?: KPattern): KPattern; transformationAtIndex(index: LeafIndex): KTransformation; numAnimatedLeaves(): LeafCount; timestampToIndex(timestamp: MillisecondTimestamp): LeafIndex; algDuration(): MillisecondDuration; moveDuration(index: LeafIndex): MillisecondDuration; } declare const twistyDebugGlobals: { shareAllNewRenderers: "auto" | "always" | "never"; showRenderStats: boolean; }; declare function setTwistyDebug(options: Partial<typeof twistyDebugGlobals>): void; declare const getSolveAnalyzer: (puzzleLoader: PuzzleLoader) => Promise<(pattern: KPattern) => string | null>; declare class TwistyAnimatedSVG { kpuzzle: KPuzzle; private showUnknownOrientations; wrapperElement: HTMLElement; svgElement: SVGElement; gradientDefs: SVGDefsElement; private originalColors; private gradients; private svgID; constructor(kpuzzle: KPuzzle, svgSource: string, experimentalStickeringMask?: StickeringMask, showUnknownOrientations?: boolean); drawPattern(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void; draw(pattern: KPattern, nextPattern?: KPattern, fraction?: number): void; private newGradient; private elementID; private elementByID; } declare class TwistyScrubber extends ManagedCustomElement { #private; model?: TwistyPlayerModel | undefined; controller?: TwistyPlayerController | undefined; constructor(model?: TwistyPlayerModel | undefined, controller?: TwistyPlayerController | undefined, options?: { mode: "open" | "closed"; }); onDetailedTimelineInfo(detailedTimelineInfo: DetailedTimelineInfo): Promise<void>; connectedCallback(): Promise<void>; updateColorScheme(colorScheme: ColorScheme): void; inputElem(): Promise<HTMLInputElement>; onInput(e: Event): Promise<void>; onKeypress(e: KeyboardEvent): void; slowDown(e: Event, inputElem: HTMLInputElement): Promise<void>; } export { AlgIndexer, LeafCount as ExperimentalLeafCount, LeafIndex as ExperimentalLeafIndex, MillisecondDuration as ExperimentalMillisecondDuration, MillisecondTimestamp as ExperimentalMillisecondTimestamp, TwistyAnimatedSVG as ExperimentalSVGAnimator, SimpleAlgIndexer, TreeAlgIndexer, TwistyScrubber, getSolveAnalyzer, setTwistyDebug };