跳到主要内容

flywave-mapview.elevationprovider.raycast

Home > @flywave/flywave-mapview > ElevationProvider > rayCast

ElevationProvider.rayCast() method

Cast a ray through the given screen position x, y.

Signature:

rayCast(x: number, y: number): THREE.Vector3 | undefined;

Parameters

Parameter

Type

Description

x

number

The X position in css/client coordinates (without applied display ratio).

y

number

The Y position in css/client coordinates (without applied display ratio).

Returns:



THREE.Vector3 \| undefined

World coordinate of the intersection or undefined if no intersection detected.