private async void SaveMap() { Texture2D tex = CubeMapper.CreateCubemapTex(lightCapture.CubeMapper.Map); byte[] texData = tex.EncodeToPNG(); var picturesLibrary = await global::Windows.Storage.StorageLibrary.GetLibraryAsync(global::Windows.Storage.KnownLibraryId.Pictures); // Fall back to the local app storage if the Pictures Library is not available var captureFolder = picturesLibrary.SaveFolder ?? global::Windows.Storage.ApplicationData.Current.LocalFolder; var file = await captureFolder.CreateFileAsync("EnvironmentMap.png", global::Windows.Storage.CreationCollisionOption.GenerateUniqueName); await global::Windows.Storage.FileIO.WriteBytesAsync(file, texData); }
public async Task <IActionResult> ResolveCube([FromBody] List <CubeModel> cubos) { var resultadosQueries = await _cubeService.ResolveCubes(cubos.Select(c => CubeMapper.Map(c)).ToList()); return(Ok(resultadosQueries)); }