Created
October 9, 2015 11:24
-
-
Save tg8/4b4b2b5c853fbb41f7e1 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | |
<script type="text/javascript" src="https://raw.githubusercontent.com/gorhill/Javascript-Voronoi/master/rhill-voronoi-core.js"></script> | |
<!--script type="text/javascript" src="rhill-voronoi-core.js"></script--> | |
</head> | |
<body> | |
<script> | |
document.write( "Testing.." ); | |
var sites = | |
[ | |
{ id:"A", x:0 , y:1994781.61 } | |
,{ id:"B", x:2225857, y:34336 } | |
,{ id:"C", x:2575935, y:33225 } | |
,{ id:"D", x:5464269, y:0 } | |
] | |
; | |
var buffer = 360000; | |
var bbox = { xl:0 - buffer | |
, yt:0 - buffer | |
, xr:5464269 + buffer | |
, yb:1994781.61 + buffer | |
// , yb:2000000 + buffer | |
}; | |
var v = new Voronoi(); | |
var r = v.compute( sites, bbox ); | |
document.write( "<br/>If you see this message, script did all right. Hooray!" ); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment