threepipe
Version:
A modern 3D viewer framework built on top of three.js, written in TypeScript, designed to make creating high-quality, modular, and extensible 3D experiences on the web simple and enjoyable.
34 lines • 1.8 kB
TypeScript
import { AssetExporterEventMap } from '../AssetExporter';
import { IGeometry, IMaterial, IObject3D, ITexture } from '../../core';
export interface AssetExportHooks {
objectGeometry?: (obj: IObject3D, geometry: IGeometry, root: IObject3D) => IGeometry | null | undefined;
objectGeometryReplace?: (obj: IObject3D, geometry: IGeometry) => void;
object?: (obj: IObject3D, root: IObject3D) => void;
objectMaterials?: (obj: IObject3D, materials: IMaterial | IMaterial[] | undefined) => void;
objectMaterial?: (obj: IObject3D, material: IMaterial, root: IObject3D, materialIndex?: number) => undefined | (() => IMaterial);
objectMaterialsReplace?: (obj: IObject3D, materials: IMaterial | IMaterial[]) => void;
replaceTexture?: (obj: IObject3D | IMaterial, texture: ITexture, mapName: string, root: IObject3D | IMaterial) => ITexture | null;
revertTextures?: (obj: IObject3D | IMaterial) => void;
revertObject?: (obj: IObject3D) => void;
}
export declare const assetExportHook: (e: AssetExporterEventMap["exportFile"], hooks: AssetExportHooks) => void;
declare module '../../core/IObject' {
interface IObject3D {
__exportState?: {
objectList: Set<IObject3D>;
meshLines: Map<IObject3D, IGeometry>;
fomMap: Map<IObject3D, IObject3D['forcedOverrideMaterial']>;
geomMap: Map<IObject3D, IObject3D['forcedOverrideGeometry']>;
matCloneMap: Map<IMaterial, IMaterial>;
savedTextures: Map<IObject3D | IMaterial, Record<string, ITexture>>;
};
}
}
declare module '../../core/IMaterial' {
interface IMaterial {
__exportState?: {
savedMaps: Record<string, ITexture> | null;
};
}
}
//# sourceMappingURL=../../src/assetmanager/export/assetExportHook.d.ts.map