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
// Camera Follow — a tour of the camera director:
//
// • FollowTarget — the scene camera damps toward the WASD player with a
// dead zone, so small moves don't drag the view (Cinemachine-style Body).
// • shakeCamera — Space triggers a decaying render-only shake that never
// dirties the camera's Transform.
// • setViewTarget — keys 1/2 blend the view between the follow camera and a
// fixed wide-angle overview camera over 1.2 s with an EaseInOut curve.
//
// The follow, shake, and blend systems are all engine built-ins (CameraPlugin);
// project code only spawns the world, moves the player, and issues director
// requests from input.
import { addStartupSystem, addSystemToSchedule, Schedule } from 'esengine';
import './components';
import { setupSystem } from './systems/setup';
import { playerMoveSystem } from './systems/move';
import { cameraDirectorSystem } from './systems/director';
addStartupSystem(setupSystem);
addSystemToSchedule(Schedule.Update, playerMoveSystem);
addSystemToSchedule(Schedule.Update, cameraDirectorSystem);