소스 검색

Better radius limit for sandbox

David Catuhe 7 년 전
부모
커밋
1d63c5f805
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      sandbox/index.js

+ 2 - 0
sandbox/index.js

@@ -91,10 +91,12 @@ if (BABYLON.Engine.isSupported()) {
 
             if (currentScene.meshes.length) {
                 var worldExtends = currentScene.getWorldExtends();
+                currentScene.activeCamera.lowerRadiusLimit = null;
                 framingBehavior.zoomOnBoundingInfo(worldExtends.min, worldExtends.max);
             }
 
             currentScene.activeCamera.pinchPrecision = 200 / currentScene.activeCamera.radius;
+            currentScene.activeCamera.upperRadiusLimit = 5 * currentScene.activeCamera.radius;
         }
 
         currentScene.activeCamera.attachControl(canvas);