React Three Map - v1.0.9
    Preparing search index...
    • Converts an array of GeoTriangles back to a BufferGeometry.

      Parameters

      • triangles: GeoTriangle[]

        Array of GeoTriangle objects

      • origin: Coords

        The geographic origin for coordinate conversion

      Returns BufferGeometry

      A Three.js BufferGeometry

      Error if triangles array is empty

      import { geoTrianglesToBufferGeometry } from '@wendylabsinc/react-three-map/maplibre';

      const json = await fetchFromDatabase();
      const triangles = JSON.parse(json);
      const geometry = geoTrianglesToBufferGeometry(triangles, origin);