@shopware-ag/dive
Version:
Shopware Spatial Framework
35 lines (34 loc) • 1.21 kB
TypeScript
import { Object3D } from 'three/webgpu';
import { GLTFExporterOptions as THREEGLTFExporterOptions } from 'three/examples/jsm/exporters/GLTFExporter.js';
import { USDZExporterOptions as THREEUSDZExporterOptions } from 'three/examples/jsm/exporters/USDZExporter.js';
import { FileType } from '../../../types/file/FileTypes.ts';
export type USDZExporterOptions = THREEUSDZExporterOptions & {
ar?: {
anchoring: {
type: 'plane' | 'image' | 'face' | 'none';
};
planeAnchoring: {
alignment: 'horizontal' | 'vertical' | 'any';
};
};
};
export type GLTFExporterOptions = THREEGLTFExporterOptions;
export type FileTypeToExporterOptions = {
glb: GLTFExporterOptions;
gltf: GLTFExporterOptions;
usdz: USDZExporterOptions;
step: undefined;
stp: undefined;
iges: undefined;
igs: undefined;
};
export declare class AssetExporter {
private _gltfExporter;
private _usdzExporter;
constructor();
export<T extends FileType>(object: Object3D, type: T, options?: FileTypeToExporterOptions[T]): Promise<ArrayBuffer>;
private _exportGlb;
private _exportGltf;
private _exportUsdz;
private _computeNormals;
}