Skip to content

Commit

Permalink
Process scene nodes starting at the primary node
Browse files Browse the repository at this point in the history
  • Loading branch information
bherr2 committed Jun 7, 2024
1 parent b934dc8 commit c224f55
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/normalization/normalize-ref-organ.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ async function getRawData(context) {

async function processSpatialEntities(context, metadata, gltfFile, cache, crosswalk) {
const scalar = new Matrix4(Matrix4.IDENTITY).scale([1000, 1000, 1000]);
const nodes = await processSceneNodes(gltfFile, scalar, undefined, cache);
const primaryNodeId = crosswalk?.[0]?.['node_name'] ?? undefined;
const nodes = await processSceneNodes(gltfFile, scalar, primaryNodeId, cache);

const obj = context.selectedDigitalObject;
const baseIri = `${obj.iri}/${obj.version}`;
Expand All @@ -70,7 +71,6 @@ async function processSpatialEntities(context, metadata, gltfFile, cache, crossw
.filter((node) => validNodeId(node, crosswalk))
.map((node) => {
const nodeId = node['@id'];
const primaryNodeId = crosswalk[0]['node_name'];
const id =
nodeId === primaryNodeId
? primaryId
Expand Down

0 comments on commit c224f55

Please sign in to comment.