API (v2.0.0) - Giro3D
    Preparing search index...

    Interface Pickable<TResult, TOptions>

    Interface for an entities.Entity3D | Entity3D that implements picking.

    By default, Entity3D objects implement picking via Three.js raycasting. Custom entities can implement this interface to provide an alternative picking method via pickAt.

    This interface uses several generic types:

    • TResult represents the type of results returned via picking with pickAt,
    • TOptions can define additional options for picking directly on this entity or on its features.
    interface Pickable<
        TResult extends PickResult = PickResult,
        TOptions extends PickOptions = PickOptions,
    > {
        isPickable: true;
        pick: (canvasCoords: Vector2, options?: TOptions) => TResult[];
    }

    Type Parameters

    Implemented by

    Index

    Properties

    Properties

    isPickable: true
    pick: (canvasCoords: Vector2, options?: TOptions) => TResult[]

    Picks objects from this entity.

    Implementations must respect at least limit and filter options.

    Type Declaration

      • (canvasCoords: Vector2, options?: TOptions): TResult[]
      • Parameters

        • canvasCoords: Vector2

          Coordinates on the rendering canvas

        • Optionaloptions: TOptions

          Options

        Returns TResult[]

        Target