Skip to content

Commit

Permalink
Set document generator last
Browse files Browse the repository at this point in the history
  • Loading branch information
javagl committed Apr 20, 2024
1 parent 091a737 commit 55e0596
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tools/contentProcessing/GltfTransform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,16 @@ export class GltfTransform {
// Create one document from each buffer and merge them
const io = await GltfTransform.getIO();
const mergedDocument = new Document();
const root = mergedDocument.getRoot();
const asset = root.getAsset();
asset.generator = "glTF-Transform";
for (const inputGlbBuffer of inputGlbBuffers) {
const inputDocument = await io.readBinary(inputGlbBuffer);
mergedDocument.merge(inputDocument);
}
// Combine all scenes into one
await GltfTransform.combineScenes(mergedDocument);
await mergedDocument.transform(unpartition());
const root = mergedDocument.getRoot();
const asset = root.getAsset();
asset.generator = "glTF-Transform";
return mergedDocument;
}
}

0 comments on commit 55e0596

Please sign in to comment.