ConstOptionalproperties: ViewportCreationDefinitionOptionalbranding?: {The branding options of the viewport.
OptionalbackgroundColor?: stringOptional 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_DISPLAYThe 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?: stringOptional 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 | nullOptional 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_POSITIONINGWhere the spinner that is specified by BUSY_MODE_DISPLAY is displayed on the screen. (default: BUSY_MODE_DISPLAY.BOTTOM_RIGHT)
Optionalcanvas?: HTMLCanvasElementThe canvas element in which the viewport should be created, it is encourage to provide one. If none was provided, a canvas will be created.
Optionalflags?: { [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.
Optionalid?: stringThe unique identifier of the session that was specified or automatically chosen on creation of the viewport.
OptionalinitialAutoAdjust?: booleanIf the viewport should automatically adjust the camera to fit the model on creation. (default: false)
OptionalsessionSettingsId?: stringThe id of the session of which the settings should be used. Only works when sessionSettingsMode is set to SESSION_SETTINGS_MODE.SESSION.
OptionalsessionSettingsMode?: SESSION_SETTINGS_MODEThe mode in which settings should be applied. (default: SESSION_SETTINGS_MODE.FIRST)
Optionalvisibility?: VISIBILITY_MODEThe initial visibility of the viewport. (default: VISIBILITY_MODE.SESSION)
OptionalvisibilitySessionIds?: 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.
Create and initialize a viewport with the provided type and canvas, and return a viewport api object allowing to control it.
An optional identifier for the viewport can be provided. This identifier can be used to retrieve the viewport object from viewports. In case no identifier is provided, a unique one will be generated.
By default a new viewport displays the complete scene tree. Viewports can be excluded from displaying geometry for specific sessions by using the excludeViewports property of ISessionApi.