ConstructorOptions

sealed interface ConstructorOptions(source)

Properties

Link copied to clipboard
abstract var baseLayer: ImageryLayer?

The bottommost imagery layer applied to the globe. If set to false, no imagery provider will be added. Default value - ImageryLayer.fromWorldImagery()

Link copied to clipboard

If true, the active element will blur when the viewer's canvas is clicked. Setting this to false is useful for cases when the canvas is clicked only for retrieving position or an entity data without actually meaning to set the canvas to be the active element. Default value - true

Link copied to clipboard
abstract var clock: Clock?

The clock to use to control current time. Default value - Clock()

Link copied to clipboard

Context and WebGL creation properties passed to Scene.

Link copied to clipboard
abstract var creditContainer: Element?

The DOM element that will contain the CreditDisplay. If not specified, the credits are added to the bottom of the widget itself.

Link copied to clipboard
abstract var creditViewport: Element?

The DOM element that will contain the credit pop up created by the CreditDisplay. If not specified, it will appear over the widget itself.

Link copied to clipboard
abstract var ellipsoid: Ellipsoid?

The default ellipsoid. Default value - Ellipsoid.default

Link copied to clipboard
abstract var globe: Globe?

The globe to use in the scene. If set to false, no globe will be added and the sky atmosphere will be hidden by default. Default value - Globe(options.ellipsoid)

Link copied to clipboard
abstract var mapMode2D: MapMode2D?

Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction. Default value - MapMode2D.INFINITE_SCROLL

Link copied to clipboard

The map projection to use in 2D and Columbus View modes. Default value - GeographicProjection(options.ellipsoid)

Link copied to clipboard

If requestRenderMode is true, this value defines the maximum change in simulation time allowed before a render is requested. See Improving Performance with Explicit Rendering. Default value - 0.0

Link copied to clipboard
abstract var msaaSamples: Double?

If provided, this value controls the rate of multisample antialiasing. Typical multisampling rates are 2, 4, and sometimes 8 samples per pixel. Higher sampling rates of MSAA may impact performance in exchange for improved visual quality. This value only applies to WebGL2 contexts that support multisample render targets. Set to 1 to disable MSAA. Default value - 4

Link copied to clipboard

If true and the configuration supports it, use order independent translucency. Default value - true

Link copied to clipboard
abstract var requestRenderMode: Boolean?

If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling improves performance of the application, but requires using Scene.requestRender to render a new frame explicitly in this mode. This will be necessary in many cases after making changes to the scene in other parts of the API. See Improving Performance with Explicit Rendering. Default value - false

Link copied to clipboard
abstract var scene3DOnly: Boolean?

When true, each geometry instance will only be rendered in 3D to save GPU memory. Default value - false

Link copied to clipboard
abstract var sceneMode: SceneMode?

The initial scene mode. Default value - SceneMode.SCENE3D

Link copied to clipboard
abstract var shadows: Boolean?

Determines if shadows are cast by light sources. Default value - false

Link copied to clipboard

If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs. Default value - true

Link copied to clipboard

Blue sky, and the glow around the Earth's limb. Enabled when the default ellipsoid used. Set to false to turn it off.

Link copied to clipboard
abstract var skyBox: SkyBox?

The skybox used to render the stars. When undefined and the WGS84 ellipsoid used, the default stars are used. If set to false, no skyBox, Sun, or Moon will be added.

Link copied to clipboard
abstract var targetFrameRate: Int?

The target frame rate when using the default render loop.

Link copied to clipboard
abstract var terrain: Terrain?

A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined.

Link copied to clipboard

The terrain provider. Default value - EllipsoidTerrainProvider(options.ellipsoid)

Link copied to clipboard
abstract var terrainShadows: ShadowMode?

Determines if the terrain casts or receives shadows from light sources. Default value - ShadowMode.RECEIVE_ONLY

Link copied to clipboard

If true, render at the browser's recommended resolution and ignore window.devicePixelRatio. Default value - true

Link copied to clipboard

True if this widget should control the render loop, false otherwise. Default value - true