Skip to content

Commit bdddbd7

Browse files
committed
fix: fix order of calculations
1 parent d9d64ab commit bdddbd7

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/model-mixin.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -541,16 +541,16 @@ export default defineComponent({
541541
return object;
542542
},
543543
addObject(object: Object3D) {
544-
const center = getCenter(object);
545-
546-
// correction position
547-
this.wrapper.position.copy(center.negate());
548-
549544
this.object = object;
550545
this.wrapper.add(object);
551546
552547
this.updateCamera();
553548
this.updateModel();
549+
550+
const center = getCenter(object);
551+
552+
// correct position
553+
this.wrapper.position.copy(center.negate());
554554
},
555555
animate() {
556556
this.reqId = requestAnimationFrame(this.animate);

0 commit comments

Comments
 (0)