Skip to content

Commit

Permalink
fix: pass scene-lod directory as parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
aleortega committed Feb 14, 2024
1 parent 9370a93 commit f66395d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion consumer-server/src/logic/lod-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function createLodGeneratorComponent({ logs }: Pick<AppComponents, 'logs'
const logger = logs.getLogger('lod-generator')
const projectRoot = path.resolve(__dirname, '..', '..', '..') // project root according to Dockerfile bundling
const lodGeneratorProgram = path.join(projectRoot, 'api', 'DCL_PiXYZ.exe') // path to the lod generator program
const sceneLodEntitiesManifestBuilder = path.join(projectRoot, 'scene-lod') // path to the scene lod entities manifest builder
const outputPath = path.join(os.tmpdir(), "built-lods")

async function generate(basePointer: string): Promise<string[]> {
Expand All @@ -17,7 +18,7 @@ export function createLodGeneratorComponent({ logs }: Pick<AppComponents, 'logs'
fs.mkdirSync(outputPath, { recursive: true })
}

const commandToExecute = `${lodGeneratorProgram} "coords" "${basePointer}" "${outputPath}"`
const commandToExecute = `${lodGeneratorProgram} "coords" "${basePointer}" "${outputPath}" "${sceneLodEntitiesManifestBuilder}"`
const files: string[] = await new Promise((resolve, reject) => {
exec(commandToExecute, (error, _stdout, stderr) => {
const processOutput = `${outputPath}/${basePointer}`
Expand Down

0 comments on commit f66395d

Please sign in to comment.