feat: import native road packages from ZIP

This commit is contained in:
2026-08-26 12:51:58 +08:00
parent 009fe34f79
commit 113ea54535
15 changed files with 200 additions and 100 deletions

View File

@@ -19,7 +19,8 @@ const DEFAULT_SETTINGS = {
};
function buildNativeTrafficSimulation(area, options = {}) {
const root = area.outputs.nativeRoadDir;
const root = options.nativePackage?.rootDir;
if (!root) throw new Error("Native traffic simulation requires an imported native road package");
const compiledPath = path.join(root, "compiled.json");
const signalPath = path.join(root, "traffic-signals.json");
const connectorPath = path.join(root, "layers", "connectors.geojson");