A seamless terrain based on pseudo quadtree algorithm and DelaunatorJS (https://github.com/mapbox/delaunator) by Mapbox team. The simplex noise library by Jonas Wagner is just for demonstration purpose.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = [ | |
{ label: "Shandy Park", LngLat: [-0.039951, 51.520465], value: 18.78, color: 0x0074D9 }, | |
{ label: "Mile End Park", LngLat: [-0.034683, 51.521343], value: 38.77, color: 0x85144B }, | |
{ label: "Tower Hamlets Cemetery Park", LngLat: [-0.027022, 51.523187], value: 45.0, color: 0x39CCCC }, | |
{ label: "Meath Gardens", LngLat: [-0.043844, 51.527939], value: 51.55, color: 0xB10DC9 }, | |
{ label: "Tredegar Square", LngLat: [-0.032144, 51.527107], value: 16.01, color: 0x2ECC40 }, | |
{ label: "Carlton Square & Gardens", LngLat: [-0.044712, 51.523860], value: 60.84, color: 0xFFDC00 } | |
]; |
A donwshifted version of Polygon Shredder by Jaume Sanchez. https://github.com/spite/polygon-shredder
I have switched polygon boxes (There are 3 faces * 2 triangles * 3 vertices, so it's 18 vertices per each box) to simple THREE.Points() geometry with just one vertex.
Work in progress...
A simplified version of http://bl.ocks.org/pbogden/7487564 made by pbogden. You can assign every button 'click' event to different functions:
var data = [{label: "BUTTON.A", x: 100, y: 60, function: function(){ fnA(); } }, {label: "BUTTON.B", x: 100, y: 120, function: function(){ fnB(); } } ];
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author qiao / https://github.com/qiao | |
* @author mrdoob / http://mrdoob.com | |
* @author alteredq / http://alteredqualia.com/ | |
* @author WestLangley / http://github.com/WestLangley | |
*/ | |
THREE.OrbitControls = function ( object, domElement ) { | |
this.object = object; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sparkData64 = | |
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGvmlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgKE1hY2ludG9zaCkiIHhtcDpDcmVhdGVEYXRlPSIyMDE5LTA3LTA3VDE3OjU5OjI4KzAzOjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNy0wN1QxODowMDo1MSswMzowMCIgeG1wOk1ldGFkYX |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @author zz85 / https://github.com/zz85 | |
* @author mrdoob / http://mrdoob.com | |
* Running this will allow you to drag three.js objects around the screen. | |
* Modified for D3.JS / THREE.JS stack by | |
* @author vkuchinov / https://github.com/vkuchinov | |
* | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author qiao / https://github.com/qiao | |
* @author mrdoob / http://mrdoob.com | |
* @author alteredq / http://alteredqualia.com/ | |
* @author WestLangley / http://github.com/WestLangley | |
*/ | |
THREE.OrbitControls = function ( object, domElement ) { | |
this.object = object; |
NewerOlder