text
stringlengths
0
8.81k
elements in the array.
Returns:
The index of itemToFind in the array, if it exists. If itemToFind
does not exist, the return value is a negative number which is the bitwise complement (~)
of the index before which the itemToFind should be inserted in order to maintain the
sorted order of the array.
Example:
// Create a comparator function to search through an array of numbers.
function comparator(a, b) {
return a - b;
};
const numbers = [0, 2, 4, 6, 8];
const index = Cesium.binarySearch(numbers, 6, comparator); // 3
buildModuleUrl(relativeUrl) → string
engine/Source/Core/buildModuleUrl.js 109
Given a relative URL under the Cesium base URL, returns an absolute URL.
Name
Type
Description
relativeUrl
string
The relative path.
Returns:
The absolutely URL representation of the provided path.
Example:
const viewer = new Cesium.Viewer("cesiumContainer", {
baseLayer: Cesium.ImageryLayer.fromProviderAsync(
Cesium.TileMapServiceImageryProvider.fromUrl(
Cesium.buildModuleUrl("Assets/Textures/NaturalEarthII"),
)),
baseLayerPicker: false,
});
clone(object, deep) → object
engine/Source/Core/clone.js 12
Clones an object, returning a new object containing the same properties.
Name
Type
Default
Description
object
object