API

Interface ScreenProjectionResult

Projected world point. x/y are canvas backing pixels; cssX/cssY are canvas-relative CSS pixels; z is WebGPU NDC depth.

interface ScreenProjectionResult {
    behindCamera: boolean;
    clipped: boolean;
    clipW: number;
    cssX: number;
    cssY: number;
    offscreen: boolean;
    x: number;
    y: number;
    z: number;
}

Hierarchy (View Summary)

  • Vec3
    • ScreenProjectionResult
Index
behindCamera: boolean

True when the point's left-handed view-space Z is at or behind the camera plane.

clipped: boolean

True when the point is outside any WebGPU clip plane or is non-finite.

clipW: number

Homogeneous clip-space W before perspective divide.

cssX: number
cssY: number
offscreen: boolean

True when the point cannot appear inside the viewport's 2D rectangle, including negative clip W.

x: number
y: number
z: number