Skip to content

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.

fix(editor): the toolbar no longer states, permanently, that this is 2D

esenginee10f9b6e7624
diff --git a/desktop/src/panels/Viewport.tsx b/desktop/src/panels/Viewport.tsx
index c2212b86c..522fd84a3 100644
--- a/desktop/src/panels/Viewport.tsx
+++ b/desktop/src/panels/Viewport.tsx
@@ -2468,7 +2468,6 @@ export function Viewport() {
)}
<div className="viewport__tb-group viewport__tb-group--right">
- <span className="vp-mode-chip">2D</span>
<div className="ov-seg">
<OvTool toggle icon={Grid3x3} label={t('vp.flag.grid')} active={showGrid} onClick={() => commands.run('view.toggleGrid')} />
<OvTool toggle icon={Axis3d} label={t('vp.flag.gizmos')} active={showGizmos} onClick={() => commands.run('view.toggleGizmos')} />
diff --git a/desktop/src/theme/viewport.css b/desktop/src/theme/viewport.css
index eb63ad775..3e64b7cba 100644
--- a/desktop/src/theme/viewport.css
+++ b/desktop/src/theme/viewport.css
@@ -95,19 +95,6 @@
border-radius: var(--r-md);
}
.ov-seg .ov-tool { width: 28px; height: 26px; }
-/* Static mode indicator — the engine is 2D-only, so this reads, it doesn't toggle. */
-.vp-mode-chip {
- font-family: var(--mono);
- font-size: var(--fs-2xs);
- font-weight: 700;
- letter-spacing: 0.03em;
- color: var(--on-accent);
- background: var(--acc);
- padding: 3px 6px;
- border-radius: var(--r-sm);
- user-select: none;
-}
-
/* Floating tool palette (vertical) over the canvas' top-left corner — the Q/W/E/R
selection + transform tools, always visible without crowding the top bar. */
.ov-left { top: 48px; left: 10px; }
diff --git a/sdk/src/camera/EditorView.ts b/sdk/src/camera/EditorView.ts
index 1894c37eb..b48ba664f 100644
--- a/sdk/src/camera/EditorView.ts
+++ b/sdk/src/camera/EditorView.ts
@@ -2,15 +2,16 @@
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
* @file EditorView.ts
- * @brief Editor viewport camera — a dedicated, editor-only 2D view.
+ * @brief Editor viewport camera — a dedicated, editor-only eye on the scene.
*
* This is NOT a scene entity: it is never serialized, never on the undo stack,
* and never part of the saved scene. When `active`, the camera system renders
* the framebuffer through this view and drives all screen<->world queries from
* it (CameraView / UICameraInfo) INSTEAD of the scene's game Camera entities —
- * so editor navigation (pan / zoom / frame) moves only this view and never the
- * scene's camera. In play mode it is deactivated, so the viewport shows the real
- * game camera (the true "Game" view). The editor mutates x / y / orthoSize.
+ * so editor navigation (pan / zoom / frame / orbit) moves only this view and never
+ * the scene's camera. In play mode it is deactivated, so the viewport shows the
+ * real game camera (the true "Game" view). The editor mutates the focus, the zoom
+ * and the angles the eye stands at; the head-on 2D view is all of them at zero.
*
* The view's view-projection is built from the SAME math primitives as scene
* cameras (see CameraPlugin) — there is one source of view-projection math; only