Bitbybit Docs
    Preparing search index...

    Class ZoomOnDto (Advanced.Navigation)

    Meshes and motion for advanced.navigation.zoomOn and advanced.navigation.zoomOnAspect, which keep the viewing angle and move the camera's target and distance so the meshes fill the view.

    Index

    Constructors

    • Parameters

      • Optionalmeshes: Mesh[]
      • OptionalincludeChildren: boolean
      • OptionalanimationSpeed: number
      • Optionaloffset: number
      • OptionaldoNotUpdateMaxZ: boolean
      • Optionalease: easeEnum

      Returns ZoomOnDto

    Properties

    meshes: Mesh[]

    Meshes to frame; an empty list logs a warning and leaves the camera where it is.

    []
    
    includeChildren: boolean

    Frames each mesh's child meshes too. zoomOn counts only meshes that have vertices, while zoomOnAspect counts the bounding box of every mesh.

    true
    
    animationSpeed: number

    Length of the camera move in seconds.

    0.8
    

    0.01

    Infinity

    0.01

    offset: number

    Scales the framed distance by 1 plus this value, so negative values move closer and positive ones leave more room. At 0, zoomOn keeps the camera's built-in margin and zoomOnAspect fits the box to the view.

    0
    

    -0.9

    Infinity

    0.1

    doNotUpdateMaxZ: boolean

    Keeps the camera's far clipping distance as it is. When false, zoomOn sets it from the size of the framed meshes; zoomOnAspect never changes it.

    true
    
    ease: easeEnum

    Easing curve of the camera move: easeIn curves start gently, easeOut curves end gently and easeInOut curves do both; elastic, back and bounce curves overshoot or rebound.

    easeInOutCubic