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 { defineComponent, defineTag } from 'esengine';
// An invisible sprite that holds the particle texture, so runtime-spawned
// emitters can read its resolved texture handle (Commands can't set a texture by
// asset path/uuid — only a numeric handle).
export const TexHolder = defineTag('TexHolder');
// The heading text that shows the current showcase's name.
export const TitleLabel = defineTag('TitleLabel');
// The two on-screen buttons that page through the showcases.
export const PrevButton = defineTag('PrevButton');
export const NextButton = defineTag('NextButton');
// Every emitter that belongs to the current showcase — despawned as a group when
// the showcase changes.
export const ShowcaseEmitter = defineTag('ShowcaseEmitter');
// A one-shot firework spawned by clicking empty space. `age` gates the
// getAliveCount despawn so it isn't removed before it has emitted.
export const Burst = defineComponent('Burst', {
age: 0,
});
export const CollisionCounter = defineComponent('CollisionCounter', {
mode: 1,
total: 0,
});