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 { defineSystem, Res, Audio } from 'esengine';
import type { AudioAPI } from 'esengine';
import { ALL_URLS } from '../config';
// Warm the buffer cache at startup so the first hit plays without latency.
export const preloadSystem = defineSystem(
[Res(Audio)],
(audio: AudioAPI) => {
void audio.preloadAll(ALL_URLS);
},
{ name: 'PreloadSystem' },
);