Documentation - v20.0.0-dev
    Preparing search index...

    How close to a line a ray must pass to hit it, in world units: base + perDistance × distance, the distance along the ray. A tolerance of a few pixels on screen is perDistance alone through a perspective camera (a pixel covers more the farther), base alone through an orthographic one (a pixel covers the same everywhere): see fromCamera. Used for the lines: a part drawing lines is hit by its segments (see PartRaycaster.raycast).

    Index

    Constructors

    • Parameters

      • base: number = 0

        World units, whatever the distance.

      • perDistance: number = 0

        World units per unit of distance along the ray.

      • pixels: number = 0

        The pixels on screen it stands for (see fromCamera); 0: unknown.

      Returns LineThreshold

    Properties

    base: number = 0

    World units, whatever the distance.

    perDistance: number = 0

    World units per unit of distance along the ray.

    pixels: number = 0

    The pixels on screen it stands for (see fromCamera); 0: unknown.

    Methods

    • The threshold at distance along the ray, in world units: at least minPixels on screen (e.g. half a wide line's width) when it knows its pixels.

      Parameters

      • distance: number
      • minPixels: number = 0

      Returns number

    • A tolerance of pixels on the screen of camera, drawn viewportHeight pixels high (its zoom included): the view's height is the caller's, the scene has none. Throws for a camera neither perspective nor orthographic.

      Parameters

      • camera: Camera
      • viewportHeight: number
      • pixels: number

        The tolerance, e.g. the scene's settings.scene.lineThresholdPixels.

      Returns LineThreshold