Personal portfolio website for Regina Carvalho. Built with Famous.js library.

slideshow.js 1.4KB

    'use strict'; /** * @ngdoc function * @name domainManagerApp.controller:AboutCtrl * @description * # AboutCtrl * Controller of the domainManagerApp */ angular.module('goApp.slideshow', ['ngFx', 'ngAnimate']) .controller('SlideshowController',['$scope', '$rootScope', '$famous', '$timeline', '$location', '$route', '$timeout', function ($scope, $rootScope, $famous, $timeline, $location, $route, $timeout) { $scope.data = {message: "Hello World"}; // FadeIn $timeout(function(){ $scope.showView = true; },100); $scope.fadeOut = function() { $scope.showView = false; $timeout(function(){ $location.path("/"); },500); } // Moving Cube var Transitionable = $famous['famous/transitions/Transitionable']; var Easing = $famous['famous/transitions/Easing']; $scope.t = new Transitionable(0); $scope.translation = $timeline([ [0, [500, 400, 100], Easing.inOutQuad], [0.25, [400, 200, 100], Easing.inOutQuad], [0.5, [300, 300, 100], Easing.inOutQuad], [0.75, [200, 500, 100], Easing.inOutQuad], [1, [100, 100, 100], Easing.inOutQuad], ]); $scope.startAnimations = function(){ $scope.t.delay((1000), function(){ // we will delay each animation based on index $scope.t.set(1, {duration: 3400}, function(){ // Animation Completion Callback }); }); } //$scope.startAnimations(); }]);