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
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { defineResource } from '../../ecs/resource';
import type { Entity } from '../../types';
import type { ListView } from './list-view';
import type { ScrollContainer } from './scroll-container';
/** @internal Per-app collection wiring; never captured through a plugin singleton. */
export interface CollectionHost {
registerListView(list: ListView<unknown>): void;
unregisterListView(list: ListView<unknown>): void;
attachScrollContainer(entity: Entity, container: ScrollContainer): void;
detachScrollContainer(entity: Entity): void;
}
/** @internal Installed by UIBehaviorPlugin before collection widget adoption. */
export const UICollections = defineResource<CollectionHost>(null!, 'UICollections');