» » Cool photo wall display effect by easing plugin

 

Cool photo wall display effect by easing plugin

Author: bamboo06 on 2-04-2016, 14:42, views: 2328

3
This is a cool photo wall display of results, combined with a lot of photos fade, rotate, zoom, tilt and 3D effects, quick photo from the left to cut, do rotate the 3D effect, and finally lined up in the photo on the wall, in order to show users cool photo wall display effect.


HTML
In this paper we use examples to share cool photo wall effect that depend on jQuery and the easing plug-in, first loading the two files.
<script src="jquery.min.js"></script> 
<script src="jquery.easing.1.3.js"></script> 

Next, we need to show photo wall where to place the following code:
<div class="grid"></div> 
<div class="animate">Click to see effect</div> 


CSS
CSS defines the basic style photo wall, picture arrangement, and button styles.
.grid { 
    width: 600px; height: 300px; margin: 100px auto 50px auto; 
    perspective: 500px; /*For 3d*/ 
} 
.grid img {width: 60px; height: 60px; display: block; float: left;} 
 
.animate { 
    text-transform: uppercase; 
    background: rgb(0, 100, 0); color: white; 
    padding: 10px 20px; border-radius: 5px; 
    cursor: pointer;margin:10px auto;width:100px;text-align:center; 
} 
.animate:hover {background: rgb(0, 75, 0);} 


JS
First, we dynamically load 50 photos on page.
var images = "", count = 50; 
for(var i = 1; i <= count; i++) 
    images += '<img src="http://thecodeplayer.com/u/uifaces/'+i+'.jpg" />'; 
     
$(".grid").append(images); 

When the button is clicked, 50 pictures done with varying degrees of deformation scaling transformation fading because you want to punch the next photo wall, and when these actions completed, began to cut into the wall photo animation, called storm () function.
var d = 0; //delay
var ry, tz, s; //transform params

//animation time
$(".animate").on("click", function(){
	//fading out the thumbnails with style
	$("img").each(function(){
		d = Math.random()*1000; //1ms to 1000ms delay
		$(this).delay(d).animate({opacity: 0}, {
			step: function(n){
				s = 1-n; //scale - will animate from 0 to 1
				$(this).css("transform", "scale("+s+")");
			}, 
			duration: 1000, 
		})
	}).promise().done(function(){
		//after *promising* and *doing* the fadeout animation we will bring the images back
		storm();
	})
})

Custom functions storm () will be completed each photo and Z-axis rotation angle displacement movement, such that a combination of CSS3 3D effects, and then call the easing achieve the cushioning effect, so that the whole picture is very smooth walls cut, see the code:
function storm(){ 
    $("img").each(function(){ 
        d = Math.random()*1000; 
        $(this).delay(d).animate({opacity: 1}, { 
            step: function(n){ 
                //rotating the images on the Y axis from 360deg to 0deg 
                ry = (1-n)*360; 
                //translating the images from 1000px to 0px 
                tz = (1-n)*1000; 
                //applying the transformation 
                $(this).css("transform", "rotateY("+ry+"deg) translateZ("+tz+"px)"); 
            },  
            duration: 3000,  
            easing: 'easeOutQuint' 
        }) 
    }) 
} 

Category: Javascript / Plugins

Dear visitor, you are browsing our website as Guest.
We strongly recommend you to register and login to view hidden contents.
<
  • 0 Comments
  • 0 Articles
7 September 2017 23:18

Munaaf

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
Seriously why arent there any ninja essays here at all? I would expect something ike that here and not seeing that is very dissapointing to say the least, but oh well i guess that decision is upto you guys!

<
  • 0 Comments
  • 0 Articles
14 September 2017 10:37

ali

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
On that website page, you'll see your description, why not read through this. save my marriage

Interestingly you write, I will address you'll find exciting and interesting things on similar topics. Married Men

On my website you'll see similar texts, write what you think. 21 Questions

<
  • 0 Comments
  • 0 Articles
19 September 2017 03:50

Emily

Reply
  • Group: Guests
  • РRegistered date: --
  • Status:
 
MindNode is not working in my MAC OS X and I don’t get the error that it shows constantly. I think that while doing best virtual reality headset I get this error more. I think we should try to fix it ASAP.

Information
Comment on the news site is possible only within (days) days from the date of publication.