pick
suspend fun pick(windowPosition: Cartesian2, width: Double? = definedExternally, height: Double? = definedExternally): ERROR CLASS: Symbol not found for JsAny??(source)
Performs the same operation as Scene.pick but asynchonosly without blocking the main render thread. Requires WebGL2 else using fallback.
// On mouse over, color the feature yellow.
handler.setInputAction(function(movement) {
const feature = scene.pickAsync(movement.endPosition).then(function(feature) {
if (feature instanceof Cesium3DTileFeature) {
feature.color = Color.YELLOW;
}
});
}, ScreenSpaceEventType.MOUSE_MOVE);Content copied to clipboard
Return
Object containing the picked primitive or undefined if nothing is at the location.
Parameters
windowPosition
Window coordinates to perform picking on.
width
Width of the pick rectangle. Default value - 3
height
Height of the pick rectangle. Default value - 3