MCPcopy
hub / github.com/lo-th/Oimo.js / dollyIn

Function dollyIn

examples/js/controls/OrbitControls.js:361–380  ·  view source on GitHub ↗
( dollyScale )

Source from the content-addressed store, hash-verified

359 }();
360
361 function dollyIn( dollyScale ) {
362
363 if ( scope.object instanceof THREE.PerspectiveCamera ) {
364
365 scale /= dollyScale;
366
367 } else if ( scope.object instanceof THREE.OrthographicCamera ) {
368
369 scope.object.zoom = Math.max( scope.minZoom, Math.min( scope.maxZoom, scope.object.zoom * dollyScale ) );
370 scope.object.updateProjectionMatrix();
371 zoomChanged = true;
372
373 } else {
374
375 console.warn( 'WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled.' );
376 scope.enableZoom = false;
377
378 }
379
380 }
381
382 function dollyOut( dollyScale ) {
383

Callers 3

handleMouseMoveDollyFunction · 0.85
handleMouseWheelFunction · 0.85
handleTouchMoveDollyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected