Skip to content

Entry points ​

Import only from these. Anything not listed is the library's own and may change.

Import fromForMost usedReference
@v12-engine/engineYour rules: world, units, orders, hooks, sessions, maps, savescreateGame, Rules, World, createMap, parseMap, defineIds, connectengine
@v12-engine/engine/aiComputer players: the kit and the brainsdefineBrain, meleeBrainengine-ai
@v12-engine/engine/serverA server in NodestartServer, GameServer, GameRoomsengine-server
@v12-engine/engine/testingTests, and many games in worker threadstestWorld, fixtureGame, order, run, simulateengine-testing
@v12-engine/engine/debugDebug commands, the inspector, self-checksdebugCommands, defineDebugCommand, setDebugChecksengine-debug
@v12-engine/clientA game on a page, and what a view is written withlaunch, loadGame, GameView, createLobbyclient
@v12-engine/client/appAn app of scenes: menus, campaigns, replays, serversstartApp, defineCampaign, onlineSceneclient-app
@v12-engine/editorThe map editoropenEditor, EditorClienteditor
@v12-engine/client/testingTests of cinematics, hooks and HUD parts with no pagestepCinematic, testStage, testClient, scriptedSession, fakeclient-testing
@v12-engine/client/kitInterface components, and what floats over the gameuseOverlays, createOverlays, Buttonclient-kit
@v12-engine/client/hudThe HUD's parts, to put together your own wayclient-hud
@v12-engine/client/debugThe debug panel, console and statsDebugPanel, LogConsole, PerfListclient-debug
@v12-engine/client/lite-viewsDrawing a world your own way: the views, camera, picking, the kitcreateLiteWorldView, RtsCamera, createDrawKitclient-lite-views
@v12-engine/client/groundGround textures in a worker (serveGroundTextures)client-ground
@v12-engine/client/campaign-workerA campaign's missions in a worker (serveCampaign)client-campaign-worker
@v12-engine/client/looks-fileUnit looks kept as a file the editor writesclient-looks-file
@v12-engine/client/viteVite plugin that serves the shared art and copies what a build usesassetsPackageclient-vite
@v12-engine/editor/viteVite plugin that keeps maps and assets in the projecteditorFileseditor-vite

Stylesheets: @v12-engine/client/styles.css (the interface), @v12-engine/client/tailwind.css (the same, for a project with its own Tailwind), @v12-engine/editor/styles.css (the editor), @v12-engine/client/fonts.css (the theme's typefaces, as files).

What is stable ​

Each entry point's API is kept in a report (packages/*/api/*.api.md), checked on every change. Every name is tagged:

TagPromise
publicStable. Breaking it is a major version.
betaMay change in a minor version. Every name is beta today.
internalNo promise. Left out of the published types and the reference.

@v12-engine/client/internal is what the editor takes from the client; it promises nothing and isn't in the reference.

The reference ​

The API reference is generated from doc comments: npm run docs:api makes it, npm run docs:dev or docs:build shows it.