interface EditorAssetInfo { name: string; // 资源名字 displayName: string; // 资源用于显示的名字 source: string; // url 地址 path: string; // loader 加载的层级地址 url: string; // loader 加载地址会去掉扩展名,这个参数不去掉 file: string; // 绝对路径 uuid: string; // 资源的唯一 ID importer: string; // 使用的导入器名字 type: string; // 类型 isDirectory: boolean; // 是否是文件夹 library: { [key: string]: string }; // 导入资源的 map subAssets: { [key: string]: EditorAssetInfo }; // 子资源 map visible: boolean; // 是否显示 readonly: boolean; // 是否只读 instantiation: string | undefined; // 虚拟资源可以实例化成实体的话,会带上这个扩展名 redirect?: string; // 跳转指向资源 meta?: any, fatherInfo?: any; } interface EditorExtendsScript { add(uuid: string, ctor: any): any; delete(uuid: string, ctor: any): any; getCtors(uuid: string): { [uuid: string]: any } } interface EditorExtendsNode { add(uuid: string, node: any): any; delete(uuid: string): any; clear(): any; getNode(uuid: string): any; getNodes(): {[uuid: string]: any}; } interface EditorExtendsComponent { addMenu(component: Function, path: string, priority?: number); deleteMenu(component: Function); getMenus(): { [uuid: string]: Object }; add(uuid: string, component: any): any; delete(uuid: string): any; clear(): any; getComponent(uuid: string): any; getComponents(): {[uuid: string]: any}; } interface EditorExtendsAsset { queryAssetInfo(uuid: string, callback: Function): any; getAssetInfoFromUrl(url: string): EditorAssetInfo; } declare namespace EditorExtends { const Script: EditorExtendsScript; const Node: EditorExtendsNode; const Component: EditorExtendsComponent; const Asset: EditorExtendsAsset; }