Skip to content

KBE3D / KBCore / Cesium / createWorldBathymetryAsync

函数: createWorldBathymetryAsync()

createWorldBathymetryAsync(options?: { requestVertexNormals?: boolean; }): Promise<CesiumTerrainProvider>

Creates a CesiumTerrainProvider instance for the Cesium World Bathymetry

.

参数

options?

Object with the following properties:

requestVertexNormals?

boolean

Flag that indicates if the client should request additional lighting information from the server if available.

返回

Promise<CesiumTerrainProvider>

A promise that resolves to the created CesiumTerrainProvider

Examples

ts
// Create Cesium World Bathymetry with default settings
try {
  const viewer = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: await Cesium.createWorldBathymetryAsync();
  });
} catch (error) {
  console.log(error);
}
ts
// Create Cesium World Bathymetry with normals.
try {
  const viewer1 = new Cesium.Viewer("cesiumContainer", {
    terrainProvider: await Cesium.createWorldBathymetryAsync({
      requestVertexNormals: true
    });
  });
} catch (error) {
  console.log(error);
}

KBE3D @3.0.0 Copyright © 2024-present KBE3D