GPU-free CarbonEngineJS composition root and runtime service registry.
Use this package to compose resource, SOF, device, audio, and input services; register capability reports; and resolve resource-request behavior. It does not load source bytes, decode formats, create GPU devices, or own backend lifecycle.
npm install @carbonenginejs/runtime-coreimport CjsLibrary, {
CjsServiceKey
} from "@carbonenginejs/runtime-core";
const library = new CjsLibrary({
resourceManager,
spaceObjectFactory,
services: {
[CjsServiceKey.INPUT_MANAGER]: inputManager
},
capabilities: {
webgpu: true
}
});
library.Register({
resourceDefaults: { emit: "json" },
resMan: resourceOptions,
sof: sofOptions
});
await library.InitializeAsync({ dataPath: "res:/sof/data.black" });
const resource = library.GetResource("res:/model/ship.gr2");Browser platform information is available from the explicit subpath:
import { Tr2PlatformInfo } from "@carbonenginejs/runtime-core/platform";
const platform = await Tr2PlatformInfo.Detect();
platform.RegisterCapabilities(library);