Vertex Viewer SDK
    Preparing search index...

    Interface VertexViewer

    interface VertexViewer {
        annotations?: AnnotationController;
        cameraControls?: boolean;
        cameraType?: FrameCamera.FrameCameraType;
        canvases?: CanvasController;
        clientId?: string;
        config?: string | Config;
        configEnv?: Environment;
        crossSectioning?: CrossSectioningOptions;
        depthBuffers?: FrameType;
        deviceId?: string;
        enableTemporalRefinement?: boolean;
        experimentalRenderingOptions?: string;
        experimentalSkipVisibilityCheck?: boolean;
        featureHighlighting?: FeatureHighlightOptions;
        featureLines?: FeatureLineOptions;
        featureMaps?: FrameType;
        frame?: ReceivedFrame;
        keyboardControls?: boolean;
        modelViews?: ModelViewController;
        noDefaultLights?: boolean;
        onAnnotationStateChanged?: (
            event: VertexViewerCustomEvent<AnnotationState>,
        ) => void;
        onCameraTypeChanged?: (
            event: VertexViewerCustomEvent<FrameCamera.FrameCameraType>,
        ) => void;
        onConnectionChange?: (
            event: VertexViewerCustomEvent<ConnectionStatus>,
        ) => void;
        onDeviceIdChange?: (event: VertexViewerCustomEvent<string>) => void;
        onDimensionschange?: (
            event: VertexViewerCustomEvent<Dimensions.Dimensions>,
        ) => void;
        onDoubletap?: (event: VertexViewerCustomEvent<TapEventDetails>) => void;
        onFrameDrawn?: (event: VertexViewerCustomEvent<ReceivedFrame>) => void;
        onFrameReceived?: (event: VertexViewerCustomEvent<ReceivedFrame>) => void;
        onInteractionFinished?: (event: VertexViewerCustomEvent<void>) => void;
        onInteractionStarted?: (event: VertexViewerCustomEvent<void>) => void;
        onLongpress?: (event: VertexViewerCustomEvent<TapEventDetails>) => void;
        onSceneChanged?: (event: VertexViewerCustomEvent<void>) => void;
        onSceneReady?: (event: VertexViewerCustomEvent<void>) => void;
        onTap?: (event: VertexViewerCustomEvent<TapEventDetails>) => void;
        onTokenExpired?: (event: VertexViewerCustomEvent<void>) => void;
        phantom?: PhantomOptions;
        pmi?: PmiController;
        resizeDebounce?: number;
        resolvedConfig?: Config;
        rotateAroundTapPoint?: boolean;
        sceneComparison?: SceneComparisonOptions;
        sceneItems?: SceneItemController;
        selectionHighlighting?: SelectionHighlightingOptions;
        src?: string;
        stencilBuffer?: StencilBufferManager;
        stream?: ViewerStream;
        token?: string;
        viewport?: Viewport;
    }
    Index
    annotations?: AnnotationController

    The annotation controller for accessing annotations associated with the scene view.

    cameraControls?: boolean

    Enables or disables the default mouse and touch interactions provided by the viewer. Enabled by default.

    true
    

    The type of camera model to represent the scene with. Can be either perspective or orthographic, and defaults to perspective.

    'perspective'
    
    canvases?: CanvasController

    The controller for accessing canvases and their associated markup.

    clientId?: string

    The Client ID associated with your Vertex Application.

    config?: string | Config

    An object or JSON encoded string that defines configuration settings for the viewer.

    configEnv?: Environment

    Sets the default environment for the viewer. This setting is used for auto-configuring network hosts.

    Use the config property for manually setting hosts.

    Viewer.config

    'platprod'
    
    crossSectioning?: CrossSectioningOptions

    Specifies options related to presentation of cross-sections. Defaults to showing the cross-section with an end cap that matches the part color.

    {     endCapEnabled: true,     endCapColor: undefined,   }
    
    depthBuffers?: FrameType

    Specifies when a depth buffer is requested from rendering. Possible values are: * undefined: A depth buffer is never requested.

    • final: A depth buffer is only requested on the final frame.

    • all: A depth buffer is requested for every frame.

    Depth buffers can increase the amount of data that's sent to a client and can impact rendering performance. Values of undefined or final should be used when needing the highest rendering performance. Some features, like measurement and pins, require that depth buffers are requested and will override an 'undefined' value when the feature is active.

    deviceId?: string

    Property used for internals or testing.

    enableTemporalRefinement?: boolean

    Specifies whether to enable temporal refinement of still images.

    true
    
    experimentalRenderingOptions?: string

    Specifies experimental rendering options. For Vertex use only.

    ''
    
    experimentalSkipVisibilityCheck?: boolean

    Experimental flag indicating that connections to Vertex should be established if the viewer is initially hidden through its own style or computed style, or has not been scrolled into view.

    Caution: Setting this flag can result in reduced performance, and should generally not be used in a production setting.

    false
    
    featureHighlighting?: FeatureHighlightOptions

    Specifies how selected features should be highlighted.

    featureLines?: FeatureLineOptions

    Specifies if and how to render feature lines.

    featureMaps?: FrameType

    Specifies when a feature map is returned from rendering. Feature maps include information about the surfaces, edges and cross-sections that are in a frame.

    Possible values are: * undefined: A feature map is never requested.

    • final: A feature map is only requested on the final frame.

    • all: A feature map is requested for every frame.

    Feature maps can increase the amount of data that's sent to a client and can impact rendering performance. Values of undefined or final should be used when needing the highest rendering performance.

    The last frame that was received, which can be used to inspect the scene and camera information.

    keyboardControls?: boolean

    Enables or disables the default keyboard shortcut interactions provided by the viewer. Enabled by default, requires cameraControls being enabled.

    true
    
    modelViews?: ModelViewController

    The controller for accessing model views associated with the scene view.

    noDefaultLights?: boolean

    Specifies whether to use the default lights for the scene. When false, default lights are used. When true, no default lights are used, and the lights must be specified separately.

    false
    
    onAnnotationStateChanged?: (
        event: VertexViewerCustomEvent<AnnotationState>,
    ) => void

    Emits an event when the state for annotation changes.

    onCameraTypeChanged?: (
        event: VertexViewerCustomEvent<FrameCamera.FrameCameraType>,
    ) => void

    Emits an event when the camera type changes.

    onConnectionChange?: (event: VertexViewerCustomEvent<ConnectionStatus>) => void

    Emits an event when the connection status changes for the viewer

    onDeviceIdChange?: (event: VertexViewerCustomEvent<string>) => void

    Used for internals or testing.

    onDimensionschange?: (
        event: VertexViewerCustomEvent<Dimensions.Dimensions>,
    ) => void
    onDoubletap?: (event: VertexViewerCustomEvent<TapEventDetails>) => void

    Emits an event whenever the user double taps or clicks a location in the viewer. The event includes the location of the first tap or click.

    onFrameDrawn?: (event: VertexViewerCustomEvent<ReceivedFrame>) => void

    Emits an event when a frame has been drawn to the viewer's canvas. The event will include details about the drawn frame, such as the Scene information related to the scene.

    onFrameReceived?: (event: VertexViewerCustomEvent<ReceivedFrame>) => void

    Emits an event when a frame has been received by the viewer. The event will include details about the drawn frame, such as the Scene information related to the scene.

    onInteractionFinished?: (event: VertexViewerCustomEvent<void>) => void

    Emits an event when the user hs finished an interaction.

    onInteractionStarted?: (event: VertexViewerCustomEvent<void>) => void

    Emits an event when the user has started an interaction.

    onLongpress?: (event: VertexViewerCustomEvent<TapEventDetails>) => void

    Emits an event whenever the user taps or clicks a location in the viewer and the configured amount of time passes without receiving a mouseup or touchend. The event includes the location of the tap or click.

    onSceneChanged?: (event: VertexViewerCustomEvent<void>) => void

    Emits an event when a frame is received with a different scene attribute.

    onSceneReady?: (event: VertexViewerCustomEvent<void>) => void

    Emits an event when the scene is ready to be interacted with.

    onTap?: (event: VertexViewerCustomEvent<TapEventDetails>) => void

    Emits an event whenever the user taps or clicks a location in the viewer. The event includes the location of the tap or click.

    This event can be used in combination with the scene method to query for items at the point of the tap.

    Scene.raycaster for more information.

    onTokenExpired?: (event: VertexViewerCustomEvent<void>) => void

    Emits an event when a provided oauth2 token is about to expire, or is about to expire, causing issues with establishing a websocket connection, or performing API calls.

    phantom?: PhantomOptions

    Specifies how phantom parts should appear. The opacity must be between 0 and 1, where 0 is completely hidden and 1 is completely visible.

    { opacity: 0.1 }
    

    The controller for accessing and viewing PMI.

    resizeDebounce?: number

    An optional value that will debounce frame updates when resizing this viewer element.

    100
    
    resolvedConfig?: Config
    rotateAroundTapPoint?: boolean

    Sets the rotation interaction behavior. True by default.

    When rotateAroundTapPoint is true and the user clicks on geometry, then the model will rotate around the point that was clicked. When rotateAroundTapPoint is true and the user clicks in empty space (not on geometry), then the model will rotate around the center of the viewport.

    When rotateAroundTapPoint is false, then the model will always rotate around the center of the viewport.

    true
    
    sceneComparison?: SceneComparisonOptions

    Specifies if and how to compare to another scene

    sceneItems?: SceneItemController

    The controller for accessing and viewing SceneItems.

    selectionHighlighting?: SelectionHighlightingOptions

    Specifies the halo selection properties. Parameter notes:

    • lineWidth values supported currently are 0-5. This width is currently the value x2. For example, 1 will have a pixel width of 2.

    • color is optional. This will be the color of the selected items in the viewer.

    • opacity is also optional. The opacity will be applied to everything selected besides the highlighted outer line.

    src?: string

    A URN of the scene resource to load when the component is mounted in the DOM tree. The specified resource is a URN in the following format: * urn:vertex:scene:<sceneid>

    stencilBuffer?: StencilBufferManager
    stream?: ViewerStream
    token?: string

    A token that can be used to make API calls to other Vertex services.

    viewport?: Viewport

    Represents the current viewport of the viewer. The viewport represents the dimensions of the canvas where a frame is rendered. It contains methods for translating between viewport coordinates, frame coordinates and world coordinates.

    Viewport.fromDimensions(Dimensions.create(0, 0))