Selection Process

Below we will consider the process for selecting nodes of a model interactively. Selected nodes can be highlighted.

Type of the process (TypeScript):

export type SelectionProcess = {
    name: "Selection"
    options: {
        mode?: SelectProcessMode
    },
    events:{
        onUpdate?: () => void
        onContextMenu?: (xClient: number, yClient: number) => void
        onHint?: (xClient: number, yClient: number, uuid?: string, modelUuid?: string) => void
    }
}

You can run the selection process using the following modes.

Modes (TypeScript):

export enum SelectProcessMode {
    Single = "Single", // picking selection mode
    Multiply = "Multiply", // picking and frame-using selection modes
}

The process calls the callback onUpdate every time when a selection state is changed.

To run the process, you should call the command RunProcessCommand.

Example (TypeScript):

view.runCommand({
    name: "RunProcessCommand",
    process: {
        name: "Selection",
        options: {},
        events: {}
    }
})

Important

Updating process is not provided!

New in version 1.7.0: Added the onContextMenu and onHint callbacks.