SDK JS
    Preparing search index...

    Function planeFromHeadingTilt

    • Build a ClippingPlane from a compass heading and tilt — the SliceWidget's backbone and a convenient way to author planes by hand.

      Parameters

      • position: { height?: number; lat: number; lng: number }

        A point the plane passes through (height metres above the rendered ground datum, default 0).

      • headingDeg: number

        Compass direction of the normal's horizontal component, in degrees clockwise from north (0 = keep the north side, 90 = keep the east side).

      • tiltDeg: number = 0

        Normal elevation above the horizon in degrees. 0 (default) gives a VERTICAL slicing plane; 90 points the normal straight up (a horizontal plane keeping everything above position); -90 keeps everything below.

      Returns ClippingPlane

      The equivalent geographic ClippingPlane.

      // Vertical plane through downtown, keeping the east side:
      const plane = planeFromHeadingTilt({ lng: -71.06, lat: 42.36 }, 90, 0);
      layer.setClippingPlanes({ planes: [plane] });