Visibility result for a marker after one occlusion update.

interface MarkerOcclusionResult {
    canvasPos: Vec2;
    distanceToMarker: number;
    inFrustum: boolean;
    marker: MarkerOcclusionMarker;
    markerId: string;
    mode: "bvh";
    occluded: boolean;
    occluderMeshId: string;
    occluderObjectId: string;
    rayDir: Vec3;
    rayOrigin: Vec3;
    visible: boolean;
}

Properties

canvasPos: Vec2

Canvas-space marker position in CSS pixels, or null when not projectable.

distanceToMarker: number

Distance from ray origin to marker along rayDir, or null when skipped.

inFrustum: boolean

true when the marker projects inside the view frustum.

Marker input that produced this result.

markerId: string

Stable ID from MarkerOcclusionMarker.id.

mode: "bvh"

Backend used for this result.

occluded: boolean

Raw occlusion result for this update before hysteresis is applied.

occluderMeshId: string

Mesh ID of the occluder, if any.

occluderObjectId: string

Object ID of the occluder, if any.

rayDir: Vec3

World-space ray direction used by the occlusion test, or null when skipped.

rayOrigin: Vec3

World-space ray origin used by the occlusion test, or null when skipped.

visible: boolean

true when the marker should be shown after frustum and hysteresis rules.