Skip to content

Commit

Permalink
Merge pull request #1752 from xeokit/remove-unit-conversion
Browse files Browse the repository at this point in the history
StoreyViewsPlugin::Remove unit conversion to meters
  • Loading branch information
xeolabs authored Dec 2, 2024
2 parents a4b732b + 22bb8ef commit 8d8dcd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/StoreyViewsPlugin/StoreyViewsPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ class StoreyViewsPlugin extends Plugin {
if(isNaN(elevationCur)) return;

const bb = storeysList[i].storeyAABB;
bb[bbIndex] = Math.max(bb[1], parseFloat(elevationCur) / 1000);
bb[bbIndex] = Math.max(bb[1], parseFloat(elevationCur));

if (i > 0) {
const storeyMetaObjectNext = metaScene.metaObjects[storeysList[i - 1].storeyId];
const elevationNext = storeyMetaObjectNext.attributes.elevation;
bb[4] = Math.min(bb[bbIndex + 3], parseFloat(elevationNext) / 1000);
bb[4] = Math.min(bb[bbIndex + 3], parseFloat(elevationNext));
}

this.storeys[storeysList[i].storeyId].storeyAABB = bb;
Expand Down

0 comments on commit 8d8dcd8

Please sign in to comment.