UNPKG

@bitbybit-dev/core

Version:

Bit By Bit Developers Core CAD API to Program Geometry

61 lines (60 loc) 2.32 kB
/** * Base interface for draw options - engine-specific implementations extend this */ export interface DrawOptionsBase { updatable?: boolean; hidden?: boolean; opacity?: number; colours?: string | string[]; size?: number; } /** * Base class for Draw implementations across all game engines. * Contains entity detection methods and shared validation utilities. */ export declare class DrawCore { detectPoint(entity: unknown): boolean; detectPoints(entity: unknown): boolean; detectLine(entity: unknown): boolean; detectLines(entity: unknown): boolean; detectPolyline(entity: unknown): boolean; detectPolylines(entity: unknown): boolean; detectNode(entity: unknown): boolean; detectNodes(entity: unknown): boolean; detectVerbCurve(entity: unknown): boolean; detectVerbSurface(entity: unknown): boolean; detectVerbCurves(entity: unknown): boolean; detectVerbSurfaces(entity: unknown): boolean; detectJscadMesh(entity: unknown): boolean; detectJscadMeshes(entity: unknown): boolean; detectOcctShape(entity: unknown): boolean; detectOcctShapes(entity: unknown): boolean; detectManifoldShape(entity: unknown): boolean; detectManifoldShapes(entity: unknown): boolean; detectDecomposedMesh(entity: unknown): boolean; detectDecomposedMeshes(entity: unknown): boolean; detectTag(entity: unknown): boolean; detectTags(entity: unknown): boolean; checkIfElementsInArrayAreNumbers(array: unknown[]): boolean; checkIfElementsInArrayAreArrays(array: unknown[]): boolean; arraysInChildrenArraysContainNumbers(array: unknown[][]): boolean; arraysInChildrenArraysAreOfLength3(array: unknown[][]): boolean; /** * Validate if draw input contains valid entity data * @param entity - Entity to validate * @returns True if valid, false otherwise */ protected isValidDrawInput(entity: unknown): boolean; /** * Type guard for Tag DTO * @param value - Value to check * @returns True if value has text property (TagDto) */ protected isTagDto(value: unknown): boolean; /** * Type guard for Tag DTO array * @param value - Value to check * @returns True if value is array of TagDtos */ protected isTagDtoArray(value: unknown): boolean; }