Vertex Viewer SDK
    Preparing search index...

    Class Scene

    A class that represents the Scene that has been loaded into the viewer. On it, you can retrieve attributes of the scene, such as the camera. It also contains methods for updating the scene and performing requests to rerender the scene.

    Index

    Constructors

    Properties

    sceneId: string
    sceneViewId: string

    Methods

    • An instance of the current camera of the scene. The camera provides a number of methods that can be used in combination with the render method to make programmatic updates to the scene's camera.

      Returns Camera

      const viewer = document.querySelector('vertex-viewer');
      const scene = await viewer.scene();
      const camera = scene.camera();

      // Fit the camera to the visible bounding box of the scene with a 1 second animation
      await camera.viewAll().render({ animation: { milliseconds: 1000 } });

      Camera for more information on available camera operations.