예제 #1
0
        public bool UpdateVis(string newVisUrl = "")
        {
            try
            {
                if (VisObj != null)
                {
                    if (newVisUrl != "")
                    {
                        VisObj.visSpecsURL = newVisUrl;
                    }

                    VisObj.UpdateVisSpecsFromTextSpecs();

                    return(true);
                }
                return(false);
            }
            catch
            {
                return(false);
            }
        }
예제 #2
0
    IEnumerator PopulateVis(string uri, Vis vis)
    {
        using (UnityWebRequest getRequest = UnityWebRequest.Get(uri))
        {
            getRequest.SetRequestHeader("AUTHORIZATION", "Basic " + System.Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(credentials.text)));

            yield return(getRequest.SendWebRequest());

            string jsonText = getRequest.downloadHandler.text;
            var    settings = new JsonSerializerSettings
            {
                NullValueHandling     = NullValueHandling.Ignore,
                MissingMemberHandling = MissingMemberHandling.Ignore
            };
            List <MetricTimeSeries> series = JsonConvert.DeserializeObject <List <MetricTimeSeries> >(jsonText, settings);
            string processedJsonString     = ProcessTimeSeriesData(series);
            vis.UpdateVisSpecsFromTextSpecs(processedJsonString);
            visUpdates++;
            if (visUpdates == visObjects.Length)
            {
                GameObject.Find("DebugText").GetComponent <Text>().text = "";
            }
        }
    }
예제 #3
0
 public void OscReceivedHandler(OSCMessage message)
 {
     Debug.Log("T-SNE Processed");
     vis.UpdateVisSpecsFromTextSpecs();
 }