Files
mrp-qrcode/types/occt-import-js.d.ts
T
jason 76308b8aa3
Build and Push Docker Image / build (push) Successful in 1m15s
stage 8-step viewer
2026-04-21 13:26:48 -05:00

46 lines
1.2 KiB
TypeScript

// Minimal ambient types for the `occt-import-js` WASM loader. The package
// ships no .d.ts of its own. Types follow the shape documented in the project
// README and the `three_viewer.html` example.
declare module "occt-import-js" {
export interface OcctArrayAttribute {
array: number[] | Float32Array | Uint32Array;
}
export interface OcctBrepFace {
first: number;
last: number;
color?: [number, number, number] | null;
}
export interface OcctMesh {
name?: string;
color?: [number, number, number] | null;
brep_faces?: OcctBrepFace[];
attributes: {
position: OcctArrayAttribute;
normal?: OcctArrayAttribute;
};
index: OcctArrayAttribute;
}
export interface OcctResult {
success: boolean;
meshes: OcctMesh[];
root?: unknown;
}
export interface OcctModule {
ReadStepFile: (buffer: Uint8Array, params: unknown) => OcctResult;
ReadBrepFile?: (buffer: Uint8Array, params: unknown) => OcctResult;
ReadIgesFile?: (buffer: Uint8Array, params: unknown) => OcctResult;
}
export interface OcctInitOptions {
locateFile?: (filename: string) => string;
}
const factory: (options?: OcctInitOptions) => Promise<OcctModule>;
export default factory;
}