Skip to content

KBE3D / KBCore / Cesium / SceneModePicker

类: SceneModePicker

<img src="/Images/sceneModePicker.png" style="float: left; margin-right: 10px;" width="44" height="116" /> <p>The SceneModePicker is a single button widget for switching between scene modes; shown to the left in its expanded state. Programatic switching of scene modes will be automatically reflected in the widget as long as the specified Scene is used to perform the change.</p><p style="clear: both;"></p><br/>

示例

ts
// In HTML head, include a link to the SceneModePicker.css stylesheet,
// and in the body, include: <div id="sceneModePickerContainer"></div>
// Note: This code assumes you already have a Scene instance.

const sceneModePicker = new Cesium.SceneModePicker('sceneModePickerContainer', scene);

参数

The DOM element or ID that will contain the widget.

参数

The Scene instance to use.

参数

The time, in seconds, it takes for the scene to transition.

属性

container

container: Element

Gets the parent container.


viewModel

viewModel: SceneModePickerViewModel

Gets the view model.

方法

isDestroyed()

isDestroyed(): boolean

返回

boolean

true if the object has been destroyed, false otherwise.


destroy()

destroy(): void

Destroys the widget. Should be called if permanently removing the widget from layout.

返回

void

构造函数

构造函数

new SceneModePicker(container: string | Element, scene: Scene, duration?: number): SceneModePicker

参数

container

string | Element

scene

Scene

duration?

number

返回

SceneModePicker

KBE3D @3.0.0 Copyright © 2024-present KBE3D