flywave-mapview.maprenderingmanager.readdepth
Home > @flywave/flywave-mapview > MapRenderingManager > readDepth
MapRenderingManager.readDepth() method
Read depth at a specific point synchronously.
Performance considerations: - This is synchronous and will cause a GPU sync point, which may impact performance - For high-frequency use cases, prefer getDepthTexture() and shader-based solutions
Signature:
readDepth(ndc: THREE.Vector2 | THREE.Vector3): number | null;
Parameters
Parameter | Type | Description |
|---|---|---|
ndc | THREE.Vector2 | THREE.Vector3 | Normalized device coordinates (x, y in range [-1, 1]) |
Returns:
number \| null
Depth value (in range \[0, 1\]) or null if reading failed