Unity3D Implementation for Chrome Experiment WebGL Globe
Try a Live Demo
Unity3D-Globe is a complete project in which you can use to add your own data and create your globe.
The default DataLoader
loads a JSON
file from Resources folder, the loader expect JSON
in the following format:
{
"AllData": [
{
"Year": "1990",
"Data": latitude, longitude, magnitude, latitude, longitude, magnitude, ...]
},
{
"Year": "2000",
"Data": latitude, longitude, magnitude, latitude, longitude, magnitude, ...]
}
]
}
You can change the structure of the JSON
file or even the data source as required and implement your own DataLoader
.
DataVisualizer
component attached to itDataVisualizer
needs a reference to the following elements:SeriesData
, the SeriesData
is just a class that has a name and float
array, the float
array represent the series data in the following order [latitude, longitude, magnitude, latitude, longitude, magnitude, ...]CreateMeshes
function from your DataVisualizer
and send it the series array that you have just createdActivateSeries
function on visualizer and send it the index of the series that you need to show.