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';
// Marks the single light that tracks the mouse cursor every frame.
export const Torch = defineTag('Torch');
// Attached when a placed light or obstacle is evicted (the FIFO cap is hit) or
// cleared with C. The fade system counts `remaining` down, dims the entity, then
// despawns it.
export const Fading = defineComponent('Fading', {
remaining: 0.35,
});