@needle-tools/engine
Version:
Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in.
30 lines (29 loc) • 1.04 kB
TypeScript
/**
* Interface for a quicklook handler that can export and open a USDZ file.
* Used as an abstraction layer to break the circular dependency between
* WebXRButtons and USDZExporter.
*/
export interface IQuicklookHandler {
objectToExport: any;
exportAndOpen(): Promise<any>;
}
type QuicklookHandlerFactory = {
/** Find an existing quicklook handler in the scene */
find(): IQuicklookHandler | null;
/** Create a new quicklook handler instance */
create(): IQuicklookHandler;
};
/**
* Register a factory for creating quicklook handlers.
* Called by USDZExporter to register itself as the handler.
*/
export declare function setQuicklookHandlerFactory(factory: QuicklookHandlerFactory): void;
/**
* Find an existing quicklook handler in the scene, or create a new one if none exists.
* @returns A quicklook handler, or null if no factory has been registered.
*/
export declare function getOrCreateQuicklookHandler(): {
readonly handler: IQuicklookHandler;
readonly created: boolean;
} | null;
export {};