|
@@ -100,9 +100,10 @@ export default {
|
|
|
let center_z = (bounding.max.z + bounding.min.z) / 2;
|
|
let center_z = (bounding.max.z + bounding.min.z) / 2;
|
|
|
|
|
|
|
|
console.log('model size: x=' + size_x + ', y=' + size_y + ', z=' + size_z);
|
|
console.log('model size: x=' + size_x + ', y=' + size_y + ', z=' + size_z);
|
|
|
|
|
+ let isY = size_y >= size_x;
|
|
|
|
|
|
|
|
camera.lookAt(new THREE.Vector3(center_x, center_y, center_z));
|
|
camera.lookAt(new THREE.Vector3(center_x, center_y, center_z));
|
|
|
- camera.position.set(center_x, center_y, size_y * 1.8);
|
|
|
|
|
|
|
+ camera.position.set(center_x, center_y, isY ? size_y * 1.8 : size_x * 1.8);
|
|
|
|
|
|
|
|
hemiLight.position.set(0, center_y + size_y * 2, 0);
|
|
hemiLight.position.set(0, center_y + size_y * 2, 0);
|
|
|
if (controls) {
|
|
if (controls) {
|
|
@@ -139,6 +140,7 @@ export default {
|
|
|
controls.enablePan = false;
|
|
controls.enablePan = false;
|
|
|
controls.enabled = props.pageType === 'asset';
|
|
controls.enabled = props.pageType === 'asset';
|
|
|
controls.update();
|
|
controls.update();
|
|
|
|
|
+
|
|
|
window.addEventListener('resize', onWindowResize);
|
|
window.addEventListener('resize', onWindowResize);
|
|
|
|
|
|
|
|
// stats
|
|
// stats
|