How to use three-geojson-geometry - 2 common examples

To help you get started, we’ve selected a few three-geojson-geometry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vasturiano / three-globe / src / layers / globe.js View on Github external
globeObj.rotation.y = -Math.PI / 2; // face prime meridian along Z axis
    globeObj.__globeObjType = 'globe'; // Add object type

    // create atmosphere
    const atmosphereObj = createGlowMesh(globeObj.geometry, {
      backside: true,
      color: 'lightskyblue',
      size: GLOBE_RADIUS * 0.15,
      power: 3.5, // dispersion
      coefficient: 0.1
    });
    atmosphereObj.__globeObjType = 'atmosphere'; // Add object type

    // create graticules
    const graticulesObj = new THREE.LineSegments(
      new GeoJsonGeometry(geoGraticule10(), GLOBE_RADIUS, 2),
      new THREE.LineBasicMaterial({ color: 'lightgrey', transparent: true, opacity: 0.1 })
    );

    return {
      globeObj,
      atmosphereObj,
      graticulesObj
    }
  },
github vasturiano / three-globe / src / layers / polygons.js View on Github external
const applyUpdate = td => {
          const { alt } = obj.__currentTargetD = td;

          conicObj.geometry = new ConicPolygonBufferGeometry(coords, GLOBE_RADIUS, GLOBE_RADIUS * (1 + alt), false);
          addStroke && (strokeObj.geometry = new GeoJsonGeometry(geoJsonGeometry, GLOBE_RADIUS  * (1 + alt + 1e-4))); // stroke slightly above the conic mesh
        };

three-geojson-geometry

ThreeJS geometry for stroking GeoJSON objects on a sphere

MIT
Latest version published 3 months ago

Package Health Score

68 / 100
Full package analysis

Popular three-geojson-geometry functions