Example #1
0
        public IRenderResult RenderBiomesTile(ChunkView view)
        {
            if (!view.HasBiomeData)
            {
                throw new ArgumentException("Chunk view must be loaded with biomes data.", nameof(view));
            }

            var pixels = view.GetBiomesArea().Select(biome => biomeConfig_[biome].Rgba32Color).ToArray();
            var image  = Image.LoadPixelData(pixels, 16, 16);

            return(new ImageSharpResult(image));
        }