Appearance
KBE3D / KBCore / Cesium / Viewer / ConstructorOptions
接口: ConstructorOptions
Initialization options for the Viewer constructor
继承于
属性
animation?
optionalanimation:boolean
If set to false, the Animation widget will not be created.
baseLayerPicker?
optionalbaseLayerPicker:boolean
If set to false, the BaseLayerPicker widget will not be created.
fullscreenButton?
optionalfullscreenButton:boolean
If set to false, the FullscreenButton widget will not be created.
vrButton?
optionalvrButton:boolean
If set to true, the VRButton widget will be created.
geocoder?
optionalgeocoder:boolean|IonGeocodeProviderType|GeocoderService[]
The geocoding service or services to use when searching with the Geocoder widget. If set to false, the Geocoder widget will not be created.
homeButton?
optionalhomeButton:boolean
If set to false, the HomeButton widget will not be created.
infoBox?
optionalinfoBox:boolean
If set to false, the InfoBox widget will not be created.
sceneModePicker?
optionalsceneModePicker:boolean
If set to false, the SceneModePicker widget will not be created.
selectionIndicator?
optionalselectionIndicator:boolean
If set to false, the SelectionIndicator widget will not be created.
timeline?
optionaltimeline:boolean
If set to false, the Timeline widget will not be created.
navigationHelpButton?
optionalnavigationHelpButton:boolean
If set to false, the navigation help button will not be created.
navigationInstructionsInitiallyVisible?
optionalnavigationInstructionsInitiallyVisible:boolean
True if the navigation instructions should initially be visible, or false if the should not be shown until the user explicitly clicks the button.
scene3DOnly?
optionalscene3DOnly:boolean
When <code>true</code>, each geometry instance will only be rendered in 3D to save GPU memory.
shouldAnimate?
optionalshouldAnimate:boolean
<code>true</code> if the clock should attempt to advance simulation time by default, <code>false</code> otherwise. This option takes precedence over setting Viewer#clockViewModel.
clockViewModel?
optionalclockViewModel:ClockViewModel
The clock view model to use to control current time.
selectedImageryProviderViewModel?
optionalselectedImageryProviderViewModel:ProviderViewModel
The view model for the current base imagery layer, if not supplied the first available base layer is used. This value is only valid if baseLayerPicker is set to true.
imageryProviderViewModels?
optionalimageryProviderViewModels:ProviderViewModel[]
The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if baseLayerPicker is set to true.
selectedTerrainProviderViewModel?
optionalselectedTerrainProviderViewModel:ProviderViewModel
The view model for the current base terrain layer, if not supplied the first available base layer is used. This value is only valid if baseLayerPicker is set to true.
terrainProviderViewModels?
optionalterrainProviderViewModels:ProviderViewModel[]
The array of ProviderViewModels to be selectable from the BaseLayerPicker. This value is only valid if baseLayerPicker is set to true.
baseLayer?
optionalbaseLayer:false|ImageryLayer
The bottommost imagery layer applied to the globe. If set to <code>false</code>, no imagery provider will be added. This value is only valid if baseLayerPicker is set to false. Cannot be used when globe is set to false.
ellipsoid?
optionalellipsoid:Ellipsoid
The default ellipsoid.
terrainProvider?
optionalterrainProvider:TerrainProvider
The terrain provider to use
terrain?
optionalterrain:Terrain
A terrain object which handles asynchronous terrain provider. Can only specify if options.terrainProvider is undefined.
skyBox?
optionalskyBox:false|SkyBox
The skybox used to render the stars. When <code>undefined</code> and the WGS84 ellipsoid used, the default stars are used. If set to <code>false</code>, no skyBox, Sun, or Moon will be added.
skyAtmosphere?
optionalskyAtmosphere:false|SkyAtmosphere
Blue sky, and the glow around the Earth's limb. Enabled when the WGS84 ellipsoid used. Set to <code>false</code> to turn it off.
fullscreenElement?
optionalfullscreenElement:string|Element
The element or id to be placed into fullscreen mode when the full screen button is pressed.
useDefaultRenderLoop?
optionaluseDefaultRenderLoop:boolean
True if this widget should control the render loop, false otherwise.
targetFrameRate?
optionaltargetFrameRate:number
The target frame rate when using the default render loop.
showRenderLoopErrors?
optionalshowRenderLoopErrors:boolean
If true, this widget will automatically display an HTML panel to the user containing the error, if a render loop error occurs.
useBrowserRecommendedResolution?
optionaluseBrowserRecommendedResolution:boolean
If true, render at the browser's recommended resolution and ignore <code>window.devicePixelRatio</code>.
automaticallyTrackDataSourceClocks?
optionalautomaticallyTrackDataSourceClocks:boolean
If true, this widget will automatically track the clock settings of newly added DataSources, updating if the DataSource's clock changes. Set this to false if you want to configure the clock independently.
contextOptions?
optionalcontextOptions:ContextOptions
Context and WebGL creation properties passed to Scene.
sceneMode?
optionalsceneMode:SceneMode
The initial scene mode.
mapProjection?
optionalmapProjection:MapProjection
The map projection to use in 2D and Columbus View modes.
globe?
optionalglobe:false|Globe
The globe to use in the scene. If set to <code>false</code>, no globe will be added and the sky atmosphere will be hidden by default.
orderIndependentTranslucency?
optionalorderIndependentTranslucency:boolean
If true and the configuration supports it, use order independent translucency.
creditContainer?
optionalcreditContainer:string|Element
The DOM element or ID that will contain the CreditDisplay. If not specified, the credits are added to the bottom of the widget itself.
creditViewport?
optionalcreditViewport:string|Element
The DOM element or ID that will contain the credit pop up created by the CreditDisplay. If not specified, it will appear over the widget itself.
dataSources?
optionaldataSources:DataSourceCollection
The collection of data sources visualized by the widget. If this parameter is provided, the instance is assumed to be owned by the caller and will not be destroyed when the viewer is destroyed.
shadows?
optionalshadows:boolean
Determines if shadows are cast by light sources.
terrainShadows?
optionalterrainShadows:ShadowMode
Determines if the terrain casts or receives shadows from light sources.
mapMode2D?
optionalmapMode2D:MapMode2D
Determines if the 2D map is rotatable or can be scrolled infinitely in the horizontal direction.
projectionPicker?
optionalprojectionPicker:boolean
If set to true, the ProjectionPicker widget will be created.
blurActiveElementOnCanvasFocus?
optionalblurActiveElementOnCanvasFocus:boolean
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.
requestRenderMode?
optionalrequestRenderMode:boolean
If true, rendering a frame will only occur when needed as determined by changes within the scene. Enabling reduces the CPU/GPU usage of your application and uses less battery on mobile, 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.
maximumRenderTimeChange?
optionalmaximumRenderTimeChange:number
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.
depthPlaneEllipsoidOffset?
optionaldepthPlaneEllipsoidOffset:number
Adjust the DepthPlane to address rendering artefacts below ellipsoid zero elevation.
msaaSamples?
optionalmsaaSamples:number
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.
