Options for MarkerOcclusionTester.

interface MarkerOcclusionTesterParams {
    depthBias?: number;
    excludeObjectIds?: readonly string[];
    hideDelayFrames?: number;
    includeTransparent?: boolean;
    includeXRayed?: boolean;
    maxRaycastSteps?: number;
    mode?: MarkerOcclusionMode;
    occluderFilter?: (
        objectId: string,
        marker: MarkerOcclusionMarker,
    ) => boolean;
    respectSectionPlanes?: boolean;
    showDelayFrames?: number;
}

Properties

depthBias?: number

Distance, in world units along the view ray, subtracted from the marker distance when testing for nearer occluders. Prevents surface-pinned markers from hiding behind their own surface because of tiny numeric differences. Defaults to 0.01.

excludeObjectIds?: readonly string[]

Object IDs that never occlude any marker in this tester.

hideDelayFrames?: number

Number of consecutive occluded frames required before a currently-visible marker becomes hidden. Defaults to 2.

includeTransparent?: boolean

Visible objects whose view opacity override is below one still count as occluders when this is true. Defaults to false.

includeXRayed?: boolean

X-rayed objects still count as occluders when this is true. Defaults to false.

maxRaycastSteps?: number

Maximum clipped hits to skip while looking for a real occluder. Defaults to 32.

Occlusion backend. Defaults to auto, which currently uses the BVH path.

occluderFilter?: (objectId: string, marker: MarkerOcclusionMarker) => boolean

Global occluder filter. Return false to ignore an object before triangle tests continue.

respectSectionPlanes?: boolean

Respect active SectionPlanes by continuing past clipped ray hits. Defaults to true.

showDelayFrames?: number

Number of consecutive unoccluded frames required before a currently-hidden marker becomes visible. Defaults to 1.