Skip to content

redsift/t3-rs-geo

Repository files navigation

t3-rs-geo

Circle CI npm MIT

t3-rs-geo is a stylized, WebGL data driven globe.

Screenshot

t3-rs-geo

Example Usage

<script src="/t3-rs-geo.umd-es2015.min.js"></script>
<script>
    var globe = new t3_rs_geo.Globe(window.innerWidth, window.innerHeight, {tiles: t3_rs_geo.GRID_LQ});
    document.getElementById('elm').appendChild(globe.domElement);

    globe.ready.then(() => {
        (function tick() {
            globe.tick();
            requestAnimationFrame(tick);
        })();
    });
</script>

View the @redsift/t3-rs-geo 101 on Codepen

Custom colors, High Quality example on Codepen

Interactive, High Quality example on Codepen

History

This globe started out as a fork of Robert Scanlon's excellent encom-globe. It was converted to a standalone project as the API and direction of the component departed from the objectives of the original. Significant changes include an update to the current (Jan 2017) version of THREE.js, exposing mostly everything for customization, a rewrite as an ES6 module, use of mesh lines and SDF rendering among other changes.

Usage

...

Generating tiles

The globe requires vertex data to render the globe and the various land masses. The precompiled bundle includes a row resolution hex grid as part of the t3_rs_geo object. Higher quality JSON files are also provided and can be loaded on demand. The companion repository t3-rs-geo-tiles generates these tiles and can be used to tweak the grid and the mappings.

Works on

Chrome 56

TODO

  1. Merge scale indicator
  2. Add user data to hit testing
  3. Fog scaling
  4. Higher res con trails
  5. Noise in trail
  6. Normalise speed
  7. Path direction
  8. Programmatic panning and animated transitions
  9. Animate base color
  10. Make wiggle a scale function
  11. HDR function
  12. Align API
  13. Atmosphere shader
  14. Ocean shader
  15. Docs / examples

Attribution

This software is substantially based on encom-globe by Robert Scanlon, licensed under MIT.

The MIT License (MIT) Copyright (c) 2014 Robert Scanlon

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Stylized, WebGL data driven globe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published