feat: add native road compiler provider

This commit is contained in:
2026-08-14 15:19:57 +08:00
parent e1f3fc10ca
commit 65cf8b96d9
14 changed files with 385 additions and 83 deletions

View File

@@ -7,10 +7,16 @@ const path = require("path");
const html = fs.readFileSync(path.join(__dirname, "workbench", "index.html"), "utf8");
assert.match(html, /id="width" type="number" min="1" step="0\.01"/);
assert.match(html, /data-layer="sidewalks" type="checkbox" checked/);
assert.match(html, /data-layer="sidewalks" type="checkbox" checked> 路缘与步行带/);
assert.match(html, /id="scene-preview" type="checkbox"/);
const app = fs.readFileSync(path.join(__dirname, "workbench", "app.js"), "utf8");
assert.match(app, /async function saveStagedChanges\(\)/);
assert.match(app, /if \(!await saveStagedChanges\(\)\) return;/);
assert.match(app, /function stageRoadOverride\(road, changes\)/);
assert.match(app, /road\.segmentId === selectedRoad\.segmentId/);
assert.match(app, /sidewalkLeft: rightInput\.checked, sidewalkRight: leftInput\.checked/);
assert.match(app, /function nativeSurfaceStyle\(feature\)/);
assert.match(app, /scene mode must render fills only/);
assert.match(app, /scenePreviewToggle\.onchange/);
assert.match(app, /layers\.sidewalks\.setVisible\(document\.querySelector\('\[data-layer="sidewalks"\]'\)\.checked\)/);
console.log("road workbench tests passed");