Skip to content

Commit

Permalink
fix: tree-shake loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett committed May 26, 2023
1 parent de4834d commit a7ac688
Show file tree
Hide file tree
Showing 19 changed files with 2,446 additions and 2,358 deletions.
104 changes: 54 additions & 50 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,58 +246,62 @@ export * from './effects/OutlineEffect'
export * from './effects/AnaglyphEffect'
export * from './effects/AsciiEffect'
export * from './effects/StereoEffect'
// export * from './loaders/FBXLoader'
// export * from './loaders/FontLoader'
// export * from './loaders/TGALoader'
// export * from './loaders/LUTCubeLoader'
// export * from './loaders/NRRDLoader'
// export * from './loaders/STLLoader'
// export * from './loaders/MTLLoader'
// export * from './loaders/XLoader'
// export * from './loaders/BVHLoader'
// export * from './loaders/KMZLoader'
export * from './loaders/FBXLoader'
// export * from './loaders/FontLoader' //
export * from './loaders/TGALoader'
export * from './loaders/LUTCubeLoader'
export * from './loaders/NRRDLoader'
export * from './loaders/STLLoader'
export * from './loaders/MTLLoader'
export * from './loaders/XLoader'
export * from './loaders/BVHLoader'
export * from './loaders/KMZLoader'
// export * from './loaders/VRMLoader'
// export * from './loaders/VRMLLoader'
// export * from './loaders/KTX2Loader'
// export * from './loaders/LottieLoader'
// export * from './loaders/TTFLoader'
// export * from './loaders/RGBELoader'
// export * from './loaders/AssimpLoader'
// export * from './loaders/ColladaLoader'
// export * from './loaders/MDDLoader'
// export * from './loaders/EXRLoader'
// export * from './loaders/3MFLoader'
// export * from './loaders/XYZLoader'
// export * from './loaders/VTKLoader'
// export * from './loaders/LUT3dlLoader'
// export * from './loaders/DDSLoader'
// export * from './loaders/PVRLoader'
// export * from './loaders/GCodeLoader'
// export * from './loaders/BasisTextureLoader'
// export * from './loaders/TDSLoader'
// export * from './loaders/LDrawLoader'
// export * from './loaders/GLTFLoader'
// export * from './loaders/lwo/LWO3Parser'
// export * from './loaders/lwo/LWO2Parser'
// export * from './loaders/lwo/IFFParser'
// export * from './loaders/SVGLoader'
// export * from './loaders/3DMLoader'
// export * from './loaders/OBJLoader'
// export * from './loaders/AMFLoader'
// export * from './loaders/MMDLoader'
// export * from './loaders/MD2Loader'
// export * from './loaders/KTXLoader'
// export * from './loaders/TiltLoader'
// export * from './loaders/DRACOLoader'
// export * from './loaders/HDRCubeTextureLoader'
// export * from './loaders/PDBLoader'
// export * from './loaders/PRWMLoader'
// export * from './loaders/RGBMLoader'
// export * from './loaders/VOXLoader'
export * from './loaders/VRMLLoader'
// export * from './loaders/KTX2Loader' //
export * from './loaders/LottieLoader'
export * from './loaders/TTFLoader'
export * from './loaders/RGBELoader'
export * from './loaders/AssimpLoader'
export * from './loaders/ColladaLoader'
export * from './loaders/MDDLoader'
export * from './loaders/EXRLoader'
export * from './loaders/3MFLoader'
export * from './loaders/XYZLoader'
export * from './loaders/VTKLoader'
export * from './loaders/LUT3dlLoader'
export * from './loaders/DDSLoader'
export * from './loaders/PVRLoader'
export * from './loaders/GCodeLoader'
// export * from './loaders/BasisTextureLoader' //
export * from './loaders/TDSLoader'
export * from './loaders/LDrawLoader'
// export * from './loaders/GLTFLoader' //
// @ts-ignore
export * from './loaders/lwo/LWO3Parser'
// @ts-ignore
export * from './loaders/lwo/LWO2Parser'
// @ts-ignore
export * from './loaders/lwo/IFFParser'
export * from './loaders/SVGLoader'
export * from './loaders/3DMLoader'
export * from './loaders/OBJLoader'
export * from './loaders/AMFLoader'
export * from './loaders/MMDLoader'
export * from './loaders/MD2Loader'
export * from './loaders/KTXLoader'
export * from './loaders/TiltLoader'
export * from './loaders/DRACOLoader'
export * from './loaders/HDRCubeTextureLoader'
export * from './loaders/PDBLoader'
export * from './loaders/PRWMLoader'
export * from './loaders/RGBMLoader'
export * from './loaders/VOXLoader'
// @ts-ignore
// export * from './loaders/NodeMaterialLoader'
// export * from './loaders/PCDLoader'
// export * from './loaders/LWOLoader'
// export * from './loaders/PLYLoader'
export * from './loaders/PCDLoader'
export * from './loaders/LWOLoader'
export * from './loaders/PLYLoader'
export * from './lines/LineSegmentsGeometry'
export * from './lines/LineGeometry'
export * from './lines/Wireframe'
Expand Down
19 changes: 19 additions & 0 deletions src/loaders/AssimpLoader.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Object3D, Loader, LoadingManager } from 'three'

export interface Assimp {
animation: any
object: Object3D
}

export class AssimpLoader extends Loader {
constructor(manager?: LoadingManager)

load(
url: string,
onLoad: (result: Assimp) => void,
onProgress?: (event: ProgressEvent) => void,
onError?: (event: ErrorEvent) => void,
): void
loadAsync(url: string, onProgress?: (event: ProgressEvent) => void): Promise<Assimp>
parse(buffer: ArrayBuffer, path: string): Assimp
}
Loading

0 comments on commit a7ac688

Please sign in to comment.