Ejemplo n.º 1
0
        public static void GenerateTextureFromData(int screenWidth, int screenHeight, HeatmapResult data, System.Action <Texture2D> onResult)
        {
            var texture = new Texture2D(screenWidth, screenHeight, TextureFormat.ARGB32, false);

            texture = HeatmapVisualizer.Create(texture, data.points, new Vector2(screenWidth, screenHeight));

            onResult(texture);
        }
Ejemplo n.º 2
0
                public void UpdateMap()
                {
                    if (this.texture == null)
                    {
                        this.texture = new Texture2D((int)this.size.x, (int)this.size.y, TextureFormat.ARGB32, false);
                    }

                    if (this.changed == false)
                    {
                        return;
                    }

                    this.texture = HeatmapVisualizer.Create(this.texture, this.GetPoints(), this.size);
                    this.changed = false;
                }