Commit a9119deb authored by Valentin Buck's avatar Valentin Buck
Browse files

Fixed Maptiles, added rendering script

parent 3429709d
......@@ -165,6 +165,12 @@ export class RecordingService extends EventTarget{
private saveZipFrames(){
console.log(this.frameArray);
if(this.frameArray){
//Append save script
let encode_string = new TextEncoder().encode("ffmpeg -i %05d.png -r 30 -c:v libx264 -crf 18 -pix_fmt yuv420p video.mp4");
this.frameArray.push(TarBall.gen_header("create_mp4_video.sh", encode_string.length));
this.frameArray.push(encode_string);
this.frameArray.push(new ArrayBuffer(512 - (encode_string.length % 512)));
//Save blob
let b = new Blob(this.frameArray);
let a_elem = document.getElementById('downloadlink') as HTMLAnchorElement;
a_elem.setAttribute("download", "frames.tar");
......
......@@ -194,6 +194,9 @@ impl Source for MapTilesSource{
.flatten()
.map(|(x, y, zoom)| self.get_tile_as_color_vec(x,y,zoom))
).await?;
if arrays.is_empty(){
return Ok(None);
}
let ref_array: Vec<&[Color]>= arrays.iter().map(|(v,_)| v.as_slice()).collect();
let tiled =
sampling::SliceTiles::new(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment