All Projects → syt123450 → Giojs

syt123450 / Giojs

Licence: apache-2.0
🌏 A Declarative 3D Globe Data Visualization Library built with Three.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Giojs

React Globe.gl
React component for Globe Data Visualization using ThreeJS/WebGL
Stars: ✭ 139 (-90.9%)
Mutual labels:  webgl, threejs, globe, datavisualization
Earthjs
D3 Earth JS
Stars: ✭ 128 (-91.62%)
Mutual labels:  3d, webgl, threejs, globe
React Globe
Create beautiful and interactive React + ThreeJS globe visualizations with ease.
Stars: ✭ 167 (-89.07%)
Mutual labels:  io, webgl, threejs, globe
React Postprocessing
📬 postprocessing for react-three-fiber
Stars: ✭ 311 (-79.65%)
Mutual labels:  3d, webgl, threejs
React 3d Viewer
A 3D model viewer component based on react.js 一个基于react.js的组件化3d模型查看工具
Stars: ✭ 100 (-93.46%)
Mutual labels:  3d, webgl, threejs
Glas
WebGL in WebAssembly with AssemblyScript
Stars: ✭ 278 (-81.81%)
Mutual labels:  3d, webgl, threejs
3dio Js
JavaScript toolkit for interior apps
Stars: ✭ 255 (-83.31%)
Mutual labels:  3d, webgl, threejs
Three Forcegraph
Force-directed graph as a ThreeJS 3d object
Stars: ✭ 84 (-94.5%)
Mutual labels:  3d, webgl, threejs
Vue Gl
Vue.js components rendering 3D WebGL graphics reactively with three.js
Stars: ✭ 434 (-71.6%)
Mutual labels:  3d, webgl, threejs
Vimeo Depth Player
A WebVR volumetric video renderer that uses color-depth based videos hosted on Vimeo.
Stars: ✭ 65 (-95.75%)
Mutual labels:  3d, webgl, threejs
Itowns
A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
Stars: ✭ 517 (-66.16%)
Mutual labels:  3d, webgl, globe
Three Globe
WebGL Globe Data Visualization as a ThreeJS reusable 3D object
Stars: ✭ 270 (-82.33%)
Mutual labels:  webgl, threejs, globe
Enable3d
🕹️ Standalone 3D Framework / Physics for three.js (using ammo.js) / 3D extension for Phaser 3
Stars: ✭ 271 (-82.26%)
Mutual labels:  3d, webgl, threejs
Glmaps
Data visualization examples and tutorials from scratch. 数据可视化示例代码集与新手学习教程。
Stars: ✭ 288 (-81.15%)
Mutual labels:  3d, webgl, threejs
React Three Editable
👀 ✏️ Edit your react-three-fiber scene with a visual editor without giving up control over your code.
Stars: ✭ 261 (-82.92%)
Mutual labels:  3d, webgl, threejs
Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (-70.88%)
Mutual labels:  3d, webgl, threejs
Roygbiv
A 3D engine for the Web
Stars: ✭ 499 (-67.34%)
Mutual labels:  3d, webgl, threejs
Webworldwind
The NASA WorldWind Javascript SDK (WebWW) includes the library and examples for creating geo-browser web applications and for embedding a 3D globe in HTML5 web pages.
Stars: ✭ 628 (-58.9%)
Mutual labels:  3d, webgl, globe
Pathfinding Visualizer Threejs
A visualizer for pathfinding algorithms in 3D with maze generation, first-person view and device camera input.
Stars: ✭ 209 (-86.32%)
Mutual labels:  3d, webgl, threejs
Harp.gl
harp.gl - web map rendering engine
Stars: ✭ 828 (-45.81%)
Mutual labels:  3d, webgl, threejs

Gio logo

Gio.js

English | 中文

React Version: react-giojs

Wechat minigame: wechat usage

npm version license badge dependencies badge build coverage

Gio.js is an open source library for web 3D globe data visualization built with Three.js. What makes Gio.js different is that it is simple to use Gio.js to customize a 3D data visualization model in a declarative way, add your own data, and integrate it into your own modern web application.

Table of Content

Motivation

Gio.js is an open source library for web 3D globe data visualization built with Three.js. What makes Gio.js different is that it is simple to use Gio.js to customize a 3D data visualization model in a declarative way, add your own data, and integrate it into your own modern web application.

This library is inspired by the Arms Trade Visualization project developed by Michael Chang and presented during Google Ideas INFO 2012. See original post. With Gio.js, it is easy to reproduce this fantastic data visualization model, and integrate it into web application.

  • Simplicity -- Create a 3D global data visualization model with your own data in just four lines of javascript code
  • Customization -- Design your own globe style with easy to use APIs in Gio.js
  • Modernization -- Build a responsible, fully interactive, rich 3D frontend application using Gio.js

Getting Started

Installation

  • Option 1: <script> tag

Include Three.js dependency:

<script src="three.min.js"></script>

Include local Gio.js library

<script src="gio.min.js"></script>

or through CDN

<script src="https://threejs.org/build/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/gio.min.js"></script>
  • Option 2: npm
npm install giojs --save
  • Option 3: yarn
