Interface PickObjectsAtOptions

Options for picking objects from the Giro3D Instance.

interface PickObjectsAtOptions {
    filter?: PickFilterCallback;
    gpuPicking?: boolean;
    limit?: number;
    pickFeatures?: boolean;
    radius?: number;
    sortByDistance?: boolean;
    where?: (string | Object3D<Object3DEventMap> | Entity<EntityEventMap, EntityUserData>)[];

Hierarchy (view full)


Filter on the picked results

gpuPicking?: boolean

If disabled, picking will using CPU raycasting when possible (rather than GPU picking). Main differences between CPU raycasting and GPU picking:

  • CPU raycasting is generally much faster to execute and does not require blocking the thread to wait for the GPU queue to complete.


  • CPU raycasting might give less accurate results in some specific cases,
  • CPU raycasting might not return complete information, only the picked point coordinates.
  • CPU raycasting does not ignore transparent pixels, whereas GPU picking does. It might be a disadvantage or advantage depending on the use case.

Default Value

limit?: number

Maximum number of objects to return.

Default Value

pickFeatures?: boolean

Indicates if features information are also retrieved from the picked object. On complex objects, this may be slow, and therefore is disabled by default.

Default Value

radius?: number

Radius (in pixels) for picking (default 0).

Picking will happen in a circle centered on the coordinates provided. Radius is the radius of this circle, in pixels.

This is honored by all native Giro3D picking methods, but may not be honored by customized picking methods.

Default Value

sortByDistance?: boolean

Indicates if the results should be sorted by distance, as Three.js raycasting does. This prevents the limit option to be fully used as it is applied after sorting, thus it may be slow and is disabled by default.

Default Value

where?: (string | Object3D<Object3DEventMap> | Entity<EntityEventMap, EntityUserData>)[]

List of entities to pick from. If not provided, will pick from all the objects in the scene. Strings consist in the IDs of the object.