Skip to content

Commit

Permalink
Merge main into sweep/use-aframe-anisotropy
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Sep 19, 2023
2 parents eddf613 + c2705b5 commit 0a41a43
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/json-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,14 @@ function createEntityFromObj(entityData, parentEl) {
entity.setAttribute('geometry', 'primitive', entityData['primitive']);
}

// load this attributes in advance in right order to correctly apply other specific components
for (const attr of ['geometry', 'material']) {
if (entityData.components[attr]) {
entity.setAttribute(attr, entityData.components[attr]);
delete entityData.components[attr];
}
}

if (entityData.id) {
entity.setAttribute('id', entityData.id);
}
Expand Down

0 comments on commit 0a41a43

Please sign in to comment.