@twinlight/runtime
v0.0.6
Published
TwinLight native renderer runtime resolver, process API, and CLI.
Readme
@twinlight/runtime
Node-only resolver and launcher for the native TwinLight renderer. It locates the platform runtime package, builds process arguments, starts twinlight.exe, and exposes readiness, endpoint, process, and capability helpers.
60-second local renderer
import { startTwinLight } from "@twinlight/runtime";
const renderer = await startTwinLight({
profile: "local-web",
preset: "local_web",
scene: "scenes/raster_showcase.scene.json",
frames: 0,
requireHardware: true,
enableVulkanRt: true,
ports: {
video: 61720,
control: 61721,
signaling: 61722,
},
});
await renderer.ready();
console.log(renderer.endpoints);
process.on("SIGINT", () => {
void renderer.stop();
});Professional integration notes
portsis the preferred structured option shape. LegacyvideoPort,controlPort, andsignalingPortremain supported.startTwinLightis an alias for the native process launcher; it never renders in JavaScript.renderer.on("stdout" | "stderr" | "exit", cb)provides lightweight process supervision hooks.capabilities()invokes the native runtime capability path and returns the parsed payload.
Not supported
- No Python-rendered or JavaScript-rendered fallback.
- No CPU fallback when required hardware features are absent.
- No browser transport implementation in this package.
