Code Monkey home page Code Monkey logo

three-conic-polygon-geometry's Issues

Inaccurate Polygons

Hello there,

Many thanks for making this awesome package!

I have noticed that some country polygons from the Natural Earth data don't render correctly. This can be seen by removing the wireframe: true from this line in the Countries example and rotating/zooming to Iceland:

image

You can see that the triangles aren't correct. Now, I notice that raising the curvatureResolution parameter in the THREE.ConicPolygonGeometry constructor to 5 seems to fix that:

image

But this breaks other country polygons, such as the nearby Greenland.

Is it possible to configure the ConicPolygonGeometry to get the polygons perfect?

Cheers

Seb

TypeError: Ho.BufferGeometry

three-conic-polygon-geometry.min.js:2 Uncaught
TypeError: Ho.BufferGeometry is not a constructor
at three-conic-polygon-…etry.min.js:2:84809
at three-conic-polygon-…ometry.min.js:2:165
at three-conic-polygon-…ometry.min.js:2:248


[Feature request] change of spheric resolution or bend polygon around sphere

The conic-polygon-geometry only uses border coords, it works fine for small regions. But for big regions, it makes large flat areas which will be blocked by the sphere surface:

with 0 altitude, only borders are visible for most regions
Screen Shot 2020-07-15 at 20 18 06
with 0.1 altitude, more visible regions, but still holes for big countries
Screen Shot 2020-07-15 at 20 18 48

The idea would be adding vertices in the middle of regions, especially for big regions, then bend around the globe, finally something like:

It will be very nice if the vertices/triangulated map can be done automatically!

Error when creating a Hexagon in React-three globe

I'm experiencing this bug a couple repos up from here, but I'm pretty sure its a bug since the other repos just call this one.

I'm getting this GEOJSON feature from uber's h3ToGeoJson function.
when I plug it into geojson.io it appears normally.
however when I put it on the globe it renders the polygon feature as everything except the hexagon.
image

{
    "type": "FeatureCollection",
    "features": [
        {
            "type": "Feature",
            "id": "8159bffffffffff",
            "properties": {},
            "geometry": {
                "type": "Polygon",
                "coordinates": [
                    [
                        [
                            -4.866872026589571,
                            15.219885219398503
                        ],
                        [
                            -4.01399844347046,
                            11.545295975414758
                        ],
                        [
                            -4.01399844347047,
                            11.545295975414751
                        ],
                        [
                            -0.3191827268566136,
                            9.731836670975918
                        ],
                        [
                            2.888107601500233,
                            11.881770859938978
                        ],
                        [
                            2.302842809205857,
                            16.098688642959498
                        ],
                        [
                            -1.711309903977913,
                            17.93540458181741
                        ],
                        [
                            -3.2925648296836454,
                            16.71898040589194
                        ],
                        [
                            -4.866872026589571,
                            15.219885219398503
                        ]
                    ]
                ]
            },
            "__id": "755664730"
        }
    ]
}

Let me know if there is a fix I can do to transform the hexagon, or a setting in the three conic polygon geometry to fix this

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.