feat(physics): 集成 Rapier2D 物理引擎并修复预览重置问题 (#244)

* feat(physics): 集成 Rapier2D 物理引擎并修复预览重置问题

* fix: 修复 CI 流程并清理代码
This commit is contained in:
YHH
2025-11-28 10:32:28 +08:00
committed by GitHub
parent cabb625a17
commit 673f5e5855
56 changed files with 4934 additions and 218 deletions

View File

@@ -99,7 +99,9 @@ export class TilemapEditorModule implements IEditorModuleLoader {
id: 'tilemap-editor',
title: 'Tilemap Editor',
position: PanelPosition.Center,
render: () => React.createElement(TilemapEditorPanel),
closable: true,
component: TilemapEditorPanel,
isDynamic: true
},
];
}

View File

@@ -21,10 +21,11 @@ function inlineCSS(): any {
const cssContent = bundle[cssFile].source;
if (!cssContent) return;
// 找到包含编辑器代码的主要 JS 文件(带 hash 的 chunk
// 找到包含编辑器代码的主要 JS 文件
// 优先查找 editor/index.js然后是带 hash 的 index-*.js
const mainJsFile = bundleKeys.find(key =>
(key === 'editor/index.js' || key.includes('index-')) &&
key.endsWith('.js') &&
key.includes('index-') &&
bundle[key].type === 'chunk' &&
bundle[key].code
);