Viewer
    Preparing search index...

    Type Alias ViewportCreationDefinition

    type ViewportCreationDefinition = {
        branding?: {
            backgroundColor?: string;
            busyModeDisplay?: BUSY_MODE_DISPLAY;
            busyModeSpinner?: string;
            logo?: string | null;
            spinnerPositioning?: SPINNER_POSITIONING;
        };
        canvas?: HTMLCanvasElement;
        flags?: { [key: string]: FLAG_TYPE };
        id?: string;
        initialAutoAdjust?: boolean;
        sessionSettingsId?: string;
        sessionSettingsMode?: SESSION_SETTINGS_MODE;
        visibility?: VISIBILITY_MODE;
        visibilitySessionIds?: string[];
    }
    Index

    Properties

    branding?: {
        backgroundColor?: string;
        busyModeDisplay?: BUSY_MODE_DISPLAY;
        busyModeSpinner?: string;
        logo?: string | null;
        spinnerPositioning?: SPINNER_POSITIONING;
    }

    The branding options of the viewport.

    Type Declaration

    • OptionalbackgroundColor?: string

      Optional background color to show while the viewport is hidden, can include alpha channel. A default color will be used if none is provided.

    • OptionalbusyModeDisplay?: BUSY_MODE_DISPLAY

      The mode used to indicate that the viewport is busy. (default: BUSY_MODE_DISPLAY.SPINNER) Whenever the busy mode gets toggled, the events EVENTTYPE_VIEWPORT.BUSY_MODE_ON and EVENTTYPE_VIEWPORT.BUSY_MODE_OFF will be emitted.

    • OptionalbusyModeSpinner?: string

      Optional URL to a logo to be displayed while the viewport is in busy mode. A default logo will be used if none is provided. The positioning of the spinner can be influenced via SPINNER_POSITIONING.

    • Optionallogo?: string | null

      Optional URL to a logo to be displayed while the viewport is hidden. A default logo will be used if none is provided. Supply null to display no logo at all.

    • OptionalspinnerPositioning?: SPINNER_POSITIONING

      Where the spinner that is specified by BUSY_MODE_DISPLAY is displayed on the screen. (default: BUSY_MODE_DISPLAY.BOTTOM_RIGHT)

    canvas?: HTMLCanvasElement

    The canvas element in which the viewport should be created, it is encourage to provide one. If none was provided, a canvas will be created.

    flags?: { [key: string]: FLAG_TYPE }

    Optional flags that should be initially set on the viewport. The key is the token that is used to identify the flag, and the value is the type of the flag.

    id?: string

    The unique identifier of the session that was specified or automatically chosen on creation of the viewport.

    initialAutoAdjust?: boolean

    If the viewport should automatically adjust the camera to fit the model on creation. (default: false)

    sessionSettingsId?: string

    The id of the session of which the settings should be used. Only works when sessionSettingsMode is set to SESSION_SETTINGS_MODE.SESSION.

    sessionSettingsMode?: SESSION_SETTINGS_MODE

    The mode in which settings should be applied. (default: SESSION_SETTINGS_MODE.FIRST)

    visibility?: VISIBILITY_MODE

    The initial visibility of the viewport. (default: VISIBILITY_MODE.SESSION)

    visibilitySessionIds?: string[]

    The ids of the sessions that should be displayed in the viewport. This only is considered if the visibility is set to VISIBILITY_MODE.SESSIONS. It's recommended that with this workflow, the sessionSettingsMode is set to SESSION_SETTINGS_MODE.SESSION and a sessionSettingsId is provided.