@shopware-ag/dive
Version:
Shopware Spatial Framework
30 lines (29 loc) • 983 B
TypeScript
import { Object3D } from 'three/webgpu';
/**
* Loader for STEP, STP, IGES, and IGS CAD files using occt-import-js.
* Parsing runs in a blob-URL Web Worker (same pattern as DracoLoader).
* Converts OpenCASCADE output to Three.js Object3D hierarchy.
*/
export declare class STEPLoader {
private _workerPending;
private _worker;
private _nextId;
private _pending;
/**
* Create (or return existing) blob-URL worker.
* Loads occt-import-js JS as raw text, concatenates with STEPWorker
* function body, and creates a classic (non-module) worker.
*/
private _getWorker;
/**
* Parse STEP or IGES file content and return a Three.js Object3D
*/
parseAsync(arrayBuffer: ArrayBuffer, fileType: 'step' | 'stp' | 'iges' | 'igs'): Promise<Object3D>;
/**
* Dispose the worker. Call when the loader is no longer needed.
*/
dispose(): void;
private _buildScene;
private _buildNode;
private _createMesh;
}