Skip to content

Commit

Permalink
Don't center/resize for objects without volume
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo committed Jun 29, 2023
1 parent c5b1701 commit d89fbea
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/bit-systems/media-loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ function resizeAndRecenter(world: HubsWorld, media: EntityID, eid: EntityID) {
const mediaObj = world.eid2obj.get(media)!;
const box = new Box3();
box.setFromObject(mediaObj);
if (box.isEmpty()) {
box.setFromCenterAndSize(new Vector3(0, 0, 0), new Vector3(1, 1, 1));
}
if (box.isEmpty()) return;

let scalar = 1;
if (resize) {
Expand Down

0 comments on commit d89fbea

Please sign in to comment.