Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@carbonenginejs/runtime-core

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.

Install

npm install @carbonenginejs/runtime-core

Quick start

import 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);

Documentation

License

MIT. See LICENSE and NOTICE.

About

🐔 CarbonEngineJS core library

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages