Skip to content

KBE3D / KBCore / Cesium / Fullscreen / requestFullscreen

函数: requestFullscreen()

requestFullscreen(element: any, vrDevice?: any): void

Asynchronously requests the browser to enter fullscreen mode on the given element. If fullscreen mode is not supported by the browser, does nothing.

参数

element

any

The HTML element which will be placed into fullscreen mode.

vrDevice?

any

The HMDVRDevice device.

返回

void

示例

ts
// Put the entire page into fullscreen.
Cesium.Fullscreen.requestFullscreen(document.body)

// Place only the Cesium canvas into fullscreen.
Cesium.Fullscreen.requestFullscreen(scene.canvas)

KBE3D @3.0.0 Copyright © 2024-present KBE3D