DriftCapture · interface

TestCamera

Analytic scenes rendered on the CPU, so a capture's stages can be held to geometry that is known before anything runs.

Explained in DriftCapture.

interface TestCamera
import type { TestCamera } from '@driftengine/capture';

In depth

It ships rather than sitting in a test, as @driftengine/nav's test field does: a consumer porting this, or checking a device against the reference, needs the same scenes the engine's own tests use, and a fixture that exists only under *.test.ts cannot be imported.

A ray cast rather than a rasteriser. Every pixel's answer is the distance along its own ray, so the depth written beside the colour is the truth rather than an interpolation — which is what makes it a fixture for depth, for triangulation and for the pose that comes out of them. The shapes are boxes and planes, which intersect in closed form, and the surfaces are a procedural checker with a seeded value noise on top: a corner detector needs something to find, and a flat colour would make every later test pass for the wrong reason.

What it gives up: no shadows, no reflections, one directional light. Nothing in a capture cares — what is measured is where things are, not how they look.

Properties

NameTypeDescription
widthreadonlynumber
heightreadonlynumber
intrinsicsreadonlyreadonly [number, number, number, number]fx, fy, cx, cy.
worldToCamerareadonlyFloat64Array3 × 4 row-major, world to camera.