flywave-mapview.camerautils.convertworldtoscreensize
Home > @flywave/flywave-mapview > CameraUtils > convertWorldToScreenSize
CameraUtils.convertWorldToScreenSize() function
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Calculates object's screen size based on the focal length and it's camera distance.
Signature:
function convertWorldToScreenSize(focalLength: number, distance: number, worldSize: number): number;
Parameters
Parameter | Type | Description |
|---|---|---|
focalLength | number | Focal length in pixels (see ) |
distance | number | Object distance in world space. |
worldSize | number | Object size in world space. object size in screen space. |
Returns:
number