yarn add giojs

Usage

After including "three.min.js" and "gio.min.js" in your html, create a div to render the 3D Gio globe: (the usage of Gio.js is a little bit different in WeChat mini game, checkout this demo to know more about it)

<!DOCTYPE HTML>
<html>
<head>

  <!-- include three.min.js library-->
  <script src="three.min.js"></script>

  <!-- include gio.min.js library-->
  <script src="gio.min.js"></script>

</head>
<body>

  <!-- container to draw 3D Gio globe-->
  <div id="globalArea"></div>

</body>
</html>

To initialize and render the 3D Gio globe:

<script>

    // get the container to hold the IO globe
    var container = document.getElementById( "globalArea" );

    // create controller for the IO globe, input the container as the parameter
    var controller = new GIO.Controller( container );

    /**
    * use addData() API to add the the data to the controller
    * know more about data format, check out documentation about data: http://giojs.org/html/docs/dataIntro.html
    * we provide sample data for test, get sample data from: https://github.com/syt123450/giojs/blob/master/examples/data/sampleData.json
    */
    controller.addData( data );

    // call the init() API to show the IO globe in the browser
    controller.init();

</script>

If everything goes well, you shall see this. For more fancier usage of Gio.js, check out Gio.js API document

Click the codepen logo to try it in Codepen:   

Gio.js 2.0 Introduction

After Gio.js 1.0 released, developers propose many cool and constructive advise. Gio.js implements most of these features. Gio.js 2.0 comes with many big features such as:

Examples

Gio.js has many representative demos to show how to work with Gio.js, there are mainly three example resources:

  • Resource 1: Gio.js Playground

There is a Playground ( playground link ) for developers to play with Gio.js and export Gio.js parameter.

  • Resource 2: Github "examples" folder

Gio.js has many API demos, and these demos are gathered in examples folder. clone the Gio.js repo, try them in your own environment ~

  • Resource 3: Live demos on Codepen

Gio.js has a Codepen collection which contains many live demos about Gio.js, click the codepen logo and try to edit them!

API List

configure(json)

Configure the controller.

setInitCountry(ISOCode, default: 'CN')

Set the country initially selected.

lightenMentioned(boolean, default: 'false')

Makes the mentioned country brighter than those not mentioned in the input dataset.

disableUnmentioned(boolean, default: 'false')

Disables an unmentioned country and makes it unselectable.

showInOnly(boolean, default: 'false')

Displays only the line with data flowing into the selected country.

showOutOnly(boolean, default: 'false')

Displays only the line with data flowing out of the selected country.

addHalo(string)

Enables the halo around the earth. When enabling halo, the color of halo also can be specified.

removeHalo()

Disables the halo around the earth.

enableStats()

Displays stats on the upper-left corner of the scene.

disableStats()

Hides stats on the upper-left corner of the scene.

setTransparentBackground()

Make default background transparent.

setAutoRotation()

Make globe rotate automatically.

setStyle(string)

Sets the color scheme of the 3D globe by name.

setSurfaceColor(string, default: '#ffffff')

Sets the color of the surface the 3D globe.

setSelectedColor(string, default: '#ffffff')

Sets color of the country in selected state.

setExportColor(string, default: '#DD380C')

Sets the color of out line.

setImportColor(string, default: '#154492')

Sets the color of in line.

setHaloColor(string, default: '#ffffff')

Sets the color of the Halo.

setBackgroundColor(string, default: '#000000')

Sets the color of the background.

adjustOceanBrightness(float, default: 0.5)

Sets the brightness of the ocean.

adjustRelatedBrightness(float, default: 0.5)

Sets the brightness of the related country.

adjustMentionedBrightness(float, default: 0.5)

Sets the brightness of the mentioned country.

addData(json)

Loads data to the controller of Gio and overrides previous data synchronously.

clearData()

Clear data in the globe, and remove spline system and moving particle.

switchDataSet()

switch data set when a data group is added.

addDataAsync(url, callback)

Loads data to the controller of Gio and overrides previous data asynchronously.

liveLoad(url, callback, duration)

Loads data to the controller periodically.

closeLiveLoader()

Close live load function.

getScene()

Get the reference of three.js scene object.

getStatsObject()

Get the reference of Stats.js panel object.

onCountryPicked(callback)

Fired when selected country changes.

switchCountry(IsoCode)

Change currently selected country.

Documentation

  • For quick start, checkout Getting Started
  • To learn more about the Basic Elements
  • To see the full API document in Markdown format, checkout APIs
  • To contribute to Gio.js's code base, read Developer Guide
  • Checkout Gio's official website giojs.org for everything above and plus lots of live examples

Contributors

Thanks goes to these wonderful people (emoji key):


syt123450

💻 📖 💡 ⚠️

Botime

💻 📖 ⚠️ 🚇

Mutian Wang

💻 📦 🎨 👀

Chenhua Zhu

💻 🚇 🤔 👀

Qi(Nora)

💻 🎨 📖

bouyuc

📖

Xiaoran Lin

💻 🎨 💡 👀

Leon

💻 🎨 💡

Alexis

💻 🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

License

Apache-2.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].