fix: render live V2X vehicles in Cesium preview
This commit is contained in:
@@ -16,7 +16,7 @@ const {
|
||||
} = require("./lib/scene-layers");
|
||||
const { digest: glbDigest } = require("./glb-digest");
|
||||
const { buildVehicleRoute: buildPreviewVehicleRoute } = require("./lib/vehicle-route");
|
||||
const { writePreviewVehicleLibrary } = require("./lib/vehicle-library");
|
||||
const { writePreviewVehicleLibrary, writePreviewV2xVehicleLibrary } = require("./lib/vehicle-library");
|
||||
const { readTrafficSignals } = require("./lib/traffic-signals");
|
||||
const {
|
||||
cesiumPreviewHtml,
|
||||
@@ -648,10 +648,11 @@ function writeVehicleModel(area) {
|
||||
const outDir = path.dirname(area.outputs.vehicleModel);
|
||||
const fileStem = path.basename(area.outputs.vehicleModel, ".gltf").replace(/-vehicle-car$/, "");
|
||||
const models = writePreviewVehicleLibrary(outDir, fileStem);
|
||||
const v2xModels = area.v2xPreview.enabled ? writePreviewV2xVehicleLibrary(outDir) : [];
|
||||
// Preserve the existing output/manifest contract for old preview HTML.
|
||||
fs.copyFileSync(path.join(outDir, models[0]), area.outputs.vehicleModel);
|
||||
console.log(`Vehicle models: ${models.length} candidates in ${path.dirname(area.outputs.vehicleModel)}`);
|
||||
return models;
|
||||
console.log(`Vehicle models: ${models.length + v2xModels.length} candidates in ${path.dirname(area.outputs.vehicleModel)}`);
|
||||
return [...models, ...v2xModels];
|
||||
}
|
||||
|
||||
function sceneGeojsonRecords(area) {
|
||||
|
||||
Reference in New Issue
Block a user