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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class QuitOnEsc : MonoBehaviour | |
{ | |
void Start() | |
{ | |
} |
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
/* | |
Create Unity mesh data for a sphere, which can be used with a video (or still) texture from a 360-camera. | |
The mesh is created so that it will be visible when the viewer is inside, rather than outside, of the sphere, with Unity's default backface-culling mode. | |
Texture coordinates are based on latitude & longitude (ie an equirectangular map projection) which matches the images from the 360-cameras that we use. | |
*/ | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class LatLonSphere : MonoBehaviour |
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
/* | |
Visualize data from SEDAC's Gridded Population of the World data set - https://sedac.ciesin.columbia.edu/data/set/gpw-v4-population-count-rev11 | |
Parses the population counts and converts the data into a greyscale texture. | |
The data file must be in ASCII format, with its extension changed to ".txt" in order for Unity to recognize it as a TextAsset. | |
*/ | |
using System.Collections; | |
using System.Collections.Generic; | |
using System; | |
using UnityEngine; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class dynamicTexture : MonoBehaviour | |
{ | |
public int width=32; | |
public int height=32; | |
void Start() |
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
/* Example of reading earthquake data from the USGS data feed. | |
Starting point for visualization project. | |
This script requests GEOJson formatted data, then parses it and prints some of the information. | |
It requires the JSONObject class for Unity, which can be downloaded from https://github.com/mtschoen/JSONObject | |
*/ | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Networking; |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class LatLonSphere : MonoBehaviour | |
{ | |
public int latRes=20, lonRes=40; | |
void Start() | |
{ |
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
// Display the state of a few example Unity Input values | |
// This script should be attached to a text object. | |
// It uses the "Jump" and "Cancel" buttons to switch between very slow framerate & 60 fps, so that the behavior of GetButtonDown & GetButtonUp can be seen. | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class showInput : MonoBehaviour | |
{ |
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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class noiseland2 : MonoBehaviour { | |
public int numRows=10, numCols=10; | |
public float minX=-1, maxX=1, minY=-1, maxY=1; | |
public int tex_width=256; |
NewerOlder