跳到主要内容

flywave-mapview.mapviewutils.cameratoworlddistance

Home > @flywave/flywave-mapview > MapViewUtils > cameraToWorldDistance

MapViewUtils.cameraToWorldDistance() function

Warning: This API is now obsolete.

Translates a linear distance value [0..1], where 1 is the distance to the far plane, into [0..cameraFar].

Signature:

function cameraToWorldDistance(distance: number, camera: THREE.Camera): number;

Parameters

Parameter

Type

Description

distance

number

Distance from the camera (range: [0, 1]).

camera

THREE.Camera

Camera applying the perspective projection.

Returns:



number