ThreeJS geometry for drawing polygons on a sphere
MIT License
A ThreeJS geometry class for drawing polygons on a sphere using cones.
Examples:
import { ConicPolygonGeometry } from 'three-conic-polygon-geometry';
or using a script tag
<script src="//unpkg.com/three-conic-polygon-geometry"></script>
then
const myMesh = new THREE.Mesh(
new THREE.ConicPolygonGeometry(polygonGeoJson),
new THREE.MeshBasicMaterial({ color: 'blue' })
);
ConicPolygonGeometry(polygonGeoJson: GeoJson polygon coordinates, bottomHeight: Float, topHeight: Float, closedBottom: Boolean, closedTop: Boolean, includeSides: Boolean, curvatureResolution: Float)
geometry.coordinates
for type: Polygon
. The first item is the polygon contour, additional items are the inner holes. It's recommended to split the geometries at the anti-meridian.0
.1
.true
.true
.true
.5
..parameters: Object
An object with a property for each of the constructor parameters. Any modification after instantiation does not change the geometry.
The geometry supports three distinct groups to which different materials can be applied.