A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix: restore non-3D bug fixes after 3D revert
esengine2bbcba391adc
diff --git a/editor/src/menus/builtinMenus.ts b/editor/src/menus/builtinMenus.tsindex 9aaaedb2c..f6b7c73d1 100644--- a/editor/src/menus/builtinMenus.ts+++ b/editor/src/menus/builtinMenus.ts@@ -57,7 +57,7 @@ export function registerBuiltinMenus(registrar: PluginRegistrar): void {registerMenuItem({id: 'file.quick-build', menu: 'file', label: 'Build',shortcut: 'Ctrl+B', order: 5, separator: true,- action: () => getProjectService().quickBuild(),+ action: () => getProjectService().quickBuild(showStatusBarMessage),});registerMenuItem({id: 'file.build-settings', menu: 'file', label: 'Build Settings...',diff --git a/editor/src/panels/InspectorPanel.ts b/editor/src/panels/InspectorPanel.tsindex 00db04756..b820aeb5c 100644--- a/editor/src/panels/InspectorPanel.ts+++ b/editor/src/panels/InspectorPanel.ts@@ -142,13 +142,17 @@ export class InspectorPanel {if (this.playMode_) return;if (this.locked_) {if (this.currentEntity_ !== null) {- if (this.needsStructureRebuild(this.currentEntity_)) {+ const entityData = this.store_.getEntityData(this.currentEntity_ as number);+ if (!entityData) {+ this.locked_ = false;+ this.updateLockButton();+ } else if (this.needsStructureRebuild(this.currentEntity_)) {this.rebuildEntityStructure(this.currentEntity_);} else {this.updateEditors();}}- return;+ if (this.locked_) return;}const selectedEntities = Array.from(this.store_.selectedEntities);diff --git a/editor/src/panels/timeline/TimelineKeyframeArea.ts b/editor/src/panels/timeline/TimelineKeyframeArea.tsindex 81a4a0fea..8220668cc 100644--- a/editor/src/panels/timeline/TimelineKeyframeArea.ts+++ b/editor/src/panels/timeline/TimelineKeyframeArea.ts@@ -719,7 +719,7 @@ export class TimelineKeyframeArea {document.addEventListener('mouseup', onUp);}- private onDoubleClick(e: MouseEvent): void {+ private async onDoubleClick(e: MouseEvent): Promise<void> {if (!this.assetData_ || !this.host_) return;const rect = this.canvas_.getBoundingClientRect();@@ -756,18 +756,30 @@ export class TimelineKeyframeArea {break;}case 'spine': {+ const animName = await showInputDialog({+ title: 'Spine Animation',+ defaultValue: 'idle',+ placeholder: 'Animation name',+ });+ if (animName == null) return;const cmd = new AddSpineClipCommand(this.assetData_, trackInfo.trackIndex,- { start: time, duration: 1, animation: 'idle' },+ { start: time, duration: 1, animation: animName },() => this.host_!.onAssetDataChanged(),);this.host_.executeCommand(cmd);break;}case 'audio': {+ const clipPath = await showInputDialog({+ title: 'Audio Clip',+ defaultValue: '',+ placeholder: 'Audio asset path or UUID',+ });+ if (clipPath == null) return;const cmd = new AddAudioEventCommand(this.assetData_, trackInfo.trackIndex,- { time, clip: '' },+ { time, clip: clipPath },() => this.host_!.onAssetDataChanged(),);this.host_.executeCommand(cmd);diff --git a/editor/src/services/ProjectService.ts b/editor/src/services/ProjectService.tsindex be449b43b..db92003a2 100644--- a/editor/src/services/ProjectService.ts+++ b/editor/src/services/ProjectService.ts@@ -1,6 +1,5 @@import { showBuildSettingsDialog, BuildService } from '../builder';import { getBuildConfigService } from '../builder/BuildConfigService';-import { showStatusBarMessage } from '../menus/builtinStatusbar';import { showSettingsDialog, ProjectSettingsSync } from '../settings';import { getEditorContext } from '../context/EditorContext';import { getAssetLibrary } from '../asset/AssetLibrary';@@ -75,31 +74,33 @@ export class ProjectService {});}- async quickBuild(): Promise<void> {+ async quickBuild(notify?: (msg: string, durationMs?: number) => void): Promise<void> {+ const show = notify ?? ((msg: string) => console.log(`[Build] ${msg}`));+if (!this.projectPath_) {- showStatusBarMessage('No project open');+ show('No project open');return;}const configService = getBuildConfigService();const config = configService.getActiveConfig();if (!config) {- showStatusBarMessage('No build config — opening Build Settings');+ show('No build config — opening Build Settings');this.showBuildSettings();return;}- showStatusBarMessage(`Building "${config.name}"...`);+ show(`Building "${config.name}"...`);const buildService = new BuildService(this.projectPath_);try {const result = await buildService.build(config);if (result.success) {- showStatusBarMessage(`Build "${config.name}" succeeded`, 3000);+ show(`Build "${config.name}" succeeded`, 3000);} else {- showStatusBarMessage(`Build "${config.name}" failed: ${result.error ?? 'unknown error'}`, 5000);+ show(`Build "${config.name}" failed: ${result.error ?? 'unknown error'}`, 5000);}} catch (e) {- showStatusBarMessage(`Build error: ${e}`, 5000);+ show(`Build error: ${e}`, 5000);}}