ThreePipe
    Preparing search index...

    Class ObjectPicker

    Hierarchy

    Index
    cursorStyles: { default: string; down: string }
    cycleThroughHits: boolean = true

    Clicking an object that is already selected cycles through the other objects under the cursor (see cycleWrap). Set to false to always pick the front object. Same flag as in webgi's ObjectPicker.

    cycleWrap: boolean = false

    Clicking an object that is already selected cycles to the next object behind it under the cursor. With cycleWrap the cycle wraps round to the front object instead of ending in an empty selection, so clicking the only object under the cursor keeps it selected - Blender's behaviour. Off by default: past the last object, the click clears the selection.

    domElement: HTMLElement
    extraObjects: IObject3D<
        IObject3DEventMap,
        IGeometry<NormalBufferAttributes, BufferGeometryEventMap>
        | undefined,
        IMaterial<IMaterialEventMap> | IMaterial<IMaterialEventMap>[] | undefined,
    >[] = []
    hoverEnabled: boolean = false
    mouse: Vector2
    multiSelectEnabled: boolean = true

    Allow selecting multiple objects with Shift/Ctrl+Click.

    pickingMode: PickingModeType = 'auto'
    raycaster: Raycaster
    selectionCondition: (o: IObject3D) => boolean
    selectionMode: SelectionModeType = 'object'
    undoManager?: JSUndoManager
    PointerClickMaxDistance: number = 0.1

    Distance threshold for a pointer click event

    PointerClickMaxTime: number = 200

    Time threshold for a pointer click event

    • Sets the hover object from a hit as a pointer move on the canvas does, when hoverEnabled: sends hitObject, applies the picking mode and sets the result as the hover object. hit null hovers nothing. Used by the pointer moves of the canvas and by the DOM icons of Object3DWidgetsPlugin.

      Parameters

      • hit: HitIntersects | null

      Returns void

    • Selects a hit as a click on the canvas does: sends hitObject (a listener can change the hit, or consume it to keep the selection), applies the picking mode (object, material, texture, geometry), and selects the result, or toggles it with shift, ctrl or cmd when multi-select is on. hit null is a click on nothing. Used by the pointer clicks of the canvas and by other ways to pick, like the DOM icons of Object3DWidgetsPlugin (with a hit made by selectableFor), so all of them behave the same.

      Parameters

      • hit: HitIntersects | null
      • Optionalevent: { ctrlKey?: boolean; metaKey?: boolean; shiftKey?: boolean }

      Returns void