Extracts triangular faces from a BufferGeometry as geographic coordinates.
The Three.js BufferGeometry to extract faces from
The geographic origin for coordinate conversion
An array of GeoTriangle objects representing the polyhedral surface
Error if BufferGeometry has no position attribute
import { extractGeoTriangles } from '@wendylabsinc/react-three-map/maplibre';import { BoxGeometry } from 'three';const geometry = new BoxGeometry(100, 100, 100);const origin = { latitude: 51.5074, longitude: -0.1278, altitude: 0 };const triangles = extractGeoTriangles(geometry, origin); Copy
import { extractGeoTriangles } from '@wendylabsinc/react-three-map/maplibre';import { BoxGeometry } from 'three';const geometry = new BoxGeometry(100, 100, 100);const origin = { latitude: 51.5074, longitude: -0.1278, altitude: 0 };const triangles = extractGeoTriangles(geometry, origin);
Extracts triangular faces from a BufferGeometry as geographic coordinates.