Feature/tilemap editor (#237)
* feat: 添加 Tilemap 编辑器插件和组件生命周期支持 * feat(editor-core): 添加声明式插件注册 API * feat(editor-core): 改进tiledmap结构合并tileset进tiledmapeditor * feat: 添加 editor-runtime SDK 和插件系统改进 * fix(ci): 修复SceneResourceManager里变量未使用问题
This commit is contained in:
@@ -1,9 +1,13 @@
|
||||
import { singleton } from 'tsyringe';
|
||||
import { invoke } from '@tauri-apps/api/core';
|
||||
import { invoke, convertFileSrc } from '@tauri-apps/api/core';
|
||||
import type { IFileSystem, FileEntry } from '@esengine/editor-core';
|
||||
|
||||
@singleton()
|
||||
export class TauriFileSystemService implements IFileSystem {
|
||||
dispose(): void {
|
||||
// No cleanup needed
|
||||
}
|
||||
|
||||
async readFile(path: string): Promise<string> {
|
||||
return await invoke<string>('read_file_content', { path });
|
||||
}
|
||||
@@ -49,4 +53,8 @@ export class TauriFileSystemService implements IFileSystem {
|
||||
async scanFiles(basePath: string, pattern: string): Promise<string[]> {
|
||||
return await invoke<string[]>('scan_files', { basePath, pattern });
|
||||
}
|
||||
|
||||
convertToAssetUrl(filePath: string): string {
|
||||
return convertFileSrc(filePath);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user