<aside> ℹ️ This feature was introduced in xeokit-sdk v2.5

</aside>



Introduction

In xeokit-sdk v2.4.2, we have added components that enable interactive picking of a Viewer's Entities using a 2D box drawn on the canvas with mouse input.

New Components

Usage

In the example below, we:

  1. Create a Viewer, arrange the Camera
  2. Use an XKTLoaderPlugin to load BIM model,
  3. Create a ObjectsKdTree3 to automatically index the Viewer's Entities for fast spatial lookup,
  4. Create a MarqueePicker to pick Entities in the Viewer, using the ObjectsKdTree3 to accelerate picking
  5. Create a MarqueePickerMouseControl to perform the marquee-picking with the MarqueePicker, using mouse input to draw the marquee box on the Viewer's canvas.

When the MarqueePickerMouseControl is active: