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
Cutscene
A code-free cutscene driven by a state machine. The director entity carries a
StateMachineAgent and a TimelinePlayer; its FSM (assets/ai/director.esfsm)
uses only the engine's built-in AI names:
- entering the
Cutscenestate runstimeline.play→ the intro timeline starts; - the
timeline.finishedcondition fires when the clip completes → transition toGameplay.
The timeline (assets/timelines/intro.estimeline) hops the hero onto the stage
(property track on the Hero child) and holds the letterbox bars visible for the
shot (activation tracks on BarTop/BarBottom).
Game code (src/systems/gameplay.ts) never touches the timeline — it reads the
FSM's observable current state to enable hero movement, and fires the replay
trigger.
Controls
| Input | Action |
|---|---|
| Arrow keys / WASD | Move the hero (only once the cutscene has finished). |
| R | Replay the cutscene — the finished clip restarts from the top. |
What to look at
assets/ai/director.esfsm— the whole cutscene flow, no registered actions.assets/timelines/intro.estimeline— property + activation tracks by child path.src/systems/gameplay.ts— gating gameplay onStateMachineAgent.currentand firing a trigger through theAiFsmresource.