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
import type { Entity, ListViewHandle, ArrayDataSource } from 'esengine';
import type { Contact } from './config';
export const state = {
list: null as ListViewHandle<Contact> | null,
grid: null as ListViewHandle<number> | null,
// Typed handle to the list's backing store (list.data is the readonly
// DataSource view; mutations — append/remove — live on ArrayDataSource).
contacts: null as ArrayDataSource<Contact> | null,
statsLabel: null as Entity | null,
nextId: 0,
lastStats: '',
};