DriftCapture · function
lookAt
A world-to-camera for an eye looking at a target, with the world's up.
Explained in DriftCapture.
function lookAt(eye: readonly [number, number, number], target: readonly [number, number, number], up?: readonly [number, number, number]): Float64Arrayimport { lookAt } from '@driftengine/capture';Parameters
| Parameter | Type | Description |
|---|---|---|
eye | readonly [number, number, number] | |
target | readonly [number, number, number] | |
up? | readonly [number, number, number] |
In depth
The camera's axes are the ones an image has: x to the right, y downward and z forward, so row zero of a frame is the top of it. Taking y upward instead renders every scene upside down, which a test of a corner's position finds and a test of a colour does not.