Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • Scene

Index

Constructors

  • new Scene(stream: StreamApi, frame: ReceivedFrame, decodeFrame: FrameDecoder, imageScaleProvider: ImageScaleProvider, dimensions: Dimensions, sceneId: string, sceneViewId: string): Scene

Properties

sceneId: string
sceneViewId: string

Methods

  • applySceneViewState(sceneViewStateId: string | SceneViewStateIdentifier, opts?: ApplySceneViewStateOptions): Promise<undefined | ILoadSceneViewStateResult>
  • boundingBox(): BoundingBox
  • 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.

    example
    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 } });
    see

    Camera for more information on available camera operations.

    Returns Camera

  • isOrthographic(): boolean
  • scale(): Point
  • viewport(): Dimensions