@csi-foxbyte/cityjson-to-3d-tiles
Version:
A Node.js library that converts CityJSON files into Cesium 3D Tiles—complete with automatic texture atlas packing, Basis compression, three LOD levels, and customizable threading.
2 lines • 646 B
JavaScript
import {Logger}from'@gltf-transform/core';import {parentPort}from'worker_threads';import {generateCell}from'./generateCell.js';import {createDatabase}from'../database/index.js';if(Logger.DEFAULT_INSTANCE=new Logger(Logger.Verbosity.SILENT),!parentPort)throw new Error("Is not being called in a worker context!");parentPort.on("message",async r=>{switch(r.type){case "work":{try{const t=await createDatabase(r.data.databasePath),a=await generateCell(r.data.cell,r.data.outputFolder,t);parentPort.postMessage(a);}catch(t){console.error(t),parentPort.postMessage(null);}break}}});//# sourceMappingURL=worker.js.map
//# sourceMappingURL=worker.js.map