Skip to main content

flywave-mapview.camerautils.convertscreentoworldsize

Home > @flywave/flywave-mapview > CameraUtils > convertScreenToWorldSize

CameraUtils.convertScreenToWorldSize() 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 world size based on the focal length and it's camera distance.

Signature:

function convertScreenToWorldSize(focalLength: number, distance: number, screenSize: number): number;

Parameters

Parameter

Type

Description

focalLength

number

Focal length in pixels (see )

distance

number

Object distance in world space.

screenSize

number

Object size in screen space. object size in world space.

Returns:



number