From 477e536cccb39c4aaa63883712949d481178c66c Mon Sep 17 00:00:00 2001 From: Anton Lydike Date: Wed, 29 Apr 2020 18:54:14 +0200 Subject: [PATCH] improved slideshow rendering with downscaled images --- src/main.js | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/main.js b/src/main.js index 6765e76..3f6322e 100644 --- a/src/main.js +++ b/src/main.js @@ -26,33 +26,31 @@ function slide_template(slide_data) { `; } +const build_image_list = list => list.map(({name, text}) => ({text, url: `https://datenvorr.at/renders/lowres/${name}`, source: `https://datenvorr.at/renders/${name}`})); + function fullscreen(element) { element.requestFullscreen(); } -function close_fullscreen(element) { - element -} -init_slideshow([ +init_slideshow(build_image_list([ { - url: "https://datenvorr.at/renders/mandelbulb.png", + name: "mandelbulb2.png", text: "A 3d rendering of a mandelbulb with a power of 2" }, { - url: "https://datenvorr.at/renders/mbulb2.5.png", + name: "mandelbulb2.5.png", text: "A 3d rendering of a mandelbulb with a power of 2.5" }, { - url: "https://datenvorr.at/renders/mandelbulb-pow3.png", - text: "A Mandelbulb with power 3" + name: "mandelbulb3.png", + text: "A 3d rendering of a mandelbulb with a power of 3" }, { - url: "https://datenvorr.at/renders/mbulb12.png", - text: "A Mandelbulb with power 12" + name: "mandelbulb12.png", + text: "A 3d rendering of a mandelbulb with a power of 12" }, { - url: "https://datenvorr.at/renders/mandelbrot-fhd.png", - source: "https://datenvorr.at/renders/mandelbrot2.png", - text: "A mandelbrot set, downscaled." + name: "mandelbrot2.png", + text: "A mandelbrot set, 250 megapixel render" } -]); +]));