Giter Site home page Giter Site logo

syt123450 / giojs Goto Github PK

View Code? Open in Web Editor NEW
1.7K 55.0 236.0 130.97 MB

๐ŸŒ A Declarative 3D Globe Data Visualization Library built with Three.js

Home Page: https://giojs.org

License: Apache License 2.0

JavaScript 99.96% HTML 0.04%
threejs globe datavisualization io 3d web javascript webgl

giojs's People

Contributors

alexisanzieu avatar botime avatar bouyuc avatar leonsaber avatar manymeeting avatar siriustom avatar syt123450 avatar zchholmes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

giojs's Issues

Establish Website

We need to establish a website to introduce the library to developer.

Customize Stats style

When Stats is enabled, the user should be able to customize its style, a possible solution is to give that element a unique id so that they can use CSS to adjust its styles.

Change null to undefined

In utils.js, around line 51 and 77.

        while ( current !== null ) {

            actualLeft += current.offsetLeft;
            current = current.offsetParent;

        }

current !== null should be change to current !== undefined, otherwise it gives an error.

Add document

We need to add several document for the project:

  • README
  • User_Guide
  • Develop_Guide
  • Country Support

Add examples

Add more examples for each api, so that developer can easily know how to use the library.

The examples should follow the example format defined in examples folder, and cover as much API as possible.

Missing countries

Hi!

When i tried to connect it with youtube stats, I had some issues with countrycode. I notice some missing countries from your singleton object :

I only found it for now but I will post update if there are more of them.

Thanks for the lib anyway !

Usage of library in Node

We need to explore how to use our library after download from npm, and how to combine it with Threejs.

Transform to latest Three.js version

Our code now is based on old Three.js version, we need to test which function is deprecated or not support by the latest three.js version, and changed our source code.

Add Support for Change Earth Surface Color

Add API in controller for users to set the earth surface color as they like.

Users may use hex color to set the color, the API may like setSurfaceColor(), and user can use it like:
setSurfaceColor("#54ce60")

Offset problem

The offset problem still exist if the div has several wrappers parent node between , it seems that can be solved by change the the calculate method of scrollTop.

Data Set for Demo

We need to create a big data set for demo to show get great visual experience.

Fix cross browser bugs

The library now can not work well in some browser, especially Safari, we may need to fix it.

Renaming suggestions

List of variables names, function names and parameter names to be renamed.
(new ideas come up now and then)

  • GIO.Controller -> GIO
  • GIO.Controller.addData -> GIO.bindData
  • mentionedCountryCodes -> activeCountryCodes
  • liveLoader -> loadScreen
  • (continued ... )

Add Color Globe Style

Now gio.js can only assign a specific for selected countries, Gio.js 2.0 will support assign specific color for all countries. The developers can assign color for countries like this:

controller.setCountryColor("US", 0xffffff);

Improve website performance

I noticed that the website is having a long latency on page loading (e.g. Document page), which is caused by some huge size images (e.g. A 1.5MB image just for 500 * 300 actual display size) and the arrangement of resource tags, etc.

In general, now that the demo is done, performance is the next step.

Cheers!

Utils.flattenCountryData() no need to sort and need to check for "undefined"

            var replica = JSON.parse( JSON.stringify( data ) );

            replica.sort( function ( a, b ) {

                return a[ valueKey ] - b[ valueKey ];

            } );

            var min = replica[ 0 ][ valueKey ];
            var max = replica[ replica.length - 1 ][ valueKey ];

In the code snippet above, sort() is used to get min/max, which lead to time complexity of O(N*log N). Instead, using a for loop for achieve the same goal for time of O(N):

            if (data === undefined || data.length === 0) 
                return;

            var min = data[0][ valueKey ];
            var max = data[0][ valueKey ];

            data.forEach(function(country) {
                if (country[ valueKey ] < min) 
                    min = country[ valueKey ];
                else if (country[ valueKey ] > max) 
                    max = country[ valueKey ];
            });

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.