opensourceBIM / BIMsurfer

The latest version of the BIM Surfer WebGL viewer for IFC
MIT License
382 stars 132 forks source link

How do I not load the model in the center of a div? #106

Closed znnspace closed 2 years ago

znnspace commented 2 years ago

How do I not load the model in the center of a div?

aothms commented 2 years ago

The camera is targeted at the 3d bounding box center. You can make changes to that https://github.com/opensourceBIM/BIMsurfer/blob/master/viewer/camera.js#L773 Or do a programmatic camera.pan() after the model finished loading https://github.com/opensourceBIM/BIMsurfer/blob/master/viewer/camera.js#L583