feat(physics): 集成 Rapier2D 物理引擎并修复预览重置问题 (#244)
* feat(physics): 集成 Rapier2D 物理引擎并修复预览重置问题 * fix: 修复 CI 流程并清理代码
This commit is contained in:
@@ -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
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user