Documentation - v20.0.0-dev
    Preparing search index...

    Interface ViewerRaycastOptions

    Options of a ray query on the viewer's scene (ViewerRaycaster.raycast).

    interface ViewerRaycastOptions {
        filter?: (object: SceneObject) => boolean;
        onlyFirst?: boolean;
        transparent?: boolean;
        viewportHeight?: number;
    }
    Index

    Properties

    filter?: (object: SceneObject) => boolean

    The objects hit: those it returns true for (e.g. object.controller === myController); the ray goes through the others, not raycast. Default: all.

    onlyFirst?: boolean

    Only the first hit (default true): the object seen among those filter keeps.

    transparent?: boolean

    Whether the objects drawn transparent are hit (default true), x-ray included. Without, the ray goes through them.

    viewportHeight?: number

    The height in pixels of the view the ray goes through (e.g. the canvas, for a pointer): a line is then hit within the engine's settings.scene.lineThresholdPixels of it. Default: only a line the ray crosses.