跳转到内容

SideModuleId

此内容尚不支持你的语言。

SideModuleId = BuiltinSideModuleId | string & object

Defined in: sideModules/registry.ts:40

Identifies an optional native module across every realm and transport.

OPEN, like ExportPlatform and MiniGameVendor: the built-ins are named for completion, but a project can drop its own module in .esengine/modules/<id>/ and that id flows through acquisition, the export and every transport exactly like a built-in one. Nothing here branches on the value — it is identity.

This is what lets a third-party runtime (a vector-animation player, another physics engine) be a MODULE rather than something a game has to fetch and instantiate for itself. Doing it by hand works on the web and falls apart everywhere else: a mini-game has no fetch and needs its binary staged into the package, and a playable needs it inlined as base64. Those are the transports below, and they are the whole reason to be in this table.