snap
fun snap(windowPosition: Cartesian2, options: Scene.SnapOptions? = definedExternally): SceneSnapResult?(source)
Returns the best snap target in a screen-space region around windowPosition. Edges are preferred over surfaces; among hits of the same kind the one nearest the cursor wins. Returns undefined if the region contains no snappable geometry.
Only primitives rendered through the Model pipeline (e.g. 3D Tiles and glTF models) are snappable. Snapping requires float color attachments (WebGL2 with EXT_color_buffer_float); if unsupported, this function returns undefined.
Return
The best snap target in the region, or undefined if there is none.
Parameters
windowPosition
Window coordinates at the center of the search region.