diff --git a/index.php b/index.php index 38feeaa..74cf14d 100644 --- a/index.php +++ b/index.php @@ -1,3 +1,42 @@ + +* +**/ + +//127.0.0.1/Master/Alles/overdose/index.php?t=Beautiful Brutalism&d=brutalismus&s=200&smax=40&smin=2000&i=1 + +if(isset($_GET['d'])){ + $dir = $_GET['d']; +} else { + echo("Technische Schwierigkeiten :("); + exit(); +} +$title = isset($_GET['t'])? $_GET['t'] : "Overdose: /" . $dir ."/"; +$sourcelinks = isset($_GET['l'])? $_GET['l'] : []; +$initial_speed = isset($_GET['s'])? $_GET['s'] : 200; //in Milliseconds (less = faster) + +//Show playbutton and speedslider and allow mouse controls? + +$allowInterface = isset($_GET['noui']) ? false : true; + +//User interface options +$min_speed = isset($_GET['smin']) ? $_GET['smin'] : 2000; +$max_speed = isset($_GET['smax']) ? $_GET['smax'] : 40; //must be > 0 + +$steps = 10; + +//Some web servers don't offer glob_brace, if this is the case for you replace >> .{jpg,png,bmp}", GLOB_BRACE << with >> " << in the following line. +//This way you'll have to take care to have only image files in your directory. +$images = glob("$dir/*"); +//$images = glob("$dir/*.{jpg,JPG,jpeg,JPEG,png,PNG,bmp,BMP}", GLOB_BRACE); + +$js_images = json_encode($images); +?> +
@@ -9,15 +48,18 @@ } + + var shuffle = function (array) { + var currentIndex = array.length; + var temporaryValue, randomIndex; + // While there remain elements to shuffle... + while (0 !== currentIndex) { + // Pick a remaining element... + randomIndex = Math.floor(Math.random() * currentIndex); + currentIndex -= 1; + // And swap it with the current element. + temporaryValue = array[currentIndex]; + array[currentIndex] = array[randomIndex]; + array[randomIndex] = temporaryValue; + } + return array; + }; + window.onresize = function() { + var w = window.innerWidth; + var h = window.innerHeight; + resizeCanvas(w,h); + width = w; + height = h; + startbutton.position(width/2-startbutton.width/2,height/2-startbutton.height/2); - + + speedslider.position(20,height-30); + + }; + +