hi there, ive tried google’ing for this for almost 4-5 days, but have lead nowhere (perhaps im searching wrong?!)
im trying to recreate an interface alike
http://www.fromtheroughmovie.com/#!/desk/dispatch/
i noticed the use of javascript throughout the site and positioning…
function positionElements() {
$("#start-fall").css({"top":"5%"});
$("#start-text").css({"left":width/2-280, "top":"42%"});
$("#start-go").css({"left":width/2-175, "top":"72%"});
$("#start-cast").css({"left":width/2-215, "top":"90%"});
}
function runPage() {
$("#start-fall, #start-text, #start-go, #start-cast").fadeIn(300, function() {
$("#start-text > a > h1").animate({"opacity":1, "margin-top":0}, 1000);
});
}
function runDiaporama() {
$(document).oneTime(500, "Movement", function() {
if(animatedVersion) {
runMovement(0);
}
else {
adjustBackground(0, false);
adjustBackground(1, false);
adjustBackground(2, false);
adjustBackground(3, false);
runStatic(0);
alert("Please update your browser to get the best experience on this site.");
}
});
}
function adjustBackground(index) {
var goTo = "top";
switch(index) {
case 1:
goTo = "top";
break;
case 2:
goTo = "right";
break;
case 3:
goTo = "bottom";
break;
case 4:
goTo = "left";
break;
}
var FullscreenrOptions = { width: 1920, height: 1080, bgID: '#start-image' + index, direction:goTo };
// This will activate the full screen background!
jQuery.fn.fullscreenr(FullscreenrOptions);
}
function runMovement(index) {
var animationTime = 6000;
adjustBackground(index+1, false);
switch(index) {
case 0:
$("#background-pictures > img").eq(index).animate({"opacity":"1", "top":"+=30"}, animationTime, "linear", function() {
afterMovement(index);
runMovement(1);
});
break;
case 1:
$("#background-pictures > img").eq(index).animate({"opacity":"1", "left":"+=30"}, animationTime, "linear", function() {
afterMovement(index);
runMovement(2);
});
break;
case 2:
$("#background-pictures > img").eq(index).animate({"opacity":"1", "top":"-=30"}, animationTime, "linear", function() {
afterMovement(index);
runMovement(3);
});
break;
case 3:
$("#background-pictures > img").eq(index).animate({"opacity":"1", "left":"-=30"}, animationTime, "linear", function() {
afterMovement(index);
runMovement(0);
});
break;
}
}
i can already see these are some of the functions leading to the page loading and the transitions on the page, the site also preloads the images, but i have no idea how it is following the mouse…
is there any tutorial or can anyone shed light on how to create this sort of interface? any help is much appreciated!! i’ve tried google, but perhaps someone can point me to the right direction
thanks so much!