import { SocketConfig } from "../common/socket";
import { UnitySocket } from "../unity/socket";
import { Meta } from "../interface/meta";
import { UnityConfig, UnityCreator } from "../unity";
import EventEmitter from "../common/event-emitter";
export type Project = {
    title: string;
    describe: string;
    previewImgUrl: string;
    packageUrl: string;
};
export type NodeServerConfig = SocketConfig;
export type StartOptions = string | {
    url: string;
    width?: number;
    height?: number;
    minio?: {
        serviceUrl: string;
        user: string;
        password: string;
    };
    modelsFolderName?: string;
};
export declare class NodeServer extends EventEmitter {
    private socket;
    projects: Project[];
    constructor(socket: UnitySocket, projects: Project[]);
    /**
     * 启动指定的node
     * @param url
     */
    start(el: string | HTMLElement, options: StartOptions, callback?: (config: UnityConfig) => UnityConfig): Promise<Meta<UnityCreator>>;
    /**
     * 关闭
     * @param url
     */
    close(url: string): void;
    /**
     * 销毁与服务端的链接
     */
    dispose(): void;
}
/**
 * 创建unity
 * @param callback
 * @returns
 */
export declare function createCloudEngine(callback?: (config: UnityConfig) => UnityConfig): Promise<Meta<UnityCreator>>;
export default function createNodeServerInstance(options: NodeServerConfig): Promise<NodeServer>;
