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.

chore(editor): trim over-long comments + drop engine name-drops

esenginea2f9121afd38
diff --git a/desktop/electron/contentPolicy.ts b/desktop/electron/contentPolicy.ts
index 6cbbeff0e..98c4231f1 100644
--- a/desktop/electron/contentPolicy.ts
+++ b/desktop/electron/contentPolicy.ts
@@ -1,15 +1,10 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
- * @file Single authority on what counts as browsable project CONTENT.
- *
- * Four enumerators walk the project — the Content Browser's readDir, its
- * subtree search, the AssetDatabase scan, and the fs watcher — and must agree
- * on what is visible: `.meta` sidecars are asset-pipeline internals (identity
- * travels with its asset through rename/duplicate/trash, never shown as its
- * own entry), dot entries are editor/VCS plumbing, and code/build output dirs
- * are not content. Any divergence is a user-visible bug (e.g. `.meta` files
- * appearing in the Content Browser). Pure (no I/O) → unit-testable.
+ * @file Single authority on what counts as browsable project content, shared by
+ * every enumerator (readDir, subtree search, asset scan, fs watcher) so they
+ * can't disagree. `.meta` sidecars and dot entries are pipeline/plumbing, not
+ * content. Pure (no I/O) → unit-testable.
*/
/** Sidecar suffix carrying an asset's uuid/type/importer (see assetDb). */
@@ -25,11 +20,8 @@ export const isContentDir = (name: string): boolean =>
export const isContentFile = (name: string): boolean =>
!name.startsWith('.') && !name.endsWith(META_EXT);
-/**
- * True when any segment of a project-relative path leaves content space —
- * the watcher's noise filter. Note `.meta` files themselves ARE watched:
- * an external sidecar edit (git pull) must re-scan the asset registry.
- */
+/** True when any path segment leaves content space (the watcher's noise filter).
+ * `.meta` files themselves stay watched — an external edit must re-scan. */
export function isNonContentPath(rel: string): boolean {
return rel
.replace(/\\/g, '/')
diff --git a/desktop/src/panels/Details.tsx b/desktop/src/panels/Details.tsx
index ad30f8e8c..16eb16217 100644
--- a/desktop/src/panels/Details.tsx
+++ b/desktop/src/panels/Details.tsx
@@ -1724,12 +1724,9 @@ function MetaRow({ k, v, mono }: { k: string; v: string; mono?: boolean }) {
);
}
-// The unified asset inspector for every type without a bespoke editor (textures,
-// prefabs, scenes, spine, audio, fonts…). Same chrome + reflection-driven
-// ComponentSection engine as the entity inspector and the Material/InputMap
-// editors: read-only metadata (dimensions / size / uuid / references) plus, for
-// types with an importer schema, editable Import Settings written to the `.meta`
-// sidecar — the UE/Unity "select an asset → edit its import settings" model.
+// The asset inspector for every type without a bespoke editor. Renders read-only
+// metadata plus, for types with an importer schema, editable Import Settings
+// (written to the `.meta` sidecar) through the shared ComponentSection engine.
function GenericAssetInspector({ path }: { path: string }) {
const name = baseName(path);
const type = assetTypeOf(name);
@@ -1839,8 +1836,8 @@ function GenericAssetInspector({ path }: { path: string }) {
</div>
</div>
- {/* Editable import settings first (the primary reason to select an asset),
- then read-only metadata — mirrors Unity's importer inspector. */}
+ {/* Editable import settings first (the reason to select an asset), then
+ read-only metadata. */}
{comp ? (
<ComponentSection
entities={[]}
diff --git a/desktop/src/project/assetImporter.ts b/desktop/src/project/assetImporter.ts
index 6fd2cba4d..faa2ed59a 100644
--- a/desktop/src/project/assetImporter.ts
+++ b/desktop/src/project/assetImporter.ts
@@ -2,18 +2,10 @@
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
/**
* @file assetImporter.ts
- * @brief Single source of truth for per-type asset IMPORT SETTINGS — the fields
- * an asset carries in its `.meta` `importer` block (a texture's filter /
- * wrap / max-size, a spine's scale, …). One registry drives BOTH the
- * import-time defaults (electron/importAssets writes them into a fresh
- * `.meta`) AND the editor's asset inspector (which renders + edits them
- * through the same reflection-driven ComponentSection as ECS components).
- * Deriving defaults from the same specs means import and inspector can't
- * drift. The runtime consumers of these settings live in the SDK
- * (runtimeLoader / runtimeAssets — filter/wrap/sliceBorder) and the cook.
- *
- * DOM/engine-free so it unit-tests and is importable from the Electron main
- * process (the type import is erased at build).
+ * @brief Single source of truth for per-type asset import settings (the `.meta`
+ * `importer` block). One registry produces both the import-time defaults and
+ * the inspector's editable fields, so the two can't drift. DOM/engine-free
+ * (importable from the Electron main process; the type import is erased).
*/
import type { InspectorField, InspectorComponent, InspectorFieldValue } from '@/types';