chessfield
Version:
A TypeScript+ThreeJS library to render a 3D chessboard
30 lines (29 loc) • 1.35 kB
TypeScript
import { Observable } from 'rxjs';
import { BufferGeometry } from 'three';
import { ChessfieldConfig } from '../resource/chessfield.config.ts';
import { Themes } from '../resource/chessfield.types.ts';
import * as cg from 'chessground/types';
import * as cf from '../resource/chessfield.types.ts';
export declare class Store {
private config?;
static readonly boardSize = 8;
static readonly squareSize: number;
static readonly squareHeight: number;
static readonly initialFen: string;
static themes: Themes;
private boardPiecesObjectsMap;
private piecesGeometriesGltfMap;
setPiecesGeometriesGltfMap(piecesGeometriesGltfMap: Map<cg.Role, BufferGeometry>): void;
getPiecesGeometriesGltfMap(): Map<cg.Role, BufferGeometry<import('three').NormalBufferAttributes>>;
constructor(config?: ChessfieldConfig | undefined);
getConfig(): ChessfieldConfig;
setConfig(config: ChessfieldConfig): void;
private movesSubject;
movesSubject$: Observable<cf.Moves>;
setFen: (fen: cg.FEN, lastMove?: cg.Key[]) => void;
private gamePiecesSubject;
gamePiecesSubject$: Observable<cf.BoardPiece[]>;
updategamePieces: (list: cf.BoardPiece[]) => void;
setBoardPiecesObjectsMap(boardPiecesObjectsMap: cf.ColorPieceNameObjectMap): void;
getBoardPiecesObjectsMap(): cf.ColorPieceNameObjectMap;
}